sun50i-a64-teres-i.dts 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. // SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2. // Copyright (C) Harald Geyer <[email protected]>
  3. // based on sun50i-a64-olinuxino.dts by Jagan Teki <[email protected]>
  4. /dts-v1/;
  5. #include "sun50i-a64.dtsi"
  6. #include "sun50i-a64-cpu-opp.dtsi"
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/input/input.h>
  9. #include <dt-bindings/pwm/pwm.h>
  10. / {
  11. model = "Olimex A64 Teres-I";
  12. compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64";
  13. chassis-type = "laptop";
  14. aliases {
  15. serial0 = &uart0;
  16. };
  17. backlight: backlight {
  18. compatible = "pwm-backlight";
  19. pwms = <&pwm 0 50000 0>;
  20. power-supply = <&reg_dcdc1>;
  21. brightness-levels = <0 5 7 10 14 20 28 40 56 80 112>;
  22. default-brightness-level = <5>;
  23. enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
  24. };
  25. chosen {
  26. stdout-path = "serial0:115200n8";
  27. framebuffer-lcd {
  28. eDP25-supply = <&reg_dldo2>;
  29. eDP12-supply = <&reg_dldo3>;
  30. };
  31. };
  32. gpio-keys {
  33. compatible = "gpio-keys";
  34. lid-switch {
  35. label = "Lid Switch";
  36. gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
  37. linux,input-type = <EV_SW>;
  38. linux,code = <SW_LID>;
  39. wakeup-source;
  40. };
  41. };
  42. leds {
  43. compatible = "gpio-leds";
  44. led-0 {
  45. label = "teres-i:green:capslock";
  46. gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
  47. };
  48. led-1 {
  49. label = "teres-i:green:numlock";
  50. gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
  51. };
  52. };
  53. reg_usb1_vbus: usb1-vbus {
  54. compatible = "regulator-fixed";
  55. regulator-name = "usb1-vbus";
  56. regulator-min-microvolt = <5000000>;
  57. regulator-max-microvolt = <5000000>;
  58. enable-active-high;
  59. gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
  60. status = "okay";
  61. };
  62. wifi_pwrseq: wifi_pwrseq {
  63. compatible = "mmc-pwrseq-simple";
  64. reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  65. };
  66. speaker_amp: audio-amplifier {
  67. compatible = "simple-audio-amplifier";
  68. enable-gpios = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /* PL12 */
  69. sound-name-prefix = "Speaker Amp";
  70. };
  71. };
  72. &codec {
  73. status = "okay";
  74. };
  75. &codec_analog {
  76. cpvdd-supply = <&reg_eldo1>;
  77. status = "okay";
  78. };
  79. &dai {
  80. status = "okay";
  81. };
  82. &de {
  83. status = "okay";
  84. };
  85. &cpu0 {
  86. cpu-supply = <&reg_dcdc2>;
  87. };
  88. &cpu1 {
  89. cpu-supply = <&reg_dcdc2>;
  90. };
  91. &cpu2 {
  92. cpu-supply = <&reg_dcdc2>;
  93. };
  94. &cpu3 {
  95. cpu-supply = <&reg_dcdc2>;
  96. };
  97. &ehci1 {
  98. status = "okay";
  99. };
  100. &i2c0 {
  101. clock-frequency = <100000>;
  102. status = "okay";
  103. anx6345: anx6345@38 {
  104. compatible = "analogix,anx6345";
  105. reg = <0x38>;
  106. reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
  107. dvdd25-supply = <&reg_dldo2>;
  108. dvdd12-supply = <&reg_dldo3>;
  109. ports {
  110. #address-cells = <1>;
  111. #size-cells = <0>;
  112. port@0 {
  113. reg = <0>;
  114. anx6345_in: endpoint {
  115. remote-endpoint = <&tcon0_out_anx6345>;
  116. };
  117. };
  118. };
  119. };
  120. };
  121. &mixer0 {
  122. status = "okay";
  123. };
  124. &mmc0 {
  125. pinctrl-names = "default";
  126. pinctrl-0 = <&mmc0_pins>;
  127. vmmc-supply = <&reg_dcdc1>;
  128. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  129. disable-wp;
  130. bus-width = <4>;
  131. status = "okay";
  132. };
  133. &mmc1 {
  134. pinctrl-names = "default";
  135. pinctrl-0 = <&mmc1_pins>;
  136. vmmc-supply = <&reg_aldo2>;
  137. vqmmc-supply = <&reg_dldo4>;
  138. mmc-pwrseq = <&wifi_pwrseq>;
  139. bus-width = <4>;
  140. non-removable;
  141. status = "okay";
  142. rtl8723bs: wifi@1 {
  143. reg = <1>;
  144. interrupt-parent = <&r_pio>;
  145. interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
  146. interrupt-names = "host-wake";
  147. };
  148. };
  149. &mmc2 {
  150. pinctrl-names = "default";
  151. pinctrl-0 = <&mmc2_pins>;
  152. vmmc-supply = <&reg_dcdc1>;
  153. vqmmc-supply = <&reg_dcdc1>;
  154. bus-width = <8>;
  155. non-removable;
  156. cap-mmc-hw-reset;
  157. status = "okay";
  158. };
  159. &ohci1 {
  160. status = "okay";
  161. };
  162. &pio {
  163. vcc-pc-supply = <&reg_dcdc1>;
  164. vcc-pd-supply = <&reg_dldo2>;
  165. vcc-pe-supply = <&reg_aldo1>;
  166. vcc-pf-supply = <&reg_dcdc1>; /* No dedicated supply-pin for this */
  167. vcc-pg-supply = <&reg_aldo2>;
  168. };
  169. &pwm {
  170. status = "okay";
  171. };
  172. &r_rsb {
  173. status = "okay";
  174. axp803: pmic@3a3 {
  175. compatible = "x-powers,axp803";
  176. reg = <0x3a3>;
  177. interrupt-parent = <&r_intc>;
  178. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  179. };
  180. };
  181. #include "axp803.dtsi"
  182. &ac_power_supply {
  183. status = "okay";
  184. };
  185. &battery_power_supply {
  186. status = "okay";
  187. };
  188. &reg_aldo1 {
  189. regulator-always-on;
  190. regulator-min-microvolt = <2800000>;
  191. regulator-max-microvolt = <2800000>;
  192. regulator-name = "vcc-pe";
  193. };
  194. &reg_aldo2 {
  195. regulator-always-on;
  196. regulator-min-microvolt = <3300000>;
  197. regulator-max-microvolt = <3300000>;
  198. regulator-name = "vcc-pl";
  199. };
  200. &reg_aldo3 {
  201. regulator-always-on;
  202. regulator-min-microvolt = <3000000>;
  203. regulator-max-microvolt = <3000000>;
  204. regulator-name = "vcc-pll-avcc";
  205. };
  206. &reg_dcdc1 {
  207. regulator-always-on;
  208. regulator-min-microvolt = <3300000>;
  209. regulator-max-microvolt = <3300000>;
  210. regulator-name = "vcc-3v3";
  211. };
  212. &reg_dcdc2 {
  213. regulator-always-on;
  214. regulator-min-microvolt = <1040000>;
  215. regulator-max-microvolt = <1300000>;
  216. regulator-name = "vdd-cpux";
  217. };
  218. /* DCDC3 is polyphased with DCDC2 */
  219. &reg_dcdc5 {
  220. regulator-always-on;
  221. regulator-min-microvolt = <1500000>;
  222. regulator-max-microvolt = <1500000>;
  223. regulator-name = "vcc-ddr3";
  224. };
  225. &reg_dcdc6 {
  226. regulator-always-on;
  227. regulator-min-microvolt = <1100000>;
  228. regulator-max-microvolt = <1100000>;
  229. regulator-name = "vdd-sys";
  230. };
  231. &reg_dldo1 {
  232. regulator-min-microvolt = <3300000>;
  233. regulator-max-microvolt = <3300000>;
  234. regulator-name = "vcc-hdmi";
  235. };
  236. &reg_dldo2 {
  237. regulator-min-microvolt = <2500000>;
  238. regulator-max-microvolt = <2500000>;
  239. regulator-name = "vcc-pd";
  240. };
  241. &reg_dldo3 {
  242. regulator-min-microvolt = <1200000>;
  243. regulator-max-microvolt = <1200000>;
  244. regulator-name = "vdd-edp";
  245. };
  246. &reg_dldo4 {
  247. regulator-min-microvolt = <3300000>;
  248. regulator-max-microvolt = <3300000>;
  249. regulator-name = "vcc-wifi-io";
  250. };
  251. &reg_eldo1 {
  252. regulator-min-microvolt = <1800000>;
  253. regulator-max-microvolt = <1800000>;
  254. regulator-name = "cpvdd";
  255. };
  256. &reg_eldo2 {
  257. regulator-min-microvolt = <1800000>;
  258. regulator-max-microvolt = <1800000>;
  259. regulator-name = "vcc-dvdd-csi";
  260. };
  261. &reg_fldo1 {
  262. regulator-min-microvolt = <1200000>;
  263. regulator-max-microvolt = <1200000>;
  264. regulator-name = "vcc-1v2-hsic";
  265. };
  266. /*
  267. * The A64 chip cannot work with this regulator off, although
  268. * it seems to be only driving the AR100 core.
  269. * Maybe we don't still know well about CPUs domain.
  270. */
  271. &reg_fldo2 {
  272. regulator-always-on;
  273. regulator-min-microvolt = <1100000>;
  274. regulator-max-microvolt = <1100000>;
  275. regulator-name = "vdd-cpus";
  276. };
  277. &reg_rtc_ldo {
  278. regulator-name = "vcc-rtc";
  279. };
  280. &simplefb_hdmi {
  281. vcc-hdmi-supply = <&reg_dldo1>;
  282. };
  283. &sound {
  284. simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
  285. simple-audio-card,widgets = "Headphone", "Headphone Jack",
  286. "Microphone", "Headset Microphone",
  287. "Microphone", "Internal Microphone",
  288. "Speaker", "Internal Speaker";
  289. simple-audio-card,routing =
  290. "Left DAC", "DACL",
  291. "Right DAC", "DACR",
  292. "ADCL", "Left ADC",
  293. "ADCR", "Right ADC",
  294. "Headphone Jack", "HP",
  295. "Speaker Amp INL", "LINEOUT",
  296. "Speaker Amp INR", "LINEOUT",
  297. "Internal Speaker", "Speaker Amp OUTL",
  298. "Internal Speaker", "Speaker Amp OUTR",
  299. "Internal Microphone", "MBIAS",
  300. "MIC1", "Internal Microphone",
  301. "Headset Microphone", "HBIAS",
  302. "MIC2", "Headset Microphone";
  303. status = "okay";
  304. };
  305. &tcon0 {
  306. pinctrl-names = "default";
  307. pinctrl-0 = <&lcd_rgb666_pins>;
  308. status = "okay";
  309. };
  310. &tcon0_out {
  311. tcon0_out_anx6345: endpoint@0 {
  312. reg = <0>;
  313. remote-endpoint = <&anx6345_in>;
  314. };
  315. };
  316. &uart0 {
  317. pinctrl-names = "default";
  318. pinctrl-0 = <&uart0_pb_pins>;
  319. status = "okay";
  320. };
  321. &usbphy {
  322. usb1_vbus-supply = <&reg_usb1_vbus>;
  323. status = "okay";
  324. };