rk3399-roc-pc.dts 13 KB

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