sun50i-a64-pinebook.dts 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.xyz>
  4. * Copyright (C) 2018 Vasily Khoruzhick <anarsoul@gmail.com>
  5. *
  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 = "Pinebook";
  14. compatible = "pine64,pinebook", "allwinner,sun50i-a64";
  15. aliases {
  16. serial0 = &uart0;
  17. ethernet0 = &rtl8723cs;
  18. };
  19. backlight: backlight {
  20. compatible = "pwm-backlight";
  21. pwms = <&pwm 0 50000 0>;
  22. brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>;
  23. default-brightness-level = <2>;
  24. enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
  25. };
  26. chosen {
  27. stdout-path = "serial0:115200n8";
  28. framebuffer-lcd {
  29. panel-supply = <&reg_dc1sw>;
  30. dvdd25-supply = <&reg_dldo2>;
  31. dvdd12-supply = <&reg_fldo1>;
  32. };
  33. };
  34. gpio_keys {
  35. compatible = "gpio-keys";
  36. lid_switch {
  37. label = "Lid Switch";
  38. gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */
  39. linux,input-type = <EV_SW>;
  40. linux,code = <SW_LID>;
  41. linux,can-disable;
  42. wakeup-source;
  43. };
  44. };
  45. reg_vcc3v3: vcc3v3 {
  46. compatible = "regulator-fixed";
  47. regulator-name = "vcc3v3";
  48. regulator-min-microvolt = <3300000>;
  49. regulator-max-microvolt = <3300000>;
  50. };
  51. wifi_pwrseq: wifi_pwrseq {
  52. compatible = "mmc-pwrseq-simple";
  53. reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  54. };
  55. };
  56. &ehci0 {
  57. status = "okay";
  58. };
  59. &ehci1 {
  60. status = "okay";
  61. };
  62. &mmc0 {
  63. pinctrl-names = "default";
  64. pinctrl-0 = <&mmc0_pins>;
  65. vmmc-supply = <&reg_dcdc1>;
  66. cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
  67. cd-inverted;
  68. disable-wp;
  69. bus-width = <4>;
  70. status = "okay";
  71. };
  72. &mmc1 {
  73. pinctrl-names = "default";
  74. pinctrl-0 = <&mmc1_pins>;
  75. vmmc-supply = <&reg_dldo4>;
  76. vqmmc-supply = <&reg_eldo1>;
  77. mmc-pwrseq = <&wifi_pwrseq>;
  78. bus-width = <4>;
  79. non-removable;
  80. status = "okay";
  81. rtl8723cs: wifi@1 {
  82. reg = <1>;
  83. };
  84. };
  85. &mmc2 {
  86. pinctrl-names = "default";
  87. pinctrl-0 = <&mmc2_pins>;
  88. vmmc-supply = <&reg_dcdc1>;
  89. vqmmc-supply = <&reg_eldo1>;
  90. max-frequency = <200000000>;
  91. bus-width = <8>;
  92. non-removable;
  93. cap-mmc-hw-reset;
  94. mmc-hs200-1_8v;
  95. status = "okay";
  96. };
  97. &ohci0 {
  98. status = "okay";
  99. };
  100. &ohci1 {
  101. status = "okay";
  102. };
  103. &pwm {
  104. status = "okay";
  105. };
  106. &r_rsb {
  107. status = "okay";
  108. axp803: pmic@3a3 {
  109. compatible = "x-powers,axp803";
  110. reg = <0x3a3>;
  111. interrupt-parent = <&r_intc>;
  112. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  113. };
  114. };
  115. /* The ANX6345 eDP-bridge is on r_i2c */
  116. &r_i2c {
  117. clock-frequency = <100000>;
  118. pinctrl-names = "default";
  119. pinctrl-0 = <&r_i2c_pins_a>;
  120. status = "okay";
  121. };
  122. #include "axp803.dtsi"
  123. &reg_aldo1 {
  124. regulator-min-microvolt = <2800000>;
  125. regulator-max-microvolt = <2800000>;
  126. regulator-name = "vcc-csi";
  127. };
  128. &reg_aldo2 {
  129. regulator-always-on;
  130. regulator-min-microvolt = <1800000>;
  131. regulator-max-microvolt = <3300000>;
  132. regulator-name = "vcc-pl";
  133. };
  134. &reg_aldo3 {
  135. regulator-always-on;
  136. regulator-min-microvolt = <2700000>;
  137. regulator-max-microvolt = <3300000>;
  138. regulator-name = "vcc-pll-avcc";
  139. };
  140. &reg_dc1sw {
  141. regulator-name = "vcc-lcd";
  142. };
  143. &reg_dcdc1 {
  144. regulator-always-on;
  145. regulator-min-microvolt = <3300000>;
  146. regulator-max-microvolt = <3300000>;
  147. regulator-name = "vcc-3v3";
  148. };
  149. &reg_dcdc2 {
  150. regulator-always-on;
  151. regulator-min-microvolt = <1000000>;
  152. regulator-max-microvolt = <1300000>;
  153. regulator-name = "vdd-cpux";
  154. };
  155. /* DCDC3 is polyphased with DCDC2 */
  156. &reg_dcdc5 {
  157. regulator-always-on;
  158. regulator-min-microvolt = <1200000>;
  159. regulator-max-microvolt = <1200000>;
  160. regulator-name = "vcc-dram";
  161. };
  162. &reg_dcdc6 {
  163. regulator-always-on;
  164. regulator-min-microvolt = <1100000>;
  165. regulator-max-microvolt = <1100000>;
  166. regulator-name = "vdd-sys";
  167. };
  168. &reg_dldo1 {
  169. regulator-min-microvolt = <3300000>;
  170. regulator-max-microvolt = <3300000>;
  171. regulator-name = "vcc-hdmi";
  172. };
  173. &reg_dldo2 {
  174. regulator-min-microvolt = <2500000>;
  175. regulator-max-microvolt = <2500000>;
  176. regulator-name = "vcc-edp";
  177. };
  178. &reg_dldo3 {
  179. regulator-min-microvolt = <3300000>;
  180. regulator-max-microvolt = <3300000>;
  181. regulator-name = "avdd-csi";
  182. };
  183. &reg_dldo4 {
  184. regulator-min-microvolt = <3300000>;
  185. regulator-max-microvolt = <3300000>;
  186. regulator-name = "vcc-wifi";
  187. };
  188. &reg_eldo1 {
  189. regulator-always-on;
  190. regulator-min-microvolt = <1800000>;
  191. regulator-max-microvolt = <1800000>;
  192. regulator-name = "cpvdd";
  193. };
  194. &reg_eldo3 {
  195. regulator-min-microvolt = <1800000>;
  196. regulator-max-microvolt = <1800000>;
  197. regulator-name = "vdd-1v8-csi";
  198. };
  199. &reg_fldo1 {
  200. regulator-min-microvolt = <1200000>;
  201. regulator-max-microvolt = <1200000>;
  202. regulator-name = "vcc-1v2-hsic";
  203. };
  204. &reg_fldo2 {
  205. regulator-always-on;
  206. regulator-min-microvolt = <1100000>;
  207. regulator-max-microvolt = <1100000>;
  208. regulator-name = "vdd-cpus";
  209. };
  210. &reg_ldo_io0 {
  211. regulator-min-microvolt = <3300000>;
  212. regulator-max-microvolt = <3300000>;
  213. regulator-name = "vcc-usb";
  214. status = "okay";
  215. };
  216. &reg_rtc_ldo {
  217. regulator-name = "vcc-rtc";
  218. };
  219. &simplefb_hdmi {
  220. vcc-hdmi-supply = <&reg_dldo1>;
  221. };
  222. &uart0 {
  223. pinctrl-names = "default";
  224. pinctrl-0 = <&uart0_pins_a>;
  225. status = "okay";
  226. };
  227. &usb_otg {
  228. dr_mode = "host";
  229. };
  230. &usbphy {
  231. usb0_vbus-supply = <&reg_ldo_io0>;
  232. usb1_vbus-supply = <&reg_ldo_io0>;
  233. status = "okay";
  234. };