sun50i-a64-teres-i.dts 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. /*
  2. * Copyright (C) Harald Geyer <harald@ccbib.org>
  3. * based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.com>
  4. *
  5. * SPDX-License-Identifier: (GPL-2.0 OR MIT)
  6. */
  7. /dts-v1/;
  8. #include "sun50i-a64.dtsi"
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/input/input.h>
  11. #include <dt-bindings/pwm/pwm.h>
  12. / {
  13. model = "Olimex A64 Teres-I";
  14. compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64";
  15. aliases {
  16. serial0 = &uart0;
  17. };
  18. chosen {
  19. stdout-path = "serial0:115200n8";
  20. framebuffer-lcd {
  21. eDP25-supply = <&reg_dldo2>;
  22. eDP12-supply = <&reg_dldo3>;
  23. };
  24. };
  25. gpio-keys {
  26. compatible = "gpio-keys";
  27. lid-switch {
  28. label = "Lid Switch";
  29. gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
  30. linux,input-type = <EV_SW>;
  31. linux,code = <SW_LID>;
  32. wakeup-source;
  33. };
  34. };
  35. leds {
  36. compatible = "gpio-leds";
  37. capslock {
  38. label = "teres-i:green:capslock";
  39. gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
  40. };
  41. numlock {
  42. label = "teres-i:green:numlock";
  43. gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
  44. };
  45. };
  46. reg_usb1_vbus: usb1-vbus {
  47. compatible = "regulator-fixed";
  48. regulator-name = "usb1-vbus";
  49. regulator-min-microvolt = <5000000>;
  50. regulator-max-microvolt = <5000000>;
  51. enable-active-high;
  52. gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
  53. status = "okay";
  54. };
  55. wifi_pwrseq: wifi_pwrseq {
  56. compatible = "mmc-pwrseq-simple";
  57. reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  58. };
  59. };
  60. &ehci1 {
  61. status = "okay";
  62. };
  63. /* The ANX6345 eDP-bridge is on i2c0. There is no linux (mainline)
  64. * driver for this chip at the moment, the bootloader initializes it.
  65. * However it can be accessed with the i2c-dev driver from user space.
  66. */
  67. &i2c0 {
  68. clock-frequency = <100000>;
  69. pinctrl-names = "default";
  70. pinctrl-0 = <&i2c0_pins>;
  71. status = "okay";
  72. };
  73. &mmc0 {
  74. pinctrl-names = "default";
  75. pinctrl-0 = <&mmc0_pins>;
  76. vmmc-supply = <&reg_dcdc1>;
  77. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  78. disable-wp;
  79. bus-width = <4>;
  80. status = "okay";
  81. };
  82. &mmc1 {
  83. pinctrl-names = "default";
  84. pinctrl-0 = <&mmc1_pins>;
  85. vmmc-supply = <&reg_aldo2>;
  86. vqmmc-supply = <&reg_dldo4>;
  87. mmc-pwrseq = <&wifi_pwrseq>;
  88. bus-width = <4>;
  89. non-removable;
  90. status = "okay";
  91. rtl8723bs: wifi@1 {
  92. reg = <1>;
  93. interrupt-parent = <&r_pio>;
  94. interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
  95. interrupt-names = "host-wake";
  96. };
  97. };
  98. &mmc2 {
  99. pinctrl-names = "default";
  100. pinctrl-0 = <&mmc2_pins>;
  101. vmmc-supply = <&reg_dcdc1>;
  102. vqmmc-supply = <&reg_dcdc1>;
  103. bus-width = <8>;
  104. non-removable;
  105. cap-mmc-hw-reset;
  106. status = "okay";
  107. };
  108. &ohci1 {
  109. status = "okay";
  110. };
  111. &r_rsb {
  112. status = "okay";
  113. axp803: pmic@3a3 {
  114. compatible = "x-powers,axp803";
  115. reg = <0x3a3>;
  116. interrupt-parent = <&r_intc>;
  117. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  118. wakeup-source;
  119. };
  120. };
  121. #include "axp803.dtsi"
  122. &reg_aldo1 {
  123. regulator-always-on;
  124. regulator-min-microvolt = <2800000>;
  125. regulator-max-microvolt = <2800000>;
  126. regulator-name = "vcc-pe";
  127. };
  128. &reg_aldo2 {
  129. regulator-always-on;
  130. regulator-min-microvolt = <3300000>;
  131. regulator-max-microvolt = <3300000>;
  132. regulator-name = "vcc-pl";
  133. };
  134. &reg_aldo3 {
  135. regulator-always-on;
  136. regulator-min-microvolt = <3000000>;
  137. regulator-max-microvolt = <3000000>;
  138. regulator-name = "vcc-pll-avcc";
  139. };
  140. &reg_dcdc1 {
  141. regulator-always-on;
  142. regulator-min-microvolt = <3300000>;
  143. regulator-max-microvolt = <3300000>;
  144. regulator-name = "vcc-3v3";
  145. };
  146. &reg_dcdc2 {
  147. regulator-always-on;
  148. regulator-min-microvolt = <1040000>;
  149. regulator-max-microvolt = <1300000>;
  150. regulator-name = "vdd-cpux";
  151. };
  152. /* DCDC3 is polyphased with DCDC2 */
  153. &reg_dcdc5 {
  154. regulator-always-on;
  155. regulator-min-microvolt = <1500000>;
  156. regulator-max-microvolt = <1500000>;
  157. regulator-name = "vcc-ddr3";
  158. };
  159. &reg_dcdc6 {
  160. regulator-always-on;
  161. regulator-min-microvolt = <1100000>;
  162. regulator-max-microvolt = <1100000>;
  163. regulator-name = "vdd-sys";
  164. };
  165. &reg_dldo1 {
  166. regulator-min-microvolt = <3300000>;
  167. regulator-max-microvolt = <3300000>;
  168. regulator-name = "vcc-hdmi";
  169. };
  170. &reg_dldo2 {
  171. regulator-min-microvolt = <2500000>;
  172. regulator-max-microvolt = <2500000>;
  173. regulator-name = "vcc-pd";
  174. };
  175. &reg_dldo3 {
  176. regulator-min-microvolt = <1200000>;
  177. regulator-max-microvolt = <1200000>;
  178. regulator-name = "vdd-edp";
  179. };
  180. &reg_dldo4 {
  181. regulator-min-microvolt = <3300000>;
  182. regulator-max-microvolt = <3300000>;
  183. regulator-name = "vcc-wifi-io";
  184. };
  185. &reg_eldo1 {
  186. regulator-min-microvolt = <1800000>;
  187. regulator-max-microvolt = <1800000>;
  188. regulator-name = "cpvdd";
  189. };
  190. &reg_eldo2 {
  191. regulator-min-microvolt = <1800000>;
  192. regulator-max-microvolt = <1800000>;
  193. regulator-name = "vcc-dvdd-csi";
  194. };
  195. &reg_fldo1 {
  196. regulator-min-microvolt = <1200000>;
  197. regulator-max-microvolt = <1200000>;
  198. regulator-name = "vcc-1v2-hsic";
  199. };
  200. /*
  201. * The A64 chip cannot work without this regulator off, although
  202. * it seems to be only driving the AR100 core.
  203. * Maybe we don't still know well about CPUs domain.
  204. */
  205. &reg_fldo2 {
  206. regulator-always-on;
  207. regulator-min-microvolt = <1100000>;
  208. regulator-max-microvolt = <1100000>;
  209. regulator-name = "vdd-cpus";
  210. };
  211. &reg_rtc_ldo {
  212. regulator-name = "vcc-rtc";
  213. };
  214. &simplefb_hdmi {
  215. vcc-hdmi-supply = <&reg_dldo1>;
  216. };
  217. &uart0 {
  218. pinctrl-names = "default";
  219. pinctrl-0 = <&uart0_pins_a>;
  220. status = "okay";
  221. };
  222. &usbphy {
  223. usb1_vbus-supply = <&reg_usb1_vbus>;
  224. status = "okay";
  225. };