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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2017 Chen-Yu Tsai <[email protected]>
  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. key-power {
  39. label = "power";
  40. linux,code = <KEY_POWER>;
  41. gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  42. wakeup-source;
  43. };
  44. };
  45. reg_vcc1v2: vcc1v2 {
  46. compatible = "regulator-fixed";
  47. regulator-name = "vcc1v2";
  48. regulator-min-microvolt = <1200000>;
  49. regulator-max-microvolt = <1200000>;
  50. regulator-always-on;
  51. regulator-boot-on;
  52. vin-supply = <&reg_vcc5v0>;
  53. gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
  54. enable-active-high;
  55. };
  56. reg_vcc3v3: vcc3v3 {
  57. compatible = "regulator-fixed";
  58. regulator-name = "vcc3v3";
  59. regulator-min-microvolt = <3300000>;
  60. regulator-max-microvolt = <3300000>;
  61. vin-supply = <&reg_vcc5v0>;
  62. };
  63. /* This represents the board's 5V input */
  64. reg_vcc5v0: vcc5v0 {
  65. compatible = "regulator-fixed";
  66. regulator-name = "vcc5v0";
  67. regulator-min-microvolt = <5000000>;
  68. regulator-max-microvolt = <5000000>;
  69. };
  70. reg_vcc_dram: vcc-dram {
  71. compatible = "regulator-fixed";
  72. regulator-name = "vcc-dram";
  73. regulator-min-microvolt = <1500000>;
  74. regulator-max-microvolt = <1500000>;
  75. regulator-always-on;
  76. regulator-boot-on;
  77. vin-supply = <&reg_vcc5v0>;
  78. gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
  79. enable-active-high;
  80. };
  81. reg_vcc_io: vcc-io {
  82. compatible = "regulator-fixed";
  83. regulator-name = "vcc-io";
  84. regulator-min-microvolt = <3300000>;
  85. regulator-max-microvolt = <3300000>;
  86. regulator-always-on;
  87. regulator-boot-on;
  88. vin-supply = <&reg_vcc3v3>;
  89. gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
  90. };
  91. reg_vdd_cpux: vdd-cpux {
  92. compatible = "regulator-fixed";
  93. regulator-name = "vdd-cpux";
  94. regulator-min-microvolt = <1200000>;
  95. regulator-max-microvolt = <1200000>;
  96. regulator-always-on;
  97. regulator-boot-on;
  98. vin-supply = <&reg_vcc5v0>;
  99. gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
  100. enable-active-high;
  101. };
  102. };
  103. &codec {
  104. allwinner,audio-routing =
  105. "Line Out", "LINEOUT",
  106. "MIC1", "Mic",
  107. "Mic", "MBIAS";
  108. status = "okay";
  109. };
  110. &cpu0 {
  111. cpu-supply = <&reg_vdd_cpux>;
  112. };
  113. &cpu1 {
  114. cpu-supply = <&reg_vdd_cpux>;
  115. };
  116. &cpu2 {
  117. cpu-supply = <&reg_vdd_cpux>;
  118. };
  119. &cpu3 {
  120. cpu-supply = <&reg_vdd_cpux>;
  121. };
  122. &de {
  123. status = "okay";
  124. };
  125. &ehci0 {
  126. status = "okay";
  127. };
  128. &ehci1 {
  129. status = "okay";
  130. };
  131. &ehci2 {
  132. status = "okay";
  133. };
  134. &ehci3 {
  135. status = "okay";
  136. };
  137. &emac {
  138. phy-handle = <&int_mii_phy>;
  139. phy-mode = "mii";
  140. allwinner,leds-active-low;
  141. status = "okay";
  142. };
  143. &hdmi {
  144. status = "okay";
  145. };
  146. &hdmi_out {
  147. hdmi_out_con: endpoint {
  148. remote-endpoint = <&hdmi_con_in>;
  149. };
  150. };
  151. &ir {
  152. pinctrl-names = "default";
  153. pinctrl-0 = <&r_ir_rx_pin>;
  154. status = "okay";
  155. };
  156. &mmc0 {
  157. vmmc-supply = <&reg_vcc_io>;
  158. bus-width = <4>;
  159. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
  160. status = "okay";
  161. };
  162. &mmc2 {
  163. pinctrl-names = "default";
  164. pinctrl-0 = <&mmc2_8bit_pins>;
  165. vmmc-supply = <&reg_vcc_io>;
  166. bus-width = <8>;
  167. non-removable;
  168. status = "okay";
  169. };
  170. &ohci0 {
  171. status = "okay";
  172. };
  173. &ohci1 {
  174. status = "okay";
  175. };
  176. &ohci2 {
  177. status = "okay";
  178. };
  179. &ohci3 {
  180. status = "okay";
  181. };
  182. &uart0 {
  183. pinctrl-names = "default";
  184. pinctrl-0 = <&uart0_pa_pins>;
  185. status = "okay";
  186. };
  187. &usb_otg {
  188. dr_mode = "host";
  189. status = "okay";
  190. };
  191. &usbphy {
  192. /* VBUS on USB ports are always on */
  193. usb0_vbus-supply = <&reg_vcc5v0>;
  194. usb1_vbus-supply = <&reg_vcc5v0>;
  195. usb2_vbus-supply = <&reg_vcc5v0>;
  196. usb3_vbus-supply = <&reg_vcc5v0>;
  197. status = "okay";
  198. };