sun50i-a64-pinebook.dts 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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. phys = <&usbphy 0>;
  58. phy-names = "usb";
  59. status = "okay";
  60. };
  61. &ehci1 {
  62. status = "okay";
  63. };
  64. &mmc0 {
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&mmc0_pins>;
  67. vmmc-supply = <&reg_dcdc1>;
  68. cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
  69. cd-inverted;
  70. disable-wp;
  71. bus-width = <4>;
  72. status = "okay";
  73. };
  74. &mmc1 {
  75. pinctrl-names = "default";
  76. pinctrl-0 = <&mmc1_pins>;
  77. vmmc-supply = <&reg_dldo4>;
  78. vqmmc-supply = <&reg_eldo1>;
  79. mmc-pwrseq = <&wifi_pwrseq>;
  80. bus-width = <4>;
  81. non-removable;
  82. status = "okay";
  83. rtl8723cs: wifi@1 {
  84. reg = <1>;
  85. };
  86. };
  87. &mmc2 {
  88. pinctrl-names = "default";
  89. pinctrl-0 = <&mmc2_pins>;
  90. vmmc-supply = <&reg_dcdc1>;
  91. vqmmc-supply = <&reg_eldo1>;
  92. bus-width = <8>;
  93. non-removable;
  94. cap-mmc-hw-reset;
  95. mmc-hs200-1_8v;
  96. status = "okay";
  97. };
  98. &ohci0 {
  99. phys = <&usbphy 0>;
  100. phy-names = "usb";
  101. status = "okay";
  102. };
  103. &ohci1 {
  104. status = "okay";
  105. };
  106. &pwm {
  107. status = "okay";
  108. };
  109. &r_rsb {
  110. status = "okay";
  111. axp803: pmic@3a3 {
  112. compatible = "x-powers,axp803";
  113. reg = <0x3a3>;
  114. interrupt-parent = <&r_intc>;
  115. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  116. };
  117. };
  118. /* The ANX6345 eDP-bridge is on r_i2c */
  119. &r_i2c {
  120. clock-frequency = <100000>;
  121. pinctrl-names = "default";
  122. pinctrl-0 = <&r_i2c_pins_a>;
  123. status = "okay";
  124. };
  125. #include "axp803.dtsi"
  126. &reg_aldo1 {
  127. regulator-min-microvolt = <2800000>;
  128. regulator-max-microvolt = <2800000>;
  129. regulator-name = "vcc-csi";
  130. };
  131. &reg_aldo2 {
  132. regulator-always-on;
  133. regulator-min-microvolt = <1800000>;
  134. regulator-max-microvolt = <3300000>;
  135. regulator-name = "vcc-pl";
  136. };
  137. &reg_aldo3 {
  138. regulator-always-on;
  139. regulator-min-microvolt = <2700000>;
  140. regulator-max-microvolt = <3300000>;
  141. regulator-name = "vcc-pll-avcc";
  142. };
  143. &reg_dc1sw {
  144. regulator-name = "vcc-lcd";
  145. };
  146. &reg_dcdc1 {
  147. regulator-always-on;
  148. regulator-min-microvolt = <3300000>;
  149. regulator-max-microvolt = <3300000>;
  150. regulator-name = "vcc-3v3";
  151. };
  152. &reg_dcdc2 {
  153. regulator-always-on;
  154. regulator-min-microvolt = <1000000>;
  155. regulator-max-microvolt = <1300000>;
  156. regulator-name = "vdd-cpux";
  157. };
  158. /* DCDC3 is polyphased with DCDC2 */
  159. &reg_dcdc5 {
  160. regulator-always-on;
  161. regulator-min-microvolt = <1200000>;
  162. regulator-max-microvolt = <1200000>;
  163. regulator-name = "vcc-dram";
  164. };
  165. &reg_dcdc6 {
  166. regulator-always-on;
  167. regulator-min-microvolt = <1100000>;
  168. regulator-max-microvolt = <1100000>;
  169. regulator-name = "vdd-sys";
  170. };
  171. &reg_dldo1 {
  172. regulator-min-microvolt = <3300000>;
  173. regulator-max-microvolt = <3300000>;
  174. regulator-name = "vcc-hdmi";
  175. };
  176. &reg_dldo2 {
  177. regulator-min-microvolt = <2500000>;
  178. regulator-max-microvolt = <2500000>;
  179. regulator-name = "vcc-edp";
  180. };
  181. &reg_dldo3 {
  182. regulator-min-microvolt = <3300000>;
  183. regulator-max-microvolt = <3300000>;
  184. regulator-name = "avdd-csi";
  185. };
  186. &reg_dldo4 {
  187. regulator-min-microvolt = <3300000>;
  188. regulator-max-microvolt = <3300000>;
  189. regulator-name = "vcc-wifi";
  190. };
  191. &reg_eldo1 {
  192. regulator-always-on;
  193. regulator-min-microvolt = <1800000>;
  194. regulator-max-microvolt = <1800000>;
  195. regulator-name = "cpvdd";
  196. };
  197. &reg_eldo3 {
  198. regulator-min-microvolt = <1800000>;
  199. regulator-max-microvolt = <1800000>;
  200. regulator-name = "vdd-1v8-csi";
  201. };
  202. &reg_fldo1 {
  203. regulator-min-microvolt = <1200000>;
  204. regulator-max-microvolt = <1200000>;
  205. regulator-name = "vcc-1v2-hsic";
  206. };
  207. &reg_fldo2 {
  208. regulator-always-on;
  209. regulator-min-microvolt = <1100000>;
  210. regulator-max-microvolt = <1100000>;
  211. regulator-name = "vdd-cpus";
  212. };
  213. &reg_ldo_io0 {
  214. regulator-min-microvolt = <3300000>;
  215. regulator-max-microvolt = <3300000>;
  216. regulator-name = "vcc-usb";
  217. status = "okay";
  218. };
  219. &reg_rtc_ldo {
  220. regulator-name = "vcc-rtc";
  221. };
  222. &simplefb_hdmi {
  223. vcc-hdmi-supply = <&reg_dldo1>;
  224. };
  225. &uart0 {
  226. pinctrl-names = "default";
  227. pinctrl-0 = <&uart0_pins_a>;
  228. status = "okay";
  229. };
  230. &usb_otg {
  231. dr_mode = "host";
  232. };
  233. &usbphy {
  234. usb0_vbus-supply = <&reg_ldo_io0>;
  235. usb1_vbus-supply = <&reg_ldo_io0>;
  236. status = "okay";
  237. };