rk3566-anbernic-rgxx3.dtsi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /dts-v1/;
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/linux-event-codes.h>
  5. #include <dt-bindings/leds/common.h>
  6. #include <dt-bindings/pinctrl/rockchip.h>
  7. #include <dt-bindings/soc/rockchip,vop2.h>
  8. #include "rk3566.dtsi"
  9. / {
  10. chosen: chosen {
  11. stdout-path = "serial2:1500000n8";
  12. };
  13. adc-joystick {
  14. compatible = "adc-joystick";
  15. io-channels = <&adc_mux 0>,
  16. <&adc_mux 1>,
  17. <&adc_mux 2>,
  18. <&adc_mux 3>;
  19. pinctrl-0 = <&joy_mux_en>;
  20. pinctrl-names = "default";
  21. #address-cells = <1>;
  22. #size-cells = <0>;
  23. axis@0 {
  24. reg = <0>;
  25. abs-flat = <32>;
  26. abs-fuzz = <32>;
  27. abs-range = <1023 15>;
  28. linux,code = <ABS_X>;
  29. };
  30. axis@1 {
  31. reg = <1>;
  32. abs-flat = <32>;
  33. abs-fuzz = <32>;
  34. abs-range = <15 1023>;
  35. linux,code = <ABS_RX>;
  36. };
  37. axis@2 {
  38. reg = <2>;
  39. abs-flat = <32>;
  40. abs-fuzz = <32>;
  41. abs-range = <15 1023>;
  42. linux,code = <ABS_Y>;
  43. };
  44. axis@3 {
  45. reg = <3>;
  46. abs-flat = <32>;
  47. abs-fuzz = <32>;
  48. abs-range = <1023 15>;
  49. linux,code = <ABS_RY>;
  50. };
  51. };
  52. adc_keys: adc-keys {
  53. compatible = "adc-keys";
  54. io-channels = <&saradc 0>;
  55. io-channel-names = "buttons";
  56. keyup-threshold-microvolt = <1800000>;
  57. poll-interval = <60>;
  58. /*
  59. * Button is mapped to F key in BSP kernel, but
  60. * according to input guidelines it should be mode.
  61. */
  62. button-mode {
  63. label = "MODE";
  64. linux,code = <BTN_MODE>;
  65. press-threshold-microvolt = <1750>;
  66. };
  67. };
  68. adc_mux: adc-mux {
  69. compatible = "io-channel-mux";
  70. channels = "left_x", "right_x", "left_y", "right_y";
  71. #io-channel-cells = <1>;
  72. io-channels = <&saradc 3>;
  73. io-channel-names = "parent";
  74. mux-controls = <&gpio_mux>;
  75. settle-time-us = <100>;
  76. };
  77. gpio_keys_control: gpio-keys-control {
  78. compatible = "gpio-keys";
  79. pinctrl-0 = <&btn_pins_ctrl>;
  80. pinctrl-names = "default";
  81. button-b {
  82. gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
  83. label = "SOUTH";
  84. linux,code = <BTN_SOUTH>;
  85. };
  86. button-down {
  87. gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
  88. label = "DPAD-DOWN";
  89. linux,code = <BTN_DPAD_DOWN>;
  90. };
  91. button-l1 {
  92. gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
  93. label = "TL";
  94. linux,code = <BTN_TL>;
  95. };
  96. button-l2 {
  97. gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
  98. label = "TL2";
  99. linux,code = <BTN_TL2>;
  100. };
  101. button-select {
  102. gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
  103. label = "SELECT";
  104. linux,code = <BTN_SELECT>;
  105. };
  106. button-start {
  107. gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
  108. label = "START";
  109. linux,code = <BTN_START>;
  110. };
  111. button-thumbl {
  112. gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
  113. label = "THUMBL";
  114. linux,code = <BTN_THUMBL>;
  115. };
  116. button-thumbr {
  117. gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
  118. label = "THUMBR";
  119. linux,code = <BTN_THUMBR>;
  120. };
  121. button-up {
  122. gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;
  123. label = "DPAD-UP";
  124. linux,code = <BTN_DPAD_UP>;
  125. };
  126. button-x {
  127. gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
  128. label = "NORTH";
  129. linux,code = <BTN_NORTH>;
  130. };
  131. };
  132. gpio_keys_vol: gpio-keys-vol {
  133. compatible = "gpio-keys";
  134. autorepeat;
  135. pinctrl-0 = <&btn_pins_vol>;
  136. pinctrl-names = "default";
  137. button-vol-down {
  138. gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
  139. label = "VOLUMEDOWN";
  140. linux,code = <KEY_VOLUMEDOWN>;
  141. };
  142. button-vol-up {
  143. gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
  144. label = "VOLUMEUP";
  145. linux,code = <KEY_VOLUMEUP>;
  146. };
  147. };
  148. gpio_mux: mux-controller {
  149. compatible = "gpio-mux";
  150. mux-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>,
  151. <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
  152. #mux-control-cells = <0>;
  153. };
  154. hdmi-con {
  155. compatible = "hdmi-connector";
  156. ddc-i2c-bus = <&i2c5>;
  157. type = "c";
  158. port {
  159. hdmi_con_in: endpoint {
  160. remote-endpoint = <&hdmi_out_con>;
  161. };
  162. };
  163. };
  164. leds: gpio-leds {
  165. compatible = "gpio-leds";
  166. pinctrl-0 = <&led_pins>;
  167. pinctrl-names = "default";
  168. green_led: led-0 {
  169. color = <LED_COLOR_ID_GREEN>;
  170. default-state = "on";
  171. function = LED_FUNCTION_POWER;
  172. gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
  173. };
  174. amber_led: led-1 {
  175. color = <LED_COLOR_ID_AMBER>;
  176. function = LED_FUNCTION_CHARGING;
  177. gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
  178. retain-state-suspended;
  179. };
  180. red_led: led-2 {
  181. color = <LED_COLOR_ID_RED>;
  182. default-state = "off";
  183. function = LED_FUNCTION_STATUS;
  184. gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
  185. };
  186. };
  187. /* Channels reversed for both headphones and speakers. */
  188. sound {
  189. compatible = "simple-audio-card";
  190. simple-audio-card,name = "anbernic_rk817";
  191. simple-audio-card,aux-devs = <&spk_amp>;
  192. simple-audio-card,format = "i2s";
  193. simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
  194. simple-audio-card,mclk-fs = <256>;
  195. simple-audio-card,widgets =
  196. "Microphone", "Mic Jack",
  197. "Headphone", "Headphones",
  198. "Speaker", "Internal Speakers";
  199. simple-audio-card,routing =
  200. "MICL", "Mic Jack",
  201. "Headphones", "HPOL",
  202. "Headphones", "HPOR",
  203. "Internal Speakers", "Speaker Amp OUTL",
  204. "Internal Speakers", "Speaker Amp OUTR",
  205. "Speaker Amp INL", "HPOL",
  206. "Speaker Amp INR", "HPOR";
  207. simple-audio-card,pin-switches = "Internal Speakers";
  208. simple-audio-card,codec {
  209. sound-dai = <&rk817>;
  210. };
  211. simple-audio-card,cpu {
  212. sound-dai = <&i2s1_8ch>;
  213. };
  214. };
  215. sdio_pwrseq: sdio-pwrseq {
  216. compatible = "mmc-pwrseq-simple";
  217. clocks = <&rk817 1>;
  218. clock-names = "ext_clock";
  219. pinctrl-0 = <&wifi_enable_h>;
  220. pinctrl-names = "default";
  221. post-power-on-delay-ms = <200>;
  222. reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_LOW>;
  223. };
  224. spk_amp: audio-amplifier {
  225. compatible = "simple-audio-amplifier";
  226. enable-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
  227. pinctrl-0 = <&spk_amp_enable_h>;
  228. pinctrl-names = "default";
  229. sound-name-prefix = "Speaker Amp";
  230. };
  231. vcc3v3_lcd0_n: regulator-vcc3v3-lcd0 {
  232. compatible = "regulator-fixed";
  233. gpio = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
  234. enable-active-high;
  235. pinctrl-0 = <&vcc_lcd_h>;
  236. pinctrl-names = "default";
  237. regulator-boot-on;
  238. regulator-min-microvolt = <3300000>;
  239. regulator-max-microvolt = <3300000>;
  240. regulator-name = "vcc3v3_lcd0_n";
  241. vin-supply = <&vcc_3v3>;
  242. regulator-state-mem {
  243. regulator-off-in-suspend;
  244. };
  245. };
  246. vcc_sys: regulator-vcc-sys {
  247. compatible = "regulator-fixed";
  248. regulator-always-on;
  249. regulator-boot-on;
  250. regulator-min-microvolt = <3800000>;
  251. regulator-max-microvolt = <3800000>;
  252. regulator-name = "vcc_sys";
  253. };
  254. vcc_wifi: regulator-vcc-wifi {
  255. compatible = "regulator-fixed";
  256. enable-active-high;
  257. gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
  258. pinctrl-0 = <&vcc_wifi_h>;
  259. pinctrl-names = "default";
  260. regulator-always-on;
  261. regulator-boot-on;
  262. regulator-min-microvolt = <3300000>;
  263. regulator-max-microvolt = <3300000>;
  264. regulator-name = "vcc_wifi";
  265. };
  266. vibrator: pwm-vibrator {
  267. compatible = "pwm-vibrator";
  268. pwm-names = "enable";
  269. pwms = <&pwm5 0 1000000000 0>;
  270. };
  271. };
  272. &combphy1 {
  273. status = "okay";
  274. };
  275. &cpu0 {
  276. cpu-supply = <&vdd_cpu>;
  277. };
  278. &cpu1 {
  279. cpu-supply = <&vdd_cpu>;
  280. };
  281. &cpu2 {
  282. cpu-supply = <&vdd_cpu>;
  283. };
  284. &cpu3 {
  285. cpu-supply = <&vdd_cpu>;
  286. };
  287. &gpu {
  288. mali-supply = <&vdd_gpu>;
  289. status = "okay";
  290. };
  291. &hdmi {
  292. ddc-i2c-bus = <&i2c5>;
  293. pinctrl-0 = <&hdmitxm0_cec>;
  294. pinctrl-names = "default";
  295. status = "okay";
  296. };
  297. &hdmi_in {
  298. hdmi_in_vp0: endpoint {
  299. remote-endpoint = <&vp0_out_hdmi>;
  300. };
  301. };
  302. &hdmi_out {
  303. hdmi_out_con: endpoint {
  304. remote-endpoint = <&hdmi_con_in>;
  305. };
  306. };
  307. &hdmi_sound {
  308. status = "okay";
  309. };
  310. &i2c0 {
  311. status = "okay";
  312. rk817: pmic@20 {
  313. compatible = "rockchip,rk817";
  314. reg = <0x20>;
  315. interrupt-parent = <&gpio0>;
  316. interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
  317. clock-output-names = "rk808-clkout1", "rk808-clkout2";
  318. clock-names = "mclk";
  319. clocks = <&cru I2S1_MCLKOUT_TX>;
  320. assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
  321. assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
  322. #clock-cells = <1>;
  323. #sound-dai-cells = <0>;
  324. pinctrl-names = "default";
  325. pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
  326. wakeup-source;
  327. vcc1-supply = <&vcc_sys>;
  328. vcc2-supply = <&vcc_sys>;
  329. vcc3-supply = <&vcc_sys>;
  330. vcc4-supply = <&vcc_sys>;
  331. vcc5-supply = <&vcc_sys>;
  332. vcc6-supply = <&vcc_sys>;
  333. vcc7-supply = <&vcc_sys>;
  334. vcc8-supply = <&vcc_sys>;
  335. vcc9-supply = <&dcdc_boost>;
  336. regulators {
  337. vdd_logic: DCDC_REG1 {
  338. regulator-always-on;
  339. regulator-boot-on;
  340. regulator-min-microvolt = <500000>;
  341. regulator-max-microvolt = <1350000>;
  342. regulator-init-microvolt = <900000>;
  343. regulator-ramp-delay = <6001>;
  344. regulator-initial-mode = <0x2>;
  345. regulator-name = "vdd_logic";
  346. regulator-state-mem {
  347. regulator-off-in-suspend;
  348. regulator-suspend-microvolt = <900000>;
  349. };
  350. };
  351. vdd_gpu: DCDC_REG2 {
  352. regulator-always-on;
  353. regulator-boot-on;
  354. regulator-min-microvolt = <500000>;
  355. regulator-max-microvolt = <1350000>;
  356. regulator-init-microvolt = <900000>;
  357. regulator-ramp-delay = <6001>;
  358. regulator-initial-mode = <0x2>;
  359. regulator-name = "vdd_gpu";
  360. regulator-state-mem {
  361. regulator-off-in-suspend;
  362. };
  363. };
  364. vcc_ddr: DCDC_REG3 {
  365. regulator-always-on;
  366. regulator-boot-on;
  367. regulator-initial-mode = <0x2>;
  368. regulator-name = "vcc_ddr";
  369. regulator-state-mem {
  370. regulator-on-in-suspend;
  371. };
  372. };
  373. vcc_3v3: DCDC_REG4 {
  374. regulator-always-on;
  375. regulator-boot-on;
  376. regulator-min-microvolt = <3300000>;
  377. regulator-max-microvolt = <3300000>;
  378. regulator-initial-mode = <0x2>;
  379. regulator-name = "vcc_3v3";
  380. regulator-state-mem {
  381. regulator-on-in-suspend;
  382. regulator-suspend-microvolt = <3300000>;
  383. };
  384. };
  385. vcca1v8_pmu: LDO_REG1 {
  386. regulator-always-on;
  387. regulator-boot-on;
  388. regulator-min-microvolt = <1800000>;
  389. regulator-max-microvolt = <1800000>;
  390. regulator-name = "vcca1v8_pmu";
  391. regulator-state-mem {
  392. regulator-on-in-suspend;
  393. regulator-suspend-microvolt = <1800000>;
  394. };
  395. };
  396. vdda_0v9: LDO_REG2 {
  397. regulator-always-on;
  398. regulator-boot-on;
  399. regulator-min-microvolt = <900000>;
  400. regulator-max-microvolt = <900000>;
  401. regulator-name = "vdda_0v9";
  402. regulator-state-mem {
  403. regulator-off-in-suspend;
  404. };
  405. };
  406. vdda0v9_pmu: LDO_REG3 {
  407. regulator-always-on;
  408. regulator-boot-on;
  409. regulator-min-microvolt = <900000>;
  410. regulator-max-microvolt = <900000>;
  411. regulator-name = "vdda0v9_pmu";
  412. regulator-state-mem {
  413. regulator-on-in-suspend;
  414. regulator-suspend-microvolt = <900000>;
  415. };
  416. };
  417. vccio_acodec: LDO_REG4 {
  418. regulator-always-on;
  419. regulator-boot-on;
  420. regulator-min-microvolt = <3300000>;
  421. regulator-max-microvolt = <3300000>;
  422. regulator-name = "vccio_acodec";
  423. regulator-state-mem {
  424. regulator-off-in-suspend;
  425. };
  426. };
  427. vccio_sd: LDO_REG5 {
  428. regulator-always-on;
  429. regulator-boot-on;
  430. regulator-min-microvolt = <1800000>;
  431. regulator-max-microvolt = <3300000>;
  432. regulator-name = "vccio_sd";
  433. regulator-state-mem {
  434. regulator-off-in-suspend;
  435. };
  436. };
  437. vcc3v3_pmu: LDO_REG6 {
  438. regulator-always-on;
  439. regulator-boot-on;
  440. regulator-min-microvolt = <3300000>;
  441. regulator-max-microvolt = <3300000>;
  442. regulator-name = "vcc3v3_pmu";
  443. regulator-state-mem {
  444. regulator-on-in-suspend;
  445. regulator-suspend-microvolt = <3300000>;
  446. };
  447. };
  448. vcc_1v8: LDO_REG7 {
  449. regulator-always-on;
  450. regulator-boot-on;
  451. regulator-min-microvolt = <1800000>;
  452. regulator-max-microvolt = <1800000>;
  453. regulator-name = "vcc_1v8";
  454. regulator-state-mem {
  455. regulator-off-in-suspend;
  456. };
  457. };
  458. vcc1v8_dvp: LDO_REG8 {
  459. regulator-always-on;
  460. regulator-boot-on;
  461. regulator-min-microvolt = <1800000>;
  462. regulator-max-microvolt = <3300000>;
  463. regulator-name = "vcc1v8_dvp";
  464. regulator-state-mem {
  465. regulator-off-in-suspend;
  466. };
  467. };
  468. vcc2v8_dvp: LDO_REG9 {
  469. regulator-always-on;
  470. regulator-boot-on;
  471. regulator-min-microvolt = <2800000>;
  472. regulator-max-microvolt = <2800000>;
  473. regulator-name = "vcc2v8_dvp";
  474. regulator-state-mem {
  475. regulator-off-in-suspend;
  476. };
  477. };
  478. dcdc_boost: BOOST {
  479. regulator-always-on;
  480. regulator-boot-on;
  481. regulator-min-microvolt = <4700000>;
  482. regulator-max-microvolt = <5400000>;
  483. regulator-name = "boost";
  484. regulator-state-mem {
  485. regulator-off-in-suspend;
  486. };
  487. };
  488. otg_switch: OTG_SWITCH {
  489. regulator-name = "otg_switch";
  490. regulator-state-mem {
  491. regulator-off-in-suspend;
  492. };
  493. };
  494. };
  495. };
  496. vdd_cpu: regulator@40 {
  497. compatible = "fcs,fan53555";
  498. reg = <0x40>;
  499. fcs,suspend-voltage-selector = <1>;
  500. regulator-always-on;
  501. regulator-boot-on;
  502. regulator-min-microvolt = <712500>;
  503. regulator-max-microvolt = <1390000>;
  504. regulator-init-microvolt = <900000>;
  505. regulator-name = "vdd_cpu";
  506. regulator-ramp-delay = <2300>;
  507. vin-supply = <&vcc_sys>;
  508. regulator-state-mem {
  509. regulator-off-in-suspend;
  510. };
  511. };
  512. };
  513. &i2c1 {
  514. /* Unknown/unused device at 0x3c */
  515. status = "disabled";
  516. };
  517. &i2c5 {
  518. pinctrl-0 = <&i2c5m1_xfer>;
  519. pinctrl-names = "default";
  520. status = "okay";
  521. };
  522. &i2s0_8ch {
  523. status = "okay";
  524. };
  525. &i2s1_8ch {
  526. pinctrl-0 = <&i2s1m0_sclktx
  527. &i2s1m0_lrcktx
  528. &i2s1m0_sdi0
  529. &i2s1m0_sdo0>;
  530. pinctrl-names = "default";
  531. rockchip,trcm-sync-tx-only;
  532. status = "okay";
  533. };
  534. &pinctrl {
  535. audio-amplifier {
  536. spk_amp_enable_h: spk-amp-enable-h {
  537. rockchip,pins =
  538. <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
  539. };
  540. };
  541. gpio-btns {
  542. btn_pins_ctrl: btn-pins-ctrl {
  543. rockchip,pins =
  544. <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
  545. <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
  546. <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
  547. <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
  548. <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
  549. <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
  550. <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
  551. <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
  552. <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
  553. <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
  554. <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
  555. <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
  556. <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>,
  557. <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>,
  558. <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>,
  559. <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
  560. };
  561. btn_pins_vol: btn-pins-vol {
  562. rockchip,pins =
  563. <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
  564. <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
  565. };
  566. };
  567. gpio-led {
  568. led_pins: led-pins {
  569. rockchip,pins =
  570. <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>,
  571. <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>,
  572. <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
  573. };
  574. };
  575. joy-mux {
  576. joy_mux_en: joy-mux-en {
  577. rockchip,pins =
  578. <0 RK_PB5 RK_FUNC_GPIO &pcfg_output_low>;
  579. };
  580. };
  581. pmic {
  582. pmic_int_l: pmic-int-l {
  583. rockchip,pins =
  584. <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  585. };
  586. };
  587. sdio-pwrseq {
  588. wifi_enable_h: wifi-enable-h {
  589. rockchip,pins =
  590. <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  591. };
  592. };
  593. vcc3v3-lcd {
  594. vcc_lcd_h: vcc-lcd-h {
  595. rockchip,pins =
  596. <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
  597. };
  598. };
  599. vcc-wifi {
  600. vcc_wifi_h: vcc-wifi-h {
  601. rockchip,pins =
  602. <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
  603. };
  604. };
  605. };
  606. &pmu_io_domains {
  607. status = "okay";
  608. pmuio1-supply = <&vcc3v3_pmu>;
  609. pmuio2-supply = <&vcc3v3_pmu>;
  610. vccio1-supply = <&vccio_acodec>;
  611. vccio3-supply = <&vccio_sd>;
  612. vccio4-supply = <&vcc_1v8>;
  613. vccio5-supply = <&vcc_3v3>;
  614. vccio6-supply = <&vcc1v8_dvp>;
  615. vccio7-supply = <&vcc_3v3>;
  616. };
  617. &pwm5 {
  618. status = "okay";
  619. };
  620. &saradc {
  621. vref-supply = <&vcc_1v8>;
  622. status = "okay";
  623. };
  624. &sdmmc0 {
  625. bus-width = <4>;
  626. cap-sd-highspeed;
  627. cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
  628. disable-wp;
  629. pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
  630. pinctrl-names = "default";
  631. sd-uhs-sdr104;
  632. vmmc-supply = <&vcc_3v3>;
  633. vqmmc-supply = <&vccio_sd>;
  634. status = "okay";
  635. };
  636. &sdmmc1 {
  637. bus-width = <4>;
  638. cap-sd-highspeed;
  639. cd-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
  640. disable-wp;
  641. pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk &sdmmc1_det>;
  642. pinctrl-names = "default";
  643. sd-uhs-sdr104;
  644. vmmc-supply = <&vcc_3v3>;
  645. vqmmc-supply = <&vcc1v8_dvp>;
  646. status = "okay";
  647. };
  648. &sdmmc2 {
  649. bus-width = <4>;
  650. cap-sd-highspeed;
  651. cap-sdio-irq;
  652. keep-power-in-suspend;
  653. mmc-pwrseq = <&sdio_pwrseq>;
  654. non-removable;
  655. pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
  656. pinctrl-names = "default";
  657. vmmc-supply = <&vcc_wifi>;
  658. vqmmc-supply = <&vcca1v8_pmu>;
  659. status = "okay";
  660. };
  661. &tsadc {
  662. rockchip,hw-tshut-mode = <1>;
  663. rockchip,hw-tshut-polarity = <0>;
  664. status = "okay";
  665. };
  666. &uart1 {
  667. pinctrl-0 = <&uart1m1_xfer &uart1m1_ctsn &uart1m1_rtsn>;
  668. pinctrl-names = "default";
  669. uart-has-rtscts;
  670. status = "okay";
  671. bluetooth {
  672. compatible = "realtek,rtl8821cs-bt";
  673. device-wake-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
  674. enable-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
  675. host-wake-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
  676. };
  677. };
  678. &uart2 {
  679. status = "okay";
  680. };
  681. /*
  682. * Lack the schematics to verify, but port works as a peripheral
  683. * (and not a host or OTG port).
  684. */
  685. &usb_host0_xhci {
  686. dr_mode = "peripheral";
  687. phys = <&usb2phy0_otg>;
  688. phy-names = "usb2-phy";
  689. status = "okay";
  690. };
  691. &usb_host1_ehci {
  692. status = "okay";
  693. };
  694. &usb_host1_ohci {
  695. status = "okay";
  696. };
  697. &usb_host1_xhci {
  698. phy-names = "usb2-phy", "usb3-phy";
  699. phys = <&usb2phy1_host>, <&combphy1 PHY_TYPE_USB3>;
  700. status = "okay";
  701. };
  702. &usb2phy0 {
  703. status = "okay";
  704. };
  705. &usb2phy0_otg {
  706. status = "okay";
  707. };
  708. &usb2phy1 {
  709. status = "okay";
  710. };
  711. &usb2phy1_host {
  712. status = "okay";
  713. };
  714. &vop {
  715. assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
  716. assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
  717. status = "okay";
  718. };
  719. &vop_mmu {
  720. status = "okay";
  721. };
  722. &vp0 {
  723. vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
  724. reg = <ROCKCHIP_VOP2_EP_HDMI0>;
  725. remote-endpoint = <&hdmi_in_vp0>;
  726. };
  727. };