1
0

022-ARM-dts-sunxi-h3-h5-represent-the-mdio-switch-used-b.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From 776245ae02f63ba2b94596b892c597676e190e78 Mon Sep 17 00:00:00 2001
  2. From: Corentin Labbe <clabbe.montjoie@gmail.com>
  3. Date: Tue, 31 Oct 2017 09:19:11 +0100
  4. Subject: [PATCH] ARM: dts: sunxi: h3/h5: represent the mdio switch used by
  5. sun8i-h3-emac
  6. Since dwmac-sun8i could use either an integrated PHY or an external PHY
  7. (which could be at same MDIO address), we need to represent this selection
  8. by a MDIO switch.
  9. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
  10. Acked-by: Florian Fainelli <f.fainelli@gmail.com>
  11. Reviewed-by: Andrew Lunn <andrew@lunn.ch>
  12. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  13. ---
  14. arch/arm/boot/dts/sunxi-h3-h5.dtsi | 31 +++++++++++++++++++++++++++----
  15. 1 file changed, 27 insertions(+), 4 deletions(-)
  16. --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
  17. +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
  18. @@ -408,11 +408,34 @@
  19. mdio: mdio {
  20. #address-cells = <1>;
  21. #size-cells = <0>;
  22. - int_mii_phy: ethernet-phy@1 {
  23. - compatible = "ethernet-phy-ieee802.3-c22";
  24. + compatible = "snps,dwmac-mdio";
  25. + };
  26. +
  27. + mdio-mux {
  28. + compatible = "allwinner,sun8i-h3-mdio-mux";
  29. + #address-cells = <1>;
  30. + #size-cells = <0>;
  31. +
  32. + mdio-parent-bus = <&mdio>;
  33. + /* Only one MDIO is usable at the time */
  34. + internal_mdio: mdio@1 {
  35. + compatible = "allwinner,sun8i-h3-mdio-internal";
  36. reg = <1>;
  37. - clocks = <&ccu CLK_BUS_EPHY>;
  38. - resets = <&ccu RST_BUS_EPHY>;
  39. + #address-cells = <1>;
  40. + #size-cells = <0>;
  41. +
  42. + int_mii_phy: ethernet-phy@1 {
  43. + compatible = "ethernet-phy-ieee802.3-c22";
  44. + reg = <1>;
  45. + clocks = <&ccu CLK_BUS_EPHY>;
  46. + resets = <&ccu RST_BUS_EPHY>;
  47. + };
  48. + };
  49. +
  50. + external_mdio: mdio@2 {
  51. + reg = <2>;
  52. + #address-cells = <1>;
  53. + #size-cells = <0>;
  54. };
  55. };
  56. };