sun50i-a64-pinebook.dts 5.4 KB

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