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>
&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>;
};
&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>;
};
&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";
&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*/
&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";
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";
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";
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";
&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";
&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";
port_id = <4>;
phy_address = <3>;
};
- port@5 {
+ port@6 {
port_id = <6>;
phy_address = <28>;
port_mac_sel = "QGMAC_PORT";
&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>;
&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*/
&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";
&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>;