realtek: convert access to RTL931x "digital 2" serdes pages
authorMarkus Stockhausen <[email protected]>
Tue, 26 Aug 2025 14:07:58 +0000 (10:07 -0400)
committerHauke Mehrtens <[email protected]>
Mon, 1 Sep 2025 22:51:43 +0000 (00:51 +0200)
commit207ab9c36af5f784cdc1562c88220472e95df878
treeb4e60861dbb7dc0c44bb7375de1fb03011580d9e
parent6802cd7f151f9bb6e59ed060c481e88323e58d27
realtek: convert access to RTL931x "digital 2" 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 third step make use of these new functions whenever we want to
access the "digital 2" pages. The pages are mapped starting at 0x200.
So the function conversion is as simple as this:

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

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

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