openwrt/target/linux/realtek
Markus Stockhausen 93881ec190 realtek: 6.6: MDIO post fixes
Merging of the realtek 6.6 series forgot to include some final fixes
for the new MDIO driver. What was changed in last second?

1. The MDIO driver used wrong constants to make use of the raw
page (for direct register access). Provide a rawpage variable in
the bus private structure, populate it during initialization and
make use of it at the proper places

2. We always used the variable portaddr for the bus index. Usually
our driver uses either addr or port for the same meaning. Remove the
duplication and reuse the normal addr variable.

3. Drop functions rtmdio_write_page() and rtmdio_read_page(). These
only call the PHY driver read/write page functions. We know that
these will only access page 0x1f. As we have only Realtek PHYs
and our driver only reacts to this special page, just hardcode it.
Benefit is that we can use these functions for PHY detection when
read/write page functions are not yet assigned.

4. Add two new helper functions phy_port_read_paged() and
phy_port_write_paged(). These allow to access arbitrary ports on
the MDIO bus when the packages are not initialized. These will be
needed for proper RTL8218B and RTL8214FC detection in forthcoming
patches.

5. The port tracking wrongly used index 0 to mark "normal" access.
This does not allow to make a "special" access to port 0. Use
index -1 to mark "normal" access.

Provide the fix for 5.15 and 6.6 to allow for easy version
comparison.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/16391
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-16 10:33:28 +02:00
..
base-files realtek: add fan controller support to D-Link DGS-1210-28MP 2024-09-15 16:40:54 +02:00
dts realtek: add fan controller support to D-Link DGS-1210-28MP 2024-09-15 16:40:54 +02:00
files/firmware/rtl838x_phy
files-5.15 realtek: 6.6: MDIO post fixes 2024-09-16 10:33:28 +02:00
files-6.6 realtek: 6.6: MDIO post fixes 2024-09-16 10:33:28 +02:00
image realtek: add fan controller support to D-Link DGS-1210-28MP 2024-09-15 16:40:54 +02:00
patches-5.15 realtek: rework hardware-assisted indirect mdio access 2024-09-14 19:58:21 +02:00
patches-6.6 realtek: 6.6: harden fw_init_cmdline() 2024-09-14 20:08:57 +02:00
profiles target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
rtl838x realtek: 6.6: copy files and config from 5.15 2024-09-14 19:58:54 +02:00
rtl839x realtek: 6.6: copy files and config from 5.15 2024-09-14 19:58:54 +02:00
rtl930x realtek: 6.6: copy files and config from 5.15 2024-09-14 19:58:54 +02:00
rtl931x realtek: 6.6: fix rtl931x kernel config 2024-09-14 19:58:54 +02:00
Makefile realtek: 6.6: enable testing kernel 2024-09-14 20:21:44 +02:00