qualcommax: fix wrong PHY node definition for Buffalo WXR-5950AX12
authorChristian Marangi <ansuelsmth@gmail.com>
Sun, 11 Feb 2024 14:58:21 +0000 (15:58 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Sun, 11 Feb 2024 15:08:05 +0000 (16:08 +0100)
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 <ansuelsmth@gmail.com>
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts

index aefa9e3b9b6ec8ae68519cec3ae0cbfa13aeda9d..cc6eafe532c79a2dcaf1cad213c3ffdbaf6049ed 100644 (file)
                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 = <ESS_PORT6>;
+       switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>;
+       switch_wan_bmp = <ESS_PORT5>;
        malibu_first_phy_addr = <0x18>;
        switch_mac_mode = <MAC_MODE_QSGMII>;
        switch_mac_mode1 = <MAC_MODE_USXGMII>;
        switch_mac_mode2 = <MAC_MODE_USXGMII>;
 
        qcom,port_phyinfo {
-               port@1 {
-                       port_id = <1>;
-                       phy_address = <0x18>;
-               };
-
                port@2 {
                        port_id = <2>;
                        phy_address = <0x19>;
 
 &dp2 {
        status = "okay";
-       phy-handle = <&qca8075_2>;
+       phy-handle = <&qca8075_1>;
        label = "lan4";
        nvmem-cells = <&macaddr_appsblenv_ethaddr>;
        nvmem-cell-names = "mac-address";
 
 &dp3 {
        status = "okay";
-       phy-handle = <&qca8075_3>;
+       phy-handle = <&qca8075_2>;
        label = "lan3";
        nvmem-cells = <&macaddr_appsblenv_ethaddr>;
        nvmem-cell-names = "mac-address";
 
 &dp4 {
        status = "okay";
-       phy-handle = <&qca8075_4>;
+       phy-handle = <&qca8075_3>;
        label = "lan2";
        nvmem-cells = <&macaddr_appsblenv_ethaddr>;
        nvmem-cell-names = "mac-address";