rk3399pro-vmarc-som.dtsi 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
  4. * Copyright (c) 2019 Vamrs Limited
  5. * Copyright (c) 2019 Amarula Solutions(India)
  6. */
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/pinctrl/rockchip.h>
  9. #include <dt-bindings/pwm/pwm.h>
  10. / {
  11. compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
  12. aliases {
  13. mmc0 = &sdmmc;
  14. mmc1 = &sdhci;
  15. };
  16. vcc3v3_pcie: vcc-pcie-regulator {
  17. compatible = "regulator-fixed";
  18. enable-active-high;
  19. gpio = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>;
  20. pinctrl-names = "default";
  21. pinctrl-0 = <&pcie_pwr>;
  22. regulator-name = "vcc3v3_pcie";
  23. regulator-always-on;
  24. regulator-boot-on;
  25. vin-supply = <&vcc5v0_sys>;
  26. };
  27. };
  28. &cpu_l0 {
  29. cpu-supply = <&vdd_cpu_l>;
  30. };
  31. &cpu_l1 {
  32. cpu-supply = <&vdd_cpu_l>;
  33. };
  34. &cpu_l2 {
  35. cpu-supply = <&vdd_cpu_l>;
  36. };
  37. &cpu_l3 {
  38. cpu-supply = <&vdd_cpu_l>;
  39. };
  40. &emmc_phy {
  41. status = "okay";
  42. };
  43. &gmac {
  44. assigned-clocks = <&cru SCLK_RMII_SRC>;
  45. phy-supply = <&vcc_lan>;
  46. snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
  47. };
  48. &hdmi {
  49. ddc-i2c-bus = <&i2c3>;
  50. pinctrl-names = "default";
  51. pinctrl-0 = <&hdmi_cec>;
  52. };
  53. &i2c0 {
  54. clock-frequency = <400000>;
  55. i2c-scl-falling-time-ns = <30>;
  56. i2c-scl-rising-time-ns = <180>;
  57. status = "okay";
  58. rk809: pmic@20 {
  59. compatible = "rockchip,rk809";
  60. reg = <0x20>;
  61. interrupt-parent = <&gpio1>;
  62. interrupts = <RK_PC2 IRQ_TYPE_LEVEL_LOW>;
  63. #clock-cells = <1>;
  64. clock-output-names = "rk808-clkout1", "rk808-clkout2";
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&pmic_int_l>;
  67. rockchip,system-power-controller;
  68. wakeup-source;
  69. vcc1-supply = <&vcc5v0_sys>;
  70. vcc2-supply = <&vcc5v0_sys>;
  71. vcc3-supply = <&vcc5v0_sys>;
  72. vcc4-supply = <&vcc5v0_sys>;
  73. vcc5-supply = <&vcc_buck5>;
  74. vcc6-supply = <&vcc_buck5>;
  75. vcc7-supply = <&vcc5v0_sys>;
  76. vcc8-supply = <&vcc3v3_sys>;
  77. vcc9-supply = <&vcc5v0_sys>;
  78. regulators {
  79. vdd_log: DCDC_REG1 {
  80. regulator-name = "vdd_log";
  81. regulator-always-on;
  82. regulator-boot-on;
  83. regulator-min-microvolt = <750000>;
  84. regulator-max-microvolt = <1350000>;
  85. regulator-initial-mode = <0x2>;
  86. regulator-state-mem {
  87. regulator-off-in-suspend;
  88. regulator-suspend-microvolt = <900000>;
  89. };
  90. };
  91. vdd_cpu_l: DCDC_REG2 {
  92. regulator-name = "vdd_cpu_l";
  93. regulator-always-on;
  94. regulator-boot-on;
  95. regulator-min-microvolt = <750000>;
  96. regulator-max-microvolt = <1350000>;
  97. regulator-ramp-delay = <6001>;
  98. regulator-initial-mode = <0x2>;
  99. regulator-state-mem {
  100. regulator-off-in-suspend;
  101. };
  102. };
  103. vcc_ddr: DCDC_REG3 {
  104. regulator-name = "vcc_ddr";
  105. regulator-always-on;
  106. regulator-boot-on;
  107. regulator-initial-mode = <0x2>;
  108. regulator-state-mem {
  109. regulator-on-in-suspend;
  110. };
  111. };
  112. vcc3v3_sys: DCDC_REG4 {
  113. regulator-name = "vcc3v3_sys";
  114. regulator-always-on;
  115. regulator-boot-on;
  116. regulator-min-microvolt = <3300000>;
  117. regulator-max-microvolt = <3300000>;
  118. regulator-initial-mode = <0x2>;
  119. regulator-state-mem {
  120. regulator-on-in-suspend;
  121. regulator-suspend-microvolt = <3300000>;
  122. };
  123. };
  124. vcc_buck5: DCDC_REG5 {
  125. regulator-name = "vcc_buck5";
  126. regulator-always-on;
  127. regulator-boot-on;
  128. regulator-min-microvolt = <2200000>;
  129. regulator-max-microvolt = <2200000>;
  130. regulator-state-mem {
  131. regulator-on-in-suspend;
  132. regulator-suspend-microvolt = <2200000>;
  133. };
  134. };
  135. vcca_0v9: LDO_REG1 {
  136. regulator-name = "vcca_0v9";
  137. regulator-always-on;
  138. regulator-boot-on;
  139. regulator-min-microvolt = <900000>;
  140. regulator-max-microvolt = <900000>;
  141. regulator-state-mem {
  142. regulator-on-in-suspend;
  143. regulator-suspend-microvolt = <900000>;
  144. };
  145. };
  146. vcc_1v8: LDO_REG2 {
  147. regulator-name = "vcc_1v8";
  148. regulator-always-on;
  149. regulator-boot-on;
  150. regulator-min-microvolt = <1800000>;
  151. regulator-max-microvolt = <1800000>;
  152. regulator-state-mem {
  153. regulator-on-in-suspend;
  154. regulator-suspend-microvolt = <1800000>;
  155. };
  156. };
  157. vcc_0v9: LDO_REG3 {
  158. regulator-name = "vcc_0v9";
  159. regulator-always-on;
  160. regulator-boot-on;
  161. regulator-min-microvolt = <900000>;
  162. regulator-max-microvolt = <900000>;
  163. regulator-state-mem {
  164. regulator-on-in-suspend;
  165. regulator-suspend-microvolt = <900000>;
  166. };
  167. };
  168. vcca_1v8: LDO_REG4 {
  169. regulator-name = "vcca_1v8";
  170. regulator-always-on;
  171. regulator-boot-on;
  172. regulator-min-microvolt = <1850000>;
  173. regulator-max-microvolt = <1850000>;
  174. regulator-state-mem {
  175. regulator-on-in-suspend;
  176. regulator-suspend-microvolt = <1850000>;
  177. };
  178. };
  179. /*
  180. * As per BSP, but schematic not showing any regulator
  181. * pin for LD05.
  182. */
  183. vdd1v5_dvp: LDO_REG5 {
  184. regulator-name = "vdd1v5_dvp";
  185. regulator-always-on;
  186. regulator-boot-on;
  187. regulator-min-microvolt = <1500000>;
  188. regulator-max-microvolt = <1500000>;
  189. regulator-state-mem {
  190. regulator-off-in-suspend;
  191. };
  192. };
  193. vcc_1v5: LDO_REG6 {
  194. regulator-name = "vcc_1v5";
  195. regulator-always-on;
  196. regulator-boot-on;
  197. regulator-min-microvolt = <1500000>;
  198. regulator-max-microvolt = <1500000>;
  199. regulator-state-mem {
  200. regulator-off-in-suspend;
  201. };
  202. };
  203. vccio_3v0: LDO_REG7 {
  204. regulator-name = "vccio_3v0";
  205. regulator-always-on;
  206. regulator-boot-on;
  207. regulator-min-microvolt = <3000000>;
  208. regulator-max-microvolt = <3000000>;
  209. regulator-state-mem {
  210. regulator-off-in-suspend;
  211. };
  212. };
  213. vccio_sd: LDO_REG8 {
  214. regulator-name = "vccio_sd";
  215. regulator-always-on;
  216. regulator-boot-on;
  217. regulator-min-microvolt = <1800000>;
  218. regulator-max-microvolt = <3300000>;
  219. regulator-state-mem {
  220. regulator-off-in-suspend;
  221. };
  222. };
  223. /*
  224. * As per BSP, but schematic not showing any regulator
  225. * pin for LD09.
  226. */
  227. vcc_sd: LDO_REG9 {
  228. regulator-name = "vcc_sd";
  229. regulator-always-on;
  230. regulator-boot-on;
  231. regulator-min-microvolt = <3300000>;
  232. regulator-max-microvolt = <3300000>;
  233. regulator-state-mem {
  234. regulator-off-in-suspend;
  235. };
  236. };
  237. vcc5v0_usb2: SWITCH_REG1 {
  238. regulator-name = "vcc5v0_usb2";
  239. regulator-min-microvolt = <5000000>;
  240. regulator-max-microvolt = <5000000>;
  241. regulator-state-mem {
  242. regulator-on-in-suspend;
  243. regulator-suspend-microvolt = <5000000>;
  244. };
  245. };
  246. vccio_3v3: vcc_lan: SWITCH_REG2 {
  247. regulator-name = "vccio_3v3";
  248. regulator-always-on;
  249. regulator-boot-on;
  250. regulator-min-microvolt = <3300000>;
  251. regulator-max-microvolt = <3300000>;
  252. regulator-state-mem {
  253. regulator-off-in-suspend;
  254. };
  255. };
  256. };
  257. };
  258. };
  259. &i2c1 {
  260. i2c-scl-falling-time-ns = <30>;
  261. i2c-scl-rising-time-ns = <140>;
  262. status = "okay";
  263. };
  264. &i2c2 {
  265. clock-frequency = <400000>;
  266. status = "okay";
  267. hym8563: rtc@51 {
  268. compatible = "haoyu,hym8563";
  269. reg = <0x51>;
  270. #clock-cells = <0>;
  271. clock-output-names = "hym8563";
  272. pinctrl-names = "default";
  273. pinctrl-0 = <&hym8563_int>;
  274. interrupt-parent = <&gpio4>;
  275. interrupts = <RK_PD6 IRQ_TYPE_LEVEL_LOW>;
  276. };
  277. };
  278. &i2c3 {
  279. i2c-scl-rising-time-ns = <450>;
  280. i2c-scl-falling-time-ns = <15>;
  281. status = "okay";
  282. };
  283. &io_domains {
  284. status = "okay";
  285. bt656-supply = <&vcca_1v8>;
  286. gpio1830-supply = <&vccio_3v0>;
  287. sdmmc-supply = <&vccio_sd>;
  288. };
  289. &pcie_phy {
  290. status = "okay";
  291. };
  292. &pcie0 {
  293. ep-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
  294. num-lanes = <4>;
  295. pinctrl-0 = <&pcie_clkreqnb_cpm>;
  296. pinctrl-names = "default";
  297. vpcie0v9-supply = <&vcca_0v9>; /* VCC_0V9_S0 */
  298. vpcie1v8-supply = <&vcca_1v8>; /* VCC_1V8_S0 */
  299. vpcie3v3-supply = <&vcc3v3_pcie>;
  300. status = "okay";
  301. };
  302. &pinctrl {
  303. hym8563 {
  304. hym8563_int: hym8563-int {
  305. rockchip,pins = <4 RK_PD6 0 &pcfg_pull_up>;
  306. };
  307. };
  308. pcie {
  309. pcie_pwr: pcie-pwr {
  310. rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
  311. };
  312. };
  313. pmic {
  314. pmic_int_l: pmic-int-l {
  315. rockchip,pins = <1 RK_PC2 0 &pcfg_pull_up>;
  316. };
  317. };
  318. sdio-pwrseq {
  319. wifi_enable_h: wifi-enable-h {
  320. rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
  321. };
  322. };
  323. vbus_host {
  324. usb1_en_oc: usb1-en-oc {
  325. rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
  326. };
  327. };
  328. vbus_typec {
  329. usb0_en_oc: usb0-en-oc {
  330. rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
  331. };
  332. };
  333. };
  334. &pmu_io_domains {
  335. status = "okay";
  336. pmu1830-supply = <&vcc_1v8>;
  337. };
  338. &sdio_pwrseq {
  339. /*
  340. * On the module itself this is one of these (depending
  341. * on the actual card populated):
  342. * - SDIO_RESET_L_WL_REG_ON
  343. * - PDN (power down when low)
  344. */
  345. reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
  346. };
  347. &sdhci {
  348. bus-width = <8>;
  349. mmc-hs400-1_8v;
  350. mmc-hs400-enhanced-strobe;
  351. non-removable;
  352. status = "okay";
  353. };
  354. &sdmmc {
  355. cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
  356. max-frequency = <150000000>;
  357. };
  358. &tcphy0 {
  359. status = "okay";
  360. };
  361. &tsadc {
  362. rockchip,hw-tshut-mode = <1>;
  363. rockchip,hw-tshut-polarity = <1>;
  364. status = "okay";
  365. };
  366. &u2phy0 {
  367. status = "okay";
  368. u2phy0_otg: otg-port {
  369. phy-supply = <&vbus_typec>;
  370. status = "okay";
  371. };
  372. u2phy0_host: host-port {
  373. phy-supply = <&vbus_host>;
  374. status = "okay";
  375. };
  376. };
  377. &u2phy1 {
  378. status = "okay";
  379. u2phy1_host: host-port {
  380. phy-supply = <&vbus_host>;
  381. status = "okay";
  382. };
  383. };
  384. &usb_host0_ehci {
  385. status = "okay";
  386. };
  387. &usb_host0_ohci {
  388. status = "okay";
  389. };
  390. &usb_host1_ehci {
  391. status = "okay";
  392. };
  393. &usb_host1_ohci {
  394. status = "okay";
  395. };
  396. &usbdrd3_0 {
  397. status = "okay";
  398. };
  399. &usbdrd_dwc3_0 {
  400. status = "okay";
  401. };
  402. &vbus_host {
  403. enable-active-high;
  404. gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */
  405. pinctrl-names = "default";
  406. pinctrl-0 = <&usb1_en_oc>;
  407. };
  408. &vbus_typec {
  409. enable-active-high;
  410. gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */
  411. pinctrl-names = "default";
  412. pinctrl-0 = <&usb0_en_oc>;
  413. };