qualcommax: convert qca807x PHY to PHY package implementation
authorChristian Marangi <ansuelsmth@gmail.com>
Fri, 17 Nov 2023 16:52:42 +0000 (17:52 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Sun, 11 Feb 2024 20:13:42 +0000 (21:13 +0100)
Convert every qca807x PHY definition in DT to new PHY package
implementation to correctly support applying fixup for the correct PHY
mode.

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

index 0ca2edcb2ca7c361977f88758871a9671c98c6b0..e62ae314fb5d82be09c51643f782e34166941b08 100644 (file)
 
        reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
 
-       qca8075: ethernet-phy@4 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <4>;
+       ethernet-phy-package@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "qcom,qca8075-package";
+               reg = <0>;
+
+               qca8075_4: ethernet-phy@4 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <4>;
+               };
        };
 };
 
 
 &dp5 {
        status = "okay";
-       phy-handle = <&qca8075>;
+       phy-handle = <&qca8075_4>;
        label = "lan";
 };
 
index 2bb2cce157ca45729dd0514a8f607e463b2f30d0..6afafb35546e00ba90fd72fe0bd4ffce8fbf79f6 100644 (file)
        pinctrl-names = "default";
        reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
 
-       qca8075_1: ethernet-phy@1 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <1>;
-       };
+       ethernet-phy-package@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "qcom,qca8075-package";
+               reg = <0>;
 
-       qca8075_2: ethernet-phy@2 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <2>;
-       };
+               qca8075_1: ethernet-phy@1 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <1>;
+               };
 
-       qca8075_3: ethernet-phy@3 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <3>;
-       };
+               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>;
+               qca8075_4: ethernet-phy@4 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <4>;
+               };
        };
 };
 
index 497a18714a67ef6c8c73baf398283199fe38902b..4dcacdf29777df639a3e7ab840c243479ee20fe3 100644 (file)
                nvmem-cells = <&aqr1_fw>;
        };
 
-       qca8075_16: ethernet-phy@16 {
-               compatible = "ethernet-phy-ieee802.3-c22";
+       ethernet-phy-package@16 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "qcom,qca8075-package";
                reg = <16>;
-       };
 
-       qca8075_17: ethernet-phy@17 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <17>;
-       };
+               qcom,package-mode = "qsgmii";
 
-       qca8075_18: ethernet-phy@18 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <18>;
-       };
+               qca8075_16: ethernet-phy@16 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <16>;
+               };
 
-       qca8075_19: ethernet-phy@19 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <19>;
+               qca8075_17: ethernet-phy@17 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <17>;
+               };
+
+               qca8075_18: ethernet-phy@18 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <18>;
+               };
+
+               qca8075_19: ethernet-phy@19 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <19>;
+               };
        };
 };
 
 
 &dp1 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_16>;
        label = "lan4";
 };
 
 &dp2 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_17>;
        label = "lan3";
 };
 
 &dp3 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_18>;
        label = "lan2";
 };
 
 &dp4 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_19>;
        label = "lan1";
 };
index d6be71b8cfd9eb35651b051ef9da60d5ba824d59..c0c21f6d79ba58f6bc4b01301c5619b5a3c6cbf9 100644 (file)
        pinctrl-names = "default";
        reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
 
-       qca8075_0: ethernet-phy@0 {
-               compatible = "ethernet-phy-ieee802.3-c22";
+       ethernet-phy-package@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "qcom,qca8075-package";
                reg = <0>;
-       };
 
-       qca8075_1: ethernet-phy@1 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <1>;
-       };
+               qcom,package-mode = "qsgmii";
 
-       qca8075_2: ethernet-phy@2 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <2>;
-       };
+               qca8075_0: ethernet-phy@0 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0>;
+               };
 
-       qca8075_3: ethernet-phy@3 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <3>;
+               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>;
+               };
        };
 
        qca8081: ethernet-phy@24 {
 
 &dp1 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_0>;
        label = "lan4";
        nvmem-cells = <&macaddr_dp1>;
 
 &dp2 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_1>;
        label = "lan3";
        nvmem-cells = <&macaddr_dp2>;
 
 &dp3 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_2>;
        label = "lan2";
        nvmem-cells = <&macaddr_dp3>;
 
 &dp4 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_3>;
        label = "lan1";
        nvmem-cells = <&macaddr_dp4>;
index 66a14232d725badfc1a8ba9f0ca5180ea2dc527f..c5c089c00f7dd41e2508588b7837224f9e075599 100644 (file)
        pinctrl-names = "default";
        reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
 
-       qca8075_0: ethernet-phy@0 {
-               compatible = "ethernet-phy-ieee802.3-c22";
+       ethernet-phy-package@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "qcom,qca8075-package";
                reg = <0>;
-       };
 
-       qca8075_1: ethernet-phy@1 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <1>;
-       };
+               qcom,package-mode = "qsgmii";
 
