515_dts.patch 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
  2. index 7a72fc636a7a..fa7ad973969c 100644
  3. --- a/arch/arm/boot/dts/Makefile
  4. +++ b/arch/arm/boot/dts/Makefile
  5. @@ -1267,6 +1267,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \
  6. sun8i-h3-zeropi.dtb \
  7. sun8i-h3-emlid-neutis-n5h3-devboard.dtb \
  8. sun8i-r16-bananapi-m2m.dtb \
  9. + sun8i-r16-clockworkpi-cpi3.dtb \
  10. + sun8i-r16-clockworkpi-cpi3-hdmi.dtb \
  11. sun8i-r16-nintendo-nes-classic.dtb \
  12. sun8i-r16-nintendo-super-nes-classic.dtb \
  13. sun8i-r16-parrot.dtb \
  14. diff --git a/arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3-hdmi.dts b/arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3-hdmi.dts
  15. new file mode 100644
  16. index 000000000000..e2c15df25b30
  17. --- /dev/null
  18. +++ b/arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3-hdmi.dts
  19. @@ -0,0 +1,380 @@
  20. +/*
  21. + * Copyright (c) 2018 Clockwork
  22. + *
  23. + * This file is dual-licensed: you can use it either under the terms
  24. + * of the GPL or the X11 license, at your option. Note that this dual
  25. + * licensing only applies to this file, and not this project as a
  26. + * whole.
  27. + *
  28. + * a) This file is free software; you can redistribute it and/or
  29. + * modify it under the terms of the GNU General Public License as
  30. + * published by the Free Software Foundation; either version 2 of the
  31. + * License, or (at your option) any later version.
  32. + *
  33. + * This file is distributed in the hope that it will be useful,
  34. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  35. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  36. + * GNU General Public License for more details.
  37. + *
  38. + * Or, alternatively,
  39. + *
  40. + * b) Permission is hereby granted, free of charge, to any person
  41. + * obtaining a copy of this software and associated documentation
  42. + * files (the "Software"), to deal in the Software without
  43. + * restriction, including without limitation the rights to use,
  44. + * copy, modify, merge, publish, distribute, sublicense, and/or
  45. + * sell copies of the Software, and to permit persons to whom the
  46. + * Software is furnished to do so, subject to the following
  47. + * conditions:
  48. + *
  49. + * The above copyright notice and this permission notice shall be
  50. + * included in all copies or substantial portions of the Software.
  51. + *
  52. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  53. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  54. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  55. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  56. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  57. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  58. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  59. + * OTHER DEALINGS IN THE SOFTWARE.
  60. + */
  61. +
  62. +/dts-v1/;
  63. +#include "sun8i-a33.dtsi"
  64. +#include "sunxi-common-regulators.dtsi"
  65. +
  66. +#include <dt-bindings/gpio/gpio.h>
  67. +#include <dt-bindings/input/input.h>
  68. +
  69. +/ {
  70. + model = "Clockwork CPI3";
  71. + compatible = "clockwork,clockworkpi-cpi3", "allwinner,sun8i-a33";
  72. +
  73. + aliases {
  74. + serial0 = &uart0;
  75. + mmc0 = &mmc0;
  76. + mmc1 = &mmc1;
  77. + };
  78. +
  79. + chosen {
  80. + stdout-path = "serial0:115200n8";
  81. + };
  82. +
  83. + leds {
  84. + compatible = "gpio-leds";
  85. + pinctrl-names = "default";
  86. + pinctrl-0 = <&led_pins>;
  87. +
  88. + led1 {
  89. + label = "led1";
  90. + gpios = <&pio 1 7 GPIO_ACTIVE_LOW>; /* PB7 */
  91. + };
  92. + };
  93. +
  94. + wifi_pwrseq: wifi_pwrseq {
  95. + compatible = "mmc-pwrseq-simple";
  96. + reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 */
  97. + };
  98. +
  99. + rfkill_gpio: rfkill_gpio {
  100. + compatible = "rfkill_gpio";
  101. + type = "bluetooth";
  102. + pinctrl-names = "default";
  103. + pinctrl-0 = <&bt_control_pin>;
  104. + reset-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
  105. + shutdown-gpio = <&r_pio 0 10 GPIO_ACTIVE_LOW>; /* PL10 */
  106. + };
  107. +
  108. + panel {
  109. + compatible = "clockwork,cpi3-hdmi";
  110. +
  111. + ports {
  112. + #address-cells = <1>;
  113. + #size-cells = <0>;
  114. + port@0 {
  115. + #address-cells = <1>;
  116. + #size-cells = <0>;
  117. + reg = <0>;
  118. +
  119. + rgb_input: endpoint@0 {
  120. + reg = <0>;
  121. + remote-endpoint = <&tcon0_out_rgb>;
  122. + };
  123. + };
  124. + };
  125. + };
  126. +};
  127. +
  128. +&codec {
  129. + pinctrl-names = "default";
  130. + pinctrl-0 = <&hdmi_i2s_pins>;
  131. + status = "okay";
  132. +};
  133. +
  134. +&dai {
  135. + status = "okay";
  136. +};
  137. +
  138. +&sound {
  139. + simple-audio-card,routing =
  140. + "AIF2 ADCL Stereo Mux", "AIF2 ADCL",
  141. + "AIF1 DA0L", "AIF1 DA0L Stereo Mux",
  142. + "AIF2 ADCR Stereo Mux", "AIF2 ADCR",
  143. + "AIF1 DA0R", "AIF1 DA0R Stereo Mux";
  144. +
  145. + status = "okay";
  146. +};
  147. +
  148. +&link_codec {
  149. + sound-dai = <&codec 1>;
  150. +};
  151. +
  152. +&de {
  153. + status = "okay";
  154. +};
  155. +
  156. +&tcon0 {
  157. + status = "okay";
  158. +};
  159. +
  160. +&tcon0_out {
  161. + tcon0_out_rgb: endpoint@0 {
  162. + reg = <0>;
  163. + remote-endpoint = <&rgb_input>;
  164. + };
  165. +};
  166. +
  167. +&ehci0 {
  168. + status = "okay";
  169. +};
  170. +
  171. +&mmc0 {
  172. + pinctrl-names = "default";
  173. + pinctrl-0 = <&mmc0_pins>, <&mmc0_cd_pin>;
  174. + vmmc-supply = <&reg_dcdc1>;
  175. + cd-gpios = <&pio 1 3 GPIO_ACTIVE_LOW>; /* PB3 */
  176. + bus-width = <4>;
  177. + status = "okay";
  178. +};
  179. +
  180. +&mmc1 {
  181. + pinctrl-names = "default";
  182. + pinctrl-0 = <&mmc1_pg_pins>, <&wifi_reset_pin>;
  183. + vmmc-supply = <&reg_aldo1>;
  184. + mmc-pwrseq = <&wifi_pwrseq>;
  185. + bus-width = <4>;
  186. + non-removable;
  187. + keep-power-in-suspend;
  188. + status = "okay";
  189. +};
  190. +
  191. +&ohci0 {
  192. + status = "okay";
  193. +};
  194. +
  195. +&pio {
  196. + mmc0_cd_pin: mmc0_cd_pin@0 {
  197. + pins = "PB3";
  198. + function = "gpio_in";
  199. + bias-pull-up;
  200. + };
  201. +
  202. + hdmi_i2s_pins: hdmi_i2s_pins@0 {
  203. + pins = "PB4", "PB5", "PB6";
  204. + function = "aif2";
  205. + };
  206. +
  207. + led_pins: led_pins@0 {
  208. + pins = "PB7";
  209. + function = "gpio_out";
  210. + };
  211. +};
  212. +
  213. +&r_pio {
  214. + usb1_vbus_pin: usb1_vbus_pin@0 {
  215. + pins = "PL2";
  216. + function = "gpio_out";
  217. + };
  218. +
  219. + usb0_id_det: usb0_id_detect_pin@0 {
  220. + pins = "PL4";
  221. + function = "gpio_in";
  222. + bias-pull-up;
  223. + };
  224. +
  225. + wifi_reset_pin: wifi_reset_pin@0 {
  226. + pins = "PL6";
  227. + function = "gpio_out";
  228. + };
  229. +
  230. + bt_control_pin: bt_control_pin@0 {
  231. + pins = "PL8", "PL10";
  232. + function = "gpio_out";
  233. + };
  234. +};
  235. +
  236. +&r_rsb {
  237. + status = "okay";
  238. +
  239. + axp22x: pmic@3a3 {
  240. + compatible = "x-powers,axp223";
  241. + reg = <0x3a3>;
  242. + interrupt-parent = <&r_intc>;
  243. + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  244. + drivevbus-supply = <&reg_vcc5v0>;
  245. + x-powers,drive-vbus-en;
  246. + };
  247. +};
  248. +
  249. +#include "axp223.dtsi"
  250. +
  251. +&reg_aldo1 {
  252. + regulator-always-on;
  253. + regulator-min-microvolt = <3000000>;
  254. + regulator-max-microvolt = <3000000>;
  255. + regulator-name = "vcc-io";
  256. +};
  257. +
  258. +&reg_aldo2 {
  259. + regulator-always-on;
  260. + regulator-min-microvolt = <2500000>;
  261. + regulator-max-microvolt = <2500000>;
  262. + regulator-name = "vdd-dll";
  263. +};
  264. +
  265. +&reg_aldo3 {
  266. + regulator-always-on;
  267. + regulator-min-microvolt = <3000000>;
  268. + regulator-max-microvolt = <3000000>;
  269. + regulator-name = "vcc-pll-avcc";
  270. +};
  271. +
  272. +&reg_dc5ldo {
  273. + regulator-always-on;
  274. + regulator-min-microvolt = <1100000>;
  275. + regulator-max-microvolt = <1100000>;
  276. + regulator-name = "vdd-cpus";
  277. +};
  278. +
  279. +&reg_dcdc1 {
  280. + regulator-always-on;
  281. + regulator-min-microvolt = <3000000>;
  282. + regulator-max-microvolt = <3000000>;
  283. + regulator-name = "vcc-3v0";
  284. +};
  285. +
  286. +&reg_dcdc2 {
  287. + regulator-always-on;
  288. + regulator-min-microvolt = <1100000>;
  289. + regulator-max-microvolt = <1100000>;
  290. + regulator-name = "vdd-sys";
  291. +};
  292. +
  293. +&reg_dcdc3 {
  294. + regulator-always-on;
  295. + regulator-min-microvolt = <1200000>;
  296. + regulator-max-microvolt = <1200000>;
  297. + regulator-name = "vdd-cpu";
  298. +};
  299. +
  300. +&reg_dcdc5 {
  301. + regulator-always-on;
  302. + regulator-min-microvolt = <1500000>;
  303. + regulator-max-microvolt = <1500000>;
  304. + regulator-name = "vcc-dram";
  305. +};
  306. +
  307. +&reg_dldo1 {
  308. + /*
  309. + * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
  310. + * Remove next line once it is possible to sync two regulators.
  311. + */
  312. + regulator-always-on;
  313. + regulator-min-microvolt = <3300000>;
  314. + regulator-max-microvolt = <3300000>;
  315. + regulator-name = "vcc-wifi0";
  316. +};
  317. +
  318. +&reg_dldo2 {
  319. + /*
  320. + * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
  321. + * Remove next line once it is possible to sync two regulators.
  322. + */
  323. + regulator-always-on;
  324. + regulator-min-microvolt = <3300000>;
  325. + regulator-max-microvolt = <3300000>;
  326. + regulator-name = "vcc-wifi1";
  327. +};
  328. +
  329. +&reg_dldo3 {
  330. + regulator-always-on;
  331. + regulator-min-microvolt = <3300000>;
  332. + regulator-max-microvolt = <3300000>;
  333. + regulator-name = "vcc-amp";
  334. +};
  335. +
  336. +&reg_dldo4 {
  337. + /*
  338. + * TODO: WiFi chip needs dldo1 AND dldo2 AND dldo4 to be on to be powered.
  339. + * Remove next line once it is possible to sync two regulators.
  340. + */
  341. + regulator-always-on;
  342. + regulator-min-microvolt = <3300000>;
  343. + regulator-max-microvolt = <3300000>;
  344. + regulator-name = "vcc-wifi2";
  345. +};
  346. +
  347. +&reg_drivevbus {
  348. + regulator-name = "usb0-vbus";
  349. + status = "okay";
  350. +};
  351. +
  352. +&reg_eldo1 {
  353. + regulator-always-on;
  354. + regulator-min-microvolt = <3300000>;
  355. + regulator-max-microvolt = <3300000>;
  356. + regulator-name = "vcc-hdmi";
  357. +};
  358. +
  359. +&reg_usb1_vbus {
  360. + pinctrl-names = "default";
  361. + pinctrl-0 = <&usb1_vbus_pin>;
  362. + gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
  363. + status = "okay";
  364. +};
  365. +
  366. +&battery_power_supply {
  367. + status = "okay";
  368. +};
  369. +
  370. +&uart0 {
  371. + pinctrl-names = "default";
  372. + pinctrl-0 = <&uart0_pb_pins>;
  373. + status = "okay";
  374. +};
  375. +
  376. +&uart1 {
  377. + pinctrl-names = "default";
  378. + pinctrl-0 = <&uart1_pg_pins>, <&uart1_cts_rts_pg_pins>;
  379. + status = "okay";
  380. +};
  381. +
  382. +&usb_otg {
  383. + dr_mode = "otg";
  384. + status = "okay";
  385. +};
  386. +
  387. +&usb_power_supply {
  388. + status = "okay";
  389. +};
  390. +
  391. +&usbphy {
  392. + status = "okay";
  393. + pinctrl-names = "default";
  394. + pinctrl-0 = <&usb0_id_det>;
  395. + usb0_vbus-supply = <&reg_drivevbus>;
  396. + usb0_id_det-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
  397. + usb0_vbus_power-supply = <&usb_power_supply>;
  398. + usb1_vbus-supply = <&reg_usb1_vbus>;
  399. +};
  400. diff --git a/arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3.dts b/arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3.dts
  401. new file mode 100644
  402. index 000000000000..a3e04b8adf8d
  403. --- /dev/null
  404. +++ b/arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3.dts
  405. @@ -0,0 +1,399 @@
  406. +/*
  407. + * Copyright (c) 2018 Clockwork
  408. + *
  409. + * This file is dual-licensed: you can use it either under the terms
  410. + * of the GPL or the X11 license, at your option. Note that this dual
  411. + * licensing only applies to this file, and not this project as a
  412. + * whole.
  413. + *
  414. + * a) This file is free software; you can redistribute it and/or
  415. + * modify it under the terms of the GNU General Public License as
  416. + * published by the Free Software Foundation; either version 2 of the
  417. + * License, or (at your option) any later version.
  418. + *
  419. + * This file is distributed in the hope that it will be useful,
  420. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  421. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  422. + * GNU General Public License for more details.
  423. + *
  424. + * Or, alternatively,
  425. + *
  426. + * b) Permission is hereby granted, free of charge, to any person
  427. + * obtaining a copy of this software and associated documentation
  428. + * files (the "Software"), to deal in the Software without
  429. + * restriction, including without limitation the rights to use,
  430. + * copy, modify, merge, publish, distribute, sublicense, and/or
  431. + * sell copies of the Software, and to permit persons to whom the
  432. + * Software is furnished to do so, subject to the following
  433. + * conditions:
  434. + *
  435. + * The above copyright notice and this permission notice shall be
  436. + * included in all copies or substantial portions of the Software.
  437. + *
  438. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  439. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  440. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  441. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  442. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  443. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  444. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  445. + * OTHER DEALINGS IN THE SOFTWARE.
  446. + */
  447. +
  448. +/dts-v1/;
  449. +#include "sun8i-a33.dtsi"
  450. +#include "sunxi-common-regulators.dtsi"
  451. +
  452. +#include <dt-bindings/gpio/gpio.h>
  453. +#include <dt-bindings/input/input.h>
  454. +
  455. +/ {
  456. + model = "Clockwork CPI3";
  457. + compatible = "clockwork,clockworkpi-cpi3", "allwinner,sun8i-a33";
  458. +
  459. + aliases {
  460. + serial0 = &uart0;
  461. + mmc0 = &mmc0;
  462. + mmc1 = &mmc1;
  463. + };
  464. +
  465. + chosen {
  466. + stdout-path = "serial0:115200n8";
  467. + };
  468. +
  469. + leds {
  470. + compatible = "gpio-leds";
  471. + pinctrl-names = "default";
  472. + pinctrl-0 = <&led_pins>;
  473. +
  474. + led1 {
  475. + label = "led1";
  476. + gpios = <&pio 1 7 GPIO_ACTIVE_LOW>; /* PB7 */
  477. + };
  478. + };
  479. +
  480. + wifi_pwrseq: wifi_pwrseq {
  481. + compatible = "mmc-pwrseq-simple";
  482. + reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 */
  483. + };
  484. +
  485. + rfkill_gpio: rfkill_gpio {
  486. + compatible = "rfkill_gpio";
  487. + type = "bluetooth";
  488. + pinctrl-names = "default";
  489. + pinctrl-0 = <&bt_control_pin>;
  490. + reset-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
  491. + shutdown-gpio = <&r_pio 0 10 GPIO_ACTIVE_LOW>; /* PL10 */
  492. + };
  493. +
  494. + backlight {
  495. + compatible = "ocp8178-backlight";
  496. + pinctrl-names = "default";
  497. + pinctrl-0 = <&backlight_control_pin>;
  498. + backlight-control-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  499. + default-brightness = <5>;
  500. + };
  501. +
  502. + lcd {
  503. + compatible = "kd027-lcd";
  504. + pinctrl-names = "default";
  505. + pinctrl-0 = <&lcd_control_pin>;
  506. + lcd-rst-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2 */
  507. + lcd-cs-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
  508. + lcd-sck-gpios = <&pio 2 2 GPIO_ACTIVE_HIGH>; /* PC2 */
  509. + lcd-sda-gpios = <&pio 2 0 GPIO_ACTIVE_HIGH>; /* PC0 */
  510. + init-seq = /bits/ 8 <0x2b 0x01 0x00 0x07 0x0c 0x27 0x16 0x04>;
  511. + suspend-seq = /bits/ 8 <0x2b 0x00>;
  512. + resume-seq = /bits/ 8 <0x2b 0x01>;
  513. + };
  514. +
  515. + panel {
  516. + compatible = "clockwork,cpi3-lcd";
  517. +
  518. + ports {
  519. + #address-cells = <1>;
  520. + #size-cells = <0>;
  521. + port@0 {
  522. + #address-cells = <1>;
  523. + #size-cells = <0>;
  524. + reg = <0>;
  525. +
  526. + rgb_input: endpoint@0 {
  527. + reg = <0>;
  528. + remote-endpoint = <&tcon0_out_rgb>;
  529. + };
  530. + };
  531. + };
  532. + };
  533. +};
  534. +
  535. +&codec {
  536. + status = "okay";
  537. +};
  538. +
  539. +&dai {
  540. + status = "okay";
  541. +};
  542. +
  543. +&sound {
  544. + status = "okay";
  545. +};
  546. +
  547. +&codec_analog {
  548. + pinctrl-names = "default";
  549. + pinctrl-0 = <&speaker_amplifier_pin>;
  550. + speaker-amplifier-gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */
  551. + interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
  552. +};
  553. +
  554. +&de {
  555. + status = "okay";
  556. +};
  557. +
  558. +&tcon0 {
  559. + status = "okay";
  560. +};
  561. +
  562. +&tcon0_out {
  563. + tcon0_out_rgb: endpoint@0 {
  564. + reg = <0>;
  565. + remote-endpoint = <&rgb_input>;
  566. + };
  567. +};
  568. +
  569. +&ehci0 {
  570. + status = "okay";
  571. +};
  572. +
  573. +&mmc0 {
  574. + pinctrl-names = "default";
  575. + pinctrl-0 = <&mmc0_pins>, <&mmc0_cd_pin>;
  576. + vmmc-supply = <&reg_dcdc1>;
  577. + cd-gpios = <&pio 1 3 GPIO_ACTIVE_LOW>; /* PB3 */
  578. + bus-width = <4>;
  579. + status = "okay";
  580. +};
  581. +
  582. +&mmc1 {
  583. + pinctrl-names = "default";
  584. + pinctrl-0 = <&mmc1_pg_pins>, <&wifi_reset_pin>;
  585. + vmmc-supply = <&reg_aldo1>;
  586. + mmc-pwrseq = <&wifi_pwrseq>;
  587. + bus-width = <4>;
  588. + non-removable;
  589. + keep-power-in-suspend;
  590. + status = "okay";
  591. +};
  592. +
  593. +&ohci0 {
  594. + status = "okay";
  595. +};
  596. +
  597. +&pio {
  598. + mmc0_cd_pin: mmc0_cd_pin@0 {
  599. + pins = "PB3";
  600. + function = "gpio_in";
  601. + bias-pull-up;
  602. + };
  603. +
  604. + led_pins: led_pins@0 {
  605. + pins = "PB7";
  606. + function = "gpio_out";
  607. + };
  608. +
  609. + lcd_control_pin: lcd_control_pin@0 {
  610. + pins = "PB2", "PC0", "PC2", "PC3";
  611. + function = "gpio_out";
  612. + };
  613. +
  614. + backlight_control_pin: backlight_control_pin@0 {
  615. + pins = "PH1";
  616. + function = "gpio_out";
  617. + };
  618. +};
  619. +
  620. +&r_pio {
  621. + usb1_vbus_pin: usb1_vbus_pin@0 {
  622. + pins = "PL2";
  623. + function = "gpio_out";
  624. + };
  625. +
  626. + speaker_amplifier_pin: speaker_amplifier_pin@0 {
  627. + pins = "PL3";
  628. + function = "gpio_out";
  629. + };
  630. +
  631. + usb0_id_det: usb0_id_detect_pin@0 {
  632. + pins = "PL4";
  633. + function = "gpio_in";
  634. + bias-pull-up;
  635. + };
  636. +
  637. + wifi_reset_pin: wifi_reset_pin@0 {
  638. + pins = "PL6";
  639. + function = "gpio_out";
  640. + };
  641. +
  642. + bt_control_pin: bt_control_pin@0 {
  643. + pins = "PL8", "PL10";
  644. + function = "gpio_out";
  645. + };
  646. +};
  647. +
  648. +&r_rsb {
  649. + status = "okay";
  650. +
  651. + axp22x: pmic@3a3 {
  652. + compatible = "x-powers,axp223";
  653. + reg = <0x3a3>;
  654. + interrupt-parent = <&r_intc>;
  655. + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  656. + drivevbus-supply = <&reg_vcc5v0>;
  657. + x-powers,drive-vbus-en;
  658. + };
  659. +};
  660. +
  661. +#include "axp223.dtsi"
  662. +
  663. +&reg_aldo1 {
  664. + regulator-always-on;
  665. + regulator-min-microvolt = <3000000>;
  666. + regulator-max-microvolt = <3000000>;
  667. + regulator-name = "vcc-io";
  668. +};
  669. +
  670. +&reg_aldo2 {
  671. + regulator-always-on;
  672. + regulator-min-microvolt = <2500000>;
  673. + regulator-max-microvolt = <2500000>;
  674. + regulator-name = "vdd-dll";
  675. +};
  676. +
  677. +&reg_aldo3 {
  678. + regulator-always-on;
  679. + regulator-min-microvolt = <3000000>;
  680. + regulator-max-microvolt = <3000000>;
  681. + regulator-name = "vcc-pll-avcc";
  682. +};
  683. +
  684. +&reg_dc5ldo {
  685. + regulator-always-on;
  686. + regulator-min-microvolt = <1100000>;
  687. + regulator-max-microvolt = <1100000>;
  688. + regulator-name = "vdd-cpus";
  689. +};
  690. +
  691. +&reg_dcdc1 {
  692. + regulator-always-on;
  693. + regulator-min-microvolt = <3000000>;
  694. + regulator-max-microvolt = <3000000>;
  695. + regulator-name = "vcc-3v0";
  696. +};
  697. +
  698. +&reg_dcdc2 {
  699. + regulator-always-on;
  700. + regulator-min-microvolt = <1100000>;
  701. + regulator-max-microvolt = <1100000>;
  702. + regulator-name = "vdd-sys";
  703. +};
  704. +
  705. +&reg_dcdc3 {
  706. + regulator-always-on;
  707. + regulator-min-microvolt = <1200000>;
  708. + regulator-max-microvolt = <1200000>;
  709. + regulator-name = "vdd-cpu";
  710. +};
  711. +
  712. +&reg_dcdc5 {
  713. + regulator-always-on;
  714. + regulator-min-microvolt = <1500000>;
  715. + regulator-max-microvolt = <1500000>;
  716. + regulator-name = "vcc-dram";
  717. +};
  718. +
  719. +&reg_dldo1 {
  720. + /*
  721. + * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
  722. + * Remove next line once it is possible to sync two regulators.
  723. + */
  724. + regulator-always-on;
  725. + regulator-min-microvolt = <3300000>;
  726. + regulator-max-microvolt = <3300000>;
  727. + regulator-name = "vcc-wifi0";
  728. +};
  729. +
  730. +&reg_dldo2 {
  731. + /*
  732. + * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
  733. + * Remove next line once it is possible to sync two regulators.
  734. + */
  735. + regulator-always-on;
  736. + regulator-min-microvolt = <3300000>;
  737. + regulator-max-microvolt = <3300000>;
  738. + regulator-name = "vcc-wifi1";
  739. +};
  740. +
  741. +&reg_dldo3 {
  742. + regulator-always-on;
  743. + regulator-min-microvolt = <3300000>;
  744. + regulator-max-microvolt = <3300000>;
  745. + regulator-name = "vcc-amp";
  746. +};
  747. +
  748. +&reg_dldo4 {
  749. + /*
  750. + * TODO: WiFi chip needs dldo1 AND dldo2 AND dldo4 to be on to be powered.
  751. + * Remove next line once it is possible to sync two regulators.
  752. + */
  753. + regulator-always-on;
  754. + regulator-min-microvolt = <3300000>;
  755. + regulator-max-microvolt = <3300000>;
  756. + regulator-name = "vcc-wifi2";
  757. +};
  758. +
  759. +&reg_drivevbus {
  760. + regulator-name = "usb0-vbus";
  761. + status = "okay";
  762. +};
  763. +
  764. +&reg_usb1_vbus {
  765. + pinctrl-names = "default";
  766. + pinctrl-0 = <&usb1_vbus_pin>;
  767. + gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
  768. + status = "okay";
  769. +};
  770. +
  771. +&battery_power_supply {
  772. + status = "okay";
  773. +};
  774. +
  775. +&uart0 {
  776. + pinctrl-names = "default";
  777. + pinctrl-0 = <&uart0_pb_pins>;
  778. + status = "okay";
  779. +};
  780. +
  781. +&uart1 {
  782. + pinctrl-names = "default";
  783. + pinctrl-0 = <&uart1_pg_pins>, <&uart1_cts_rts_pg_pins>;
  784. + status = "okay";
  785. +};
  786. +
  787. +&usb_otg {
  788. + dr_mode = "otg";
  789. + status = "okay";
  790. +};
  791. +
  792. +&usb_power_supply {
  793. + status = "okay";
  794. +};
  795. +
  796. +&usbphy {
  797. + status = "okay";
  798. + pinctrl-names = "default";
  799. + pinctrl-0 = <&usb0_id_det>;
  800. + usb0_vbus-supply = <&reg_drivevbus>;
  801. + usb0_id_det-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
  802. + usb0_vbus_power-supply = <&usb_power_supply>;
  803. + usb1_vbus-supply = <&reg_usb1_vbus>;
  804. +};