sun50i-h5-nanopi-neo2.dts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. // Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
  3. /dts-v1/;
  4. #include "sun50i-h5.dtsi"
  5. #include <dt-bindings/gpio/gpio.h>
  6. / {
  7. model = "FriendlyARM NanoPi NEO 2";
  8. compatible = "friendlyarm,nanopi-neo2", "allwinner,sun50i-h5";
  9. aliases {
  10. ethernet0 = &emac;
  11. serial0 = &uart0;
  12. };
  13. chosen {
  14. stdout-path = "serial0:115200n8";
  15. };
  16. leds {
  17. compatible = "gpio-leds";
  18. pwr {
  19. label = "nanopi:green:pwr";
  20. gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
  21. default-state = "on";
  22. };
  23. status {
  24. label = "nanopi:blue:status";
  25. gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
  26. };
  27. };
  28. reg_gmac_3v3: gmac-3v3 {
  29. compatible = "regulator-fixed";
  30. regulator-name = "gmac-3v3";
  31. regulator-min-microvolt = <3300000>;
  32. regulator-max-microvolt = <3300000>;
  33. startup-delay-us = <100000>;
  34. enable-active-high;
  35. gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
  36. };
  37. reg_vcc3v3: vcc3v3 {
  38. compatible = "regulator-fixed";
  39. regulator-name = "vcc3v3";
  40. regulator-min-microvolt = <3300000>;
  41. regulator-max-microvolt = <3300000>;
  42. };
  43. reg_usb0_vbus: usb0-vbus {
  44. compatible = "regulator-fixed";
  45. regulator-name = "usb0-vbus";
  46. regulator-min-microvolt = <5000000>;
  47. regulator-max-microvolt = <5000000>;
  48. enable-active-high;
  49. gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
  50. status = "okay";
  51. };
  52. };
  53. &ehci0 {
  54. status = "okay";
  55. };
  56. &ehci3 {
  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. &external_mdio {
  68. ext_rgmii_phy: ethernet-phy@7 {
  69. compatible = "ethernet-phy-ieee802.3-c22";
  70. reg = <7>;
  71. };
  72. };
  73. &mmc0 {
  74. vmmc-supply = <&reg_vcc3v3>;
  75. bus-width = <4>;
  76. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
  77. status = "okay";
  78. };
  79. &ohci0 {
  80. status = "okay";
  81. };
  82. &ohci3 {
  83. status = "okay";
  84. };
  85. &uart0 {
  86. pinctrl-names = "default";
  87. pinctrl-0 = <&uart0_pa_pins>;
  88. status = "okay";
  89. };
  90. &usb_otg {
  91. dr_mode = "otg";
  92. status = "okay";
  93. };
  94. &usbphy {
  95. /* USB Type-A port's VBUS is always on */
  96. usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
  97. usb0_vbus-supply = <&reg_usb0_vbus>;
  98. status = "okay";
  99. };