306-dt-sun7i-fix-gmac-on-bananapi.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
  2. +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
  3. @@ -86,6 +86,13 @@
  4. allwinner,drive = <0>;
  5. allwinner,pull = <1>;
  6. };
  7. +
  8. + gmac_power_pin_bananapi: gmac_power_pin@0 {
  9. + allwinner,pins = "PH23";
  10. + allwinner,function = "gpio_out";
  11. + allwinner,drive = <0>;
  12. + allwinner,pull = <0>;
  13. + };
  14. };
  15. lradc: lradc@01c22800 {
  16. @@ -134,9 +141,10 @@
  17. gmac: ethernet@01c50000 {
  18. pinctrl-names = "default";
  19. - pinctrl-0 = <&gmac_pins_mii_a>;
  20. + pinctrl-0 = <&gmac_pins_rgmii_a>;
  21. phy = <&phy1>;
  22. - phy-mode = "mii";
  23. + phy-mode = "rgmii";
  24. + phy-supply = <&reg_gmac_3v3>;
  25. status = "okay";
  26. phy1: ethernet-phy@1 {
  27. @@ -169,4 +177,16 @@
  28. status = "okay";
  29. };
  30. + reg_gmac_3v3: gmac-3v3 {
  31. + compatible = "regulator-fixed";
  32. + pinctrl-names = "default";
  33. + pinctrl-0 = <&gmac_power_pin_bananapi>;
  34. + regulator-name = "gmac-3v3";
  35. + regulator-min-microvolt = <3300000>;
  36. + regulator-max-microvolt = <3300000>;
  37. + startup-delay-us = <50000>;
  38. + enable-active-high;
  39. + gpio = <&pio 7 23 0>;
  40. + status = "okay";
  41. + };
  42. };