-       qca8075_2: ethernet-phy@2 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <2>;
-       };
+               qca8075_0: ethernet-phy@0 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0>;
+               };
 
-       qca8075_3: ethernet-phy@3 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <3>;
+               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>;
+               };
        };
 
        qca8081: ethernet-phy@28 {
 
 &dp1 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_0>;
        label = "lan4";
 };
 
 &dp2 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_1>;
        label = "lan3";
 };
 
 &dp3 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_2>;
        label = "lan2";
 };
 
 &dp4 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_3>;
        label = "lan1";
 };
index 8fdfe981f9ce1599c8c2e280182359a495496304..70cc2921c72a876c2c1d92b06f8dba080f4aa623 100644 (file)
        pinctrl-names = "default";
        reset-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
 
-       qca8075_1: ethernet-phy@0 {
-               compatible = "ethernet-phy-ieee802.3-c22";
+       ethernet-phy-package@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "qcom,qca8075-package";
                reg = <0>;
-       };
 
-       qca8075_2: ethernet-phy@1 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <1>;
-       };
+               qca8075_0: ethernet-phy@0 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0>;
+               };
 
-       qca8075_3: ethernet-phy@2 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <2>;
-       };
+               qca8075_1: ethernet-phy@1 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <1>;
+               };
 
-       qca8075_4: ethernet-phy@3 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <3>;
+               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>;
+               };
        };
 
        aqr113c: ethernet-phy@5 {
 /* Dummy LAN port */
 &dp1 {
        status = "disabled";
-       phy-handle = <&qca8075_1>;
+       phy-handle = <&qca8075_0>;
        label = "lan4";
 };
 
 &dp2 {
        status = "okay";
-       phy-handle = <&qca8075_2>;
+       phy-handle = <&qca8075_1>;
        label = "lan3";
 };
 
 &dp3 {
        status = "okay";
-       phy-handle = <&qca8075_3>;
+       phy-handle = <&qca8075_2>;
        label = "lan2";
 };
 
 &dp4 {
        status = "okay";
-       phy-handle = <&qca8075_4>;
+       phy-handle = <&qca8075_3>;
        label = "lan1";
 };
 
index e4bd72c532c2686936f44cecfafc1accfb66dae7..7d7f54ea62141abc13af61c0f7afdf87cede8e0f 100644 (file)
        pinctrl-names = "default";
        reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
 
-       qca8075_1: ethernet-phy@1 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <1>;
-       };
+       ethernet-phy-package@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "qcom,qca8075-package";
+               reg = <0>;
 
-       qca8075_2: ethernet-phy@2 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <2>;
-       };
+               qca8075_1: ethernet-phy@1 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <1>;
+               };
 
-       qca8075_3: ethernet-phy@3 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <3>;
+               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>;
+               };
        };
 
        qca8081: ethernet-phy@28 {
index a1e2d01e8f75c6fd46e13f2d7b69157e04208818..6f98e01b9a58beb35891a3abf039f9a0c3aae9be 100644 (file)
                reg = <0x3a001800 0x200>;
                qcom,mactype = <0>;
                local-mac-address = [000000000000];
-               phy-mode = "sgmii";
+               phy-mode = "psgmii";
                status = "disabled";
        };
 
index be6953f9423a2bd8510b73bc82421e7ce3311979..5d7d84ac52dba63919bcff04b3a8e739cdba955d 100644 (file)
        pinctrl-names = "default";
        reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
 
-       qca8075_1: ethernet-phy@0 {
-               compatible = "ethernet-phy-ieee802.3-c22";
+       ethernet-phy-package@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "qcom,qca8075-package";
                reg = <0>;
-       };
 
-       qca8075_2: ethernet-phy@1 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <1>;
-       };
+               qca8075_0: ethernet-phy@0 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0>;
+               };
 
-       qca8075_3: ethernet-phy@2 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <2>;
-       };
+               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_4: ethernet-phy@3 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <3>;
+               qca8075_3: ethernet-phy@3 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <3>;
+               };
        };
 
