openwrt/target/linux/realtek
Markus Stockhausen a4cbb44c1b
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
realtek: convert access to RTL931x analog 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 follows

Frontend SerDes  |  0  1  2  3  4  5  6  7  8  9 10 11 12 13
-----------------+------------------------------------------
Backend SerDes 1 |  0  1  2  3  6  7 10 11 14 15 18 19 22 23
Backend SerDes 2 |  0  1  2  4  6  8 10 12 14 16 18 20 22 24
Backend SerDes 3 |  0  1  2  5  6  9 10 13 14 17 18 21 22 25

frontend page               "even" frontend SerDes     "odd" frontend SerDes
page 0x000-0x03f (analog):  page 0x000-0x03f back SDS  page 0x000-0x03f back SDS
page 0x100-0x13f (XSGMII1): page 0x000-0x03f back SDS  page 0x000-0x03f back SDS+1
page 0x200-0x23f (XSGMII2): page 0x000-0x03f back SDS  page 0x000-0x03f back SDS+2

As a first micro step provide some helpers that simply operate on
frontend serdes and will determine the backend serdes on their own.

So rtmdio_931x_read_sds_phy() and rtmdio_931x_write_sds_phy() operate
on backend serdes. While rtmdio_931x_read_sds_phy_**new**() and
rtmdio_931x_write_sds_phy_**new**() operate on frontend serdes.

This is only an intermediate naming convention and will be cleanup
afterwards.

In a first step make use of these new functions whenever we
want to access the analog page. As the pages stay unchanged
in the new functions conversion is as simple as this:

Old:
asds = rtl931x_get_analog_sds(...)
rtmdio_931x_read_sds_phy(asds, ...)

New:
rtmdio_931x_read_sds_phy_new(sds, ...)

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19818
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-08-25 13:44:43 +02:00
..
base-files realtek: add support for XikeStor SKS8310-8X 2025-08-23 19:22:53 +02:00
dts realtek: add support for XikeStor SKS8310-8X 2025-08-23 19:22:53 +02:00
files/firmware/rtl838x_phy
files-6.12 realtek: convert access to RTL931x analog serdes pages 2025-08-25 13:44:43 +02:00
image realtek: add support for XikeStor SKS8310-8X 2025-08-23 19:22:53 +02:00
patches-6.12 realtek: rtl8231-aux: add RTL931x support 2025-08-17 17:31:22 +02:00
profiles target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
rtl838x realtek: backport NAND driver for RTL93xx 2025-07-30 23:22:24 +02:00
rtl839x realtek: backport NAND driver for RTL93xx 2025-07-30 23:22:24 +02:00
rtl930x realtek: add NAND targets for RTL93xx 2025-08-10 11:46:52 +02:00
rtl930x_nand realtek: add NAND targets for RTL93xx 2025-08-10 11:46:52 +02:00
rtl931x realtek: add RTL8231 driver configuration to kernel build 2025-08-17 17:31:24 +02:00
rtl931x_nand realtek: add RTL8231 driver configuration to kernel build 2025-08-17 17:31:24 +02:00
Makefile realtek: add NAND targets for RTL93xx 2025-08-10 11:46:52 +02:00