rk3399-leez-p710.dts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2019 Andy Yan <[email protected]>
  4. */
  5. /dts-v1/;
  6. #include <dt-bindings/input/linux-event-codes.h>
  7. #include <dt-bindings/interrupt-controller/irq.h>
  8. #include <dt-bindings/pwm/pwm.h>
  9. #include "rk3399.dtsi"
  10. #include "rk3399-opp.dtsi"
  11. / {
  12. model = "Leez RK3399 P710";
  13. compatible = "leez,p710", "rockchip,rk3399";
  14. aliases {
  15. mmc0 = &sdio0;
  16. mmc1 = &sdmmc;
  17. mmc2 = &sdhci;
  18. };
  19. chosen {
  20. stdout-path = "serial2:1500000n8";
  21. };
  22. clkin_gmac: external-gmac-clock {
  23. compatible = "fixed-clock";
  24. clock-frequency = <125000000>;
  25. clock-output-names = "clkin_gmac";
  26. #clock-cells = <0>;
  27. };
  28. sdio_pwrseq: sdio-pwrseq {
  29. compatible = "mmc-pwrseq-simple";
  30. clocks = <&rk808 1>;
  31. clock-names = "ext_clock";
  32. pinctrl-names = "default";
  33. pinctrl-0 = <&wifi_reg_on_h>;
  34. reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
  35. };
  36. dc5v_adp: dc5v-adp {
  37. compatible = "regulator-fixed";
  38. regulator-name = "dc5v_adapter";
  39. regulator-always-on;
  40. regulator-boot-on;
  41. regulator-min-microvolt = <5000000>;
  42. regulator-max-microvolt = <5000000>;
  43. };
  44. vcc3v3_lan: vcc3v3-lan {
  45. compatible = "regulator-fixed";
  46. regulator-name = "vcc3v3_lan";
  47. regulator-always-on;
  48. regulator-boot-on;
  49. regulator-min-microvolt = <3300000>;
  50. regulator-max-microvolt = <3300000>;
  51. vin-supply = <&vcc3v3_sys>;
  52. };
  53. vcc3v3_sys: vcc3v3-sys {
  54. compatible = "regulator-fixed";
  55. regulator-name = "vcc3v3_sys";
  56. regulator-always-on;
  57. regulator-boot-on;
  58. regulator-min-microvolt = <3300000>;
  59. regulator-max-microvolt = <3300000>;
  60. vin-supply = <&vcc5v0_sys>;
  61. };
  62. vcc5v0_host0: vcc5v0_host1: vcc5v0-host {
  63. compatible = "regulator-fixed";
  64. regulator-name = "vcc5v0_host";
  65. regulator-boot-on;
  66. regulator-always-on;
  67. regulator-min-microvolt = <5500000>;
  68. regulator-max-microvolt = <5500000>;
  69. vin-supply = <&vcc5v0_sys>;
  70. };
  71. vcc5v0_host3: vcc5v0-host3 {
  72. compatible = "regulator-fixed";
  73. regulator-name = "vcc5v0_host3";
  74. enable-active-high;
  75. gpio = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
  76. pinctrl-names = "default";
  77. pinctrl-0 = <&vcc5v0_host3_en>;
  78. regulator-always-on;
  79. vin-supply = <&vcc5v0_sys>;
  80. };
  81. vcc5v0_sys: vcc5v0-sys {
  82. compatible = "regulator-fixed";
  83. regulator-name = "vcc5v0_sys";
  84. regulator-always-on;
  85. regulator-boot-on;
  86. regulator-min-microvolt = <5000000>;
  87. regulator-max-microvolt = <5000000>;
  88. vin-supply = <&dc5v_adp>;
  89. };
  90. vdd_log: vdd-log {
  91. compatible = "pwm-regulator";
  92. pwms = <&pwm2 0 25000 1>;
  93. pwm-supply = <&vcc5v0_sys>;
  94. regulator-name = "vdd_log";
  95. regulator-always-on;
  96. regulator-boot-on;
  97. regulator-min-microvolt = <800000>;
  98. regulator-max-microvolt = <1400000>;
  99. };
  100. };
  101. &cpu_l0 {
  102. cpu-supply = <&vdd_cpu_l>;
  103. };
  104. &cpu_l1 {
  105. cpu-supply = <&vdd_cpu_l>;
  106. };
  107. &cpu_l2 {
  108. cpu-supply = <&vdd_cpu_l>;
  109. };
  110. &cpu_l3 {
  111. cpu-supply = <&vdd_cpu_l>;
  112. };
  113. &cpu_b0 {
  114. cpu-supply = <&vdd_cpu_b>;
  115. };
  116. &cpu_b1 {
  117. cpu-supply = <&vdd_cpu_b>;
  118. };
  119. &emmc_phy {
  120. status = "okay";
  121. };
  122. &gmac {
  123. assigned-clocks = <&cru SCLK_RMII_SRC>;
  124. assigned-clock-parents = <&clkin_gmac>;
  125. clock_in_out = "input";
  126. phy-supply = <&vcc3v3_lan>;
  127. phy-mode = "rgmii";
  128. pinctrl-names = "default";
  129. pinctrl-0 = <&rgmii_pins>;
  130. snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
  131. snps,reset-active-low;
  132. snps,reset-delays-us = <0 10000 50000>;
  133. tx_delay = <0x28>;
  134. rx_delay = <0x11>;
  135. status = "okay";
  136. };
  137. &gpu {
  138. mali-supply = <&vdd_gpu>;
  139. status = "okay";
  140. };
  141. &hdmi {
  142. ddc-i2c-bus = <&i2c7>;
  143. pinctrl-names = "default";
  144. pinctrl-0 = <&hdmi_cec>;
  145. status = "okay";
  146. };
  147. &hdmi_sound {
  148. status = "okay";
  149. };
  150. &i2c0 {
  151. clock-frequency = <400000>;
  152. i2c-scl-rising-time-ns = <168>;
  153. i2c-scl-falling-time-ns = <4>;
  154. status = "okay";
  155. rk808: pmic@1b {
  156. compatible = "rockchip,rk808";
  157. reg = <0x1b>;
  158. interrupt-parent = <&gpio1>;
  159. interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
  160. #clock-cells = <1>;
  161. clock-output-names = "xin32k", "rk808-clkout2";
  162. pinctrl-names = "default";
  163. pinctrl-0 = <&pmic_int_l>;
  164. rockchip,system-power-controller;
  165. wakeup-source;
  166. vcc1-supply = <&vcc5v0_sys>;
  167. vcc2-supply = <&vcc5v0_sys>;
  168. vcc3-supply = <&vcc5v0_sys>;
  169. vcc4-supply = <&vcc5v0_sys>;
  170. vcc6-supply = <&vcc5v0_sys>;
  171. vcc7-supply = <&vcc5v0_sys>;
  172. vcc8-supply = <&vcc3v3_sys>;
  173. vcc9-supply = <&vcc5v0_sys>;
  174. vcc10-supply = <&vcc5v0_sys>;
  175. vcc11-supply = <&vcc5v0_sys>;
  176. vcc12-supply = <&vcc3v3_sys>;
  177. vddio-supply = <&vcc_1v8>;
  178. regulators {
  179. vdd_center: DCDC_REG1 {
  180. regulator-name = "vdd_center";
  181. regulator-always-on;
  182. regulator-boot-on;
  183. regulator-min-microvolt = <750000>;
  184. regulator-max-microvolt = <1350000>;
  185. regulator-ramp-delay = <6001>;
  186. regulator-state-mem {
  187. regulator-off-in-suspend;
  188. };
  189. };
  190. vdd_cpu_l: DCDC_REG2 {
  191. regulator-name = "vdd_cpu_l";
  192. regulator-always-on;
  193. regulator-boot-on;
  194. regulator-min-microvolt = <750000>;
  195. regulator-max-microvolt = <1350000>;
  196. regulator-ramp-delay = <6001>;
  197. regulator-state-mem {
  198. regulator-off-in-suspend;
  199. };
  200. };
  201. vcc_ddr: DCDC_REG3 {
  202. regulator-name = "vcc_ddr";
  203. regulator-always-on;
  204. regulator-boot-on;
  205. regulator-state-mem {
  206. regulator-on-in-suspend;
  207. };
  208. };
  209. vcc_1v8: DCDC_REG4 {
  210. regulator-name = "vcc_1v8";
  211. regulator-always-on;
  212. regulator-boot-on;
  213. regulator-min-microvolt = <1800000>;
  214. regulator-max-microvolt = <1800000>;
  215. regulator-state-mem {
  216. regulator-on-in-suspend;
  217. regulator-suspend-microvolt = <1800000>;
  218. };
  219. };
  220. vcc1v8_dvp: LDO_REG1 {
  221. regulator-name = "vcc1v8_dvp";
  222. regulator-always-on;
  223. regulator-boot-on;
  224. regulator-min-microvolt = <1800000>;
  225. regulator-max-microvolt = <1800000>;
  226. regulator-state-mem {
  227. regulator-off-in-suspend;
  228. };
  229. };
  230. vcc1v8_hdmi: LDO_REG2 {
  231. regulator-name = "vcc1v8_hdmi";
  232. regulator-always-on;
  233. regulator-boot-on;
  234. regulator-min-microvolt = <1800000>;
  235. regulator-max-microvolt = <1800000>;
  236. regulator-state-mem {
  237. regulator-off-in-suspend;
  238. };
  239. };
  240. vcca_1v8: LDO_REG3 {
  241. regulator-name = "vcca_1v8";
  242. regulator-always-on;
  243. regulator-boot-on;
  244. regulator-min-microvolt = <1800000>;
  245. regulator-max-microvolt = <1800000>;
  246. regulator-state-mem {
  247. regulator-on-in-suspend;
  248. regulator-suspend-microvolt = <1800000>;
  249. };
  250. };
  251. vccio_sd: LDO_REG4 {
  252. regulator-name = "vccio_sd";
  253. regulator-always-on;
  254. regulator-boot-on;
  255. regulator-min-microvolt = <3000000>;
  256. regulator-max-microvolt = <3000000>;
  257. regulator-state-mem {
  258. regulator-on-in-suspend;
  259. regulator-suspend-microvolt = <3000000>;
  260. };
  261. };
  262. vcca3v0_codec: LDO_REG5 {
  263. regulator-name = "vcca3v0_codec";
  264. regulator-always-on;
  265. regulator-boot-on;
  266. regulator-min-microvolt = <3000000>;
  267. regulator-max-microvolt = <3000000>;
  268. regulator-state-mem {
  269. regulator-off-in-suspend;
  270. };
  271. };
  272. vcc_1v5: LDO_REG6 {
  273. regulator-name = "vcc_1v5";
  274. regulator-always-on;
  275. regulator-boot-on;
  276. regulator-min-microvolt = <1500000>;
  277. regulator-max-microvolt = <1500000>;
  278. regulator-state-mem {
  279. regulator-on-in-suspend;
  280. regulator-suspend-microvolt = <1500000>;
  281. };
  282. };
  283. vcc0v9_hdmi: LDO_REG7 {
  284. regulator-name = "vcc0v9_hdmi";
  285. regulator-always-on;
  286. regulator-boot-on;
  287. regulator-min-microvolt = <900000>;
  288. regulator-max-microvolt = <900000>;
  289. regulator-state-mem {
  290. regulator-off-in-suspend;
  291. };
  292. };
  293. vcc_3v0: LDO_REG8 {
  294. regulator-name = "vcc_3v0";
  295. regulator-always-on;
  296. regulator-boot-on;
  297. regulator-min-microvolt = <3000000>;
  298. regulator-max-microvolt = <3000000>;
  299. regulator-state-mem {
  300. regulator-on-in-suspend;
  301. regulator-suspend-microvolt = <3000000>;
  302. };
  303. };
  304. };
  305. };
  306. vdd_cpu_b: regulator@40 {
  307. compatible = "silergy,syr827";
  308. reg = <0x40>;
  309. fcs,suspend-voltage-selector = <1>;
  310. pinctrl-names = "default";
  311. pinctrl-0 = <&vsel1_pin>;
  312. regulator-name = "vdd_cpu_b";
  313. regulator-min-microvolt = <712500>;
  314. regulator-max-microvolt = <1500000>;
  315. regulator-ramp-delay = <1000>;
  316. regulator-always-on;
  317. regulator-boot-on;
  318. vin-supply = <&vcc5v0_sys>;
  319. regulator-state-mem {
  320. regulator-off-in-suspend;
  321. };
  322. };
  323. vdd_gpu: regulator@41 {
  324. compatible = "silergy,syr828";
  325. reg = <0x41>;
  326. fcs,suspend-voltage-selector = <1>;
  327. pinctrl-names = "default";
  328. pinctrl-0 = <&vsel2_pin>;
  329. regulator-name = "vdd_gpu";
  330. regulator-min-microvolt = <712500>;
  331. regulator-max-microvolt = <1500000>;
  332. regulator-ramp-delay = <1000>;
  333. regulator-always-on;
  334. regulator-boot-on;
  335. vin-supply = <&vcc5v0_sys>;
  336. regulator-state-mem {
  337. regulator-off-in-suspend;
  338. };
  339. };
  340. };
  341. &i2c1 {
  342. i2c-scl-rising-time-ns = <300>;
  343. i2c-scl-falling-time-ns = <15>;
  344. status = "okay";
  345. };
  346. &i2c3 {
  347. i2c-scl-rising-time-ns = <450>;
  348. i2c-scl-falling-time-ns = <15>;
  349. status = "okay";
  350. };
  351. &i2c4 {
  352. i2c-scl-rising-time-ns = <600>;
  353. i2c-scl-falling-time-ns = <20>;
  354. status = "okay";
  355. };
  356. &i2c7 {
  357. status = "okay";
  358. };
  359. &i2s0 {
  360. rockchip,playback-channels = <8>;
  361. rockchip,capture-channels = <8>;
  362. status = "okay";
  363. };
  364. &i2s1 {
  365. rockchip,playback-channels = <2>;
  366. rockchip,capture-channels = <2>;
  367. status = "okay";
  368. };
  369. &i2s2 {
  370. status = "okay";
  371. };
  372. &io_domains {
  373. status = "okay";
  374. bt656-supply = <&vcc1v8_dvp>;
  375. audio-supply = <&vcc_1v8>;
  376. sdmmc-supply = <&vccio_sd>;
  377. gpio1830-supply = <&vcc_3v0>;
  378. };
  379. &pmu_io_domains {
  380. status = "okay";
  381. pmu1830-supply = <&vcc_3v0>;
  382. };
  383. &pinctrl {
  384. bt {
  385. bt_reg_on_h: bt-reg-on-h {
  386. rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
  387. };
  388. bt_host_wake_l: bt-host-wake-l {
  389. rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
  390. };
  391. bt_wake_l: bt-wake-l {
  392. rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
  393. };
  394. };
  395. pmic {
  396. pmic_int_l: pmic-int-l {
  397. rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
  398. };
  399. vsel1_pin: vsel1-pin {
  400. rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
  401. };
  402. vsel2_pin: vsel2-pin {
  403. rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  404. };
  405. };
  406. usb2 {
  407. vcc5v0_host3_en: vcc5v0-host3-en {
  408. rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  409. };
  410. };
  411. wifi {
  412. wifi_reg_on_h: wifi-reg-on-h {
  413. rockchip,pins =
  414. <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
  415. };
  416. wifi_host_wake_l: wifi-host-wake-l {
  417. rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
  418. };
  419. };
  420. };
  421. &pwm2 {
  422. status = "okay";
  423. };
  424. &saradc {
  425. status = "okay";
  426. vref-supply = <&vcc_1v8>;
  427. };
  428. &sdio0 {
  429. #address-cells = <1>;
  430. #size-cells = <0>;
  431. bus-width = <4>;
  432. clock-frequency = <50000000>;
  433. cap-sdio-irq;
  434. cap-sd-highspeed;
  435. keep-power-in-suspend;
  436. mmc-pwrseq = <&sdio_pwrseq>;
  437. non-removable;
  438. pinctrl-names = "default";
  439. pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
  440. sd-uhs-sdr104;
  441. status = "okay";
  442. brcmf: wifi@1 {
  443. compatible = "brcm,bcm4329-fmac";
  444. reg = <1>;
  445. interrupt-parent = <&gpio0>;
  446. interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
  447. interrupt-names = "host-wake";
  448. pinctrl-names = "default";
  449. pinctrl-0 = <&wifi_host_wake_l>;
  450. };
  451. };
  452. &sdhci {
  453. bus-width = <8>;
  454. mmc-hs400-1_8v;
  455. mmc-hs400-enhanced-strobe;
  456. non-removable;
  457. status = "okay";
  458. };
  459. &sdmmc {
  460. bus-width = <4>;
  461. cap-mmc-highspeed;
  462. cap-sd-highspeed;
  463. cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
  464. disable-wp;
  465. max-frequency = <150000000>;
  466. pinctrl-names = "default";
  467. pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
  468. status = "okay";
  469. };
  470. &tcphy0 {
  471. status = "okay";
  472. };
  473. &tcphy1 {
  474. status = "okay";
  475. };
  476. &tsadc {
  477. status = "okay";
  478. /* tshut mode 0:CRU 1:GPIO */
  479. rockchip,hw-tshut-mode = <1>;
  480. /* tshut polarity 0:LOW 1:HIGH */
  481. rockchip,hw-tshut-polarity = <1>;
  482. };
  483. &u2phy0 {
  484. status = "okay";
  485. u2phy0_otg: otg-port {
  486. status = "okay";
  487. };
  488. u2phy0_host: host-port {
  489. phy-supply = <&vcc5v0_host0>;
  490. status = "okay";
  491. };
  492. };
  493. &u2phy1 {
  494. status = "okay";
  495. u2phy1_otg: otg-port {
  496. status = "okay";
  497. };
  498. u2phy1_host: host-port {
  499. phy-supply = <&vcc5v0_host1>;
  500. status = "okay";
  501. };
  502. };
  503. &uart0 {
  504. pinctrl-names = "default";
  505. pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
  506. status = "okay";
  507. bluetooth {
  508. compatible = "brcm,bcm43438-bt";
  509. clocks = <&rk808 1>;
  510. clock-names = "ext_clock";
  511. device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
  512. host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
  513. shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
  514. pinctrl-names = "default";
  515. pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_reg_on_h>;
  516. };
  517. };
  518. &uart2 {
  519. status = "okay";
  520. };
  521. &usb_host0_ehci {
  522. status = "okay";
  523. };
  524. &usb_host0_ohci {
  525. status = "okay";
  526. };
  527. &usb_host1_ehci {
  528. status = "okay";
  529. };
  530. &usb_host1_ohci {
  531. status = "okay";
  532. };
  533. &usbdrd3_0 {
  534. status = "okay";
  535. };
  536. &usbdrd_dwc3_0 {
  537. status = "okay";
  538. dr_mode = "otg";
  539. };
  540. &usbdrd3_1 {
  541. status = "okay";
  542. };
  543. &usbdrd_dwc3_1 {
  544. status = "okay";
  545. dr_mode = "host";
  546. };
  547. &vopb {
  548. status = "okay";
  549. };
  550. &vopb_mmu {
  551. status = "okay";
  552. };
  553. &vopl {
  554. status = "okay";
  555. };
  556. &vopl_mmu {
  557. status = "okay";
  558. };