Advertisement
kosmik2001

patch-mtk7630.patch

Apr 30th, 2024
815
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.91 KB | Source Code | 0 0
  1. diff -Naru build_ax23-v1-ap-a/target/linux/generic/hack-6.1/940-net-dsa-mt7530-use-switch-MDIO-bus-for-PHY-muxing.patch build_ax23-v1-ap-b/target/linux/generic/hack-6.1/940-net-dsa-mt7530-use-switch-MDIO-bus-for-PHY-muxing.patch
  2. --- build_ax23-v1-ap-a/target/linux/generic/hack-6.1/940-net-dsa-mt7530-use-switch-MDIO-bus-for-PHY-muxing.patch    1970-01-01 03:00:00.000000000 +0300
  3. +++ build_ax23-v1-ap-b/target/linux/generic/hack-6.1/940-net-dsa-mt7530-use-switch-MDIO-bus-for-PHY-muxing.patch    2024-04-30 08:01:42.514810164 +0300
  4. @@ -0,0 +1,29 @@
  5. +From 5f94d7358cceda721983b29245010a9d4ab0c808 Mon Sep 17 00:00:00 2001
  6. +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
  7. +Date: Sun, 28 Apr 2024 13:38:46 +0300
  8. +Subject: [PATCH] net: dsa: mt7530: use switch MDIO bus for PHY muxing
  9. +MIME-Version: 1.0
  10. +Content-Type: text/plain; charset=UTF-8
  11. +Content-Transfer-Encoding: 8bit
  12. +
  13. +Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
  14. +---
  15. + drivers/net/dsa/mt7530.c | 2 +-
  16. + 1 file changed, 1 insertion(+), 1 deletion(-)
  17. +
  18. +diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
  19. +index 7dc2f0ac8962..fa7a1ab292d2 100644
  20. +--- a/drivers/net/dsa/mt7530.c
  21. ++++ b/drivers/net/dsa/mt7530.c
  22. +@@ -2585,7 +2585,7 @@ mt7530_setup(struct dsa_switch *ds)
  23. +           if (!phy_node)
  24. +               continue;
  25. +
  26. +-          if (phy_node->parent == priv->dev->of_node->parent) {
  27. ++          if (phy_node->parent->parent == priv->dev->of_node) {
  28. +               ret = of_get_phy_mode(mac_np, &interface);
  29. +               if (ret && ret != -ENODEV) {
  30. +                   of_node_put(mac_np);
  31. +--
  32. +2.40.1
  33. +
  34. diff -Naru build_ax23-v1-ap-a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts build_ax23-v1-ap-b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts
  35. --- build_ax23-v1-ap-a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts 2024-02-24 01:30:57.232929535 +0300
  36. +++ build_ax23-v1-ap-b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts 2024-04-30 08:08:54.398642666 +0300
  37. @@ -145,27 +145,48 @@
  38.     nvmem-cell-names = "mac-address";
  39.  };
  40.  
  41. -&mdio {
  42. -   ethphy0: ethernet-phy@0 {
  43. -       reg = <0>;
  44. -   };
  45. -};
  46. -
  47.  &switch0 {
  48. +   mdio {
  49. +       #address-cells = <1>;
  50. +       #size-cells = <0>;
  51. +
  52. +       ethphy0: ethernet-phy@0 {
  53. +           reg = <0>;
  54. +       };
  55. +
  56. +       ethphy1: ethernet-phy@1 {
  57. +           reg = <1>;
  58. +           interrupts = <1>;
  59. +       };
  60. +
  61. +       ethphy2: ethernet-phy@2 {
  62. +           reg = <2>;
  63. +           interrupts = <2>;
  64. +       };
  65. +
  66. +       ethphy3: ethernet-phy@3 {
  67. +           reg = <3>;
  68. +           interrupts = <3>;
  69. +       };
  70. +    };
  71. +
  72.     ports {
  73.         port@1 {
  74.             status = "okay";
  75.             label = "lan1";
  76. +           phy-handle = <&ethphy1>;
  77.         };
  78.  
  79.         port@2 {
  80.             status = "okay";
  81.             label = "lan2";
  82. +           phy-handle = <&ethphy2>;
  83.         };
  84.  
  85.         port@3 {
  86.             status = "okay";
  87.             label = "lan3";
  88. +           phy-handle = <&ethphy3>;
  89.         };
  90.     };
  91.  };
  92. diff -Naru build_ax23-v1-ap-a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts build_ax23-v1-ap-b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
  93. --- build_ax23-v1-ap-a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts 2024-02-24 01:30:57.240929468 +0300
  94. +++ build_ax23-v1-ap-b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts 2024-04-30 08:13:31.371035141 +0300
  95. @@ -189,27 +189,48 @@
  96.     nvmem-cell-names = "mac-address";
  97.  };
  98.  
  99. -&mdio {
  100. -   ethphy0: ethernet-phy@0 {
  101. -       reg = <0>;
  102. -   };
  103. -};
  104. -
  105.  &switch0 {
  106. +   mdio {
  107. +       #address-cells = <1>;
  108. +       #size-cells = <0>;
  109. +
  110. +       ethphy0: ethernet-phy@0 {
  111. +           reg = <0>;
  112. +       };
  113. +
  114. +       ethphy1: ethernet-phy@1 {
  115. +           reg = <1>;
  116. +           interrupts = <1>;
  117. +       };
  118. +
  119. +       ethphy2: ethernet-phy@2 {
  120. +           reg = <2>;
  121. +           interrupts = <2>;
  122. +       };
  123. +
  124. +       ethphy3: ethernet-phy@3 {
  125. +           reg = <3>;
  126. +           interrupts = <3>;
  127. +       };
  128. +    };
  129. +
  130.     ports {
  131.         port@1 {
  132.             status = "okay";
  133.             label = "lan3";
  134. +           phy-handle = <&ethphy1>;
  135.         };
  136.  
  137.         port@2 {
  138.             status = "okay";
  139.             label = "lan2";
  140. +           phy-handle = <&ethphy2>;
  141.         };
  142.  
  143.         port@3 {
  144.             status = "okay";
  145.             label = "lan1";
  146. +           phy-handle = <&ethphy3>;
  147.         };
  148.     };
  149.  };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement