[openwrt/openwrt] qualcommax: fix wrong PHY node definition for Buffalo WXR-5950AX12

LEDE Commits lede-commits at lists.infradead.org
Sun Feb 11 07:08:13 PST 2024


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0222e48d7374127c51c8113a29ec3a98274d519b

commit 0222e48d7374127c51c8113a29ec3a98274d519b
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sun Feb 11 15:58:21 2024 +0100

    qualcommax: fix wrong PHY node definition for Buffalo WXR-5950AX12
    
    Commit d737ae99cb36 ("qualcommax: Fix Buffalo WXR-5950AX12 Ethernet
    DTS") reverted the switch bmp to the original OEM definition and
    added the malibu_first_phy_addr property.
    
    Problem is that OEM bmp definition is wrong and actually doesn't make sense,
    probably caused by copy-paste of the QCOM reference DTS without actually
    setting real values. What actually fixed the regression was adding the
    malibu_first_phy_addr as without it the MALIBU PHY was actually not
    correctly configured and the Aquantia PHY were actually configured as
    MALIBU PHY.
    
    Fix all these wrong PHY definition.
    
    The BPM is reverted and the following fixes are applied:
    - Drop ESS_PORT1 as it's not actually attached in HW.
    - Move ESS_PORT5 AGAIN from lan to wan. This refer to the first Aquantia
      PHY that is labelled "wan"
    - Move ESS_PORT6 AGAIN from wan to lan. This refer to the second
      Aquantia PHY that is labelled "lan1".
    
    Also PHY tag in MDIO node are renumbered to start from 0 following the
    tagging standard used also in other dts and the not attached one (reg
    0x18 and reg 0x1c) are correctly dropped.
    
    Definition for port at 1 in phyinfo is dropped as it doesn't exist.
    
    dp nodes are updated to reference the new PHY tag numbering.
    
    Fixes: d737ae99cb36 ("qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTS")
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts   | 31 ++++++----------------
 1 file changed, 8 insertions(+), 23 deletions(-)

diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts
index aefa9e3b9b..cc6eafe532 100644
--- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts
@@ -230,48 +230,33 @@
 		reg = <0x8>;
 	};
 
-	qca8075_1: ethernet-phy at 18 {
-		compatible = "ethernet-phy-ieee802.3-c22";
-		reg = <0x18>;
-	};
-
-	qca8075_2: ethernet-phy at 19 {
+	qca8075_1: ethernet-phy at 19 {
 		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0x19>;
 	};
 
-	qca8075_3: ethernet-phy at 1a {
+	qca8075_2: ethernet-phy at 1a {
 		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0x1a>;
 	};
 
-	qca8075_4: ethernet-phy at 1b {
+	qca8075_3: ethernet-phy at 1b {
 		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0x1b>;
 	};
-
-	qca8075_5: ethernet-phy at 1c {
-		compatible = "ethernet-phy-ieee802.3-c22";
-		reg = <0x1c>;
-	};
 };
 
 &switch {
 	status = "okay";
 
-	switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>;
-	switch_wan_bmp = <ESS_PORT6>;
+	switch_lan_bmp = <(ESS_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>;
 
 	qcom,port_phyinfo {
-		port at 1 {
-			port_id = <1>;
-			phy_address = <0x18>;
-		};
-
 		port at 2 {
 			port_id = <2>;
 			phy_address = <0x19>;
@@ -307,7 +292,7 @@
 
 &dp2 {
 	status = "okay";
-	phy-handle = <&qca8075_2>;
+	phy-handle = <&qca8075_1>;
 	label = "lan4";
 	nvmem-cells = <&macaddr_appsblenv_ethaddr>;
 	nvmem-cell-names = "mac-address";
@@ -315,7 +300,7 @@
 
 &dp3 {
 	status = "okay";
-	phy-handle = <&qca8075_3>;
+	phy-handle = <&qca8075_2>;
 	label = "lan3";
 	nvmem-cells = <&macaddr_appsblenv_ethaddr>;
 	nvmem-cell-names = "mac-address";
@@ -323,7 +308,7 @@
 
 &dp4 {
 	status = "okay";
-	phy-handle = <&qca8075_4>;
+	phy-handle = <&qca8075_3>;
 	label = "lan2";
 	nvmem-cells = <&macaddr_appsblenv_ethaddr>;
 	nvmem-cell-names = "mac-address";




More information about the lede-commits mailing list