sun50i-h5-orangepi-zero-plus.dts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. // Copyright (C) 2016 ARM Ltd.
  3. // Copyright (C) 2018 Hauke Mehrtens <hauke@hauke-m.de>
  4. /dts-v1/;
  5. #include "sun50i-h5.dtsi"
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/pinctrl/sun4i-a10.h>
  9. / {
  10. model = "Xunlong Orange Pi Zero Plus";
  11. compatible = "xunlong,orangepi-zero-plus", "allwinner,sun50i-h5";
  12. reg_vcc3v3: vcc3v3 {
  13. compatible = "regulator-fixed";
  14. regulator-name = "vcc3v3";
  15. regulator-min-microvolt = <3300000>;
  16. regulator-max-microvolt = <3300000>;
  17. };
  18. aliases {
  19. ethernet0 = &emac;
  20. ethernet1 = &rtl8189ftv;
  21. serial0 = &uart0;
  22. };
  23. chosen {
  24. stdout-path = "serial0:115200n8";
  25. };
  26. leds {
  27. compatible = "gpio-leds";
  28. pwr {
  29. label = "orangepi:green:pwr";
  30. gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
  31. default-state = "on";
  32. };
  33. status {
  34. label = "orangepi:red:status";
  35. gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
  36. };
  37. };
  38. reg_gmac_3v3: gmac-3v3 {
  39. compatible = "regulator-fixed";
  40. regulator-name = "gmac-3v3";
  41. regulator-min-microvolt = <3300000>;
  42. regulator-max-microvolt = <3300000>;
  43. startup-delay-us = <100000>;
  44. enable-active-high;
  45. gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
  46. };
  47. };
  48. &ehci0 {
  49. status = "okay";
  50. };
  51. &ehci1 {
  52. status = "okay";
  53. };
  54. &emac {
  55. pinctrl-names = "default";
  56. pinctrl-0 = <&emac_rgmii_pins>;
  57. phy-supply = <&reg_gmac_3v3>;
  58. phy-handle = <&ext_rgmii_phy>;
  59. phy-mode = "rgmii";
  60. status = "okay";
  61. };
  62. &external_mdio {
  63. ext_rgmii_phy: ethernet-phy@1 {
  64. compatible = "ethernet-phy-ieee802.3-c22";
  65. reg = <1>;
  66. };
  67. };
  68. &mmc0 {
  69. vmmc-supply = <&reg_vcc3v3>;
  70. bus-width = <4>;
  71. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
  72. status = "okay";
  73. };
  74. &mmc1 {
  75. vmmc-supply = <&reg_vcc3v3>;
  76. bus-width = <4>;
  77. non-removable;
  78. status = "okay";
  79. /*
  80. * Explicitly define the sdio device, so that we can add an ethernet
  81. * alias for it (which e.g. makes u-boot set a mac-address).
  82. */
  83. rtl8189ftv: sdio_wifi@1 {
  84. reg = <1>;
  85. };
  86. };
  87. &spi0 {
  88. status = "okay";
  89. flash@0 {
  90. #address-cells = <1>;
  91. #size-cells = <1>;
  92. compatible = "mxicy,mx25l1606e", "winbond,w25q128";
  93. reg = <0>;
  94. spi-max-frequency = <40000000>;
  95. };
  96. };
  97. &ohci0 {
  98. status = "okay";
  99. };
  100. &ohci1 {
  101. status = "okay";
  102. };
  103. &uart0 {
  104. pinctrl-names = "default";
  105. pinctrl-0 = <&uart0_pa_pins>;
  106. status = "okay";
  107. };
  108. &usb_otg {
  109. dr_mode = "peripheral";
  110. status = "okay";
  111. };
  112. &usbphy {
  113. /* USB Type-A ports' VBUS is always on */
  114. usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
  115. status = "okay";
  116. };