px30-evb.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
  4. */
  5. /dts-v1/;
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/pinctrl/rockchip.h>
  9. #include "px30.dtsi"
  10. / {
  11. model = "Rockchip PX30 EVB";
  12. compatible = "rockchip,px30-evb", "rockchip,px30";
  13. aliases {
  14. mmc0 = &sdmmc;
  15. mmc1 = &sdio;
  16. mmc2 = &emmc;
  17. };
  18. chosen {
  19. stdout-path = "serial5:115200n8";
  20. };
  21. adc-keys {
  22. compatible = "adc-keys";
  23. io-channels = <&saradc 2>;
  24. io-channel-names = "buttons";
  25. keyup-threshold-microvolt = <1800000>;
  26. poll-interval = <100>;
  27. button-esc {
  28. label = "esc";
  29. linux,code = <KEY_ESC>;
  30. press-threshold-microvolt = <1310000>;
  31. };
  32. button-home {
  33. label = "home";
  34. linux,code = <KEY_HOME>;
  35. press-threshold-microvolt = <624000>;
  36. };
  37. button-menu {
  38. label = "menu";
  39. linux,code = <KEY_MENU>;
  40. press-threshold-microvolt = <987000>;
  41. };
  42. button-down {
  43. label = "volume down";
  44. linux,code = <KEY_VOLUMEDOWN>;
  45. press-threshold-microvolt = <300000>;
  46. };
  47. button-up {
  48. label = "volume up";
  49. linux,code = <KEY_VOLUMEUP>;
  50. press-threshold-microvolt = <17000>;
  51. };
  52. };
  53. backlight: backlight {
  54. compatible = "pwm-backlight";
  55. pwms = <&pwm1 0 25000 0>;
  56. power-supply = <&vcc3v3_lcd>;
  57. };
  58. emmc_pwrseq: emmc-pwrseq {
  59. compatible = "mmc-pwrseq-emmc";
  60. pinctrl-0 = <&emmc_reset>;
  61. pinctrl-names = "default";
  62. reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
  63. };
  64. sdio_pwrseq: sdio-pwrseq {
  65. compatible = "mmc-pwrseq-simple";
  66. pinctrl-names = "default";
  67. pinctrl-0 = <&wifi_enable_h>;
  68. /*
  69. * On the module itself this is one of these (depending
  70. * on the actual card populated):
  71. * - SDIO_RESET_L_WL_REG_ON
  72. * - PDN (power down when low)
  73. */
  74. reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
  75. };
  76. vcc5v0_sys: vccsys {
  77. compatible = "regulator-fixed";
  78. regulator-name = "vcc5v0_sys";
  79. regulator-always-on;
  80. regulator-boot-on;
  81. regulator-min-microvolt = <5000000>;
  82. regulator-max-microvolt = <5000000>;
  83. };
  84. };
  85. &cpu0 {
  86. cpu-supply = <&vdd_arm>;
  87. };
  88. &cpu1 {
  89. cpu-supply = <&vdd_arm>;
  90. };
  91. &cpu2 {
  92. cpu-supply = <&vdd_arm>;
  93. };
  94. &cpu3 {
  95. cpu-supply = <&vdd_arm>;
  96. };
  97. &csi_dphy {
  98. status = "okay";
  99. };
  100. &display_subsystem {
  101. status = "okay";
  102. };
  103. &dsi {
  104. status = "okay";
  105. ports {
  106. mipi_out: port@1 {
  107. reg = <1>;
  108. mipi_out_panel: endpoint {
  109. remote-endpoint = <&mipi_in_panel>;
  110. };
  111. };
  112. };
  113. panel@0 {
  114. compatible = "xinpeng,xpp055c272";
  115. reg = <0>;
  116. backlight = <&backlight>;
  117. iovcc-supply = <&vcc_1v8>;
  118. vci-supply = <&vcc3v3_lcd>;
  119. port {
  120. mipi_in_panel: endpoint {
  121. remote-endpoint = <&mipi_out_panel>;
  122. };
  123. };
  124. };
  125. };
  126. &dsi_dphy {
  127. status = "okay";
  128. };
  129. &emmc {
  130. cap-mmc-highspeed;
  131. mmc-hs200-1_8v;
  132. non-removable;
  133. mmc-pwrseq = <&emmc_pwrseq>;
  134. vmmc-supply = <&vcc_3v0>;
  135. vqmmc-supply = <&vccio_flash>;
  136. status = "okay";
  137. };
  138. &gmac {
  139. clock_in_out = "output";
  140. phy-supply = <&vcc_rmii>;
  141. snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
  142. snps,reset-active-low;
  143. snps,reset-delays-us = <0 50000 50000>;
  144. status = "okay";
  145. };
  146. &gpu {
  147. mali-supply = <&vdd_log>;
  148. status = "okay";
  149. };
  150. &i2c0 {
  151. status = "okay";
  152. rk809: pmic@20 {
  153. compatible = "rockchip,rk809";
  154. reg = <0x20>;
  155. interrupt-parent = <&gpio0>;
  156. interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
  157. pinctrl-names = "default";
  158. pinctrl-0 = <&pmic_int>;
  159. rockchip,system-power-controller;
  160. wakeup-source;
  161. #clock-cells = <0>;
  162. clock-output-names = "xin32k";
  163. vcc1-supply = <&vcc5v0_sys>;
  164. vcc2-supply = <&vcc5v0_sys>;
  165. vcc3-supply = <&vcc5v0_sys>;
  166. vcc4-supply = <&vcc5v0_sys>;
  167. vcc5-supply = <&vcc3v3_sys>;
  168. vcc6-supply = <&vcc3v3_sys>;
  169. vcc7-supply = <&vcc3v3_sys>;
  170. vcc8-supply = <&vcc3v3_sys>;
  171. vcc9-supply = <&vcc5v0_sys>;
  172. regulators {
  173. vdd_log: DCDC_REG1 {
  174. regulator-name = "vdd_log";
  175. regulator-min-microvolt = <950000>;
  176. regulator-max-microvolt = <1350000>;
  177. regulator-ramp-delay = <6001>;
  178. regulator-always-on;
  179. regulator-boot-on;
  180. regulator-state-mem {
  181. regulator-on-in-suspend;
  182. regulator-suspend-microvolt = <950000>;
  183. };
  184. };
  185. vdd_arm: DCDC_REG2 {
  186. regulator-name = "vdd_arm";
  187. regulator-min-microvolt = <950000>;
  188. regulator-max-microvolt = <1350000>;
  189. regulator-ramp-delay = <6001>;
  190. regulator-always-on;
  191. regulator-boot-on;
  192. regulator-state-mem {
  193. regulator-off-in-suspend;
  194. regulator-suspend-microvolt = <950000>;
  195. };
  196. };
  197. vcc_ddr: DCDC_REG3 {
  198. regulator-name = "vcc_ddr";
  199. regulator-always-on;
  200. regulator-boot-on;
  201. regulator-state-mem {
  202. regulator-on-in-suspend;
  203. };
  204. };
  205. vcc_3v0: vcc_rmii: DCDC_REG4 {
  206. regulator-name = "vcc_3v0";
  207. regulator-min-microvolt = <3000000>;
  208. regulator-max-microvolt = <3000000>;
  209. regulator-always-on;
  210. regulator-boot-on;
  211. regulator-state-mem {
  212. regulator-on-in-suspend;
  213. regulator-suspend-microvolt = <3000000>;
  214. };
  215. };
  216. vcc3v3_sys: DCDC_REG5 {
  217. regulator-name = "vcc3v3_sys";
  218. regulator-min-microvolt = <3300000>;
  219. regulator-max-microvolt = <3300000>;
  220. regulator-always-on;
  221. regulator-boot-on;
  222. regulator-state-mem {
  223. regulator-on-in-suspend;
  224. regulator-suspend-microvolt = <3300000>;
  225. };
  226. };
  227. vcc_1v0: LDO_REG1 {
  228. regulator-name = "vcc_1v0";
  229. regulator-min-microvolt = <1000000>;
  230. regulator-max-microvolt = <1000000>;
  231. regulator-always-on;
  232. regulator-boot-on;
  233. regulator-state-mem {
  234. regulator-on-in-suspend;
  235. regulator-suspend-microvolt = <1000000>;
  236. };
  237. };
  238. vcc_1v8: vccio_flash: vccio_sdio: LDO_REG2 {
  239. regulator-name = "vcc_1v8";
  240. regulator-min-microvolt = <1800000>;
  241. regulator-max-microvolt = <1800000>;
  242. regulator-always-on;
  243. regulator-boot-on;
  244. regulator-state-mem {
  245. regulator-on-in-suspend;
  246. regulator-suspend-microvolt = <1800000>;
  247. };
  248. };
  249. vdd_1v0: LDO_REG3 {
  250. regulator-name = "vdd_1v0";
  251. regulator-min-microvolt = <1000000>;
  252. regulator-max-microvolt = <1000000>;
  253. regulator-always-on;
  254. regulator-boot-on;
  255. regulator-state-mem {
  256. regulator-on-in-suspend;
  257. regulator-suspend-microvolt = <1000000>;
  258. };
  259. };
  260. vcc3v0_pmu: LDO_REG4 {
  261. regulator-name = "vcc3v0_pmu";
  262. regulator-min-microvolt = <3000000>;
  263. regulator-max-microvolt = <3000000>;
  264. regulator-always-on;
  265. regulator-boot-on;
  266. regulator-state-mem {
  267. regulator-on-in-suspend;
  268. regulator-suspend-microvolt = <3000000>;
  269. };
  270. };
  271. vccio_sd: LDO_REG5 {
  272. regulator-name = "vccio_sd";
  273. regulator-min-microvolt = <1800000>;
  274. regulator-max-microvolt = <3300000>;
  275. regulator-always-on;
  276. regulator-boot-on;
  277. regulator-state-mem {
  278. regulator-on-in-suspend;
  279. regulator-suspend-microvolt = <3300000>;
  280. };
  281. };
  282. vcc_sd: LDO_REG6 {
  283. regulator-name = "vcc_sd";
  284. regulator-min-microvolt = <3300000>;
  285. regulator-max-microvolt = <3300000>;
  286. regulator-boot-on;
  287. regulator-state-mem {
  288. regulator-on-in-suspend;
  289. regulator-suspend-microvolt = <3300000>;
  290. };
  291. };
  292. vcc2v8_dvp: LDO_REG7 {
  293. regulator-name = "vcc2v8_dvp";
  294. regulator-min-microvolt = <2800000>;
  295. regulator-max-microvolt = <2800000>;
  296. regulator-boot-on;
  297. regulator-state-mem {
  298. regulator-off-in-suspend;
  299. regulator-suspend-microvolt = <2800000>;
  300. };
  301. };
  302. vcc1v8_dvp: LDO_REG8 {
  303. regulator-name = "vcc1v8_dvp";
  304. regulator-min-microvolt = <1800000>;
  305. regulator-max-microvolt = <1800000>;
  306. regulator-boot-on;
  307. regulator-state-mem {
  308. regulator-on-in-suspend;
  309. regulator-suspend-microvolt = <1800000>;
  310. };
  311. };
  312. vcc1v5_dvp: LDO_REG9 {
  313. regulator-name = "vcc1v5_dvp";
  314. regulator-min-microvolt = <1500000>;
  315. regulator-max-microvolt = <1500000>;
  316. regulator-boot-on;
  317. regulator-state-mem {
  318. regulator-off-in-suspend;
  319. regulator-suspend-microvolt = <1500000>;
  320. };
  321. };
  322. vcc3v3_lcd: SWITCH_REG1 {
  323. regulator-name = "vcc3v3_lcd";
  324. regulator-boot-on;
  325. };
  326. vcc5v0_host: SWITCH_REG2 {
  327. regulator-name = "vcc5v0_host";
  328. regulator-always-on;
  329. regulator-boot-on;
  330. };
  331. };
  332. };
  333. };
  334. &i2c1 {
  335. status = "okay";
  336. sensor@d {
  337. compatible = "asahi-kasei,ak8963";
  338. reg = <0x0d>;
  339. gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
  340. vdd-supply = <&vcc3v0_pmu>;
  341. mount-matrix = "1", /* x0 */
  342. "0", /* y0 */
  343. "0", /* z0 */
  344. "0", /* x1 */
  345. "1", /* y1 */
  346. "0", /* z1 */
  347. "0", /* x2 */
  348. "0", /* y2 */
  349. "1"; /* z2 */
  350. };
  351. touchscreen@14 {
  352. compatible = "goodix,gt1151";
  353. reg = <0x14>;
  354. interrupt-parent = <&gpio0>;
  355. interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
  356. irq-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  357. reset-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
  358. VDDIO-supply = <&vcc3v3_lcd>;
  359. };
  360. sensor@4c {
  361. compatible = "fsl,mma7660";
  362. reg = <0x4c>;
  363. interrupt-parent = <&gpio0>;
  364. interrupts = <RK_PB7 IRQ_TYPE_LEVEL_LOW>;
  365. };
  366. };
  367. &i2c2 {
  368. status = "okay";
  369. clock-frequency = <100000>;
  370. /* These are relatively safe rise/fall times; TODO: measure */
  371. i2c-scl-falling-time-ns = <50>;
  372. i2c-scl-rising-time-ns = <300>;
  373. ov5695: ov5695@36 {
  374. compatible = "ovti,ov5695";
  375. reg = <0x36>;
  376. avdd-supply = <&vcc2v8_dvp>;
  377. clocks = <&cru SCLK_CIF_OUT>;
  378. clock-names = "xvclk";
  379. dvdd-supply = <&vcc1v5_dvp>;
  380. dovdd-supply = <&vcc1v8_dvp>;
  381. pinctrl-names = "default";
  382. pinctrl-0 = <&cif_clkout_m0 &mipi_pdn>;
  383. reset-gpios = <&gpio2 RK_PB6 GPIO_ACTIVE_LOW>;
  384. port {
  385. ucam_out: endpoint {
  386. remote-endpoint = <&mipi_in_ucam>;
  387. data-lanes = <1 2>;
  388. };
  389. };
  390. };
  391. };
  392. &i2s1_2ch {
  393. status = "okay";
  394. };
  395. &io_domains {
  396. status = "okay";
  397. vccio1-supply = <&vccio_sdio>;
  398. vccio2-supply = <&vccio_sd>;
  399. vccio3-supply = <&vcc_3v0>;
  400. vccio4-supply = <&vcc3v0_pmu>;
  401. vccio5-supply = <&vcc_3v0>;
  402. vccio6-supply = <&vccio_flash>;
  403. };
  404. &isp {
  405. status = "okay";
  406. ports {
  407. port@0 {
  408. mipi_in_ucam: endpoint@0 {
  409. reg = <0>;
  410. data-lanes = <1 2>;
  411. remote-endpoint = <&ucam_out>;
  412. };
  413. };
  414. };
  415. };
  416. &isp_mmu {
  417. status = "okay";
  418. };
  419. &pinctrl {
  420. headphone {
  421. hp_det: hp-det {
  422. rockchip,pins =
  423. <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
  424. };
  425. };
  426. emmc {
  427. emmc_reset: emmc-reset {
  428. rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  429. };
  430. };
  431. pmic {
  432. pmic_int: pmic_int {
  433. rockchip,pins =
  434. <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
  435. };
  436. soc_slppin_gpio: soc_slppin_gpio {
  437. rockchip,pins =
  438. <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
  439. };
  440. soc_slppin_slp: soc_slppin_slp {
  441. rockchip,pins =
  442. <0 RK_PA4 1 &pcfg_pull_none>;
  443. };
  444. soc_slppin_rst: soc_slppin_rst {
  445. rockchip,pins =
  446. <0 RK_PA4 2 &pcfg_pull_none>;
  447. };
  448. };
  449. sdio-pwrseq {
  450. wifi_enable_h: wifi-enable-h {
  451. rockchip,pins =
  452. <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  453. };
  454. };
  455. cif-m0 {
  456. cif_clkout_m0: cif-clkout-m0 {
  457. rockchip,pins =
  458. <2 RK_PB3 1 &pcfg_pull_none_12ma>;
  459. };
  460. };
  461. mipi {
  462. mipi_pdn: mipi-pdn {
  463. rockchip,pins = <2 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
  464. };
  465. };
  466. };
  467. &pmu_io_domains {
  468. status = "okay";
  469. pmuio1-supply = <&vcc3v0_pmu>;
  470. pmuio2-supply = <&vcc3v0_pmu>;
  471. };
  472. &pwm1 {
  473. status = "okay";
  474. };
  475. &saradc {
  476. vref-supply = <&vcc_1v8>;
  477. status = "okay";
  478. };
  479. &sdmmc {
  480. cap-mmc-highspeed;
  481. cap-sd-highspeed;
  482. card-detect-delay = <800>;
  483. sd-uhs-sdr12;
  484. sd-uhs-sdr25;
  485. sd-uhs-sdr50;
  486. sd-uhs-sdr104;
  487. vmmc-supply = <&vcc_sd>;
  488. vqmmc-supply = <&vccio_sd>;
  489. status = "okay";
  490. };
  491. &sdio {
  492. cap-sd-highspeed;
  493. keep-power-in-suspend;
  494. non-removable;
  495. mmc-pwrseq = <&sdio_pwrseq>;
  496. sd-uhs-sdr104;
  497. status = "okay";
  498. };
  499. &tsadc {
  500. rockchip,hw-tshut-mode = <1>;
  501. rockchip,hw-tshut-polarity = <1>;
  502. status = "okay";
  503. };
  504. &u2phy {
  505. status = "okay";
  506. u2phy_host: host-port {
  507. status = "okay";
  508. };
  509. u2phy_otg: otg-port {
  510. status = "okay";
  511. };
  512. };
  513. &uart1 {
  514. pinctrl-names = "default";
  515. pinctrl-0 = <&uart1_xfer &uart1_cts>;
  516. status = "okay";
  517. };
  518. &uart5 {
  519. status = "okay";
  520. };
  521. &usb20_otg {
  522. status = "okay";
  523. };
  524. &usb_host0_ehci {
  525. status = "okay";
  526. };
  527. &usb_host0_ohci {
  528. status = "okay";
  529. };
  530. &vopb {
  531. status = "okay";
  532. };
  533. &vopb_mmu {
  534. status = "okay";
  535. };
  536. &vopl {
  537. status = "okay";
  538. };
  539. &vopl_mmu {
  540. status = "okay";
  541. };