-       qca8081: ethernet-phy@4{
+       qca8081: ethernet-phy@28 {
                compatible = "ethernet-phy-id004d.d101";
                reg = <28>;
                reset-deassert-us = <10000>;
 
 &dp1 {
        status = "okay";
-       phy-handle = <&qca8075_1>;
+       phy-handle = <&qca8075_0>;
        label = "lan1";
        nvmem-cells = <&macaddr_lan 0>;
        nvmem-cell-names = "mac-address";
 
 &dp2 {
        status = "okay";
-       phy-handle = <&qca8075_2>;
+       phy-handle = <&qca8075_1>;
        label = "lan2";
        nvmem-cells = <&macaddr_lan 0>;
        nvmem-cell-names = "mac-address";
 
 &dp3 {
        status = "okay";
-       phy-handle = <&qca8075_3>;
+       phy-handle = <&qca8075_2>;
        label = "lan3";
        nvmem-cells = <&macaddr_lan 0>;
        nvmem-cell-names = "mac-address";
 
 &dp4 {
        status = "okay";
-       phy-handle = <&qca8075_4>;
+       phy-handle = <&qca8075_3>;
        label = "lan4";
        nvmem-cells = <&macaddr_lan 0>;
        nvmem-cell-names = "mac-address";
index 39e0cfabf707e4ff1ac7e8939cd3240d6feccd7a..5b9a45e9610ca276f7ee66e84d2da6670d926044 100644 (file)
        pinctrl-names = "default";
        reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
 
-       qca8075_0: ethernet-phy@0 {
-               compatible = "ethernet-phy-ieee802.3-c22";
+       ethernet-phy-package@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
                reg = <0>;
-       };
 
-       qca8075_1: ethernet-phy@1 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <1>;
-       };
+               compatible = "qcom,qca8075-package";
 
-       qca8075_2: ethernet-phy@2 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <2>;
-       };
+               qca8075_0: ethernet-phy@0 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0>;
+               };
 
-       qca8075_3: ethernet-phy@3 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <3>;
-       };
+               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_4: ethernet-phy@4 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <4>;
+               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>;
+               };
        };
 
        aqr111b0: ethernet-phy@7 {
index 48b1fee1ea543be2d19e5060ddb94b9aa14dffb2..91561e5c2ad3b166d7ec5f1e6af665c7f851953e 100644 (file)
        pinctrl-names = "default";
        reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
 
-       qca8075: ethernet-phy@3 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <3>;
+       ethernet-phy-package@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "qcom,qca8075-package";
+               reg = <0>;
+
+               qca8075_3: ethernet-phy@3 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <3>;
+               };
        };
 
        qca8081: ethernet-phy@28 {
 
 &dp4 {
        status = "okay";
-       phy-handle = <&qca8075>;
+       phy-handle = <&qca8075_3>;
        label = "lan2";
 };
 
index cc6eafe532c79a2dcaf1cad213c3ffdbaf6049ed..a0631b3b712bb84bca7060e3d49386f53a64df49 100644 (file)
                reg = <0x8>;
        };
 
-       qca8075_1: ethernet-phy@19 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <0x19>;
-       };
+       ethernet-phy-package@17 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "qcom,qca8075-package";
+               reg = <0x18>;
 
-       qca8075_2: ethernet-phy@1a {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <0x1a>;
-       };
+               qcom,package-mode = "qsgmii";
+
+               qca8075_1: ethernet-phy@19 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0x19>;
+               };
 
-       qca8075_3: ethernet-phy@1b {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <0x1b>;
+               qca8075_2: ethernet-phy@1a {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0x1a>;
+               };
+
+               qca8075_3: ethernet-phy@1b {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       reg = <0x1b>;
+               };
        };
 };
 
 
        switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>;
        switch_wan_bmp = <ESS_PORT5>;
-       malibu_first_phy_addr = <0x18>;
        switch_mac_mode = <MAC_MODE_QSGMII>;
        switch_mac_mode1 = <MAC_MODE_USXGMII>;
        switch_mac_mode2 = <MAC_MODE_USXGMII>;
 
 &dp2 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_1>;
        label = "lan4";
        nvmem-cells = <&macaddr_appsblenv_ethaddr>;
 
 &dp3 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_2>;
        label = "lan3";
        nvmem-cells = <&macaddr_appsblenv_ethaddr>;
 
 &dp4 {
        status = "okay";
+       phy-mode = "qsgmii";
        phy-handle = <&qca8075_3>;
        label = "lan2";
        nvmem-cells = <&macaddr_appsblenv_ethaddr>;