rk3399-rockpro64.dts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
  4. * Copyright (c) 2018 Akash Gajjar <Akash_Gajjar@mentor.com>
  5. */
  6. /dts-v1/;
  7. #include <dt-bindings/input/linux-event-codes.h>
  8. #include <dt-bindings/pwm/pwm.h>
  9. #include "rk3399.dtsi"
  10. #include "rk3399-opp.dtsi"
  11. / {
  12. model = "Pine64 RockPro64";
  13. compatible = "pine64,rockpro64", "rockchip,rk3399";
  14. chosen {
  15. stdout-path = "serial2:1500000n8";
  16. };
  17. clkin_gmac: external-gmac-clock {
  18. compatible = "fixed-clock";
  19. clock-frequency = <125000000>;
  20. clock-output-names = "clkin_gmac";
  21. #clock-cells = <0>;
  22. };
  23. dc_12v: dc-12v {
  24. compatible = "regulator-fixed";
  25. regulator-name = "dc_12v";
  26. regulator-always-on;
  27. regulator-boot-on;
  28. regulator-min-microvolt = <12000000>;
  29. regulator-max-microvolt = <12000000>;
  30. };
  31. gpio-keys {
  32. compatible = "gpio-keys";
  33. autorepeat;
  34. pinctrl-names = "default";
  35. pinctrl-0 = <&pwrbtn>;
  36. power {
  37. debounce-interval = <100>;
  38. gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  39. label = "GPIO Key Power";
  40. linux,code = <KEY_POWER>;
  41. wakeup-source;
  42. };
  43. };
  44. leds {
  45. compatible = "gpio-leds";
  46. pinctrl-names = "default";
  47. pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>;
  48. work-led {
  49. label = "work";
  50. default-state = "on";
  51. gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
  52. };
  53. diy-led {
  54. label = "diy";
  55. default-state = "off";
  56. gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
  57. };
  58. };
  59. sdio_pwrseq: sdio-pwrseq {
  60. compatible = "mmc-pwrseq-simple";
  61. clocks = <&rk808 1>;
  62. clock-names = "ext_clock";
  63. pinctrl-names = "default";
  64. pinctrl-0 = <&wifi_enable_h>;
  65. /*
  66. * On the module itself this is one of these (depending
  67. * on the actual card populated):
  68. * - SDIO_RESET_L_WL_REG_ON
  69. * - PDN (power down when low)
  70. */
  71. reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
  72. };
  73. /* switched by pmic_sleep */
  74. vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
  75. compatible = "regulator-fixed";
  76. regulator-name = "vcc1v8_s3";
  77. regulator-always-on;
  78. regulator-boot-on;
  79. regulator-min-microvolt = <1800000>;
  80. regulator-max-microvolt = <1800000>;
  81. vin-supply = <&vcc_1v8>;
  82. };
  83. vcc3v3_pcie: vcc3v3-pcie-regulator {
  84. compatible = "regulator-fixed";
  85. enable-active-high;
  86. gpio = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
  87. pinctrl-names = "default";
  88. pinctrl-0 = <&pcie_pwr_en>;
  89. regulator-name = "vcc3v3_pcie";
  90. regulator-always-on;
  91. regulator-boot-on;
  92. vin-supply = <&dc_12v>;
  93. };
  94. vcc3v3_sys: vcc3v3-sys {
  95. compatible = "regulator-fixed";
  96. regulator-name = "vcc3v3_sys";
  97. regulator-always-on;
  98. regulator-boot-on;
  99. regulator-min-microvolt = <3300000>;
  100. regulator-max-microvolt = <3300000>;
  101. vin-supply = <&vcc_sys>;
  102. };
  103. /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
  104. vcc5v0_host: vcc5v0-host-regulator {
  105. compatible = "regulator-fixed";
  106. enable-active-high;
  107. gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
  108. pinctrl-names = "default";
  109. pinctrl-0 = <&vcc5v0_host_en>;
  110. regulator-name = "vcc5v0_host";
  111. regulator-always-on;
  112. vin-supply = <&vcc_sys>;
  113. };
  114. vcc5v0_typec: vcc5v0-typec-regulator {
  115. compatible = "regulator-fixed";
  116. enable-active-high;
  117. gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
  118. pinctrl-names = "default";
  119. pinctrl-0 = <&vcc5v0_typec_en>;
  120. regulator-name = "vcc5v0_typec";
  121. regulator-always-on;
  122. vin-supply = <&vcc_sys>;
  123. };
  124. vcc_sys: vcc-sys {
  125. compatible = "regulator-fixed";
  126. regulator-name = "vcc_sys";
  127. regulator-always-on;
  128. regulator-boot-on;
  129. regulator-min-microvolt = <5000000>;
  130. regulator-max-microvolt = <5000000>;
  131. vin-supply = <&dc_12v>;
  132. };
  133. vdd_log: vdd-log {
  134. compatible = "pwm-regulator";
  135. pwms = <&pwm2 0 25000 1>;
  136. regulator-name = "vdd_log";
  137. regulator-always-on;
  138. regulator-boot-on;
  139. regulator-min-microvolt = <800000>;
  140. regulator-max-microvolt = <1400000>;
  141. vin-supply = <&vcc_sys>;
  142. };
  143. };
  144. &cpu_l0 {
  145. cpu-supply = <&vdd_cpu_l>;
  146. };
  147. &cpu_l1 {
  148. cpu-supply = <&vdd_cpu_l>;
  149. };
  150. &cpu_l2 {
  151. cpu-supply = <&vdd_cpu_l>;
  152. };
  153. &cpu_l3 {
  154. cpu-supply = <&vdd_cpu_l>;
  155. };
  156. &cpu_b0 {
  157. cpu-supply = <&vdd_cpu_b>;
  158. };
  159. &cpu_b1 {
  160. cpu-supply = <&vdd_cpu_b>;
  161. };
  162. &emmc_phy {
  163. status = "okay";
  164. };
  165. &gmac {
  166. assigned-clocks = <&cru SCLK_RMII_SRC>;
  167. assigned-clock-parents = <&clkin_gmac>;
  168. clock_in_out = "input";
  169. phy-supply = <&vcc_lan>;
  170. phy-mode = "rgmii";
  171. pinctrl-names = "default";
  172. pinctrl-0 = <&rgmii_pins>;
  173. snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
  174. snps,reset-active-low;
  175. snps,reset-delays-us = <0 10000 50000>;
  176. tx_delay = <0x28>;
  177. rx_delay = <0x11>;
  178. status = "okay";
  179. };
  180. &i2c0 {
  181. clock-frequency = <400000>;
  182. i2c-scl-rising-time-ns = <168>;
  183. i2c-scl-falling-time-ns = <4>;
  184. status = "okay";
  185. rk808: pmic@1b {
  186. compatible = "rockchip,rk808";
  187. reg = <0x1b>;
  188. interrupt-parent = <&gpio1>;
  189. interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
  190. #clock-cells = <1>;
  191. clock-output-names = "xin32k", "rk808-clkout2";
  192. pinctrl-names = "default";
  193. pinctrl-0 = <&pmic_int_l>;
  194. rockchip,system-power-controller;
  195. wakeup-source;
  196. vcc1-supply = <&vcc_sys>;
  197. vcc2-supply = <&vcc_sys>;
  198. vcc3-supply = <&vcc_sys>;
  199. vcc4-supply = <&vcc_sys>;
  200. vcc6-supply = <&vcc_sys>;
  201. vcc7-supply = <&vcc_sys>;
  202. vcc8-supply = <&vcc3v3_sys>;
  203. vcc9-supply = <&vcc_sys>;
  204. vcc10-supply = <&vcc_sys>;
  205. vcc11-supply = <&vcc_sys>;
  206. vcc12-supply = <&vcc3v3_sys>;
  207. vddio-supply = <&vcc1v8_pmu>;
  208. regulators {
  209. vdd_center: DCDC_REG1 {
  210. regulator-name = "vdd_center";
  211. regulator-always-on;
  212. regulator-boot-on;
  213. regulator-min-microvolt = <750000>;
  214. regulator-max-microvolt = <1350000>;
  215. regulator-ramp-delay = <6001>;
  216. regulator-state-mem {
  217. regulator-off-in-suspend;
  218. };
  219. };
  220. vdd_cpu_l: DCDC_REG2 {
  221. regulator-name = "vdd_cpu_l";
  222. regulator-always-on;
  223. regulator-boot-on;
  224. regulator-min-microvolt = <750000>;
  225. regulator-max-microvolt = <1350000>;
  226. regulator-ramp-delay = <6001>;
  227. regulator-state-mem {
  228. regulator-off-in-suspend;
  229. };
  230. };
  231. vcc_ddr: DCDC_REG3 {
  232. regulator-name = "vcc_ddr";
  233. regulator-always-on;
  234. regulator-boot-on;
  235. regulator-state-mem {
  236. regulator-on-in-suspend;
  237. };
  238. };
  239. vcc_1v8: DCDC_REG4 {
  240. regulator-name = "vcc_1v8";
  241. regulator-always-on;
  242. regulator-boot-on;
  243. regulator-min-microvolt = <1800000>;
  244. regulator-max-microvolt = <1800000>;
  245. regulator-state-mem {
  246. regulator-on-in-suspend;
  247. regulator-suspend-microvolt = <1800000>;
  248. };
  249. };
  250. vcc1v8_dvp: LDO_REG1 {
  251. regulator-name = "vcc1v8_dvp";
  252. regulator-always-on;
  253. regulator-boot-on;
  254. regulator-min-microvolt = <1800000>;
  255. regulator-max-microvolt = <1800000>;
  256. regulator-state-mem {
  257. regulator-off-in-suspend;
  258. };
  259. };
  260. vcc2v8_dvp: LDO_REG2 {
  261. regulator-name = "vcc2v8_dvp";
  262. regulator-always-on;
  263. regulator-boot-on;
  264. regulator-min-microvolt = <2800000>;
  265. regulator-max-microvolt = <2800000>;
  266. regulator-state-mem {
  267. regulator-off-in-suspend;
  268. };
  269. };
  270. vcc1v8_pmu: LDO_REG3 {
  271. regulator-name = "vcc1v8_pmu";
  272. regulator-always-on;
  273. regulator-boot-on;
  274. regulator-min-microvolt = <1800000>;
  275. regulator-max-microvolt = <1800000>;
  276. regulator-state-mem {
  277. regulator-on-in-suspend;
  278. regulator-suspend-microvolt = <1800000>;
  279. };
  280. };
  281. vcc_sdio: LDO_REG4 {
  282. regulator-name = "vcc_sdio";
  283. regulator-always-on;
  284. regulator-boot-on;
  285. regulator-min-microvolt = <1800000>;
  286. regulator-max-microvolt = <3000000>;
  287. regulator-state-mem {
  288. regulator-on-in-suspend;
  289. regulator-suspend-microvolt = <3000000>;
  290. };
  291. };
  292. vcca3v0_codec: LDO_REG5 {
  293. regulator-name = "vcca3v0_codec";
  294. regulator-always-on;
  295. regulator-boot-on;
  296. regulator-min-microvolt = <3000000>;
  297. regulator-max-microvolt = <3000000>;
  298. regulator-state-mem {
  299. regulator-off-in-suspend;
  300. };
  301. };
  302. vcc_1v5: LDO_REG6 {
  303. regulator-name = "vcc_1v5";
  304. regulator-always-on;
  305. regulator-boot-on;
  306. regulator-min-microvolt = <1500000>;
  307. regulator-max-microvolt = <1500000>;
  308. regulator-state-mem {
  309. regulator-on-in-suspend;
  310. regulator-suspend-microvolt = <1500000>;
  311. };
  312. };
  313. vcca1v8_codec: LDO_REG7 {
  314. regulator-name = "vcca1v8_codec";
  315. regulator-always-on;
  316. regulator-boot-on;
  317. regulator-min-microvolt = <1800000>;
  318. regulator-max-microvolt = <1800000>;
  319. regulator-state-mem {
  320. regulator-off-in-suspend;
  321. };
  322. };
  323. vcc_3v0: LDO_REG8 {
  324. regulator-name = "vcc_3v0";
  325. regulator-always-on;
  326. regulator-boot-on;
  327. regulator-min-microvolt = <3000000>;
  328. regulator-max-microvolt = <3000000>;
  329. regulator-state-mem {
  330. regulator-on-in-suspend;
  331. regulator-suspend-microvolt = <3000000>;
  332. };
  333. };
  334. vcc3v3_s3: vcc_lan: SWITCH_REG1 {
  335. regulator-name = "vcc3v3_s3";
  336. regulator-always-on;
  337. regulator-boot-on;
  338. regulator-state-mem {
  339. regulator-off-in-suspend;
  340. };
  341. };
  342. vcc3v3_s0: SWITCH_REG2 {
  343. regulator-name = "vcc3v3_s0";
  344. regulator-always-on;
  345. regulator-boot-on;
  346. regulator-state-mem {
  347. regulator-off-in-suspend;
  348. };
  349. };
  350. };
  351. };
  352. vdd_cpu_b: regulator@40 {
  353. compatible = "silergy,syr827";
  354. reg = <0x40>;
  355. fcs,suspend-voltage-selector = <0>;
  356. regulator-name = "vdd_cpu_b";
  357. regulator-min-microvolt = <712500>;
  358. regulator-max-microvolt = <1500000>;
  359. regulator-ramp-delay = <1000>;
  360. regulator-always-on;
  361. regulator-boot-on;
  362. vin-supply = <&vcc_sys>;
  363. regulator-state-mem {
  364. regulator-off-in-suspend;
  365. };
  366. };
  367. vdd_gpu: regulator@41 {
  368. compatible = "silergy,syr828";
  369. reg = <0x41>;
  370. fcs,suspend-voltage-selector = <1>;
  371. regulator-name = "vdd_gpu";
  372. regulator-min-microvolt = <712500>;
  373. regulator-max-microvolt = <1500000>;
  374. regulator-ramp-delay = <1000>;
  375. regulator-always-on;
  376. regulator-boot-on;
  377. vin-supply = <&vcc_sys>;
  378. regulator-state-mem {
  379. regulator-off-in-suspend;
  380. };
  381. };
  382. };
  383. &i2c1 {
  384. i2c-scl-rising-time-ns = <300>;
  385. i2c-scl-falling-time-ns = <15>;
  386. status = "okay";
  387. };
  388. &i2c3 {
  389. i2c-scl-rising-time-ns = <450>;
  390. i2c-scl-falling-time-ns = <15>;
  391. status = "okay";
  392. };
  393. &i2c4 {
  394. i2c-scl-rising-time-ns = <600>;
  395. i2c-scl-falling-time-ns = <20>;
  396. status = "okay";
  397. fusb0: typec-portc@22 {
  398. compatible = "fcs,fusb302";
  399. reg = <0x22>;
  400. interrupt-parent = <&gpio1>;
  401. interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
  402. pinctrl-names = "default";
  403. pinctrl-0 = <&fusb0_int>;
  404. vbus-supply = <&vcc5v0_typec>;
  405. status = "okay";
  406. };
  407. };
  408. &i2s0 {
  409. rockchip,playback-channels = <8>;
  410. rockchip,capture-channels = <8>;
  411. status = "okay";
  412. };
  413. &i2s1 {
  414. rockchip,playback-channels = <2>;
  415. rockchip,capture-channels = <2>;
  416. status = "okay";
  417. };
  418. &i2s2 {
  419. status = "okay";
  420. };
  421. &io_domains {
  422. status = "okay";
  423. bt656-supply = <&vcc1v8_dvp>;
  424. audio-supply = <&vcca1v8_codec>;
  425. sdmmc-supply = <&vcc_sdio>;
  426. gpio1830-supply = <&vcc_3v0>;
  427. };
  428. &pmu_io_domains {
  429. pmu1830-supply = <&vcc_3v0>;
  430. status = "okay";
  431. };
  432. &pinctrl {
  433. buttons {
  434. pwrbtn: pwrbtn {
  435. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  436. };
  437. };
  438. fusb302x {
  439. fusb0_int: fusb0-int {
  440. rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
  441. };
  442. };
  443. leds {
  444. work_led_gpio: work_led-gpio {
  445. rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  446. };
  447. diy_led_gpio: diy_led-gpio {
  448. rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  449. };
  450. };
  451. lcd-panel {
  452. lcd_panel_reset: lcd-panel-reset {
  453. rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
  454. };
  455. };
  456. pcie {
  457. pcie_pwr_en: pcie-pwr-en {
  458. rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
  459. };
  460. };
  461. pmic {
  462. pmic_int_l: pmic-int-l {
  463. rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
  464. };
  465. vsel1_gpio: vsel1-gpio {
  466. rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
  467. };
  468. vsel2_gpio: vsel2-gpio {
  469. rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  470. };
  471. };
  472. sdio-pwrseq {
  473. wifi_enable_h: wifi-enable-h {
  474. rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
  475. };
  476. };
  477. usb-typec {
  478. vcc5v0_typec_en: vcc5v0_typec_en {
  479. rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  480. };
  481. };
  482. usb2 {
  483. vcc5v0_host_en: vcc5v0-host-en {
  484. rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
  485. };
  486. };
  487. };
  488. &pwm0 {
  489. status = "okay";
  490. };
  491. &pwm2 {
  492. status = "okay";
  493. };
  494. &saradc {
  495. vref-supply = <&vcca1v8_s3>;
  496. status = "okay";
  497. };
  498. &sdmmc {
  499. bus-width = <4>;
  500. cap-mmc-highspeed;
  501. cap-sd-highspeed;
  502. cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  503. disable-wp;
  504. max-frequency = <150000000>;
  505. pinctrl-names = "default";
  506. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
  507. status = "okay";
  508. };
  509. &sdhci {
  510. bus-width = <8>;
  511. mmc-hs400-1_8v;
  512. mmc-hs400-enhanced-strobe;
  513. non-removable;
  514. status = "okay";
  515. };
  516. &tcphy0 {
  517. status = "okay";
  518. };
  519. &tcphy1 {
  520. status = "okay";
  521. };
  522. &tsadc {
  523. /* tshut mode 0:CRU 1:GPIO */
  524. rockchip,hw-tshut-mode = <1>;
  525. /* tshut polarity 0:LOW 1:HIGH */
  526. rockchip,hw-tshut-polarity = <1>;
  527. status = "okay";
  528. };
  529. &u2phy0 {
  530. status = "okay";
  531. u2phy0_otg: otg-port {
  532. status = "okay";
  533. };
  534. u2phy0_host: host-port {
  535. phy-supply = <&vcc5v0_host>;
  536. status = "okay";
  537. };
  538. };
  539. &u2phy1 {
  540. status = "okay";
  541. u2phy1_otg: otg-port {
  542. status = "okay";
  543. };
  544. u2phy1_host: host-port {
  545. phy-supply = <&vcc5v0_host>;
  546. status = "okay";
  547. };
  548. };
  549. &uart0 {
  550. pinctrl-names = "default";
  551. pinctrl-0 = <&uart0_xfer &uart0_cts>;
  552. status = "okay";
  553. };
  554. &uart2 {
  555. status = "okay";
  556. };
  557. &usb_host0_ehci {
  558. status = "okay";
  559. };
  560. &usb_host0_ohci {
  561. status = "okay";
  562. };
  563. &usb_host1_ehci {
  564. status = "okay";
  565. };
  566. &usb_host1_ohci {
  567. status = "okay";
  568. };
  569. &usbdrd3_0 {
  570. status = "okay";
  571. };
  572. &usbdrd_dwc3_0 {
  573. status = "okay";
  574. dr_mode = "otg";
  575. };
  576. &usbdrd3_1 {
  577. status = "okay";
  578. };
  579. &usbdrd_dwc3_1 {
  580. status = "okay";
  581. dr_mode = "host";
  582. };
  583. &vopb {
  584. status = "okay";
  585. };
  586. &vopb_mmu {
  587. status = "okay";
  588. };
  589. &vopl {
  590. status = "okay";
  591. };
  592. &vopl_mmu {
  593. status = "okay";
  594. };