qualcommax: convert qca807x PHY to PHY package implementation

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>
This commit is contained in:
Christian Marangi 2023-11-17 17:52:42 +01:00
parent 8ed390ac76
commit 0ab4b9201e
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
12 changed files with 247 additions and 147 deletions

View File

@ -262,10 +262,17 @@
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
qca8075: ethernet-phy@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>;
};
};
};
&switch {
@ -288,7 +295,7 @@
&dp5 {
status = "okay";
phy-handle = <&qca8075>;
phy-handle = <&qca8075_4>;
label = "lan";
};

View File

@ -213,6 +213,12 @@
pinctrl-names = "default";
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
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>;
@ -232,6 +238,7 @@
compatible = "ethernet-phy-ieee802.3-c22";
reg = <4>;
};
};
};
&switch {

View File

@ -366,6 +366,14 @@
nvmem-cells = <&aqr1_fw>;
};
ethernet-phy-package@16 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "qcom,qca8075-package";
reg = <16>;
qcom,package-mode = "qsgmii";
qca8075_16: ethernet-phy@16 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <16>;
@ -385,6 +393,7 @@
compatible = "ethernet-phy-ieee802.3-c22";
reg = <19>;
};
};
};
&sdhc_1 {
@ -448,24 +457,28 @@
&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";
};

View File

