ipq807x: fix multiple error on ESS switch port define
authorChristian Marangi <ansuelsmth@gmail.com>
Tue, 14 Nov 2023 21:35:31 +0000 (22:35 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 15 Nov 2023 10:02:30 +0000 (11:02 +0100)
Fix multiple error on ESS switch port define.
- Fix wrong switch CPU and WAN bmp define. (many times wan port are
  actually set in lan mask and lan port in wan mask)
- Renumber phyinfo port, use port_id instead of phy_address as it
  doesn't make sense using that for port enumeration
- Drop additional port for devices that have them not connected.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
15 files changed:
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts

index 6dbd0e95f513aa61c49c678523c550d3efb6990a..622b8662fa9b66441eaf5c5628bc55ca2d40e38d 100644 (file)
 &switch {
        status = "okay";
 
-       switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
-       switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
+       switch_lan_bmp = <ESS_PORT5>; /* lan port bitmap */
        switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
 
        qcom,port_phyinfo {
-               port@0 {
-                       port_id = <1>;
-                       phy_address = <0>;
-               };
-               port@1 {
-                       port_id = <2>;
-                       phy_address = <1>;
-               };
-               port@2 {
-                       port_id = <3>;
-                       phy_address = <2>;
-               };
-               port@3 {
-                       port_id = <4>;
-                       phy_address = <3>;
-               };
-               port@4 {
+               port@5 {
                        port_id = <5>;
                        phy_address = <4>;
                };
index 0494fff0e36af0dbc80ecf7cff8a38153baf1798..23b9121d5fc1dc09d7a2aa71ae454c743a86dc39 100644 (file)
 &switch {
        status = "okay";
 
-       switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
-       switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
+       switch_lan_bmp = <(ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
+       switch_wan_bmp = <ESS_PORT2>; /* wan port bitmap */
        switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
 
        qcom,port_phyinfo {
-               port@1 {
+               port@2 {
                        port_id = <2>;
                        phy_address = <1>;
                };
-               port@2 {
+               port@3 {
                        port_id = <3>;
                        phy_address = <2>;
                };
-               port@3 {
+               port@4 {
                        port_id = <4>;
                        phy_address = <3>;
                };
-               port@4 {
+               port@5 {
                        port_id = <5>;
                        phy_address = <4>;
                };
index d76c9a12eb602fb0bbde6b1e38ee6e3548c95144..7067f9296879cae1ad98ec58052c0ca4a9bff55c 100644 (file)
 &switch {
        status = "okay";
 
-       switch_lan_bmp = <ESS_PORT5>; /* lan port bitmap */
-       switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
+       switch_lan_bmp = <ESS_PORT6>; /* lan port bitmap */
+       switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
        switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance1*/
        switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance2*/
 
        qcom,port_phyinfo {
-               port@4 {
+               port@5 {
                        port_id = <5>;
                        phy_address = <24>;
                        port_mac_sel = "QGMAC_PORT";
                };
-               port@5 {
+               port@6 {
                        port_id = <6>;
                        phy_address = <28>;
                        port_mac_sel = "QGMAC_PORT";
index 683cf775b3e18495aa19d8d98a206887e5ca8232..a7d398ee0f10d16ab9684ac632dbcaaf9722e756 100644 (file)
 &switch {
        status = "okay";
 
-       switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
-       switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
+       switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; /* lan port bitmap */
+       switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
        malibu_first_phy_addr = <16>; /* PHY addr of the first malibu PHY */
        switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
        switch_mac_mode1 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance1*/
index 81affdc3d0d4e10617e6d1c36b8370206acdd30d..73bc13cf3206319dd7dba2fa6009c6ce047ce287 100644 (file)
 &switch {
        status = "okay";
 
-       switch_lan_bmp = <ESS_PORT5>; /* lan port bitmap */
-       switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
+       switch_lan_bmp = <ESS_PORT6>; /* lan port bitmap */
+       switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
        switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance1*/
        switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance2*/
 
        qcom,port_phyinfo {
-               port@4 {
+               port@5 {
                        port_id = <5>;
                        phy_address = <24>;
                        port_mac_sel = "QGMAC_PORT";
                };
-               port@5 {
+               port@6 {
                        port_id = <6>;
                        phy_address = <28>;
                        port_mac_sel = "QGMAC_PORT";
index 9e97e4e066baff02419790b24bc94d3a5866bc6b..fbf5b41d85f3ca7b382d0ef8a3b2e2907261b79b 100644 (file)
        switch_mac_mode1 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance1*/
 
        qcom,port_phyinfo {
-               port@0 {
+               port@1 {
                        port_id = <1>;
                        phy_address = <0>;
                };
-               port@1 {
+               port@2 {
                        port_id = <2>;
                        phy_address = <1>;
                };
-               port@2 {
+               port@3 {
                        port_id = <3>;
                        phy_address = <2>;
                };
-               port@3 {
+               port@4 {
                        port_id = <4>;
                        phy_address = <3>;
                };
-               port@4 {
+               port@5 {
                        port_id = <5>;
                        phy_address = <24>;
                        port_mac_sel = "QGMAC_PORT";
index e2971103c847fb33934a815f478534d2794d1239..a4548a77831764851498b31e8eea0ae5645ddc81 100644 (file)
        switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
 
        qcom,port_phyinfo {
-               port@0 {
+               port@1 {
                        port_id = <1>;
                        phy_address = <0>;
                };
-               port@1 {
+               port@2 {
                        port_id = <2>;
                        phy_address = <1>;
                };
-               port@2 {
+               port@3 {
                        port_id = <3>;
                        phy_address = <2>;
                };
-               port@3 {
+               port@4 {
                        port_id = <4>;
                        phy_address = <3>;
                };
-               port@5 {
+               port@6 {
                        port_id = <6>;
                        phy_address = <28>;
                        port_mac_sel = "QGMAC_PORT";
index ba22d16c0a6ce1ebead4717b0cdb1d2d637bae30..34499641596b5a26b8caf57d1fda31047adb0618 100644 (file)
        switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/
 
        qcom,port_phyinfo {
-               port@0 {
+               port@1 {
                        port_id = <1>;
                        phy_address = <0>;
                };
-               port@1 {
+               port@2 {
                        port_id = <2>;
                        phy_address = <1>;
                };
-               port@2 {
+               port@3 {
                        port_id = <3>;
                        phy_address = <2>;
                };
-               port@3 {
+               port@4 {
                        port_id = <4>;
                        phy_address = <3>;
                };
-               port@4 {
+               port@6 {
                        port_id = <6>;
                        phy_address = <8>;
                        compatible = "ethernet-phy-ieee802.3-c45";
index 9da475c5e70e150077fe4eb41b4095b1957157ef..33a618851c7b439610b35db6ec8f8cc6820f8a19 100644 (file)
 &switch {
        status = "okay";
 
-       switch_wan_bmp = <ESS_PORT6>;
+       switch_lan_bmp = <ESS_PORT6>;
        switch_mac_mode = <MAC_MODE_PSGMII>;
        switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>;
 
        qcom,port_phyinfo {
-               port@5 {
+               port@6 {
                        port_id = <6>;
                        phy_address = <28>;
                        port_mac_sel = "QGMAC_PORT";
index c4cc8c0b97a09a9c1d3bb95c2ac063b3118110fa..74dae6cbf3d593419a180487fee21f3c1223430b 100644 (file)
 &switch {
        status = "okay";
 
-       switch_wan_bmp = <ESS_PORT6>;
+       switch_lan_bmp = <ESS_PORT6>;
        switch_mac_mode = <MAC_MODE_PSGMII>;
        switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>;
 
        qcom,port_phyinfo {
-               port@5 {
+               port@6 {
                        port_id = <6>;
                        phy_address = <28>;
                        port_mac_sel = "QGMAC_PORT";
index b9a882f1dbaa953daca694d27e71d4979253e250..a450fbca25ca5e36b4adc5305ba73319d89c7ce7 100644 (file)
                        port_id = <4>;
                        phy_address = <3>;
                };
-               port@5 {
+               port@6 {
                        port_id = <6>;
                        phy_address = <28>;
                        port_mac_sel = "QGMAC_PORT";
index 0931c8ca326cd055d62c55fec5e6fd08a4b3c4c9..5fb8f3b4de4f850a56fc59af51ea415e429ffe68 100644 (file)
 &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_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>;
+       switch_wan_bmp = <ESS_PORT5>;
        switch_mac_mode = <MAC_MODE_PSGMII>;
        switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>;
        switch_mac_mode2 = <MAC_MODE_USXGMII>;
 
        qcom,port_phyinfo {
-               port@0 {
+               port@1 {
                        port_id = <1>;
                        phy_address = <0>;
                };
 
-               port@1 {
+               port@2 {
                        port_id = <2>;
                        phy_address = <1>;
                };
 
-               port@2 {
+               port@3 {
                        port_id = <3>;
                        phy_address = <2>;
                };
 
-               port@3 {
+               port@4 {
                        port_id = <4>;
                        phy_address = <3>;
                };
 
-               port@4 {
+               port@5 {
                        port_id = <5>;
                        phy_address = <28>;
                        port_mac_sel = "QGMAC_PORT";
                };
 
-               port@5 {
+               port@6 {
                        port_id = <6>;
                        ethernet-phy-ieee802.3-c45;
                        phy_address = <8>;
index 501b53982cb5a2658ccf24e28b7667328d9d3bfe..0a5bbb4c35d94321c655f9bed709aabe956f82e9 100644 (file)
 &switch {
        status = "okay";
 
-       switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
-       switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
+       switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; /* lan port bitmap */
+       switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
        switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
        switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/
 
index af06fac3a46c344138010184af790681aa410ed2..9999f112af9d0e0cbc48702d574c4e243f75615a 100644 (file)
 &switch {
        status = "okay";
 
-       switch_lan_bmp = <ESS_PORT4>;
-       switch_wan_bmp = <ESS_PORT6>;
+       switch_lan_bmp = <ESS_PORT4 | ESS_PORT6>;
        switch_mac_mode = <MAC_MODE_PSGMII>;
        switch_mac_mode2 = <MAC_MODE_USXGMII>;
 
        qcom,port_phyinfo {
-               port@3 {
+               port@4 {
                        port_id = <4>;
                        phy_address = <3>;
                };
 
-               port@5 {
+               port@6 {
                        port_id = <6>;
                        phy_address = <28>;
                        port_mac_sel = "QGMAC_PORT";
index 88ae3831173f8d8212b2ddad3d0eaaa254020e12..18386c766c3620d61a01135868d08c17d97abad1 100644 (file)
 &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_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>;
+       switch_wan_bmp = <ESS_PORT5>;
        switch_mac_mode = <MAC_MODE_QSGMII>;
        switch_mac_mode1 = <MAC_MODE_USXGMII>;
        switch_mac_mode2 = <MAC_MODE_USXGMII>;
 
        qcom,port_phyinfo {
-               port@0 {
+               port@1 {
                        port_id = <1>;
                        phy_address = <0x18>;
                };
 
-               port@1 {
+               port@2 {
                        port_id = <2>;
                        phy_address = <0x19>;
                };
 
-               port@2 {
+               port@3 {
                        port_id = <3>;
                        phy_address = <0x1a>;
                };
 
-               port@3 {
+               port@4 {
                        port_id = <4>;
                        phy_address = <0x1b>;
                };
 
-               port@4 {
+               port@5 {
                        port_id = <5>;
                        ethernet-phy-ieee802.3-c45;
                        phy_address = <0x0>;
                };
 
-               port@5 {
+               port@6 {
                        port_id = <6>;
                        ethernet-phy-ieee802.3-c45;
                        phy_address = <0x8>;