1
0

027-arm64-dts-allwinner-H5-Restore-EMAC-changes.patch 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. From 44a94c7ef989317de81e3e7f84385be2bf1b5fe2 Mon Sep 17 00:00:00 2001
  2. From: Corentin Labbe <clabbe.montjoie@gmail.com>
  3. Date: Tue, 31 Oct 2017 09:19:14 +0100
  4. Subject: [PATCH] arm64: dts: allwinner: H5: Restore EMAC changes
  5. The original dwmac-sun8i DT bindings have some issue on how to handle
  6. integrated PHY and was reverted in last RC of 4.13.
  7. But now we have a solution so we need to get back that was reverted.
  8. This patch restore arm64 DT about dwmac-sun8i for H5
  9. This reverts a part of commit 87e1f5e8bb4b ("arm64: dts: allwinner: Revert EMAC changes")
  10. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
  11. Acked-by: Florian Fainelli <f.fainelli@gmail.com>
  12. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  13. ---
  14. arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts | 17 +++++++++++++++++
  15. .../arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 17 +++++++++++++++++
  16. .../boot/dts/allwinner/sun50i-h5-orangepi-prime.dts | 17 +++++++++++++++++
  17. 3 files changed, 51 insertions(+)
  18. --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts
  19. +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts
  20. @@ -50,6 +50,7 @@
  21. compatible = "friendlyarm,nanopi-neo2", "allwinner,sun50i-h5";
  22. aliases {
  23. + ethernet0 = &emac;
  24. serial0 = &uart0;
  25. };
  26. @@ -108,6 +109,22 @@
  27. status = "okay";
  28. };
  29. +&emac {
  30. + pinctrl-names = "default";
  31. + pinctrl-0 = <&emac_rgmii_pins>;
  32. + phy-supply = <&reg_gmac_3v3>;
  33. + phy-handle = <&ext_rgmii_phy>;
  34. + phy-mode = "rgmii";
  35. + status = "okay";
  36. +};
  37. +
  38. +&external_mdio {
  39. + ext_rgmii_phy: ethernet-phy@7 {
  40. + compatible = "ethernet-phy-ieee802.3-c22";
  41. + reg = <7>;
  42. + };
  43. +};
  44. +
  45. &mmc0 {
  46. pinctrl-names = "default";
  47. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
  48. --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
  49. +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
  50. @@ -59,6 +59,7 @@
  51. };
  52. aliases {
  53. + ethernet0 = &emac;
  54. serial0 = &uart0;
  55. };
  56. @@ -136,6 +137,22 @@
  57. status = "okay";
  58. };
  59. +&emac {
  60. + pinctrl-names = "default";
  61. + pinctrl-0 = <&emac_rgmii_pins>;
  62. + phy-supply = <&reg_gmac_3v3>;
  63. + phy-handle = <&ext_rgmii_phy>;
  64. + phy-mode = "rgmii";
  65. + status = "okay";
  66. +};
  67. +
  68. +&external_mdio {
  69. + ext_rgmii_phy: ethernet-phy@1 {
  70. + compatible = "ethernet-phy-ieee802.3-c22";
  71. + reg = <1>;
  72. + };
  73. +};
  74. +
  75. &ir {
  76. pinctrl-names = "default";
  77. pinctrl-0 = <&ir_pins_a>;
  78. --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
  79. +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
  80. @@ -54,6 +54,7 @@
  81. compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
  82. aliases {
  83. + ethernet0 = &emac;
  84. serial0 = &uart0;
  85. };
  86. @@ -143,6 +144,22 @@
  87. status = "okay";
  88. };
  89. +&emac {
  90. + pinctrl-names = "default";
  91. + pinctrl-0 = <&emac_rgmii_pins>;
  92. + phy-supply = <&reg_gmac_3v3>;
  93. + phy-handle = <&ext_rgmii_phy>;
  94. + phy-mode = "rgmii";
  95. + status = "okay";
  96. +};
  97. +
  98. +&external_mdio {
  99. + ext_rgmii_phy: ethernet-phy@1 {
  100. + compatible = "ethernet-phy-ieee802.3-c22";
  101. + reg = <1>;
  102. + };
  103. +};
  104. +
  105. &ir {
  106. pinctrl-names = "default";
  107. pinctrl-0 = <&ir_pins_a>;