@ -347,6 +347,14 @@
pinctrl-names = "default";
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
ethernet-phy-package@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "qcom,qca8075-package";
reg = <0>;
qcom,package-mode = "qsgmii";
qca8075_0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
@ -366,6 +374,7 @@
compatible = "ethernet-phy-ieee802.3-c22";
reg = <3>;
};
};
qca8081: ethernet-phy@24 {
compatible = "ethernet-phy-id004d.d101";
@ -426,6 +435,7 @@
&dp1 {
status = "okay";
phy-mode = "qsgmii";
phy-handle = <&qca8075_0>;
label = "lan4";
nvmem-cells = <&macaddr_dp1>;
@ -434,6 +444,7 @@
&dp2 {
status = "okay";
phy-mode = "qsgmii";
phy-handle = <&qca8075_1>;
label = "lan3";
nvmem-cells = <&macaddr_dp2>;
@ -442,6 +453,7 @@
&dp3 {
status = "okay";
phy-mode = "qsgmii";
phy-handle = <&qca8075_2>;
label = "lan2";
nvmem-cells = <&macaddr_dp3>;
@ -450,6 +462,7 @@
&dp4 {
status = "okay";
phy-mode = "qsgmii";
phy-handle = <&qca8075_3>;
label = "lan1";
nvmem-cells = <&macaddr_dp4>;

View File

@ -137,6 +137,14 @@
pinctrl-names = "default";
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
ethernet-phy-package@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "qcom,qca8075-package";
reg = <0>;
qcom,package-mode = "qsgmii";
qca8075_0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
@ -156,6 +164,7 @@
compatible = "ethernet-phy-ieee802.3-c22";
reg = <3>;
};
};
qca8081: ethernet-phy@28 {
compatible = "ethernet-phy-id004d.d101";
@ -223,24 +232,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";
};

View File

@ -161,25 +161,32 @@
pinctrl-names = "default";
reset-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
qca8075_1: ethernet-phy@0 {
ethernet-phy-package@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "qcom,qca8075-package";
reg = <0>;
qca8075_0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
};
qca8075_2: ethernet-phy@1 {
qca8075_1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
qca8075_3: ethernet-phy@2 {
qca8075_2: ethernet-phy@2 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <2>;
};
qca8075_4: ethernet-phy@3 {
qca8075_3: ethernet-phy@3 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <3>;
};
};
aqr113c: ethernet-phy@5 {
compatible ="ethernet-phy-ieee802.3-c45";
@ -236,25 +243,25 @@
/* 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";
};

View File

@ -357,6 +357,12 @@
pinctrl-names = "default";
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
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>;
@ -371,6 +377,7 @@
compatible = "ethernet-phy-ieee802.3-c22";
reg = <3>;
};
};
qca8081: ethernet-phy@28 {
compatible = "ethernet-phy-ieee802.3-c22";

View File

@ -520,7 +520,7 @@
reg = <0x3a001800 0x200>;
qcom,mactype = <0>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
phy-mode = "psgmii";
status = "disabled";
};

View File

@ -271,27 +271,34 @@
pinctrl-names = "default";
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
qca8075_1: ethernet-phy@0 {
ethernet-phy-package@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "qcom,qca8075-package";
reg = <0>;
qca8075_0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
};
qca8075_2: ethernet-phy@1 {
qca8075_1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
qca8075_3: ethernet-phy@2 {
qca8075_2: ethernet-phy@2 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <2>;
};
qca8075_4: ethernet-phy@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>;
@ -358,7 +365,7 @@
&dp1 {
status = "okay";
phy-handle = <&qca8075_1>;
phy-handle = <&qca8075_0>;
label = "lan1";
nvmem-cells = <&macaddr_lan 0>;
nvmem-cell-names = "mac-address";
@ -366,7 +373,7 @@
&dp2 {
status = "okay";
phy-handle = <&qca8075_2>;
phy-handle = <&qca8075_1>;
label = "lan2";
nvmem-cells = <&macaddr_lan 0>;
nvmem-cell-names = "mac-address";
@ -374,7 +381,7 @@
&dp3 {
status = "okay";
phy-handle = <&qca8075_3>;
phy-handle = <&qca8075_2>;
label = "lan3";
nvmem-cells = <&macaddr_lan 0>;
nvmem-cell-names = "mac-address";
@ -382,7 +389,7 @@
&dp4 {
status = "okay";
phy-handle = <&qca8075_4>;
phy-handle = <&qca8075_3>;
label = "lan4";
nvmem-cells = <&macaddr_lan 0>;
nvmem-cell-names = "mac-address";

View File

@ -150,6 +150,13 @@
pinctrl-names = "default";
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
ethernet-phy-package@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
compatible = "qcom,qca8075-package";
qca8075_0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
@ -174,6 +181,7 @@
compatible = "ethernet-phy-ieee802.3-c22";
reg = <4>;
};
};
aqr111b0: ethernet-phy@7 {
compatible ="ethernet-phy-ieee802.3-c45";

View File

@ -194,10 +194,17 @@
pinctrl-names = "default";
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
qca8075: ethernet-phy@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 {
compatible = "ethernet-phy-id004d.d101";
@ -209,7 +216,7 @@
&dp4 {
status = "okay";
phy-handle = <&qca8075>;
phy-handle = <&qca8075_3>;
label = "lan2";
};

View File

@ -230,6 +230,14 @@
reg = <0x8>;
};
ethernet-phy-package@17 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "qcom,qca8075-package";
reg = <0x18>;
qcom,package-mode = "qsgmii";
qca8075_1: ethernet-phy@19 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x19>;
@ -244,6 +252,7 @@
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x1b>;
};
};
};
&switch {
@ -251,7 +260,6 @@
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>;
@ -292,6 +300,7 @@
&dp2 {
status = "okay";
phy-mode = "qsgmii";
phy-handle = <&qca8075_1>;
label = "lan4";
nvmem-cells = <&macaddr_appsblenv_ethaddr>;
@ -300,6 +309,7 @@
&dp3 {
status = "okay";
phy-mode = "qsgmii";
phy-handle = <&qca8075_2>;
label = "lan3";
nvmem-cells = <&macaddr_appsblenv_ethaddr>;
@ -308,6 +318,7 @@
&dp4 {
status = "okay";
phy-mode = "qsgmii";
phy-handle = <&qca8075_3>;
label = "lan2";
nvmem-cells = <&macaddr_appsblenv_ethaddr>;