From: Christian Marangi Date: Sun, 11 Feb 2024 14:58:21 +0000 (+0100) Subject: qualcommax: fix wrong PHY node definition for Buffalo WXR-5950AX12 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0222e48d7374127c51c8113a29ec3a98274d519b;p=openwrt%2Fstaging%2Fnbd.git qualcommax: fix wrong PHY node definition for Buffalo WXR-5950AX12 Commit d737ae99cb36 ("qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTS") reverted the switch bmp to the original OEM definition and added the malibu_first_phy_addr property. Problem is that OEM bmp definition is wrong and actually doesn't make sense, probably caused by copy-paste of the QCOM reference DTS without actually setting real values. What actually fixed the regression was adding the malibu_first_phy_addr as without it the MALIBU PHY was actually not correctly configured and the Aquantia PHY were actually configured as MALIBU PHY. Fix all these wrong PHY definition. The BPM is reverted and the following fixes are applied: - Drop ESS_PORT1 as it's not actually attached in HW. - Move ESS_PORT5 AGAIN from lan to wan. This refer to the first Aquantia PHY that is labelled "wan" - Move ESS_PORT6 AGAIN from wan to lan. This refer to the second Aquantia PHY that is labelled "lan1". Also PHY tag in MDIO node are renumbered to start from 0 following the tagging standard used also in other dts and the not attached one (reg 0x18 and reg 0x1c) are correctly dropped. Definition for port@1 in phyinfo is dropped as it doesn't exist. dp nodes are updated to reference the new PHY tag numbering. Fixes: d737ae99cb36 ("qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTS") Signed-off-by: Christian Marangi --- diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts index aefa9e3b9b..cc6eafe532 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts @@ -230,48 +230,33 @@ reg = <0x8>; }; - qca8075_1: ethernet-phy@18 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <0x18>; - }; - - qca8075_2: ethernet-phy@19 { + qca8075_1: ethernet-phy@19 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x19>; }; - qca8075_3: ethernet-phy@1a { + qca8075_2: ethernet-phy@1a { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x1a>; }; - qca8075_4: ethernet-phy@1b { + qca8075_3: ethernet-phy@1b { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x1b>; }; - - qca8075_5: ethernet-phy@1c { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <0x1c>; - }; }; &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; - switch_wan_bmp = ; + switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; + switch_wan_bmp = ; malibu_first_phy_addr = <0x18>; switch_mac_mode = ; switch_mac_mode1 = ; switch_mac_mode2 = ; qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0x18>; - }; - port@2 { port_id = <2>; phy_address = <0x19>; @@ -307,7 +292,7 @@ &dp2 { status = "okay"; - phy-handle = <&qca8075_2>; + phy-handle = <&qca8075_1>; label = "lan4"; nvmem-cells = <&macaddr_appsblenv_ethaddr>; nvmem-cell-names = "mac-address"; @@ -315,7 +300,7 @@ &dp3 { status = "okay"; - phy-handle = <&qca8075_3>; + phy-handle = <&qca8075_2>; label = "lan3"; nvmem-cells = <&macaddr_appsblenv_ethaddr>; nvmem-cell-names = "mac-address"; @@ -323,7 +308,7 @@ &dp4 { status = "okay"; - phy-handle = <&qca8075_4>; + phy-handle = <&qca8075_3>; label = "lan2"; nvmem-cells = <&macaddr_appsblenv_ethaddr>; nvmem-cell-names = "mac-address";