sunxi-libretech-all-h3-cc.dtsi 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
  4. */
  5. #include <dt-bindings/gpio/gpio.h>
  6. #include <dt-bindings/input/input.h>
  7. / {
  8. aliases {
  9. ethernet0 = &emac;
  10. serial0 = &uart0;
  11. };
  12. chosen {
  13. stdout-path = "serial0:115200n8";
  14. };
  15. connector {
  16. compatible = "hdmi-connector";
  17. type = "a";
  18. port {
  19. hdmi_con_in: endpoint {
  20. remote-endpoint = <&hdmi_out_con>;
  21. };
  22. };
  23. };
  24. leds {
  25. compatible = "gpio-leds";
  26. pwr_led {
  27. label = "librecomputer:green:pwr";
  28. gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
  29. default-state = "on";
  30. };
  31. status_led {
  32. label = "librecomputer:blue:status";
  33. gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
  34. };
  35. };
  36. gpio_keys {
  37. compatible = "gpio-keys";
  38. power {
  39. label = "power";
  40. linux,code = <KEY_POWER>;
  41. gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  42. };
  43. };
  44. reg_vcc1v2: vcc1v2 {
  45. compatible = "regulator-fixed";
  46. regulator-name = "vcc1v2";
  47. regulator-min-microvolt = <1200000>;
  48. regulator-max-microvolt = <1200000>;
  49. regulator-always-on;
  50. regulator-boot-on;
  51. vin-supply = <&reg_vcc5v0>;
  52. gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
  53. enable-active-high;
  54. };
  55. reg_vcc3v3: vcc3v3 {
  56. compatible = "regulator-fixed";
  57. regulator-name = "vcc3v3";
  58. regulator-min-microvolt = <3300000>;
  59. regulator-max-microvolt = <3300000>;
  60. vin-supply = <&reg_vcc5v0>;
  61. };
  62. /* This represents the board's 5V input */
  63. reg_vcc5v0: vcc5v0 {
  64. compatible = "regulator-fixed";
  65. regulator-name = "vcc5v0";
  66. regulator-min-microvolt = <5000000>;
  67. regulator-max-microvolt = <5000000>;
  68. };
  69. reg_vcc_dram: vcc-dram {
  70. compatible = "regulator-fixed";
  71. regulator-name = "vcc-dram";
  72. regulator-min-microvolt = <1500000>;
  73. regulator-max-microvolt = <1500000>;
  74. regulator-always-on;
  75. regulator-boot-on;
  76. vin-supply = <&reg_vcc5v0>;
  77. gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
  78. enable-active-high;
  79. };
  80. reg_vcc_io: vcc-io {
  81. compatible = "regulator-fixed";
  82. regulator-name = "vcc-io";
  83. regulator-min-microvolt = <3300000>;
  84. regulator-max-microvolt = <3300000>;
  85. regulator-always-on;
  86. regulator-boot-on;
  87. vin-supply = <&reg_vcc3v3>;
  88. gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
  89. };
  90. reg_vdd_cpux: vdd-cpux {
  91. compatible = "regulator-fixed";
  92. regulator-name = "vdd-cpux";
  93. regulator-min-microvolt = <1200000>;
  94. regulator-max-microvolt = <1200000>;
  95. regulator-always-on;
  96. regulator-boot-on;
  97. vin-supply = <&reg_vcc5v0>;
  98. gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
  99. enable-active-high;
  100. };
  101. };
  102. &codec {
  103. allwinner,audio-routing =
  104. "Line Out", "LINEOUT",
  105. "MIC1", "Mic",
  106. "Mic", "MBIAS";
  107. status = "okay";
  108. };
  109. &cpu0 {
  110. cpu-supply = <&reg_vdd_cpux>;
  111. };
  112. &de {
  113. status = "okay";
  114. };
  115. &ehci0 {
  116. status = "okay";
  117. };
  118. &ehci1 {
  119. status = "okay";
  120. };
  121. &ehci2 {
  122. status = "okay";
  123. };
  124. &ehci3 {
  125. status = "okay";
  126. };
  127. &emac {
  128. phy-handle = <&int_mii_phy>;
  129. phy-mode = "mii";
  130. allwinner,leds-active-low;
  131. status = "okay";
  132. };
  133. &hdmi {
  134. status = "okay";
  135. };
  136. &hdmi_out {
  137. hdmi_out_con: endpoint {
  138. remote-endpoint = <&hdmi_con_in>;
  139. };
  140. };
  141. &ir {
  142. pinctrl-names = "default";
  143. pinctrl-0 = <&r_ir_rx_pin>;
  144. status = "okay";
  145. };
  146. &mmc0 {
  147. vmmc-supply = <&reg_vcc_io>;
  148. bus-width = <4>;
  149. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
  150. status = "okay";
  151. };
  152. &mmc2 {
  153. pinctrl-names = "default";
  154. pinctrl-0 = <&mmc2_8bit_pins>;
  155. vmmc-supply = <&reg_vcc_io>;
  156. bus-width = <8>;
  157. non-removable;
  158. status = "okay";
  159. };
  160. &ohci0 {
  161. status = "okay";
  162. };
  163. &ohci1 {
  164. status = "okay";
  165. };
  166. &ohci2 {
  167. status = "okay";
  168. };
  169. &ohci3 {
  170. status = "okay";
  171. };
  172. &uart0 {
  173. pinctrl-names = "default";
  174. pinctrl-0 = <&uart0_pa_pins>;
  175. status = "okay";
  176. };
  177. &usb_otg {
  178. dr_mode = "host";
  179. status = "okay";
  180. };
  181. &usbphy {
  182. /* VBUS on USB ports are always on */
  183. usb0_vbus-supply = <&reg_vcc5v0>;
  184. usb1_vbus-supply = <&reg_vcc5v0>;
  185. usb2_vbus-supply = <&reg_vcc5v0>;
  186. usb3_vbus-supply = <&reg_vcc5v0>;
  187. status = "okay";
  188. };