]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: dsa: remove redundant integrated phy attribute
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Mon, 30 Mar 2026 16:13:02 +0000 (18:13 +0200)
committerRobert Marko <robimarko@gmail.com>
Tue, 31 Mar 2026 10:56:24 +0000 (12:56 +0200)
commitf1f0572d1fda32426cad6f520622568b1de56b2a
tree653b68366862bfdf973593211ab800334fd56f69
parent78ffee0ed26c0889fe1fcbad892a7e4e3de5745c
realtek: dsa: remove redundant integrated phy attribute

The dsa driver currently has different attributes to denote what
hardware is around a port:

- phy_is_integrated: true if phy is not driven by a serdes
- phy: the type of the attached phy (e.g. 0=NONE, 2=RTL8218B, ....)
- pcs: link to a serdes pcs instance

This is somehow redundant and especially the phy type should be only
part of the phy driver and is not needed by the dsa driver at all.
Remove the redundancy by simply keeping a boolean attribute "phy" that
flags a phy driven port and can be used similar to the pcs (pointer)
attribute. With that the driver can check phy/pcs as follows:

- if (ports[i].pcs) -> port has a dedicated serdes
- if (ports[i].phy) -> port has a dedicated phy

That implemented, the "phy-is-integrated" attribute of a phy can be
removed from the dts. This will be a separate commit. As a side effect
the following (annoying) boot message for kernel 6.18 gets fixed.

OF: /switchcore@1b000000/mdio-controller/mdio-bus@0/ethernet-phy@24:
Read of boolean property 'sfp' with a value.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22698
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/common.c
target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/dsa.c
target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/rtl838x.h
target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/rtl931x.c