From: Robert Marko Date: Fri, 20 Feb 2026 21:40:38 +0000 (+0100) Subject: qualcommax: ipq60xx/ipq807x: convert to PPE networking stack X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f50435627d370a1bb07d455d7081207b7b6a744e;p=thirdparty%2Fopenwrt.git qualcommax: ipq60xx/ipq807x: convert to PPE networking stack Convert IPQ60xx and IPQ807x devices from the old NSS dataplane to the new PPE stack. IPQ50xx is not yet supported. Link: https://github.com/openwrt/openwrt/pull/22381 Signed-off-by: Robert Marko --- diff --git a/target/linux/qualcommax/Makefile b/target/linux/qualcommax/Makefile index f08a9c83701..1ef9ac33796 100644 --- a/target/linux/qualcommax/Makefile +++ b/target/linux/qualcommax/Makefile @@ -14,7 +14,7 @@ include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += \ kmod-usb3 kmod-usb-dwc3 kmod-usb-dwc3-qcom \ kmod-leds-gpio kmod-gpio-button-hotplug \ - kmod-qca-nss-dp kmod-ath11k-ahb \ + kmod-ath11k-ahb \ wpad-basic-mbedtls uboot-envtools \ e2fsprogs kmod-fs-ext4 losetup diff --git a/target/linux/qualcommax/dts/ipq6000-360v6.dts b/target/linux/qualcommax/dts/ipq6000-360v6.dts index 07aabe045a6..46e3d5a8b8f 100644 --- a/target/linux/qualcommax/dts/ipq6000-360v6.dts +++ b/target/linux/qualcommax/dts/ipq6000-360v6.dts @@ -156,29 +156,58 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3)>; - switch_wan_bmp = ; - switch_mac_mode = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { port@1 { - port_id = <1>; - phy_address = <0>; + reg = <1>; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; }; + port@2 { - port_id = <2>; - phy_address = <1>; + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; }; + port@3 { - port_id = <3>; - phy_address = <2>; + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; }; + port@4 { - port_id = <4>; - phy_address = <3>; + reg = <4>; + label = "wan"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; }; }; }; @@ -187,30 +216,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "lan1"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan2"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan3"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "wan"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq6000-ap120c-ax.dts b/target/linux/qualcommax/dts/ipq6000-ap120c-ax.dts index 3cc14d77a23..df558b414c9 100644 --- a/target/linux/qualcommax/dts/ipq6000-ap120c-ax.dts +++ b/target/linux/qualcommax/dts/ipq6000-ap120c-ax.dts @@ -349,23 +349,46 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = ; - switch_wan_bmp = ; + ports { + #address-cells = <1>; + #size-cells = <0>; - switch_mac_mode = ; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { port@4 { - port_id = <4>; - phy_address = <3>; + reg = <4>; + label = "lan"; + phy-handle = <&qca8072_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; }; port@5 { - port_id = <5>; - phy_address = <4>; + reg = <5>; + label = "wan"; + phy-handle = <&qca8072_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + nvmem-cells = <&macaddr_wan>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -374,24 +397,6 @@ status = "okay"; }; -&dp4 { - status = "okay"; - - phy-handle = <&qca8072_3>; - label = "lan"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; -}; - -&dp5 { - status = "okay"; - - phy-handle = <&qca8072_4>; - label = "wan"; - nvmem-cells = <&macaddr_wan>; - nvmem-cell-names = "mac-address"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq6000-gl-ax1800.dts b/target/linux/qualcommax/dts/ipq6000-gl-ax1800.dts index bd3f0c3c643..747dacfd2f6 100644 --- a/target/linux/qualcommax/dts/ipq6000-gl-ax1800.dts +++ b/target/linux/qualcommax/dts/ipq6000-gl-ax1800.dts @@ -9,7 +9,7 @@ compatible = "glinet,gl-ax1800", "qcom,ipq6018"; aliases { - label-mac-device = &dp1; + label-mac-device = &swport1; }; }; @@ -21,49 +21,20 @@ }; }; -&switch { - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; - switch_wan_bmp = ; -}; - -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "wan"; - nvmem-cells = <&macaddr_wan>; - nvmem-cell-names = "mac-address"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; +&swport2 { label = "lan1"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; }; -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; +&swport3 { label = "lan2"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; }; -&dp4 { +&swport4 { status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan3"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; }; -&dp5 { +&swport5 { status = "okay"; - phy-handle = <&qca8075_4>; - label = "lan4"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; }; &wifi { diff --git a/target/linux/qualcommax/dts/ipq6000-gl-axt1800.dts b/target/linux/qualcommax/dts/ipq6000-gl-axt1800.dts index 5db3c8e1edf..432794a8c31 100644 --- a/target/linux/qualcommax/dts/ipq6000-gl-axt1800.dts +++ b/target/linux/qualcommax/dts/ipq6000-gl-axt1800.dts @@ -9,7 +9,7 @@ compatible = "glinet,gl-axt1800", "qcom,ipq6018"; aliases { - label-mac-device = &dp1; + label-mac-device = &swport1; }; vcc_sd: regulator-vcc-sd { @@ -136,33 +136,20 @@ status = "okay"; }; -&switch { - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3)>; - switch_wan_bmp = ; +&swport2 { + label = "lan2"; }; -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "wan"; - nvmem-cells = <&macaddr_wan>; - nvmem-cell-names = "mac-address"; +&swport3 { + label = "lan1"; }; -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; +&swport2 { label = "lan2"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; }; -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; +&swport3 { label = "lan1"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; }; &wifi { diff --git a/target/linux/qualcommax/dts/ipq6000-glinet.dtsi b/target/linux/qualcommax/dts/ipq6000-glinet.dtsi index 5c862f39785..e1563222b2d 100644 --- a/target/linux/qualcommax/dts/ipq6000-glinet.dtsi +++ b/target/linux/qualcommax/dts/ipq6000-glinet.dtsi @@ -276,31 +276,76 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_mac_mode = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + swport1: port@1 { + reg = <1>; + label = "wan"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&macaddr_wan>; + nvmem-cell-names = "mac-address"; }; - port@2 { - port_id = <2>; - phy_address = <1>; + + swport2: port@2 { + reg = <2>; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport3: port@3 { + reg = <3>; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport4: port@4 { + reg = <4>; + label = "lan3"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; + status = "disabled"; }; - port@5 { - port_id = <5>; - phy_address = <4>; + + swport5: port@5 { + reg = <5>; + label = "lan4"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; + status = "disabled"; }; }; }; diff --git a/target/linux/qualcommax/dts/ipq6000-link.dtsi b/target/linux/qualcommax/dts/ipq6000-link.dtsi index c3b7621ec7d..9a5d16c8528 100644 --- a/target/linux/qualcommax/dts/ipq6000-link.dtsi +++ b/target/linux/qualcommax/dts/ipq6000-link.dtsi @@ -118,6 +118,107 @@ qcom,ath11k-calibration-variant = "Link-NN6000"; }; +&mdio { + status = "okay"; + + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; + + ethernet-phy-package@0 { + compatible = "qcom,qca8075-package"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + qca8075_0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; + + qca8075_1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; + + qca8075_2: ethernet-phy@2 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <2>; + }; + + qca8075_3: ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <3>; + }; + + qca8075_4: ethernet-phy@4 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <4>; + }; + }; +}; + +&uniphy0 { + status = "okay"; +}; + +&switch { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + swport1: port@1 { + reg = <1>; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; + status = "disabled"; + }; + + swport2: port@2 { + reg = <2>; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + }; + + swport3: port@3 { + reg = <3>; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; + }; + + swport4: port@4 { + reg = <4>; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + }; + + swport5: port@5 { + reg = <5>; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + status = "disabled"; + }; + }; +}; + &edma { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq6000-mr7350.dts b/target/linux/qualcommax/dts/ipq6000-mr7350.dts index f9b2171bd55..9c595cf7dc3 100644 --- a/target/linux/qualcommax/dts/ipq6000-mr7350.dts +++ b/target/linux/qualcommax/dts/ipq6000-mr7350.dts @@ -347,33 +347,76 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; - switch_wan_bmp = ; - switch_mac_mode = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { port@1 { - port_id = <1>; - phy_address = <0>; + reg = <1>; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; + port@2 { - port_id = <2>; - phy_address = <1>; + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; + port@3 { - port_id = <3>; - phy_address = <2>; + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; + port@4 { - port_id = <4>; - phy_address = <3>; + reg = <4>; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; + port@5 { - port_id = <5>; - phy_address = <4>; + reg = <5>; + label = "wan"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -382,46 +425,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "lan1"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan2"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan3"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan4"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; - label = "wan"; - nvmem-cells = <&hw_mac_addr 0>; - nvmem-cell-names = "mac-address"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq6000-nn6000-v1.dts b/target/linux/qualcommax/dts/ipq6000-nn6000-v1.dts index 641e5f0a316..7d62d3f9939 100644 --- a/target/linux/qualcommax/dts/ipq6000-nn6000-v1.dts +++ b/target/linux/qualcommax/dts/ipq6000-nn6000-v1.dts @@ -9,81 +9,20 @@ compatible = "link,nn6000-v1", "qcom,ipq6018"; aliases { - ethernet1 = &dp2; - ethernet2 = &dp3; - ethernet3 = &dp4; + ethernet1 = &swport2; + ethernet2 = &swport3; + ethernet3 = &swport4; }; }; -&mdio { - status = "okay"; - - pinctrl-0 = <&mdio_pins>; - pinctrl-names = "default"; - reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; - - ethernet-phy-package@0 { - compatible = "qcom,qca8075-package"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0>; - - qca8075_1: ethernet-phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <1>; - }; - - qca8075_2: ethernet-phy@2 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <2>; - }; - - qca8075_3: ethernet-phy@3 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <3>; - }; - }; -}; - -&switch { - status = "okay"; - - switch_lan_bmp = <(ESS_PORT3 | ESS_PORT4)>; - switch_wan_bmp = ; - switch_mac_mode = ; - - qcom,port_phyinfo { - port@2 { - port_id = <2>; - phy_address = <1>; - }; - - port@3 { - port_id = <3>; - phy_address = <2>; - }; - - port@4 { - port_id = <4>; - phy_address = <3>; - }; - }; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; +&swport2 { label = "wan"; }; -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; +&swport3 { label = "lan1"; }; -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; +&swport4 { label = "lan2"; }; diff --git a/target/linux/qualcommax/dts/ipq6000-nn6000-v2.dts b/target/linux/qualcommax/dts/ipq6000-nn6000-v2.dts index 3ed26140945..300871e85b4 100644 --- a/target/linux/qualcommax/dts/ipq6000-nn6000-v2.dts +++ b/target/linux/qualcommax/dts/ipq6000-nn6000-v2.dts @@ -9,115 +9,31 @@ compatible = "link,nn6000-v2", "qcom,ipq6018"; aliases { - ethernet0 = &dp1; - ethernet1 = &dp2; - ethernet2 = &dp3; - ethernet3 = &dp4; - ethernet4 = &dp5; + ethernet0 = &swport1; + ethernet1 = &swport2; + ethernet2 = &swport3; + ethernet3 = &swport4; + ethernet4 = &swport5; }; }; -&mdio { - status = "okay"; - - pinctrl-0 = <&mdio_pins>; - pinctrl-names = "default"; - reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; - - ethernet-phy-package@0 { - compatible = "qcom,qca8075-package"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0>; - - qca8075_0: ethernet-phy@0 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <0>; - }; - - qca8075_1: ethernet-phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <1>; - }; - - qca8075_2: ethernet-phy@2 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <2>; - }; - - qca8075_3: ethernet-phy@3 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <3>; - }; - - qca8075_4: ethernet-phy@4 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <4>; - }; - }; -}; - -&switch { - status = "okay"; - - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; - switch_wan_bmp = ; - switch_mac_mode = ; - - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; - }; - - port@2 { - port_id = <2>; - phy_address = <1>; - }; - - port@3 { - port_id = <3>; - phy_address = <2>; - }; - - port@4 { - port_id = <4>; - phy_address = <3>; - }; - - port@5 { - port_id = <5>; - phy_address = <4>; - }; - }; -}; - -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; +&swport1 { label = "lan1"; + status = "okay"; }; -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; +&swport2 { label = "wan"; }; -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; +&swport3 { label = "lan2"; }; -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; +&swport4 { label = "lan3"; }; -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; +&swport5 { label = "lan4"; }; diff --git a/target/linux/qualcommax/dts/ipq6000-re-ss-01.dts b/target/linux/qualcommax/dts/ipq6000-re-ss-01.dts index a71574cc4f5..49a25010b37 100644 --- a/target/linux/qualcommax/dts/ipq6000-re-ss-01.dts +++ b/target/linux/qualcommax/dts/ipq6000-re-ss-01.dts @@ -14,13 +14,13 @@ compatible = "jdcloud,re-ss-01", "qcom,ipq6018"; aliases { - ethernet1 = &dp2; - ethernet2 = &dp3; - ethernet3 = &dp4; - ethernet4 = &dp5; + ethernet1 = &swport2; + ethernet2 = &swport3; + ethernet3 = &swport4; + ethernet4 = &swport5; serial0 = &blsp1_uart3; - label-mac-device = &dp2; + label-mac-device = &swport2; led-boot = &led_status_red; led-failsafe = &led_status_red; led-running = &led_status_green; @@ -162,29 +162,58 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; - switch_wan_bmp = ; - switch_mac_mode = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@2 { - port_id = <2>; - phy_address = <1>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport2: port@2 { + reg = <2>; + label = "lan1"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + }; + + swport3: port@3 { + reg = <3>; + label = "lan2"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport4: port@4 { + reg = <4>; + label = "lan3"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; }; - port@5 { - port_id = <5>; - phy_address = <4>; + + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; }; }; }; @@ -193,30 +222,6 @@ status = "okay"; }; -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan1"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan2"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan3"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; - label = "wan"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq6010-mango-dvk.dts b/target/linux/qualcommax/dts/ipq6010-mango-dvk.dts index 60769457ed4..f58f4a169f6 100644 --- a/target/linux/qualcommax/dts/ipq6010-mango-dvk.dts +++ b/target/linux/qualcommax/dts/ipq6010-mango-dvk.dts @@ -200,34 +200,6 @@ }; }; -&dp3 { - status = "okay"; - - phy-handle = <&qca8072_1>; - nvmem-cells = <&macaddr_eth1>; - nvmem-cell-names = "mac-address"; - label = "lan2"; -}; - -&dp4 { - status = "okay"; - - phy-handle = <&qca8072_0>; - nvmem-cells = <&macaddr_eth0>; - nvmem-cell-names = "mac-address"; - label = "lan1"; -}; - -&dp5 { - status = "okay"; - - phy-mode = "sgmii"; - phy-handle = <&qca8081>; - nvmem-cells = <&macaddr_eth2>; - nvmem-cell-names = "mac-address"; - label = "wan"; -}; - &edma { status = "okay"; }; @@ -277,28 +249,60 @@ cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy1 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT3 | ESS_PORT4)>; - switch_wan_bmp = ; - switch_mac_mode = ; - switch_mac_mode1 = ; - port3_pcs_channel = <4>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { port@3 { - port_id = <3>; - phy_address = <4>; + reg = <3>; + label = "lan2"; + phy-handle = <&qca8072_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + nvmem-cells = <&macaddr_eth1>; + nvmem-cell-names = "mac-address"; }; + port@4 { - port_id = <4>; - phy_address = <3>; + reg = <4>; + label = "lan1"; + phy-handle = <&qca8072_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_eth0>; + nvmem-cell-names = "mac-address"; }; + port@5 { - port_id = <5>; - phy_address = <24>; - port_mac_sel = "QGMAC_PORT"; + reg = <5>; + label = "wan"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; + nvmem-cells = <&macaddr_eth2>; + nvmem-cell-names = "mac-address"; }; }; }; diff --git a/target/linux/qualcommax/dts/ipq6010-re-cs-02.dts b/target/linux/qualcommax/dts/ipq6010-re-cs-02.dts index 6a7e3eff3df..8594ea7bf00 100644 --- a/target/linux/qualcommax/dts/ipq6010-re-cs-02.dts +++ b/target/linux/qualcommax/dts/ipq6010-re-cs-02.dts @@ -9,13 +9,13 @@ compatible = "jdcloud,re-cs-02", "qcom,ipq6018"; aliases { - ethernet0 = &dp1; - ethernet1 = &dp2; - ethernet2 = &dp3; - ethernet3 = &dp4; - ethernet4 = &dp5; + ethernet0 = &swport1; + ethernet1 = &swport2; + ethernet2 = &swport3; + ethernet3 = &swport4; + ethernet4 = &swport5; - label-mac-device = &dp1; + label-mac-device = &swport1; serial0 = &blsp1_uart3; serial1 = &blsp1_uart6; }; @@ -97,35 +97,66 @@ }; }; +&uniphy1 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; - switch_wan_bmp = ; - switch_mac_mode = ; - switch_mac_mode1 = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <24>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@2 { - port_id = <2>; - phy_address = <25>; + + swport1: port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; }; - port@3 { - port_id = <3>; - phy_address = <26>; + + swport2: port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; }; - port@4 { - port_id = <4>; - phy_address = <27>; + + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; }; - port@5 { - port_id = <5>; - phy_address = <12>; - port_mac_sel = "QGMAC_PORT"; + + swport4: port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + }; + + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; }; }; }; @@ -134,37 +165,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "lan1"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan2"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan3"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan4"; -}; - -&dp5 { - status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&qca8081>; - label = "wan"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq6010-re-cs-07.dts b/target/linux/qualcommax/dts/ipq6010-re-cs-07.dts index 650e2c55f35..1ee45622167 100644 --- a/target/linux/qualcommax/dts/ipq6010-re-cs-07.dts +++ b/target/linux/qualcommax/dts/ipq6010-re-cs-07.dts @@ -9,12 +9,12 @@ compatible = "jdcloud,re-cs-07", "qcom,ipq6018"; aliases { - ethernet0 = &dp1; - ethernet1 = &dp2; - ethernet2 = &dp3; - ethernet3 = &dp4; + ethernet0 = &swport1; + ethernet1 = &swport2; + ethernet2 = &swport3; + ethernet3 = &swport4; - label-mac-device = &dp2; + label-mac-device = &swport2; serial0 = &blsp1_uart3; }; @@ -45,26 +45,51 @@ &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; - switch_wan_bmp = ; - switch_mac_mode = ; + ports { + #address-cells = <1>; + #size-cells = <0>; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <24>; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@2 { - port_id = <2>; - phy_address = <25>; + + swport1: port@1 { + reg = <1>; + label = "wan"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; }; - port@3 { - port_id = <3>; - phy_address = <26>; + + swport2: port@2 { + reg = <2>; + label = "lan1"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; }; - port@4 { - port_id = <4>; - phy_address = <27>; + + swport3: port@3 { + reg = <3>; + label = "lan2"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; + }; + + swport4: port@4 { + reg = <4>; + label = "lan3"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; }; }; }; @@ -72,27 +97,3 @@ &edma { status = "okay"; }; - -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "wan"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan1"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan2"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan3"; -}; diff --git a/target/linux/qualcommax/dts/ipq6010-re-cs.dtsi b/target/linux/qualcommax/dts/ipq6010-re-cs.dtsi index 7ff432613a5..bd971145c8c 100644 --- a/target/linux/qualcommax/dts/ipq6010-re-cs.dtsi +++ b/target/linux/qualcommax/dts/ipq6010-re-cs.dtsi @@ -137,3 +137,7 @@ }; }; }; + +&uniphy0 { + status = "okay"; +}; diff --git a/target/linux/qualcommax/dts/ipq6010-wax214.dts b/target/linux/qualcommax/dts/ipq6010-wax214.dts index 90a4828c17b..5df12f4ed66 100644 --- a/target/linux/qualcommax/dts/ipq6010-wax214.dts +++ b/target/linux/qualcommax/dts/ipq6010-wax214.dts @@ -15,8 +15,8 @@ aliases { serial0 = &blsp1_uart3; - ethernet0 = &dp3; - label-mac-device = &dp3; + ethernet0 = &swport3; + label-mac-device = &swport3; led-boot = &pwr; led-failsafe = &pwr; led-running = &pwr; @@ -95,13 +95,6 @@ }; }; -&dp3 { - status = "okay"; - - phy-handle = <&qca8072_4>; - label = "lan"; -}; - &edma { status = "okay"; }; @@ -129,17 +122,34 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = ; - switch_mac_mode = ; - port3_pcs_channel = <4>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { - port@3 { - port_id = <3>; - phy_address = <4>; + swport3: port@3 { + reg = <3>; + label = "lan"; + phy-handle = <&qca8072_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; }; }; }; diff --git a/target/linux/qualcommax/dts/ipq6010-wax610-base.dtsi b/target/linux/qualcommax/dts/ipq6010-wax610-base.dtsi index e51ed90629f..2db7294a4ba 100644 --- a/target/linux/qualcommax/dts/ipq6010-wax610-base.dtsi +++ b/target/linux/qualcommax/dts/ipq6010-wax610-base.dtsi @@ -8,8 +8,8 @@ / { aliases { serial0 = &blsp1_uart3; - ethernet0 = &dp5; - label-mac-device = &dp5; + ethernet0 = &swport5; + label-mac-device = &swport5; led-boot = &led_system_blue; led-failsafe = &led_system_orange; @@ -111,17 +111,34 @@ status = "okay"; }; +&uniphy1 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = ; - switch_mac_mode1 = ; + ports { + #address-cells = <1>; + #size-cells = <0>; - qcom,port_phyinfo { - port@5 { - port_id = <5>; - phy_address = <24>; - port_mac_sel = "QGMAC_PORT"; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + swport5: port@5 { + reg = <5>; + label = "lan"; + phy-handle = <&qca8081_24>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; }; }; }; @@ -156,12 +173,6 @@ }; }; -&dp5 { - status = "okay"; - phy-handle = <&qca8081_24>; - label = "lan"; -}; - &blsp1_uart3 { pinctrl-0 = <&serial_3_pins>; pinctrl-names = "default"; diff --git a/target/linux/qualcommax/dts/ipq6010-xe3-4.dts b/target/linux/qualcommax/dts/ipq6010-xe3-4.dts index f0094a7d8f0..7f795e1e5d5 100644 --- a/target/linux/qualcommax/dts/ipq6010-xe3-4.dts +++ b/target/linux/qualcommax/dts/ipq6010-xe3-4.dts @@ -15,9 +15,9 @@ aliases { serial0 = &blsp1_uart3; - ethernet0 = &dp5; - ethernet1 = &dp4; - label-mac-device = &dp5; + ethernet0 = &swport5; + ethernet1 = &swport4; + label-mac-device = &swport5; led-boot = &led_status_amber; led-failsafe = &led_status_amber; @@ -183,23 +183,50 @@ status = "okay"; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy1 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT4 | ESS_PORT5)>; - switch_mac_mode = ; - switch_mac_mode2 = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { - port@4 { - port_id = <4>; - phy_address = <3>; + swport4: port@4 { + reg = <4>; + label = "lan2"; + phy-handle = <&qca8072>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cell-names = "mac-address"; + nvmem-cells = <ð1addr 0>; }; - port@5 { - port_id = <5>; - phy_address = <24>; - port_mac_sel = "QGMAC_PORT"; + swport5: port@5 { + reg = <5>; + label = "lan1"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; + nvmem-cell-names = "mac-address"; + nvmem-cells = <ðaddr 0>; }; }; }; @@ -235,25 +262,6 @@ }; }; -&dp4 { - status = "okay"; - - phy-handle = <&qca8072>; - nvmem-cell-names = "mac-address"; - nvmem-cells = <ð1addr 0>; - label = "lan2"; -}; - -&dp5 { - status = "okay"; - - phy-mode = "sgmii"; - phy-handle = <&qca8081>; - nvmem-cell-names = "mac-address"; - nvmem-cells = <ðaddr 0>; - label = "lan1"; -}; - &blsp1_spi1 { pinctrl-0 = <&spi_0_pins>; pinctrl-names = "default"; diff --git a/target/linux/qualcommax/dts/ipq6018-eap620-hd-v3.dts b/target/linux/qualcommax/dts/ipq6018-eap620-hd-v3.dts index fd7b9c54a73..b2352b20355 100644 --- a/target/linux/qualcommax/dts/ipq6018-eap620-hd-v3.dts +++ b/target/linux/qualcommax/dts/ipq6018-eap620-hd-v3.dts @@ -40,8 +40,8 @@ gpio-reserved-ranges = <20 1>; }; -&switch { - switch_mac_mode1 = ; +&swport5 { + phy-handle = <&rtl8211f_4>; }; &wifi { diff --git a/target/linux/qualcommax/dts/ipq6018-fap650.dts b/target/linux/qualcommax/dts/ipq6018-fap650.dts index c7f7f699929..2405d6b18df 100644 --- a/target/linux/qualcommax/dts/ipq6018-fap650.dts +++ b/target/linux/qualcommax/dts/ipq6018-fap650.dts @@ -15,12 +15,12 @@ compatible = "yuncore,fap650", "qcom,ipq6018"; aliases { - ethernet0 = &dp5; - ethernet1 = &dp4; - ethernet2 = &dp3; - ethernet3 = &dp2; - ethernet4 = &dp1; - label-mac-device = &dp5; + ethernet0 = &swport5; + ethernet1 = &swport4; + ethernet2 = &swport3; + ethernet3 = &swport2; + ethernet4 = &swport1; + label-mac-device = &swport5; serial0 = &blsp1_uart3; led-boot = &led_system; led-failsafe = &led_system; @@ -133,36 +133,66 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1|ESS_PORT2|ESS_PORT3|ESS_PORT4)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ - switch_mac_mode = ; /* mac mode for uniphy instance0*/ - - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + swport1: port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; }; - port@2 { - port_id = <2>; - phy_address = <1>; + swport2: port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; }; - port@3 { - port_id = <3>; - phy_address = <2>; + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; }; - port@4 { - port_id = <4>; - phy_address = <3>; + swport4: port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; }; - port@5 { - port_id = <5>; - phy_address = <4>; + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; }; }; }; @@ -179,37 +209,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "lan1"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan2"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan3"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan4"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; - phy-mode = "psgmii"; - label = "wan"; -}; - &qpic_bam { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq6018-mr7500.dts b/target/linux/qualcommax/dts/ipq6018-mr7500.dts index a01299f42a4..bb58959c9f3 100644 --- a/target/linux/qualcommax/dts/ipq6018-mr7500.dts +++ b/target/linux/qualcommax/dts/ipq6018-mr7500.dts @@ -23,7 +23,7 @@ led-failsafe = &led_system_red; led-upgrade = &led_system_green; - label-mac-device = &dp5_syn; + label-mac-device = &swport5; }; chosen { @@ -347,84 +347,84 @@ }; }; -&dp1 { +&edma { status = "okay"; - label = "lan1"; - phy-handle = <&qca8075_0>; - phy-mode = "qsgmii"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; }; -&dp2 { +&uniphy0 { status = "okay"; - label = "lan2"; - phy-handle = <&qca8075_1>; - phy-mode = "qsgmii"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; }; -&dp3 { +&uniphy1 { status = "okay"; - label = "lan3"; - phy-handle = <&qca8075_2>; - phy-mode = "qsgmii"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; }; -&dp4 { +&switch { status = "okay"; - label = "lan4"; - phy-handle = <&qca8075_3>; - phy-mode = "qsgmii"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; -}; -&dp5_syn { - status = "okay"; - label = "wan"; - phy-handle = <&aqr114c>; - phy-mode = "usxgmii"; - nvmem-cells = <&hw_mac_addr 0>; - nvmem-cell-names = "mac-address"; -}; + ports { + #address-cells = <1>; + #size-cells = <0>; -&edma { - status = "okay"; -}; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; -&switch { - status = "okay"; - switch_lan_bmp = <( ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 )>; - switch_wan_bmp = ; - switch_mac_mode = ; - switch_mac_mode1 = ; - - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@2 { - port_id = <2>; - phy_address = <1>; + + swport1: port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport2: port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; - port@5 { - port_id = <5>; - phy_address = <8>; - compatible = "ethernet-phy-ieee802.3-c45"; - ethernet-phy-ieee802.3-c45; + + swport4: port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; + }; + + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&aqr114c>; + phy-mode = "usxgmii"; + pcs-handle = <&uniphy1 0>; + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; }; }; }; diff --git a/target/linux/qualcommax/dts/ipq6018-rbs350.dts b/target/linux/qualcommax/dts/ipq6018-rbs350.dts index 3b3090cdc22..4c199450faf 100644 --- a/target/linux/qualcommax/dts/ipq6018-rbs350.dts +++ b/target/linux/qualcommax/dts/ipq6018-rbs350.dts @@ -9,10 +9,10 @@ compatible = "netgear,rbs350", "qcom,ipq6018"; }; -&dp2 { +&swport2 { status = "disabled"; }; -&dp3 { +&swport3 { status = "disabled"; }; diff --git a/target/linux/qualcommax/dts/ipq6018-rbx350.dtsi b/target/linux/qualcommax/dts/ipq6018-rbx350.dtsi index 2b111736186..dd6a7b7543f 100644 --- a/target/linux/qualcommax/dts/ipq6018-rbx350.dtsi +++ b/target/linux/qualcommax/dts/ipq6018-rbx350.dtsi @@ -11,7 +11,7 @@ led-failsafe = &led_status_red; led-upgrade = &led_status_blue; serial0 = &blsp1_uart3; - label-mac-device = &dp5; + label-mac-device = &swport5; }; @@ -84,37 +84,66 @@ status = "okay"; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; - switch_wan_bmp = ; - switch_mac_mode = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@2 { - port_id = <2>; - phy_address = <1>; + swport2: port@2 { + reg = <2>; + label = "wan"; + phy-handle = <&phy1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_boarddata 3>; + nvmem-cell-names = "mac-address"; }; - port@3 { - port_id = <3>; - phy_address = <2>; + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&phy2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&macaddr_boarddata 2>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <3>; + swport4: port@4 { + reg = <4>; + label = "lan2"; + phy-handle = <&phy3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_boarddata 1>; + nvmem-cell-names = "mac-address"; }; - port@5 { - port_id = <5>; - phy_address = <4>; + swport5: port@5 { + reg = <5>; + label = "lan1"; + phy-handle = <&phy4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + nvmem-cells = <&macaddr_boarddata 0>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -181,38 +210,6 @@ }; }; -&dp2 { - status = "okay"; - phy-handle = <&phy1>; - label = "wan"; - nvmem-cells = <&macaddr_boarddata 3>; - nvmem-cell-names = "mac-address"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&phy2>; - label = "lan3"; - nvmem-cells = <&macaddr_boarddata 2>; - nvmem-cell-names = "mac-address"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&phy3>; - label = "lan2"; - nvmem-cells = <&macaddr_boarddata 1>; - nvmem-cell-names = "mac-address"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&phy4>; - label = "lan1"; - nvmem-cells = <&macaddr_boarddata 0>; - nvmem-cell-names = "mac-address"; -}; - &blsp1_uart3 { pinctrl-0 = <&serial_3_pins>; pinctrl-names = "default"; diff --git a/target/linux/qualcommax/dts/ipq6018-tplink-eap6xx-outdoor.dtsi b/target/linux/qualcommax/dts/ipq6018-tplink-eap6xx-outdoor.dtsi index 9ab252ef378..6373ae00765 100644 --- a/target/linux/qualcommax/dts/ipq6018-tplink-eap6xx-outdoor.dtsi +++ b/target/linux/qualcommax/dts/ipq6018-tplink-eap6xx-outdoor.dtsi @@ -94,13 +94,6 @@ }; }; -&dp5 { - phy-handle = <&rtl8211f_4>; - phy-mode = "sgmii"; - label = "lan"; - status = "okay"; -}; - &edma { status = "okay"; }; @@ -120,15 +113,34 @@ }; }; +&uniphy1 { + status = "okay"; +}; + &switch { - switch_lan_bmp = ; - switch_mac_mode1 = ; status = "okay"; - qcom,port_phyinfo { - port@4 { - port_id = <5>; - phy_address = <4>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + swport5: port@5 { + reg = <5>; + label = "lan"; + phy-handle = <&rtl8211f_4>; + phy-mode = "sgmii"; + pcs-handle = <&uniphy1 0>; }; }; }; diff --git a/target/linux/qualcommax/dts/ipq8070-cax1800.dts b/target/linux/qualcommax/dts/ipq8070-cax1800.dts index 728820e6bb4..532a01132e1 100644 --- a/target/linux/qualcommax/dts/ipq8070-cax1800.dts +++ b/target/linux/qualcommax/dts/ipq8070-cax1800.dts @@ -20,8 +20,8 @@ led-running = &led_system_green; led-upgrade = &led_system_red; /* Aliases as required by u-boot to patch MAC addresses */ - ethernet0 = &dp5; - label-mac-device = &dp5; + ethernet0 = &swport5; + label-mac-device = &swport5; }; chosen { @@ -274,16 +274,34 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = ; /* lan port bitmap */ - switch_mac_mode = ; /* mac mode for uniphy instance0*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@5 { - port_id = <5>; - phy_address = <4>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + swport5: port@5 { + reg = <5>; + label = "lan"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; }; }; }; @@ -292,12 +310,6 @@ status = "okay"; }; -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; - label = "lan"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq8070-nwa110ax.dts b/target/linux/qualcommax/dts/ipq8070-nwa110ax.dts index c9358a031d8..2dfc2a263b4 100644 --- a/target/linux/qualcommax/dts/ipq8070-nwa110ax.dts +++ b/target/linux/qualcommax/dts/ipq8070-nwa110ax.dts @@ -12,17 +12,12 @@ compatible = "zyxel,nwa110ax", "qcom,ipq8074"; aliases { - ethernet0 = &dp1; - label-mac-device = &dp1; + ethernet0 = &swport1; + label-mac-device = &swport1; }; }; -&switch { - switch_lan_bmp = ; - switch_mac_mode = ; -}; - -&dp1 { +&swport1 { label = "uplink"; nvmem-cell-names = "mac-address"; nvmem-cells = <&label_mac 0>; diff --git a/target/linux/qualcommax/dts/ipq8070-rm2-6.dts b/target/linux/qualcommax/dts/ipq8070-rm2-6.dts index 5d3123f75ea..203f2074a44 100644 --- a/target/linux/qualcommax/dts/ipq8070-rm2-6.dts +++ b/target/linux/qualcommax/dts/ipq8070-rm2-6.dts @@ -24,10 +24,10 @@ * Aliases as required by u-boot * to patch MAC addresses */ - ethernet0 = &dp4; - ethernet1 = &dp2; - ethernet2 = &dp5; - label-mac-device = &dp4; + ethernet0 = &swport4; + ethernet1 = &swport2; + ethernet2 = &swport5; + label-mac-device = &swport4; }; chosen { @@ -253,25 +253,54 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT4)>; - switch_wan_bmp = ; - switch_mac_mode = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@2 { - port_id = <2>; - phy_address = <1>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + /* + * Directly connect to the Hi5630 + * PLC (Power Line Communication) + */ + swport2: port@2 { + reg = <2>; + label = "plc"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + }; + + swport4: port@4 { + reg = <4>; + label = "lan"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; }; - port@5 { - port_id = <5>; - phy_address = <4>; + + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; }; }; }; @@ -280,28 +309,6 @@ status = "okay"; }; -/* - * Directly connect to the Hi5630 - * PLC (Power Line Communication) - */ -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "plc"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; - label = "wan"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq8071-ap8220.dts b/target/linux/qualcommax/dts/ipq8071-ap8220.dts index 7e70cfc6189..e2802f0cfb1 100644 --- a/target/linux/qualcommax/dts/ipq8071-ap8220.dts +++ b/target/linux/qualcommax/dts/ipq8071-ap8220.dts @@ -289,24 +289,46 @@ }; }; +&uniphy1 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = ; - switch_wan_bmp = ; - switch_mac_mode1 = ; - switch_mac_mode2 = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@5 { - port_id = <5>; - phy_address = <24>; - port_mac_sel = "QGMAC_PORT"; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8081_24>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; + }; + + swport6: port@6 { + reg = <6>; + label = "lan"; + phy-handle = <&qca8081_28>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; }; }; }; @@ -315,19 +337,6 @@ status = "okay"; }; -&dp5 { - status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&qca8081_24>; - label = "wan"; -}; - -&dp6 { - status = "okay"; - phy-handle = <&qca8081_28>; - label = "lan"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq8071-ax3600.dtsi b/target/linux/qualcommax/dts/ipq8071-ax3600.dtsi index c3c41ae2c16..8439e88c796 100644 --- a/target/linux/qualcommax/dts/ipq8071-ax3600.dtsi +++ b/target/linux/qualcommax/dts/ipq8071-ax3600.dtsi @@ -14,7 +14,7 @@ led-failsafe = &led_system_yellow; led-running = &led_system_blue; led-upgrade = &led_system_yellow; - label-mac-device = &dp2; + label-mac-device = &swport2; }; chosen { @@ -242,29 +242,66 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - 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*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@2 { - port_id = <2>; - phy_address = <1>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport2: port@2 { + reg = <2>; + label = "wan"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_dp2>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport3: port@3 { + reg = <3>; + label = "lan1"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&macaddr_dp3>; + nvmem-cell-names = "mac-address"; }; - port@5 { - port_id = <5>; - phy_address = <4>; + + swport4: port@4 { + reg = <4>; + label = "lan2"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_dp4>; + nvmem-cell-names = "mac-address"; + }; + + swport5: port@5 { + reg = <5>; + label = "lan3"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + nvmem-cells = <&macaddr_dp5>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -273,38 +310,6 @@ status = "okay"; }; -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "wan"; - nvmem-cells = <&macaddr_dp2>; - nvmem-cell-names = "mac-address"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan1"; - nvmem-cells = <&macaddr_dp3>; - nvmem-cell-names = "mac-address"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan2"; - nvmem-cells = <&macaddr_dp4>; - nvmem-cell-names = "mac-address"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; - label = "lan3"; - nvmem-cells = <&macaddr_dp5>; - nvmem-cell-names = "mac-address"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq8071-eap102.dts b/target/linux/qualcommax/dts/ipq8071-eap102.dts index 41b6dd066cc..31b226cc0fa 100644 --- a/target/linux/qualcommax/dts/ipq8071-eap102.dts +++ b/target/linux/qualcommax/dts/ipq8071-eap102.dts @@ -22,9 +22,9 @@ led-running = &led_system_green; led-upgrade = &led_system_green; /* Aliases as required by u-boot to patch MAC addresses */ - ethernet0 = &dp6; - ethernet1 = &dp5; - label-mac-device = &dp5; + ethernet0 = &swport6; + ethernet1 = &swport5; + label-mac-device = &swport5; }; chosen { @@ -342,24 +342,46 @@ }; }; +&uniphy1 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - 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*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@5 { - port_id = <5>; - phy_address = <24>; - port_mac_sel = "QGMAC_PORT"; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + + swport5: port@5 { + reg = <5>; + label = "lan"; + phy-handle = <&qca8081_24>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; + }; + + swport6: port@6 { + reg = <6>; + label = "wan"; + phy-handle = <&qca8081_28>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; }; }; }; @@ -368,19 +390,6 @@ status = "okay"; }; -&dp5 { - status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&qca8081_24>; - label = "lan"; -}; - -&dp6 { - status = "okay"; - phy-handle = <&qca8081_28>; - label = "wan"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq8071-mf269.dts b/target/linux/qualcommax/dts/ipq8071-mf269.dts index da72f6bf719..a382c73e65f 100644 --- a/target/linux/qualcommax/dts/ipq8071-mf269.dts +++ b/target/linux/qualcommax/dts/ipq8071-mf269.dts @@ -19,7 +19,7 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; - label-mac-device = &dp6_syn; + label-mac-device = &swport6; }; chosen { @@ -401,24 +401,50 @@ }; }; +&uniphy1 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - 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*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@5 { - port_id = <5>; - phy_address = <24>; - port_mac_sel = "QGMAC_PORT"; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + + swport5: port@5 { + reg = <5>; + label = "lan"; + phy-handle = <&qca8081_24>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_mac_0 1>; + }; + + swport6: port@6 { + reg = <6>; + label = "wan"; + phy-handle = <&qca8081_28>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_mac_0 0>; }; }; }; @@ -427,22 +453,6 @@ status = "okay"; }; -&dp5_syn { - status = "okay"; - phy-handle = <&qca8081_24>; - label = "lan"; - nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_mac_0 1>; -}; - -&dp6_syn { - status = "okay"; - phy-handle = <&qca8081_28>; - label = "wan"; - nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_mac_0 0>; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq8071-nwa210ax.dts b/target/linux/qualcommax/dts/ipq8071-nwa210ax.dts index 91a4027b40b..388f304ba2a 100644 --- a/target/linux/qualcommax/dts/ipq8071-nwa210ax.dts +++ b/target/linux/qualcommax/dts/ipq8071-nwa210ax.dts @@ -13,9 +13,9 @@ compatible = "zyxel,nwa210ax", "qcom,ipq8074"; aliases { - ethernet0 = &dp5; - ethernet1 = &dp1; - label-mac-device = &dp5; + ethernet0 = &swport5; + ethernet1 = &swport1; + label-mac-device = &swport5; }; leds { @@ -46,20 +46,28 @@ }; }; -&switch { - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT5)>; - switch_mac_mode = ; - switch_mac_mode1 = ; +&uniphy1 { + status = "okay"; }; -&phyinfo { - port@5 { - port_id = <5>; - phy_address = <16>; - port_mac_sel = "QGMAC_PORT"; +&swports { + swport5: port@5 { + reg = <5>; + label = "uplink"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&label_mac 0>; }; }; +&swport1 { + label = "lan1"; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&label_mac 1>; +}; + &mdio { qca8081: ethernet-phy@16 { compatible = "ethernet-phy-id004d.d101"; @@ -69,21 +77,6 @@ }; }; -&dp1 { - label = "lan1"; - nvmem-cell-names = "mac-address"; - nvmem-cells = <&label_mac 1>; -}; - -&dp5 { - status = "okay"; - phy-handle = <&qca8081>; - phy-mode = "sgmii"; - label = "uplink"; - nvmem-cell-names = "mac-address"; - nvmem-cells = <&label_mac 0>; -}; - &wifi { qcom,ath11k-calibration-variant = "Zyxel-NWA210AX"; }; diff --git a/target/linux/qualcommax/dts/ipq8072-301w.dts b/target/linux/qualcommax/dts/ipq8072-301w.dts index 5edb4e1936b..ce8a4ff4ace 100644 --- a/target/linux/qualcommax/dts/ipq8072-301w.dts +++ b/target/linux/qualcommax/dts/ipq8072-301w.dts @@ -24,13 +24,13 @@ led-failsafe = &led_system_red; led-running = &led_pwr_green; led-upgrade = &led_system_red; - ethernet0 = &dp1; - ethernet1 = &dp2; - ethernet2 = &dp3; - ethernet3 = &dp4; - ethernet4 = &dp5; - ethernet5 = &dp6_syn; - label-mac-device = &dp1; + ethernet0 = &lan4; + ethernet1 = &lan3; + ethernet2 = &lan2; + ethernet3 = &lan1; + ethernet4 = &port_10g_1; + ethernet5 = &port_10g_2; + label-mac-device = &lan4; }; chosen { @@ -438,92 +438,89 @@ vqmmc-supply = <&l11>; }; -&switch { +&uniphy0 { status = "okay"; - - 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_mode1 = ; /* mac mode for uniphy instance1*/ - switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ - - qcom,port_phyinfo { - port@0 { - port_id = <1>; - phy_address = <16>; - }; - port@1 { - port_id = <2>; - phy_address = <17>; - }; - port@2 { - port_id = <3>; - phy_address = <18>; - }; - port@3 { - port_id = <4>; - phy_address = <19>; - }; - port@4 { - port_id = <5>; - phy_address = <8>; - compatible = "ethernet-phy-ieee802.3-c45"; - ethernet-phy-ieee802.3-c45; - }; - port@5 { - port_id = <6>; - phy_address = <0>; - compatible = "ethernet-phy-ieee802.3-c45"; - ethernet-phy-ieee802.3-c45; - }; - }; }; -&edma { +&uniphy1 { status = "okay"; }; -&dp1 { +&uniphy2 { status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_16>; - label = "lan4"; }; -&dp2 { +&switch { status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_17>; - label = "lan3"; -}; -&dp3 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_18>; - label = "lan2"; -}; + ports { + #address-cells = <1>; + #size-cells = <0>; -&dp4 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_19>; - label = "lan1"; -}; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; -&dp5 { - status = "okay"; - qcom,mactype = <1>; - phy-mode = "usxgmii"; - phy-handle = <&aqr113c_8>; - label = "10g-1"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + lan4: port@1 { + reg = <1>; + label = "lan4"; + phy-handle = <&qca8075_16>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 0>; + }; + + lan3: port@2 { + reg = <2>; + label = "lan3"; + phy-handle = <&qca8075_17>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 1>; + }; + + lan2: port@3 { + reg = <3>; + label = "lan2"; + phy-handle = <&qca8075_18>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 2>; + }; + + + lan1: port@4 { + reg = <4>; + label = "lan1"; + phy-handle = <&qca8075_19>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 3>; + }; + + port_10g_1: port@5 { + reg = <5>; + label = "10g-1"; + phy-handle = <&aqr113c_8>; + phy-mode = "usxgmii"; + pcs-handle = <&uniphy1 0>; + }; + + port_10g_2: port@6 { + reg = <6>; + label = "10g-2"; + phy-handle = <&aqr113c_0>; + phy-mode = "usxgmii"; + pcs-handle = <&uniphy2 0>; + }; + }; }; -&dp6_syn { +&edma { status = "okay"; - phy-mode = "usxgmii"; - phy-handle = <&aqr113c_0>; - label = "10g-2"; }; &wifi { diff --git a/target/linux/qualcommax/dts/ipq8072-aw1000.dts b/target/linux/qualcommax/dts/ipq8072-aw1000.dts index 09adde5dcf7..33fa341390d 100644 --- a/target/linux/qualcommax/dts/ipq8072-aw1000.dts +++ b/target/linux/qualcommax/dts/ipq8072-aw1000.dts @@ -24,12 +24,12 @@ * Aliases as required by u-boot * to patch MAC addresses */ - ethernet0 = &dp1; - ethernet1 = &dp2; - ethernet2 = &dp3; - ethernet3 = &dp4; - ethernet4 = &dp6_syn; - label-mac-device = &dp1; + ethernet0 = &swport1; + ethernet1 = &swport2; + ethernet2 = &swport3; + ethernet3 = &swport4; + ethernet4 = &swport6; + label-mac-device = &swport1; }; chosen { @@ -301,35 +301,70 @@ }; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* 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*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@2 { - port_id = <2>; - phy_address = <1>; + + swport1: port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 0>; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport2: port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 1>; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 2>; }; - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + + swport4: port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 3>; + }; + + swport6: port@6 { + reg = <6>; + label = "wan"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; }; }; }; @@ -338,40 +373,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_0>; - label = "lan1"; -}; - -&dp2 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_1>; - label = "lan2"; -}; - -&dp3 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_2>; - label = "lan3"; -}; - -&dp4 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_3>; - label = "lan4"; -}; - -&dp6_syn { - status = "okay"; - phy-handle = <&qca8081>; - label = "wan"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq8072-ax880.dts b/target/linux/qualcommax/dts/ipq8072-ax880.dts index 70310daf0fb..6e6576b1c45 100644 --- a/target/linux/qualcommax/dts/ipq8072-ax880.dts +++ b/target/linux/qualcommax/dts/ipq8072-ax880.dts @@ -22,9 +22,9 @@ led-running = &led_system; led-upgrade = &led_system; /* Aliases as required by u-boot to patch MAC addresses */ - ethernet0 = &dp5_syn; - ethernet1 = &dp6_syn; - label-mac-device = &dp5_syn; + ethernet0 = &swport5; + ethernet1 = &swport6; + label-mac-device = &swport5; }; chosen { @@ -349,24 +349,46 @@ }; }; +&uniphy1 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - 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*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@5 { - port_id = <5>; - phy_address = <24>; - port_mac_sel = "QGMAC_PORT"; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8081_24>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; + }; + + swport6: port@6 { + reg = <6>; + label = "lan"; + phy-handle = <&qca8081_28>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; }; }; }; @@ -375,18 +397,6 @@ status = "okay"; }; -&dp5_syn { - status = "okay"; - phy-handle = <&qca8081_24>; - label = "wan"; -}; - -&dp6_syn { - status = "okay"; - phy-handle = <&qca8081_28>; - label = "lan"; -}; - &wifi { status = "okay"; qcom,ath11k-calibration-variant = "Yuncore-AX880"; diff --git a/target/linux/qualcommax/dts/ipq8072-ax9000.dts b/target/linux/qualcommax/dts/ipq8072-ax9000.dts index c879c5ef730..6e7f552ffe6 100644 --- a/target/linux/qualcommax/dts/ipq8072-ax9000.dts +++ b/target/linux/qualcommax/dts/ipq8072-ax9000.dts @@ -21,7 +21,7 @@ led-failsafe = &led_system_yellow; led-running = &led_system_blue; led-upgrade = &led_system_yellow; - label-mac-device = &dp5; + label-mac-device = &wan; }; chosen { @@ -460,86 +460,86 @@ }; }; -&switch { +&uniphy0 { status = "okay"; - - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ - switch_mac_mode = ; /* mac mode for uniphy instance0*/ - switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ - - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; - }; - port@2 { - port_id = <2>; - phy_address = <1>; - }; - port@3 { - port_id = <3>; - phy_address = <2>; - }; - port@4 { - port_id = <4>; - phy_address = <3>; - }; - port@5 { - port_id = <5>; - phy_address = <24>; - port_mac_sel = "QGMAC_PORT"; - }; - }; }; -&edma { +&uniphy1 { status = "okay"; }; -&dp1 { +&switch { status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_0>; - label = "lan4"; - nvmem-cells = <&macaddr_dp1>; - nvmem-cell-names = "mac-address"; -}; -&dp2 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_1>; - label = "lan3"; - nvmem-cells = <&macaddr_dp2>; - nvmem-cell-names = "mac-address"; -}; + ports { + #address-cells = <1>; + #size-cells = <0>; -&dp3 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_2>; - label = "lan2"; - nvmem-cells = <&macaddr_dp3>; - nvmem-cell-names = "mac-address"; -}; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; -&dp4 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_3>; - label = "lan1"; - nvmem-cells = <&macaddr_dp4>; - nvmem-cell-names = "mac-address"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + lan4: port@1 { + reg = <1>; + label = "lan4"; + phy-handle = <&qca8075_0>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&macaddr_dp1>; + nvmem-cell-names = "mac-address"; + }; + + lan3: port@2 { + reg = <2>; + label = "lan3"; + phy-handle = <&qca8075_1>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_dp2>; + nvmem-cell-names = "mac-address"; + }; + + lan2: port@3 { + reg = <3>; + label = "lan2"; + phy-handle = <&qca8075_2>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&macaddr_dp3>; + nvmem-cell-names = "mac-address"; + }; + + lan1: port@4 { + reg = <4>; + label = "lan1"; + phy-handle = <&qca8075_3>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_dp4>; + nvmem-cell-names = "mac-address"; + }; + + wan: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; + nvmem-cells = <&macaddr_dp5>; + nvmem-cell-names = "mac-address"; + }; + }; }; -&dp5 { +&edma { status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&qca8081>; - label = "wan"; - nvmem-cells = <&macaddr_dp5>; - nvmem-cell-names = "mac-address"; }; &pcie_qmp0 { diff --git a/target/linux/qualcommax/dts/ipq8072-dl-wrx36.dts b/target/linux/qualcommax/dts/ipq8072-dl-wrx36.dts index fa3c8ea0113..1d1e7fc1ee3 100644 --- a/target/linux/qualcommax/dts/ipq8072-dl-wrx36.dts +++ b/target/linux/qualcommax/dts/ipq8072-dl-wrx36.dts @@ -232,35 +232,80 @@ }; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* 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*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { port@1 { - port_id = <1>; - phy_address = <0>; + reg = <1>; + label = "lan4"; + phy-handle = <&qca8075_0>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&macaddr_art_18>; + nvmem-cell-names = "mac-address"; }; + port@2 { - port_id = <2>; - phy_address = <1>; + reg = <2>; + label = "lan3"; + phy-handle = <&qca8075_1>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_art_12>; + nvmem-cell-names = "mac-address"; }; + port@3 { - port_id = <3>; - phy_address = <2>; + reg = <3>; + label = "lan2"; + phy-handle = <&qca8075_2>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&macaddr_art_c>; + nvmem-cell-names = "mac-address"; }; + port@4 { - port_id = <4>; - phy_address = <3>; + reg = <4>; + label = "lan1"; + phy-handle = <&qca8075_3>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; + port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + reg = <6>; + label = "wan"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -269,50 +314,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_0>; - label = "lan4"; - nvmem-cells = <&macaddr_art_18>; - nvmem-cell-names = "mac-address"; -}; - -&dp2 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_1>; - label = "lan3"; - nvmem-cells = <&macaddr_art_12>; - nvmem-cell-names = "mac-address"; -}; - -&dp3 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_2>; - label = "lan2"; - nvmem-cells = <&macaddr_art_c>; - nvmem-cell-names = "mac-address"; -}; - -&dp4 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_3>; - label = "lan1"; - nvmem-cells = <&macaddr_art_6>; - nvmem-cell-names = "mac-address"; -}; - -&dp6_syn { - status = "okay"; - phy-handle = <&qca8081>; - label = "wan"; - nvmem-cells = <&macaddr_art_0>; - nvmem-cell-names = "mac-address"; -}; - &wifi { status = "okay"; qcom,ath11k-calibration-variant = "Dynalink-DL-WRX36"; diff --git a/target/linux/qualcommax/dts/ipq8072-eap620hd-v1.dts b/target/linux/qualcommax/dts/ipq8072-eap620hd-v1.dts index 18a3759e79d..4932509ab98 100644 --- a/target/linux/qualcommax/dts/ipq8072-eap620hd-v1.dts +++ b/target/linux/qualcommax/dts/ipq8072-eap620hd-v1.dts @@ -82,21 +82,34 @@ }; }; -&dp6 { +&uniphy2 { status = "okay"; - phy-handle = <&ar8031>; - label = "lan"; }; &switch { status = "okay"; - switch_lan_bmp = ; - switch_mac_mode2 = ; - qcom,port_phyinfo { - port@6 { - phy_address = <4>; - port_id = <6>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + swport6: port@6 { + reg = <6>; + label = "lan"; + phy-handle = <&ar8031>; + phy-mode = "sgmii"; + pcs-handle = <&uniphy2 0>; }; }; }; diff --git a/target/linux/qualcommax/dts/ipq8072-eap660hd-v1.dts b/target/linux/qualcommax/dts/ipq8072-eap660hd-v1.dts index 62d40d7e1b0..aea73fe82d4 100644 --- a/target/linux/qualcommax/dts/ipq8072-eap660hd-v1.dts +++ b/target/linux/qualcommax/dts/ipq8072-eap660hd-v1.dts @@ -81,23 +81,34 @@ }; }; -&dp5 { +&uniphy1 { status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&qca8081_28>; - label = "lan"; }; &switch { status = "okay"; - switch_lan_bmp = ; - switch_mac_mode1 = ; - - qcom,port_phyinfo { - port@5 { - phy_address = <28>; - port_id = <5>; - port_mac_sel = "QGMAC_PORT"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + swport5: port@5 { + reg = <5>; + label = "lan"; + phy-handle = <&qca8081_28>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; }; }; }; diff --git a/target/linux/qualcommax/dts/ipq8072-haze.dts b/target/linux/qualcommax/dts/ipq8072-haze.dts index 0b390e9298f..cb3de6a2593 100644 --- a/target/linux/qualcommax/dts/ipq8072-haze.dts +++ b/target/linux/qualcommax/dts/ipq8072-haze.dts @@ -16,11 +16,11 @@ aliases { serial0 = &blsp1_uart5; /* Aliases are required by U-Boot to patch MAC addresses */ - ethernet0 = &dp6_syn; - ethernet1 = &dp4; - ethernet2 = &dp3; - ethernet3 = &dp2; - label-mac-device = &dp6_syn; + ethernet0 = &swport6; + ethernet1 = &swport4; + ethernet2 = &swport3; + ethernet3 = &swport2; + label-mac-device = &swport6; led-boot = &led_system_blue; led-failsafe = &led_system_red; led-running = &led_system_green; @@ -198,37 +198,71 @@ vqmmc-supply = <&l11>; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ - switch_mac_mode = ; /* mac mode for uniphy instance0*/ - switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ - switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ + ports { + #address-cells = <1>; + #size-cells = <0>; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@2 { - port_id = <2>; - phy_address = <1>; + + swport1: port@1 { + reg = <1>; + label = "lan4"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; + status = "disabled"; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport2: port@2 { + reg = <2>; + label = "lan3"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport3: port@3 { + reg = <3>; + label = "lan2"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; }; - port@6 { - port_id = <6>; - phy_address = <8>; - compatible = "ethernet-phy-ieee802.3-c45"; - ethernet-phy-ieee802.3-c45; + + swport4: port@4 { + reg = <4>; + label = "lan1"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + }; + + swport6: port@6 { + reg = <6>; + label = "wan"; + phy-handle = <&aqr113c>; + phy-mode = "usxgmii"; + pcs-handle = <&uniphy2 0>; }; }; }; @@ -237,39 +271,6 @@ status = "okay"; }; -/* Dummy LAN port */ -&dp1 { - status = "disabled"; - phy-handle = <&qca8075_0>; - label = "lan4"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan3"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan2"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan1"; -}; - -&dp6_syn { - status = "okay"; - qcom,mactype = <1>; - phy-mode = "usxgmii"; - phy-handle = <&aqr113c>; - label = "wan"; -}; - &pcie_qmp0 { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq8072-linkhub-hh500v.dts b/target/linux/qualcommax/dts/ipq8072-linkhub-hh500v.dts index 2a91807bdda..3c40fc16ae4 100644 --- a/target/linux/qualcommax/dts/ipq8072-linkhub-hh500v.dts +++ b/target/linux/qualcommax/dts/ipq8072-linkhub-hh500v.dts @@ -338,42 +338,52 @@ }; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = ; - switch_wan_bmp = ; - switch_mac_mode = ; - switch_mac_mode2 = ; + ports { + #address-cells = <1>; + #size-cells = <0>; - qcom,port_phyinfo { - port@4 { - phy_address = <3>; - port_id = <4>; - }; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - port@6 { - phy_address = <16>; - port_id = <6>; - port_mac_sel = "QGMAC_PORT"; + fixed-link { + speed = <1000>; + full-duplex; }; }; -}; -&edma { - status = "okay"; -}; + swport4: port@4 { + reg = <4>; + label = "lan"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + }; -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan"; + swport6: port@6 { + reg = <6>; + label = "wan"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; + }; + }; }; -&dp6_syn { +&edma { status = "okay"; - phy-handle = <&qca8081>; - label = "wan"; }; &pcie_qmp0 { diff --git a/target/linux/qualcommax/dts/ipq8072-mx5300.dts b/target/linux/qualcommax/dts/ipq8072-mx5300.dts index ea93cdcf4c7..f7defd66555 100644 --- a/target/linux/qualcommax/dts/ipq8072-mx5300.dts +++ b/target/linux/qualcommax/dts/ipq8072-mx5300.dts @@ -19,7 +19,7 @@ led-running = &led_system_blue; led-failsafe = &led_system_red; led-upgrade = &led_system_green; - label-mac-device = &dp2; + label-mac-device = &swport2; }; chosen { @@ -438,33 +438,76 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ - switch_mac_mode = ; /* mac mode for uniphy instance0*/ + ports { + #address-cells = <1>; + #size-cells = <0>; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@2 { - port_id = <2>; - phy_address = <1>; + + swport1: port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport2: port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; }; - port@5 { - port_id = <5>; - phy_address = <4>; + + swport4: port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; + }; + + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -473,46 +516,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "lan1"; - nvmem-cells = <&hw_mac_addr 0>; - nvmem-cell-names = "mac-address"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan2"; - nvmem-cells = <&hw_mac_addr 0>; - nvmem-cell-names = "mac-address"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan3"; - nvmem-cells = <&hw_mac_addr 0>; - nvmem-cell-names = "mac-address"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan4"; - nvmem-cells = <&hw_mac_addr 0>; - nvmem-cell-names = "mac-address"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; - label = "wan"; - nvmem-cells = <&hw_mac_addr 0>; - nvmem-cell-names = "mac-address"; -}; - &ssphy_0 { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq8072-mx8500.dts b/target/linux/qualcommax/dts/ipq8072-mx8500.dts index f7837debbcc..1025775d515 100644 --- a/target/linux/qualcommax/dts/ipq8072-mx8500.dts +++ b/target/linux/qualcommax/dts/ipq8072-mx8500.dts @@ -409,40 +409,80 @@ }; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* 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*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + swport1: port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; - port@2 { - port_id = <2>; - phy_address = <1>; + swport2: port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; - port@3 { - port_id = <3>; - phy_address = <2>; + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <3>; + swport4: port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; - port@6 { - port_id = <6>; - phy_address = <8>; - compatible = "ethernet-phy-ieee802.3-c45"; - ethernet-phy-ieee802.3-c45; + swport6: port@6 { + reg = <6>; + label = "wan"; + phy-handle = <&aqr114c>; + phy-mode = "usxgmii"; + pcs-handle = <&uniphy2 0>; + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -451,51 +491,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_0>; - label = "lan1"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; -}; - -&dp2 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_1>; - label = "lan2"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; -}; - -&dp3 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_2>; - label = "lan3"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; -}; - -&dp4 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_3>; - label = "lan4"; - nvmem-cells = <&hw_mac_addr 1>; - nvmem-cell-names = "mac-address"; -}; - -&dp6_syn { - status = "okay"; - phy-mode = "usxgmii"; - phy-handle = <&aqr114c>; - label = "wan"; - nvmem-cells = <&hw_mac_addr 0>; - nvmem-cell-names = "mac-address"; -}; - &ssphy_0 { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq8072-sax1v1k.dts b/target/linux/qualcommax/dts/ipq8072-sax1v1k.dts index 91804b862fb..e522a3efe18 100644 --- a/target/linux/qualcommax/dts/ipq8072-sax1v1k.dts +++ b/target/linux/qualcommax/dts/ipq8072-sax1v1k.dts @@ -20,11 +20,11 @@ led-upgrade = &led_system_red; serial0 = &blsp1_uart5; /* Aliases as required by u-boot to patch MAC addresses */ - ethernet0 = &dp6_syn; - ethernet1 = &dp4; - ethernet2 = &dp3; - ethernet3 = &dp2; - label-mac-device = &dp6_syn; + ethernet0 = &swport6; + ethernet1 = &swport4; + ethernet2 = &swport3; + ethernet3 = &swport2; + label-mac-device = &swport6; }; chosen { @@ -173,33 +173,62 @@ status = "okay"; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* 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*/ status = "okay"; - qcom,port_phyinfo { - port@2 { - port_id = <2>; - phy_address = <1>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@3 { - port_id = <3>; - phy_address = <2>; + swport2: port@2 { + reg = <2>; + label = "lan3"; + phy-handle = <&qca8075_1>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 1>; }; - port@4 { - port_id = <4>; - phy_address = <3>; + swport3: port@3 { + reg = <3>; + label = "lan2"; + phy-handle = <&qca8075_2>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 2>; }; - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + swport4: port@4 { + reg = <4>; + label = "lan1"; + phy-handle = <&qca8075_3>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 3>; + }; + + swport6: port@6 { + reg = <6>; + label = "wan"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; }; }; }; @@ -208,33 +237,6 @@ status = "okay"; }; -&dp2 { - phy-mode = "qsgmii"; - phy-handle = <&qca8075_1>; - label = "lan3"; - status = "okay"; -}; - -&dp3 { - phy-mode = "qsgmii"; - phy-handle = <&qca8075_2>; - label = "lan2"; - status = "okay"; -}; - -&dp4 { - phy-mode = "qsgmii"; - phy-handle = <&qca8075_3>; - label = "lan1"; - status = "okay"; -}; - -&dp6_syn { - phy-handle = <&qca8081>; - label = "wan"; - status = "okay"; -}; - &wifi { qcom,ath11k-calibration-variant = "Spectrum-SAX1V1K"; status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq8072-wax218.dts b/target/linux/qualcommax/dts/ipq8072-wax218.dts index e9a9c12edfb..570ff0aca55 100644 --- a/target/linux/qualcommax/dts/ipq8072-wax218.dts +++ b/target/linux/qualcommax/dts/ipq8072-wax218.dts @@ -89,18 +89,36 @@ status = "okay"; }; +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = ; - switch_mac_mode = ; - switch_mac_mode2 = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + swport6: port@6 { + reg = <6>; + label = "lan"; + phy-handle = <&qca8081_28>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -135,14 +153,6 @@ }; }; -&dp6_syn { - status = "okay"; - phy-handle = <&qca8081_28>; - label = "lan"; - nvmem-cells = <&macaddr_ubootenv_ethaddr>; - nvmem-cell-names = "mac-address"; -}; - &qpic_bam { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq8072-wax620.dts b/target/linux/qualcommax/dts/ipq8072-wax620.dts index f410f79495e..286bb7c60b8 100644 --- a/target/linux/qualcommax/dts/ipq8072-wax620.dts +++ b/target/linux/qualcommax/dts/ipq8072-wax620.dts @@ -14,8 +14,8 @@ aliases { serial0 = &blsp1_uart5; - ethernet0 = &dp6; - label-mac-device = &dp6; + ethernet0 = &swport6; + label-mac-device = &swport6; led-boot = &led_system_blue; led-failsafe = &led_system_red; @@ -115,18 +115,34 @@ status = "okay"; }; +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = ; - switch_mac_mode = ; - switch_mac_mode2 = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + swport6: port@6 { + reg = <6>; + label = "lan"; + phy-handle = <&qca8081_28>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; }; }; }; @@ -161,12 +177,6 @@ }; }; -&dp6 { - status = "okay"; - phy-handle = <&qca8081_28>; - label = "lan"; -}; - &qpic_bam { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq8072-wpq873.dts b/target/linux/qualcommax/dts/ipq8072-wpq873.dts index f0fd1331e60..7fe6c9b5bd3 100644 --- a/target/linux/qualcommax/dts/ipq8072-wpq873.dts +++ b/target/linux/qualcommax/dts/ipq8072-wpq873.dts @@ -21,11 +21,11 @@ led-running = &led_system_green; led-upgrade = &led_system_blue; /* Aliases as required by u-boot to patch MAC addresses */ - ethernet0 = &dp6; - ethernet1 = &dp2; - ethernet2 = &dp3; - ethernet3 = &dp4; - label-mac-device = &dp6; + ethernet0 = &swport6; + ethernet1 = &swport2; + ethernet2 = &swport3; + ethernet3 = &swport4; + label-mac-device = &swport6; }; chosen { @@ -384,32 +384,62 @@ }; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ - switch_mac_mode = ; /* mac mode for uniphy instance0*/ - switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ - switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ + ports { + #address-cells = <1>; + #size-cells = <0>; - qcom,port_phyinfo { - port@2 { - port_id = <2>; - phy_address = <1>; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport2: port@2 { + reg = <2>; + label = "lan1"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport3: port@3 { + reg = <3>; + label = "lan2"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; }; - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + + swport4: port@4 { + reg = <4>; + label = "lan3"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + }; + + swport6: port@6 { + reg = <6>; + label = "wan"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; }; }; }; @@ -418,30 +448,6 @@ status = "okay"; }; -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan1"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan2"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan3"; -}; - -&dp6 { - status = "okay"; - phy-handle = <&qca8081>; - label = "wan"; -}; - &pcie_qmp0 { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq8072-zbt-z800ax.dts b/target/linux/qualcommax/dts/ipq8072-zbt-z800ax.dts index be7c77d3feb..6db9345e347 100644 --- a/target/linux/qualcommax/dts/ipq8072-zbt-z800ax.dts +++ b/target/linux/qualcommax/dts/ipq8072-zbt-z800ax.dts @@ -22,12 +22,12 @@ * Aliases as required by u-boot * to patch MAC addresses */ - ethernet0 = &dp1; - ethernet1 = &dp2; - ethernet2 = &dp3; - ethernet3 = &dp4; - ethernet4 = &dp5; - label-mac-device = &dp1; + ethernet0 = &swport1; + ethernet1 = &swport2; + ethernet2 = &swport3; + ethernet3 = &swport4; + ethernet4 = &swport5; + label-mac-device = &swport1; }; chosen { @@ -379,33 +379,66 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; - switch_wan_bmp = ; - switch_mac_mode = ; + ports { + #address-cells = <1>; + #size-cells = <0>; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@2 { - port_id = <2>; - phy_address = <1>; + + swport1: port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport2: port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; }; - port@5 { - port_id = <5>; - phy_address = <4>; + + swport4: port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + }; + + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; }; }; }; @@ -414,36 +447,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "lan1"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan2"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan3"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan4"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; - label = "wan"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq8074-deco-x80-5g.dts b/target/linux/qualcommax/dts/ipq8074-deco-x80-5g.dts index 2f14b554ccb..b43f5b6bb5b 100644 --- a/target/linux/qualcommax/dts/ipq8074-deco-x80-5g.dts +++ b/target/linux/qualcommax/dts/ipq8074-deco-x80-5g.dts @@ -443,24 +443,46 @@ to suit the TP-Link Deco X80-5G target */ }; }; +&uniphy1 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; &switch { status = "okay"; - switch_wan_bmp = ; /* wan port bitmap */ - switch_lan_bmp = ; /* lan port bitmap */ - switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ - switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@5 { - port_id = <5>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@6 { - port_id = <6>; - phy_address = <4>; + + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; + }; + + swport6: port@6 { + reg = <6>; + label = "lan"; + phy-handle = <&qca8033>; + phy-mode = "sgmii"; + pcs-handle = <&uniphy2 0>; }; }; }; @@ -469,18 +491,6 @@ to suit the TP-Link Deco X80-5G target */ status = "okay"; }; -&dp5 { - status = "okay"; - phy-handle = <&qca8081>; - label = "wan"; -}; - -&dp6_syn { - status = "okay"; - phy-handle = <&qca8033>; - label = "lan"; -}; - &wifi { status = "okay"; qcom,ath11k-calibration-variant = "tplink_deco-x80-5g"; diff --git a/target/linux/qualcommax/dts/ipq8074-nbg7815.dts b/target/linux/qualcommax/dts/ipq8074-nbg7815.dts index 35dd01967f8..ecf2a899ebd 100644 --- a/target/linux/qualcommax/dts/ipq8074-nbg7815.dts +++ b/target/linux/qualcommax/dts/ipq8074-nbg7815.dts @@ -20,9 +20,7 @@ aliases { serial0 = &blsp1_uart5; serial1 = &blsp1_uart3; - /* Alias as required by u-boot to patch MAC addresses */ - ethernet0 = &dp1; - label-mac-device = &dp1; + label-mac-device = &swport1; }; chosen { @@ -300,46 +298,94 @@ }; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy1 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - 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 = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@2 { - port_id = <2>; - phy_address = <1>; + swport1: port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&macaddr_lan 0>; + nvmem-cell-names = "mac-address"; }; - port@3 { - port_id = <3>; - phy_address = <2>; + swport2: port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_lan 0>; + nvmem-cell-names = "mac-address"; + }; + + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&macaddr_lan 0>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <3>; + swport4: port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_lan 0>; + nvmem-cell-names = "mac-address"; }; - port@5 { - port_id = <5>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy1 0>; + nvmem-cells = <&macaddr_lan 1>; + nvmem-cell-names = "mac-address"; }; - port@6 { - port_id = <6>; - ethernet-phy-ieee802.3-c45; - phy_address = <8>; + swport6: port@6 { + reg = <6>; + label = "10g"; + phy-handle = <&aqr113c>; + phy-mode = "usxgmii"; + pcs-handle = <&uniphy2 0>; + nvmem-cells = <&macaddr_lan 0>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -348,56 +394,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "lan1"; - nvmem-cells = <&macaddr_lan 0>; - nvmem-cell-names = "mac-address"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan2"; - nvmem-cells = <&macaddr_lan 0>; - nvmem-cell-names = "mac-address"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan3"; - nvmem-cells = <&macaddr_lan 0>; - nvmem-cell-names = "mac-address"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan4"; - nvmem-cells = <&macaddr_lan 0>; - nvmem-cell-names = "mac-address"; -}; - -&dp5 { - status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&qca8081>; - label = "wan"; - nvmem-cells = <&macaddr_lan 1>; - nvmem-cell-names = "mac-address"; -}; - -&dp6_syn { - status = "okay"; - phy-mode = "usxgmii"; - phy-handle = <&aqr113c>; - label = "10g"; - nvmem-cells = <&macaddr_lan 0>; - nvmem-cell-names = "mac-address"; -}; - &blsp1_i2c2 { pinctrl-0 = <&i2c_0_pins>; pinctrl-names = "default"; diff --git a/target/linux/qualcommax/dts/ipq8074-rax120v2.dts b/target/linux/qualcommax/dts/ipq8074-rax120v2.dts index 4822cbe9a69..2cc4b5dd8b7 100644 --- a/target/linux/qualcommax/dts/ipq8074-rax120v2.dts +++ b/target/linux/qualcommax/dts/ipq8074-rax120v2.dts @@ -19,7 +19,7 @@ led-running = &led_system_white; led-upgrade = &led_system_white; led-internet = &led_wan_white; - label-mac-device = &dp5; + label-mac-device = &swport5; }; chosen { @@ -190,40 +190,90 @@ }; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - 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*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + swport1: port@1 { + reg = <1>; + label = "lan4"; + phy-handle = <&qca8075_0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; }; - port@2 { - port_id = <2>; - phy_address = <1>; + + swport2: port@2 { + reg = <2>; + label = "lan3"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport3: port@3 { + reg = <3>; + label = "lan2"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport4: port@4 { + reg = <4>; + label = "lan1"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; }; - port@5 { - port_id = <5>; - phy_address = <4>; + + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + nvmem-cells = <&macaddr_wan>; + nvmem-cell-names = "mac-address"; }; - port@6 { - port_id = <6>; - phy_address = <7>; - compatible = "ethernet-phy-ieee802.3-c45"; - ethernet-phy-ieee802.3-c45; + + swport6: port@6 { + reg = <6>; + label = "lan5"; + phy-handle = <&aqr111b0>; + phy-mode = "usxgmii"; + pcs-handle = <&uniphy2 0>; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -232,55 +282,6 @@ status = "okay"; }; -&dp1 { - status = "okay"; - phy-handle = <&qca8075_0>; - label = "lan4"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; -}; - -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan3"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan2"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan1"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; - label = "wan"; - nvmem-cells = <&macaddr_wan>; - nvmem-cell-names = "mac-address"; -}; - -&dp6_syn { - status = "okay"; - phy-mode = "usxgmii"; - phy-handle = <&aqr111b0>; - label = "lan5"; - nvmem-cells = <&macaddr_lan>; - nvmem-cell-names = "mac-address"; -}; - &blsp1_uart5 { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq8074-rbs750.dts b/target/linux/qualcommax/dts/ipq8074-rbs750.dts index 9982abd8037..54588badf1d 100644 --- a/target/linux/qualcommax/dts/ipq8074-rbs750.dts +++ b/target/linux/qualcommax/dts/ipq8074-rbs750.dts @@ -12,10 +12,10 @@ compatible = "netgear,rbs750", "qcom,ipq8074"; }; -&dp1 { +&swport1 { status = "disabled"; }; -&dp2 { +&swport2 { status = "disabled"; }; diff --git a/target/linux/qualcommax/dts/ipq8074-rbx750.dtsi b/target/linux/qualcommax/dts/ipq8074-rbx750.dtsi index 55474c82e3a..097cb6ca719 100644 --- a/target/linux/qualcommax/dts/ipq8074-rbx750.dtsi +++ b/target/linux/qualcommax/dts/ipq8074-rbx750.dtsi @@ -18,7 +18,7 @@ led-failsafe = &lp5562_red; led-upgrade = &lp5562_blue; serial0 = &blsp1_uart5; - label-mac-device = &dp5; + label-mac-device = &swport5; }; chosen { @@ -98,32 +98,66 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT4 | ESS_PORT5)>; - switch_wan_bmp = ; - switch_mac_mode = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <0>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + swport1: port@1 { + reg = <1>; + label = "wan"; + phy-handle = <&phy0>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&macaddr_boarddata 1>; + nvmem-cell-names = "mac-address"; }; - port@2 { - port_id = <2>; - phy_address = <1>; + swport2: port@2 { + reg = <2>; + label = "lan3"; + phy-handle = <&phy1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_boarddata 1>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <3>; + swport4: port@4 { + reg = <4>; + label = "lan2"; + phy-handle = <&phy3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_boarddata 1>; + nvmem-cell-names = "mac-address"; }; - port@5 { - port_id = <5>; - phy_address = <4>; + swport5: port@5 { + reg = <5>; + label = "lan1"; + phy-handle = <&phy4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + nvmem-cells = <&macaddr_boarddata 0>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -162,38 +196,6 @@ }; }; -&dp1 { - status = "okay"; - phy-handle = <&phy0>; - label = "wan"; - nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_boarddata 1>; -}; - -&dp2 { - status = "okay"; - phy-handle = <&phy1>; - label = "lan3"; - nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_boarddata 2>; -}; - -&dp4 { - status = "okay"; - phy-handle = <&phy3>; - label = "lan2"; - nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_boarddata 1>; -}; - -&dp5 { - status = "okay"; - phy-handle = <&phy4>; - label = "lan1"; - nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_boarddata 0>; -}; - &qpic_bam { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq8074-rt-ax89x.dts b/target/linux/qualcommax/dts/ipq8074-rt-ax89x.dts index 1fdf394d3fa..467dec01d61 100644 --- a/target/linux/qualcommax/dts/ipq8074-rt-ax89x.dts +++ b/target/linux/qualcommax/dts/ipq8074-rt-ax89x.dts @@ -17,12 +17,6 @@ aliases { serial0 = &blsp1_uart5; mdio-gpio0 = &mdio1; - ethernet0 = &dp1; - ethernet1 = &dp2; - ethernet2 = &dp3; - ethernet3 = &dp4; - ethernet4 = &dp5_syn; - ethernet5 = &dp6_syn; led-boot = &led_pwr; led-failsafe = &led_pwr; led-running = &led_pwr; @@ -160,6 +154,16 @@ enable-active-high; regulator-boot-on; }; + + sfp: sfp { + compatible = "sff,sfp"; + + i2c-bus = <&blsp1_i2c2>; + + mod-def0-gpios = <&tlmm 46 GPIO_ACTIVE_LOW>; + tx-disable-gpios = <&tlmm 48 GPIO_ACTIVE_HIGH>; + tx-fault-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>; + }; }; &cpu0_thermal { @@ -455,6 +459,12 @@ partition@3e0000 { label = "0:appsblenv"; reg = <0x003e0000 0x20000>; + + nvmem-layout { + compatible = "u-boot,env"; + + macaddr_ubootenv_ethaddr: ethaddr {}; + }; }; partition@400000 { @@ -552,6 +562,7 @@ #address-cells = <1>; #size-cells = <0>; reg = <0x10>; + dsa,member = <1 0>; ports { #address-cells = <1>; @@ -560,7 +571,7 @@ port@0 { reg = <0>; label = "cpu"; - ethernet = <&dp1>; + ethernet = <&port_switch>; phy-mode = "rgmii-rxid"; phy-handle = <&qca8035>; }; @@ -569,30 +580,40 @@ reg = <1>; label = "lan7"; phy-handle = <&qca8337_0>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; port@2 { reg = <2>; label = "lan6"; phy-handle = <&qca8337_1>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; port@3 { reg = <3>; label = "lan5"; phy-handle = <&qca8337_2>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; port@4 { reg = <4>; label = "lan4"; phy-handle = <&qca8337_3>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; port@5 { reg = <5>; label = "lan3"; phy-handle = <&qca8337_4>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; port@6 { @@ -602,6 +623,8 @@ phy-handle = <&qca8033>; managed = "in-band-status"; qca,sgmii-enable-pll; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -639,97 +662,103 @@ &switch { status = "okay"; + dsa,member = <0 0>; pinctrl-0 = <&uniphy_pins>; pinctrl-names = "default"; - switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT5 | ESS_PORT6)>; /* lan port bitmap */ - switch_wan_bmp = ; /* wan port bitmap */ - switch_mac_mode = ; /* mac mode for uniphy instance0*/ - switch_mac_mode1 = ; /* mac mode for uniphy instance1*/ - switch_mac_mode2 = ; /* mac mode for uniphy instance2*/ + ports { + #address-cells = <1>; + #size-cells = <0>; - qcom,port_phyinfo { port@0 { - port_id = <1>; - phy_address = <0x8>; - }; - port@1 { - port_id = <2>; - phy_address = <0x9>; - }; - port@2 { - port_id = <3>; - phy_address = <0xa>; + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@3 { - port_id = <4>; - phy_address = <0xb>; + + port_switch: port@1 { + reg = <1>; + label = "switch"; + phy-handle = <&qca8075_8>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 0>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; - sfp: port@4 { - port_id = <5>; - phy_address = <30>; - phy_i2c_address = <30>; - phy-i2c-mode; /*i2c access phy */ - media-type = "sfp"; /* fiber mode */ - sfp_tx_dis_pin = <&tlmm 48 GPIO_ACTIVE_HIGH>; - sfp_mod_present_pin = <&tlmm 46 GPIO_ACTIVE_LOW>; + port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_9>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; - /* PCB R5.00, AQR113C */ - port@5_113c { - status = "disabled"; - port_id = <6>; - phy_address = <8>; - ethernet-phy-ieee802.3-c45; - mdiobus = <&mdio1>; + port@3 { + reg = <3>; + label = "lan1"; + phy-handle = <&qca8075_a>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; + }; + + port@4 { + reg = <4>; + label = "wan"; + phy-handle = <&qca8075_b>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; + }; + + port@5 { + reg = <5>; + label = "10g-sfp"; + sfp = <&sfp>; + phy-mode = "10gbase-r"; + managed = "in-band-status"; + pcs-handle = <&uniphy1 0>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; + }; + + port@6 { + reg = <6>; + label = "10g-copper"; + phy-handle = <&aqr113c>; + phy-mode = "usxgmii"; + pcs-handle = <&uniphy2 0>; + nvmem-cells = <&macaddr_ubootenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; }; }; -&edma { - status = "okay"; -}; - -&dp1 { +&uniphy0 { status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_8>; - label = "switch"; }; -&dp2 { +&uniphy1 { status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_9>; - label = "lan2"; }; -&dp3 { +&uniphy2 { status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_a>; - label = "lan1"; }; -&dp4 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_b>; - label = "wan"; -}; - -&dp5_syn { - status = "okay"; - phy-handle = <&sfp>; - label = "10g-sfp"; -}; - -&dp6_syn { +&edma { status = "okay"; - phy-handle = <&aqr113c>; - label = "10g-copper"; }; &wifi { diff --git a/target/linux/qualcommax/dts/ipq8074-sxk80.dtsi b/target/linux/qualcommax/dts/ipq8074-sxk80.dtsi index db0e4475c31..9abdbdc0a59 100644 --- a/target/linux/qualcommax/dts/ipq8074-sxk80.dtsi +++ b/target/linux/qualcommax/dts/ipq8074-sxk80.dtsi @@ -20,7 +20,7 @@ led-failsafe = &led_front_red; led-running = &led_front_green; led-upgrade = &led_front_white; - label-mac-device = &dp2; + label-mac-device = &swport2; }; chosen { @@ -458,35 +458,80 @@ }; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* 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*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; - qcom,port_phyinfo { - port@2 { - port_id = <2>; - phy_address = <1>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; - port@3 { - port_id = <3>; - phy_address = <2>; + + swport2: port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_boarddata1_0>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <3>; + + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&macaddr_boarddata1_0>; + nvmem-cell-names = "mac-address"; }; - port@5 { - port_id = <5>; - phy_address = <4>; + + swport4: port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_boarddata1_0>; + nvmem-cell-names = "mac-address"; }; - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + + swport5: port@5 { + reg = <5>; + label = "lan5"; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; + nvmem-cells = <&macaddr_boarddata1_0>; + nvmem-cell-names = "mac-address"; + }; + + swport6: port@6 { + reg = <6>; + label = "wan"; + phy-handle = <&qca8081_28>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; + nvmem-cells = <&macaddr_boarddata1_6>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -495,46 +540,6 @@ status = "okay"; }; -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; - label = "lan2"; - nvmem-cells = <&macaddr_boarddata1_0>; - nvmem-cell-names = "mac-address"; -}; - -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; - label = "lan3"; - nvmem-cells = <&macaddr_boarddata1_0>; - nvmem-cell-names = "mac-address"; -}; - -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan4"; - nvmem-cells = <&macaddr_boarddata1_0>; - nvmem-cell-names = "mac-address"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; - label = "lan5"; - nvmem-cells = <&macaddr_boarddata1_0>; - nvmem-cell-names = "mac-address"; -}; - -&dp6 { - status = "okay"; - phy-handle = <&qca8081_28>; - label = "wan"; - nvmem-cells = <&macaddr_boarddata1_6>; - nvmem-cell-names = "mac-address"; -}; - &wifi { status = "okay"; diff --git a/target/linux/qualcommax/dts/ipq8074-wax630.dts b/target/linux/qualcommax/dts/ipq8074-wax630.dts index 3393efd7b55..0764800bbc9 100644 --- a/target/linux/qualcommax/dts/ipq8074-wax630.dts +++ b/target/linux/qualcommax/dts/ipq8074-wax630.dts @@ -16,9 +16,9 @@ aliases { serial0 = &blsp1_uart5; - ethernet0 = &dp6_syn; - ethernet1 = &dp4; - label-mac-device = &dp6_syn; + ethernet0 = &swport6; + ethernet1 = &swport4; + label-mac-device = &swport6; led-boot = &led_system_blue; led-failsafe = &led_system_red; @@ -148,23 +148,46 @@ status = "okay"; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT4 | ESS_PORT6)>; - switch_mac_mode = ; - switch_mac_mode2 = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { - port@4 { - port_id = <4>; - phy_address = <3>; + swport4: port@4 { + reg = <4>; + label = "lan2"; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; }; - port@6 { - port_id = <6>; - phy_address = <28>; - port_mac_sel = "QGMAC_PORT"; + swport6: port@6 { + reg = <6>; + label = "lan1"; + phy-handle = <&qca8081>; + phy-mode = "2500base-x"; + pcs-handle = <&uniphy2 0>; }; }; }; @@ -214,18 +237,6 @@ }; }; -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; - label = "lan2"; -}; - -&dp6_syn { - status = "okay"; - phy-handle = <&qca8081>; - label = "lan1"; -}; - &qpic_bam { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq8074-wxr-5950ax12.dts b/target/linux/qualcommax/dts/ipq8074-wxr-5950ax12.dts index f6ba5731c89..60fb04d46c8 100644 --- a/target/linux/qualcommax/dts/ipq8074-wxr-5950ax12.dts +++ b/target/linux/qualcommax/dts/ipq8074-wxr-5950ax12.dts @@ -19,7 +19,7 @@ led-failsafe = &led_power_red; led-running = &led_power_white; led-upgrade = &led_power_white; - label-mac-device = &dp5_syn; + label-mac-device = &swport5; }; chosen { @@ -255,41 +255,84 @@ }; }; +&uniphy0 { + status = "okay"; +}; + +&uniphy1 { + status = "okay"; +}; + +&uniphy2 { + status = "okay"; +}; + &switch { status = "okay"; - switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; - switch_wan_bmp = ; - switch_mac_mode = ; - switch_mac_mode1 = ; - switch_mac_mode2 = ; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { - port@2 { - port_id = <2>; - phy_address = <0x19>; + swport2: port@2 { + reg = <2>; + label = "lan4"; + phy-handle = <&qca8075_1>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 1>; + nvmem-cells = <&macaddr_appsblenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; - port@3 { - port_id = <3>; - phy_address = <0x1a>; + swport3: port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&qca8075_2>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 2>; + nvmem-cells = <&macaddr_appsblenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; - port@4 { - port_id = <4>; - phy_address = <0x1b>; + swport4: port@4 { + reg = <4>; + label = "lan2"; + phy-handle = <&qca8075_3>; + phy-mode = "qsgmii"; + pcs-handle = <&uniphy0 3>; + nvmem-cells = <&macaddr_appsblenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; - port@5 { - port_id = <5>; - ethernet-phy-ieee802.3-c45; - phy_address = <0x0>; + swport5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&aqr113c_1>; + phy-mode = "usxgmii"; + pcs-handle = <&uniphy1 0>; + nvmem-cells = <&macaddr_appsblenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; - port@6 { - port_id = <6>; - ethernet-phy-ieee802.3-c45; - phy_address = <0x8>; + swport6: port@6 { + reg = <6>; + label = "lan1"; + phy-handle = <&aqr113c_2>; + phy-mode = "usxgmii"; + pcs-handle = <&uniphy2 0>; + nvmem-cells = <&macaddr_appsblenv_ethaddr>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -298,51 +341,6 @@ status = "okay"; }; -&dp2 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_1>; - label = "lan4"; - nvmem-cells = <&macaddr_appsblenv_ethaddr>; - nvmem-cell-names = "mac-address"; -}; - -&dp3 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_2>; - label = "lan3"; - nvmem-cells = <&macaddr_appsblenv_ethaddr>; - nvmem-cell-names = "mac-address"; -}; - -&dp4 { - status = "okay"; - phy-mode = "qsgmii"; - phy-handle = <&qca8075_3>; - label = "lan2"; - nvmem-cells = <&macaddr_appsblenv_ethaddr>; - nvmem-cell-names = "mac-address"; -}; - -&dp5_syn { - status = "okay"; - phy-mode = "usxgmii"; - phy-handle = <&aqr113c_1>; - label = "wan"; - nvmem-cells = <&macaddr_appsblenv_ethaddr>; - nvmem-cell-names = "mac-address"; -}; - -&dp6_syn { - status = "okay"; - phy-mode = "usxgmii"; - phy-handle = <&aqr113c_2>; - label = "lan1"; - nvmem-cells = <&macaddr_appsblenv_ethaddr>; - nvmem-cell-names = "mac-address"; -}; - &ssphy_0 { status = "okay"; }; diff --git a/target/linux/qualcommax/dts/ipq807x-nwax10ax.dtsi b/target/linux/qualcommax/dts/ipq807x-nwax10ax.dtsi index 7c2bd698ea6..5f6e75410a9 100644 --- a/target/linux/qualcommax/dts/ipq807x-nwax10ax.dtsi +++ b/target/linux/qualcommax/dts/ipq807x-nwax10ax.dtsi @@ -89,13 +89,33 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - phyinfo: qcom,port_phyinfo { - port@1 { - port_id = <1>; - phy_address = <1>; + swports: ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + swport1: port@1 { + reg = <1>; + phy-handle = <&ar8033>; + phy-mode = "sgmii"; + pcs-handle = <&uniphy0 0>; }; }; }; @@ -112,12 +132,6 @@ }; }; -&dp1 { - status = "okay"; - phy-handle = <&ar8033>; - phy-mode = "sgmii"; -}; - &blsp1_spi1 { pinctrl-0 = <&spi_0_pins>; pinctrl-names = "default"; diff --git a/target/linux/qualcommax/dts/ipq8174-homewrk.dts b/target/linux/qualcommax/dts/ipq8174-homewrk.dts index 3e028fc8c6b..3682114ad3e 100644 --- a/target/linux/qualcommax/dts/ipq8174-homewrk.dts +++ b/target/linux/qualcommax/dts/ipq8174-homewrk.dts @@ -46,33 +46,25 @@ }; }; -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; +&swport2 { label = "wan"; nvmem-cells = <&mac_address 0>; nvmem-cell-names = "mac-address"; }; -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; +&swport3 { label = "lan3"; nvmem-cells = <&mac_address 1>; nvmem-cell-names = "mac-address"; }; -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; +&swport4 { label = "lan2"; nvmem-cells = <&mac_address 1>; nvmem-cell-names = "mac-address"; }; -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; +&swport5 { label = "lan1"; nvmem-cells = <&mac_address 1>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/qualcommax/dts/ipq8174-mx4200.dtsi b/target/linux/qualcommax/dts/ipq8174-mx4200.dtsi index c2f2ac563b5..20f83c72f8c 100644 --- a/target/linux/qualcommax/dts/ipq8174-mx4200.dtsi +++ b/target/linux/qualcommax/dts/ipq8174-mx4200.dtsi @@ -5,7 +5,7 @@ / { aliases { - label-mac-device = &dp2; + label-mac-device = &swport2; }; }; @@ -242,33 +242,25 @@ }; }; -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; +&swport2 { nvmem-cells = <&hw_mac_addr 0>; nvmem-cell-names = "mac-address"; label = "wan"; }; -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; +&swport3 { nvmem-cells = <&hw_mac_addr 0>; nvmem-cell-names = "mac-address"; label = "lan1"; }; -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; +&swport4 { nvmem-cells = <&hw_mac_addr 0>; nvmem-cell-names = "mac-address"; label = "lan2"; }; -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; +&swport5 { nvmem-cells = <&hw_mac_addr 0>; nvmem-cell-names = "mac-address"; label = "lan3"; diff --git a/target/linux/qualcommax/dts/ipq8174-mx4300.dts b/target/linux/qualcommax/dts/ipq8174-mx4300.dts index 5010d96c28b..df0f1875e9a 100644 --- a/target/linux/qualcommax/dts/ipq8174-mx4300.dts +++ b/target/linux/qualcommax/dts/ipq8174-mx4300.dts @@ -22,7 +22,7 @@ }; aliases { - label-mac-device = &dp2; + label-mac-device = &swport2; }; }; @@ -256,33 +256,25 @@ }; }; -&dp2 { - status = "okay"; - phy-handle = <&qca8075_1>; +&swport2 { label = "wan"; nvmem-cells = <&hw_mac_addr 0>; nvmem-cell-names = "mac-address"; }; -&dp3 { - status = "okay"; - phy-handle = <&qca8075_2>; +&swport3 { label = "lan3"; nvmem-cells = <&hw_mac_addr 0>; nvmem-cell-names = "mac-address"; }; -&dp4 { - status = "okay"; - phy-handle = <&qca8075_3>; +&swport4 { label = "lan2"; nvmem-cells = <&hw_mac_addr 0>; nvmem-cell-names = "mac-address"; }; -&dp5 { - status = "okay"; - phy-handle = <&qca8075_4>; +&swport5 { label = "lan1"; nvmem-cells = <&hw_mac_addr 0>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/qualcommax/dts/ipq8174-mx4x00.dtsi b/target/linux/qualcommax/dts/ipq8174-mx4x00.dtsi index 1bd150c160b..297dbf8d163 100644 --- a/target/linux/qualcommax/dts/ipq8174-mx4x00.dtsi +++ b/target/linux/qualcommax/dts/ipq8174-mx4x00.dtsi @@ -151,32 +151,54 @@ }; }; +&uniphy0 { + status = "okay"; +}; + &switch { status = "okay"; - 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*/ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + ethernet = <&edma>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; - qcom,port_phyinfo { - port@2 { - port_id = <2>; - phy_address = <1>; + swport2: port@2 { + reg = <2>; + phy-handle = <&qca8075_1>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 1>; }; - port@3 { - port_id = <3>; - phy_address = <2>; + swport3: port@3 { + reg = <3>; + phy-handle = <&qca8075_2>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 2>; }; - port@4 { - port_id = <4>; - phy_address = <3>; + swport4: port@4 { + reg = <4>; + phy-handle = <&qca8075_3>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 3>; }; - port@5 { - port_id = <5>; - phy_address = <4>; + swport5: port@5 { + reg = <5>; + phy-handle = <&qca8075_4>; + phy-mode = "psgmii"; + pcs-handle = <&uniphy0 4>; }; }; }; diff --git a/target/linux/qualcommax/image/ipq807x.mk b/target/linux/qualcommax/image/ipq807x.mk index 2bd3dab6343..dde9c381318 100644 --- a/target/linux/qualcommax/image/ipq807x.mk +++ b/target/linux/qualcommax/image/ipq807x.mk @@ -86,7 +86,7 @@ define Device/asus_rt-ax89x PAGESIZE := 2048 DEVICE_DTS_CONFIG := config@hk01 SOC := ipq8074 - DEVICE_PACKAGES := kmod-hwmon-gpiofan ipq-wifi-asus_rt-ax89x + DEVICE_PACKAGES := kmod-hwmon-gpiofan kmod-sfp ipq-wifi-asus_rt-ax89x KERNEL_NAME := vmlinux KERNEL := kernel-bin | libdeflate-gzip KERNEL_IN_UBI := 1 diff --git a/target/linux/qualcommax/ipq50xx/target.mk b/target/linux/qualcommax/ipq50xx/target.mk index 62b05a7fc30..6fc8a8e51c3 100644 --- a/target/linux/qualcommax/ipq50xx/target.mk +++ b/target/linux/qualcommax/ipq50xx/target.mk @@ -1,5 +1,6 @@ SUBTARGET:=ipq50xx BOARDNAME:=Qualcomm Atheros IPQ50xx +DEFAULT_PACKAGES += kmod-qca-nss-dp define Target/Description Build firmware images for Qualcomm Atheros IPQ50xx based boards. diff --git a/target/linux/qualcommax/ipq60xx/config-default b/target/linux/qualcommax/ipq60xx/config-default index 262468a0b2f..0b3a10efe0c 100644 --- a/target/linux/qualcommax/ipq60xx/config-default +++ b/target/linux/qualcommax/ipq60xx/config-default @@ -4,8 +4,10 @@ CONFIG_MTD_SPLIT_FIT_FW=y CONFIG_PINCTRL_IPQ6018=y CONFIG_PWM=y CONFIG_PWM_IPQ=y +CONFIG_QCOM_80211AX_PPE=y CONFIG_QCOM_APM=y # CONFIG_QCOM_CLK_SMD_RPM is not set +CONFIG_QCOM_EDMA=y # CONFIG_QCOM_RPMPD is not set CONFIG_QCOM_SMD_RPM=y CONFIG_REGULATOR_CPR3=y diff --git a/target/linux/qualcommax/ipq807x/config-default b/target/linux/qualcommax/ipq807x/config-default index 7c4f73d5435..9837d8744a9 100644 --- a/target/linux/qualcommax/ipq807x/config-default +++ b/target/linux/qualcommax/ipq807x/config-default @@ -16,8 +16,10 @@ CONFIG_PM_GENERIC_DOMAINS=y CONFIG_PM_GENERIC_DOMAINS_OF=y # CONFIG_POWER_RESET_QCOM_PON is not set CONFIG_QCA83XX_PHY=y +CONFIG_QCOM_80211AX_PPE=y CONFIG_QCOM_APM=y # CONFIG_QCOM_COINCELL is not set +CONFIG_QCOM_EDMA=y CONFIG_QCOM_GDSC=y CONFIG_QCOM_SPMI_ADC5=y # CONFIG_QCOM_SPMI_RRADC is not set