-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
mediatek: fix DTS defining mt7530 switch phys but not referencing them #15141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mediatek: fix DTS defining mt7530 switch phys but not referencing them #15141
Conversation
I don't think this is the case. Read Andrew's comment: Arınç:
Andrew:
https://patchwork.kernel.org/comment/25318259/ Edit: I will compile an OpenWrt snapshot to get to the bottom of this. |
|
With my patch, the switch MDIO bus won't be assigned to ds->user_mii_bus when the switch MDIO bus is defined on the device tree anymore. This was not the case with the downstream patch. When ds->user_mii_bus is populated, DSA will 1:1 map the port with PHY. Meaning port with address 1 will be mapped to PHY with address 1. Because that ds->user_mii_bus is not populated when the switch MDIO bus is defined on the device tree, on every port node, the PHY address must be supplied by the phy-handle property. Daniel, you can add above to your patch log here. |
The upstream solution to define the MDIO bus in DT is a bit more strict than our previous downstream solution doing the same thing and now requires switch PHYs to be referenced in DT as well. Arınç Ünal told us in openwrt#15141: "With [the now upstream patch written by him which we backported], the switch MDIO bus won't be assigned to ds->user_mii_bus when the switch MDIO bus is defined on the device tree anymore. This was not the case with the downstream patch. When ds->user_mii_bus is populated, DSA will 1:1 map the port with PHY. Meaning port with address 1 will be mapped to PHY with address 1. Because that ds->user_mii_bus is not populated when the switch MDIO bus is defined on the device tree, on every port node, the PHY address must be supplied by the phy-handle property." Add those phy-handles to affected devices' DT. Fixes: 4354b34 ("generic: 6.6: sync mt7530 DSA driver with upstream") Fixes: 401a6cc ("generic: 6.1: sync mt7530 DSA driver with upstream") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7ff21c8 to
4f14e8d
Compare
|
Working perfect. Tested on Asus TUF-AX4200. A big thanks as always. |
The upstream solution to define the MDIO bus in DT is a bit more strict than our previous downstream solution doing the same thing and now requires switch PHYs to be referenced in DT as well. Arınç Ünal told us in openwrt#15141: "With [the now upstream patch written by him which we backported], the switch MDIO bus won't be assigned to ds->user_mii_bus when the switch MDIO bus is defined on the device tree anymore. This was not the case with the downstream patch. When ds->user_mii_bus is populated, DSA will 1:1 map the port with PHY. Meaning port with address 1 will be mapped to PHY with address 1. Because that ds->user_mii_bus is not populated when the switch MDIO bus is defined on the device tree, on every port node, the PHY address must be supplied by the phy-handle property." Add those phy-handles to affected devices' DT. Fixes: 4354b34 ("generic: 6.6: sync mt7530 DSA driver with upstream") Fixes: 401a6cc ("generic: 6.1: sync mt7530 DSA driver with upstream") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4f14e8d to
eb13076
Compare
The upstream solution to define the MDIO bus in DT is a bit more strict than our previous downstream solution doing the same thing and now requires switch PHYs to be referenced in DT as well. Arınç Ünal told us in openwrt#15141: "With [the now upstream patch written by him which we backported], the switch MDIO bus won't be assigned to ds->user_mii_bus when the switch MDIO bus is defined on the device tree anymore. This was not the case with the downstream patch. When ds->user_mii_bus is populated, DSA will 1:1 map the port with PHY. Meaning port with address 1 will be mapped to PHY with address 1. Because that ds->user_mii_bus is not populated when the switch MDIO bus is defined on the device tree, on every port node, the PHY address must be supplied by the phy-handle property." Add those phy-handles to affected devices' DT. Fixes: 4354b34 ("generic: 6.6: sync mt7530 DSA driver with upstream") Fixes: 401a6cc ("generic: 6.1: sync mt7530 DSA driver with upstream") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
mediatek: fix DTS defining mt7530 switch phys but not referencing them
The upstream solution to define the MDIO bus in DT is a bit more strict than our previous downstream solution doing the same thing and now requires switch PHYs to be referenced in DT as well.
Arınç Ünal told us in #15141:
"With [the now upstream patch written by him which we backported], the switch MDIO bus won't be assigned to ds->user_mii_bus when the switch MDIO bus is defined on the device tree anymore. This was not the case with the downstream patch.
When ds->user_mii_bus is populated, DSA will 1:1 map the port with PHY. Meaning port with address 1 will be mapped to PHY with address 1.
Because that ds->user_mii_bus is not populated when the switch MDIO bus is defined on the device tree, on every port node, the PHY address must be supplied by the phy-handle property."
Add those phy-handles to affected devices' DT.
Fixes: 4354b34 ("generic: 6.6: sync mt7530 DSA driver with upstream")
Fixes: 401a6cc ("generic: 6.1: sync mt7530 DSA driver with upstream")
Signed-off-by: Daniel Golle daniel@makrotopia.org