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 <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2023-11-14 22:35:31 +01:00
parent 17feb04ad4
commit f3cd4bfb7f
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
15 changed files with 59 additions and 77 deletions

View File

@ -271,28 +271,11 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ switch_lan_bmp = <ESS_PORT5>; /* lan port bitmap */
switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/ switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
qcom,port_phyinfo { qcom,port_phyinfo {
port@0 { port@5 {
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_id = <5>; port_id = <5>;
phy_address = <4>; phy_address = <4>;
}; };

View File

@ -235,24 +235,24 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ switch_lan_bmp = <(ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */ switch_wan_bmp = <ESS_PORT2>; /* wan port bitmap */
switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/ switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
qcom,port_phyinfo { qcom,port_phyinfo {
port@1 { port@2 {
port_id = <2>; port_id = <2>;
phy_address = <1>; phy_address = <1>;
}; };
port@2 { port@3 {
port_id = <3>; port_id = <3>;
phy_address = <2>; phy_address = <2>;
}; };
port@3 { port@4 {
port_id = <4>; port_id = <4>;
phy_address = <3>; phy_address = <3>;
}; };
port@4 { port@5 {
port_id = <5>; port_id = <5>;
phy_address = <4>; phy_address = <4>;
}; };

View File

@ -343,18 +343,18 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_lan_bmp = <ESS_PORT5>; /* lan port bitmap */ switch_lan_bmp = <ESS_PORT6>; /* lan port bitmap */
switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */ switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance1*/ switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance1*/
switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance2*/ switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance2*/
qcom,port_phyinfo { qcom,port_phyinfo {
port@4 { port@5 {
port_id = <5>; port_id = <5>;
phy_address = <24>; phy_address = <24>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";
}; };
port@5 { port@6 {
port_id = <6>; port_id = <6>;
phy_address = <28>; phy_address = <28>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";

View File

@ -321,8 +321,8 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */ switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; /* lan port bitmap */
switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */ switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
malibu_first_phy_addr = <16>; /* PHY addr of the first malibu PHY */ 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_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
switch_mac_mode1 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance1*/ switch_mac_mode1 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance1*/

View File

@ -325,18 +325,18 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_lan_bmp = <ESS_PORT5>; /* lan port bitmap */ switch_lan_bmp = <ESS_PORT6>; /* lan port bitmap */
switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */ switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance1*/ switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance1*/
switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance2*/ switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance2*/
qcom,port_phyinfo { qcom,port_phyinfo {
port@4 { port@5 {
port_id = <5>; port_id = <5>;
phy_address = <24>; phy_address = <24>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";
}; };
port@5 { port@6 {
port_id = <6>; port_id = <6>;
phy_address = <28>; phy_address = <28>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";

View File

@ -388,23 +388,23 @@
switch_mac_mode1 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance1*/ switch_mac_mode1 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance1*/
qcom,port_phyinfo { qcom,port_phyinfo {
port@0 { port@1 {
port_id = <1>; port_id = <1>;
phy_address = <0>; phy_address = <0>;
}; };
port@1 { port@2 {
port_id = <2>; port_id = <2>;
phy_address = <1>; phy_address = <1>;
}; };
port@2 { port@3 {
port_id = <3>; port_id = <3>;
phy_address = <2>; phy_address = <2>;
}; };
port@3 { port@4 {
port_id = <4>; port_id = <4>;
phy_address = <3>; phy_address = <3>;
}; };
port@4 { port@5 {
port_id = <5>; port_id = <5>;
phy_address = <24>; phy_address = <24>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";

View File

@ -175,23 +175,23 @@
switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/ switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
qcom,port_phyinfo { qcom,port_phyinfo {
port@0 { port@1 {
port_id = <1>; port_id = <1>;
phy_address = <0>; phy_address = <0>;
}; };
port@1 { port@2 {
port_id = <2>; port_id = <2>;
phy_address = <1>; phy_address = <1>;
}; };
port@2 { port@3 {
port_id = <3>; port_id = <3>;
phy_address = <2>; phy_address = <2>;
}; };
port@3 { port@4 {
port_id = <4>; port_id = <4>;
phy_address = <3>; phy_address = <3>;
}; };
port@5 { port@6 {
port_id = <6>; port_id = <6>;
phy_address = <28>; phy_address = <28>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";

View File

@ -193,23 +193,23 @@
switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/ switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/
qcom,port_phyinfo { qcom,port_phyinfo {
port@0 { port@1 {
port_id = <1>; port_id = <1>;
phy_address = <0>; phy_address = <0>;
}; };
port@1 { port@2 {
port_id = <2>; port_id = <2>;
phy_address = <1>; phy_address = <1>;
}; };
port@2 { port@3 {
port_id = <3>; port_id = <3>;
phy_address = <2>; phy_address = <2>;
}; };
port@3 { port@4 {
port_id = <4>; port_id = <4>;
phy_address = <3>; phy_address = <3>;
}; };
port@4 { port@6 {
port_id = <6>; port_id = <6>;
phy_address = <8>; phy_address = <8>;
compatible = "ethernet-phy-ieee802.3-c45"; compatible = "ethernet-phy-ieee802.3-c45";

View File

@ -89,12 +89,12 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_wan_bmp = <ESS_PORT6>; switch_lan_bmp = <ESS_PORT6>;
switch_mac_mode = <MAC_MODE_PSGMII>; switch_mac_mode = <MAC_MODE_PSGMII>;
switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>;
qcom,port_phyinfo { qcom,port_phyinfo {
port@5 { port@6 {
port_id = <6>; port_id = <6>;
phy_address = <28>; phy_address = <28>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";

View File

@ -117,12 +117,12 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_wan_bmp = <ESS_PORT6>; switch_lan_bmp = <ESS_PORT6>;
switch_mac_mode = <MAC_MODE_PSGMII>; switch_mac_mode = <MAC_MODE_PSGMII>;
switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>;
qcom,port_phyinfo { qcom,port_phyinfo {
port@5 { port@6 {
port_id = <6>; port_id = <6>;
phy_address = <28>; phy_address = <28>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";

View File

@ -407,7 +407,7 @@
port_id = <4>; port_id = <4>;
phy_address = <3>; phy_address = <3>;
}; };
port@5 { port@6 {
port_id = <6>; port_id = <6>;
phy_address = <28>; phy_address = <28>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";

View File

@ -298,40 +298,40 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>;
switch_wan_bmp = <ESS_PORT6>; switch_wan_bmp = <ESS_PORT5>;
switch_mac_mode = <MAC_MODE_PSGMII>; switch_mac_mode = <MAC_MODE_PSGMII>;
switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>;
switch_mac_mode2 = <MAC_MODE_USXGMII>; switch_mac_mode2 = <MAC_MODE_USXGMII>;
qcom,port_phyinfo { qcom,port_phyinfo {
port@0 { port@1 {
port_id = <1>; port_id = <1>;
phy_address = <0>; phy_address = <0>;
}; };
port@1 { port@2 {
port_id = <2>; port_id = <2>;
phy_address = <1>; phy_address = <1>;
}; };
port@2 { port@3 {
port_id = <3>; port_id = <3>;
phy_address = <2>; phy_address = <2>;
}; };
port@3 { port@4 {
port_id = <4>; port_id = <4>;
phy_address = <3>; phy_address = <3>;
}; };
port@4 { port@5 {
port_id = <5>; port_id = <5>;
phy_address = <28>; phy_address = <28>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";
}; };
port@5 { port@6 {
port_id = <6>; port_id = <6>;
ethernet-phy-ieee802.3-c45; ethernet-phy-ieee802.3-c45;
phy_address = <8>; phy_address = <8>;

View File

@ -195,8 +195,8 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */ switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; /* lan port bitmap */
switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */ switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/ switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/ switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/

View File

@ -151,18 +151,17 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_lan_bmp = <ESS_PORT4>; switch_lan_bmp = <ESS_PORT4 | ESS_PORT6>;
switch_wan_bmp = <ESS_PORT6>;
switch_mac_mode = <MAC_MODE_PSGMII>; switch_mac_mode = <MAC_MODE_PSGMII>;
switch_mac_mode2 = <MAC_MODE_USXGMII>; switch_mac_mode2 = <MAC_MODE_USXGMII>;
qcom,port_phyinfo { qcom,port_phyinfo {
port@3 { port@4 {
port_id = <4>; port_id = <4>;
phy_address = <3>; phy_address = <3>;
}; };
port@5 { port@6 {
port_id = <6>; port_id = <6>;
phy_address = <28>; phy_address = <28>;
port_mac_sel = "QGMAC_PORT"; port_mac_sel = "QGMAC_PORT";

View File

@ -267,40 +267,40 @@
&switch { &switch {
status = "okay"; status = "okay";
switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>;
switch_wan_bmp = <ESS_PORT6>; switch_wan_bmp = <ESS_PORT5>;
switch_mac_mode = <MAC_MODE_QSGMII>; switch_mac_mode = <MAC_MODE_QSGMII>;
switch_mac_mode1 = <MAC_MODE_USXGMII>; switch_mac_mode1 = <MAC_MODE_USXGMII>;
switch_mac_mode2 = <MAC_MODE_USXGMII>; switch_mac_mode2 = <MAC_MODE_USXGMII>;
qcom,port_phyinfo { qcom,port_phyinfo {
port@0 { port@1 {
port_id = <1>; port_id = <1>;
phy_address = <0x18>; phy_address = <0x18>;
}; };
port@1 { port@2 {
port_id = <2>; port_id = <2>;
phy_address = <0x19>; phy_address = <0x19>;
}; };
port@2 { port@3 {
port_id = <3>; port_id = <3>;
phy_address = <0x1a>; phy_address = <0x1a>;
}; };
port@3 { port@4 {
port_id = <4>; port_id = <4>;
phy_address = <0x1b>; phy_address = <0x1b>;
}; };
port@4 { port@5 {
port_id = <5>; port_id = <5>;
ethernet-phy-ieee802.3-c45; ethernet-phy-ieee802.3-c45;
phy_address = <0x0>; phy_address = <0x0>;
}; };
port@5 { port@6 {
port_id = <6>; port_id = <6>;
ethernet-phy-ieee802.3-c45; ethernet-phy-ieee802.3-c45;
phy_address = <0x8>; phy_address = <0x8>;