realtek: convert access to RTL931x "digital 1" serdes pages
authorMarkus Stockhausen <[email protected]>
Tue, 26 Aug 2025 11:30:55 +0000 (07:30 -0400)
committerHauke Mehrtens <[email protected]>
Mon, 1 Sep 2025 22:51:43 +0000 (00:51 +0200)
commit4063d904004b04f89be15cda1c6da93e971c88f2
treea0e5154a86c162d296c89fdf0c31a1001acc7fc9
parent8b2cff96fe2d34eb29fb163b7f04270b5c7ba3ee
realtek: convert access to RTL931x "digital 1" serdes pages

The RTL931x has 14 frontend and at least 26 backend serdes. Currently
the programming functions always need to determine the right backend
serdes from the given frontend serdes on their own. We plan to provide
a consistent serdes mapping to all callers.

As the second step make use of these new functions whenever we
want to access the digital 1 pages. The pages are mapped starting
at 0x100. So the function conversion is as simple as this:

Old:
dsds = (sds - 1) * 2;
rtmdio_931x_read_sds_phy(dsds, page, ...)

New:
rtmdio_931x_read_sds_phy_new(sds, page + 0x100, ...)

Signed-off-by: Markus Stockhausen <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/19873
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c