rk3399-rock960.dtsi 13 KB

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