From: Christian Marangi Date: Tue, 14 Nov 2023 21:35:31 +0000 (+0100) Subject: ipq807x: fix multiple error on ESS switch port define X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f3cd4bfb7f697bb885e976627ac2ecbb99e80c60;p=openwrt%2Fstaging%2Fthess.git ipq807x: fix multiple error on ESS switch port define 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 --- diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts index 6dbd0e95f5..622b8662fa 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8070-cax1800.dts @@ -271,28 +271,11 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = ; /* lan port bitmap */ switch_mac_mode = ; /* 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>; }; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi index 0494fff0e3..23b9121d5f 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-ax3600.dtsi @@ -235,24 +235,24 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = <(ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */ + switch_wan_bmp = ; /* wan port bitmap */ switch_mac_mode = ; /* 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>; }; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts index d76c9a12eb..7067f92968 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8071-eap102.dts @@ -343,18 +343,18 @@ &switch { status = "okay"; - switch_lan_bmp = ; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = ; /* lan port bitmap */ + switch_wan_bmp = ; /* wan port bitmap */ switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ switch_mac_mode2 = ; /* 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"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts index 683cf775b3..a7d398ee0f 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts @@ -321,8 +321,8 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; /* lan port bitmap */ + switch_wan_bmp = ; /* wan port bitmap */ malibu_first_phy_addr = <16>; /* PHY addr of the first malibu PHY */ switch_mac_mode = ; /* mac mode for uniphy instance0*/ switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts index 81affdc3d0..73bc13cf32 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts @@ -325,18 +325,18 @@ &switch { status = "okay"; - switch_lan_bmp = ; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = ; /* lan port bitmap */ + switch_wan_bmp = ; /* wan port bitmap */ switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ switch_mac_mode2 = ; /* 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"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts index 9e97e4e066..fbf5b41d85 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts @@ -388,23 +388,23 @@ switch_mac_mode1 = ; /* 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"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts index e2971103c8..a4548a7783 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-dl-wrx36.dts @@ -175,23 +175,23 @@ switch_mac_mode2 = ; /* 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"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts index ba22d16c0a..3449964159 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts @@ -193,23 +193,23 @@ switch_mac_mode2 = ; /* 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"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts index 9da475c5e7..33a618851c 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts @@ -89,12 +89,12 @@ &switch { status = "okay"; - switch_wan_bmp = ; + switch_lan_bmp = ; switch_mac_mode = ; switch_mac_mode2 = ; qcom,port_phyinfo { - port@5 { + port@6 { port_id = <6>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts index c4cc8c0b97..74dae6cbf3 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax620.dts @@ -117,12 +117,12 @@ &switch { status = "okay"; - switch_wan_bmp = ; + switch_lan_bmp = ; switch_mac_mode = ; switch_mac_mode2 = ; qcom,port_phyinfo { - port@5 { + port@6 { port_id = <6>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts index b9a882f1db..a450fbca25 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wpq873.dts @@ -407,7 +407,7 @@ port_id = <4>; phy_address = <3>; }; - port@5 { + port@6 { port_id = <6>; phy_address = <28>; port_mac_sel = "QGMAC_PORT"; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts index 0931c8ca32..5fb8f3b4de 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts @@ -298,40 +298,40 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; - switch_wan_bmp = ; + switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; + switch_wan_bmp = ; switch_mac_mode = ; switch_mac_mode1 = ; switch_mac_mode2 = ; 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>; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts index 501b53982c..0a5bbb4c35 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts @@ -195,8 +195,8 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ + switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; /* lan port bitmap */ + switch_wan_bmp = ; /* wan port bitmap */ switch_mac_mode = ; /* mac mode for uniphy instance0*/ switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts index af06fac3a4..9999f112af 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wax630.dts @@ -151,18 +151,17 @@ &switch { status = "okay"; - switch_lan_bmp = ; - switch_wan_bmp = ; + switch_lan_bmp = ; switch_mac_mode = ; switch_mac_mode2 = ; 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"; 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 88ae383117..18386c766c 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 @@ -267,40 +267,40 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; - switch_wan_bmp = ; + switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; + switch_wan_bmp = ; switch_mac_mode = ; switch_mac_mode1 = ; switch_mac_mode2 = ; 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>;