rk3399-puma.dtsi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
  4. */
  5. #include <dt-bindings/pwm/pwm.h>
  6. #include "rk3399.dtsi"
  7. #include "rk3399-opp.dtsi"
  8. / {
  9. leds {
  10. compatible = "gpio-leds";
  11. pinctrl-names = "default";
  12. pinctrl-0 = <&led_pin_module>;
  13. module-led {
  14. label = "module_led";
  15. gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>;
  16. linux,default-trigger = "heartbeat";
  17. panic-indicator;
  18. };
  19. };
  20. /*
  21. * Overwrite the opp-table for CPUB as this board uses a different
  22. * regulator (FAN53555) that only allows 10mV steps and therefore
  23. * can't reach the operation point target voltages from rk3399-opp.dtsi
  24. */
  25. /delete-node/ opp-table1;
  26. cluster1_opp: opp-table1 {
  27. compatible = "operating-points-v2";
  28. opp-shared;
  29. opp00 {
  30. opp-hz = /bits/ 64 <408000000>;
  31. opp-microvolt = <800000>;
  32. clock-latency-ns = <40000>;
  33. };
  34. opp01 {
  35. opp-hz = /bits/ 64 <600000000>;
  36. opp-microvolt = <800000>;
  37. };
  38. opp02 {
  39. opp-hz = /bits/ 64 <816000000>;
  40. opp-microvolt = <830000>;
  41. opp-suspend;
  42. };
  43. opp03 {
  44. opp-hz = /bits/ 64 <1008000000>;
  45. opp-microvolt = <880000>;
  46. };
  47. opp04 {
  48. opp-hz = /bits/ 64 <1200000000>;
  49. opp-microvolt = <950000>;
  50. };
  51. opp05 {
  52. opp-hz = /bits/ 64 <1416000000>;
  53. opp-microvolt = <1030000>;
  54. };
  55. opp06 {
  56. opp-hz = /bits/ 64 <1608000000>;
  57. opp-microvolt = <1100000>;
  58. };
  59. opp07 {
  60. opp-hz = /bits/ 64 <1800000000>;
  61. opp-microvolt = <1200000>;
  62. };
  63. opp08 {
  64. opp-hz = /bits/ 64 <1992000000>;
  65. opp-microvolt = <1230000>;
  66. turbo-mode;
  67. };
  68. };
  69. clkin_gmac: external-gmac-clock {
  70. compatible = "fixed-clock";
  71. clock-frequency = <125000000>;
  72. clock-output-names = "clkin_gmac";
  73. #clock-cells = <0>;
  74. };
  75. vcc1v2_phy: vcc1v2-phy {
  76. compatible = "regulator-fixed";
  77. regulator-name = "vcc1v2_phy";
  78. regulator-always-on;
  79. regulator-boot-on;
  80. regulator-min-microvolt = <1200000>;
  81. regulator-max-microvolt = <1200000>;
  82. vin-supply = <&vcc5v0_sys>;
  83. };
  84. vcc3v3_sys: vcc3v3-sys {
  85. compatible = "regulator-fixed";
  86. regulator-name = "vcc3v3_sys";
  87. regulator-always-on;
  88. regulator-boot-on;
  89. regulator-min-microvolt = <3300000>;
  90. regulator-max-microvolt = <3300000>;
  91. vin-supply = <&vcc5v0_sys>;
  92. };
  93. vcc5v0_host: vcc5v0-host-regulator {
  94. compatible = "regulator-fixed";
  95. gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
  96. enable-active-low;
  97. pinctrl-names = "default";
  98. pinctrl-0 = <&vcc5v0_host_en>;
  99. regulator-name = "vcc5v0_host";
  100. regulator-always-on;
  101. vin-supply = <&vcc5v0_sys>;
  102. };
  103. vcc5v0_sys: vcc5v0-sys {
  104. compatible = "regulator-fixed";
  105. regulator-name = "vcc5v0_sys";
  106. regulator-always-on;
  107. regulator-boot-on;
  108. regulator-min-microvolt = <5000000>;
  109. regulator-max-microvolt = <5000000>;
  110. };
  111. };
  112. &cpu_b0 {
  113. cpu-supply = <&vdd_cpu_b>;
  114. };
  115. &cpu_b1 {
  116. cpu-supply = <&vdd_cpu_b>;
  117. };
  118. &cpu_l0 {
  119. cpu-supply = <&vdd_cpu_l>;
  120. };
  121. &cpu_l1 {
  122. cpu-supply = <&vdd_cpu_l>;
  123. };
  124. &cpu_l2 {
  125. cpu-supply = <&vdd_cpu_l>;
  126. };
  127. &cpu_l3 {
  128. cpu-supply = <&vdd_cpu_l>;
  129. };
  130. &emmc_phy {
  131. status = "okay";
  132. };
  133. &gmac {
  134. assigned-clocks = <&cru SCLK_RMII_SRC>;
  135. assigned-clock-parents = <&clkin_gmac>;
  136. clock_in_out = "input";
  137. phy-supply = <&vcc1v2_phy>;
  138. phy-mode = "rgmii";
  139. pinctrl-names = "default";
  140. pinctrl-0 = <&rgmii_pins>;
  141. snps,reset-gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
  142. snps,reset-active-low;
  143. snps,reset-delays-us = <0 10000 50000>;
  144. tx_delay = <0x10>;
  145. rx_delay = <0x10>;
  146. status = "okay";
  147. };
  148. &i2c0 {
  149. status = "okay";
  150. i2c-scl-rising-time-ns = <168>;
  151. i2c-scl-falling-time-ns = <4>;
  152. clock-frequency = <400000>;
  153. rk808: pmic@1b {
  154. compatible = "rockchip,rk808";
  155. reg = <0x1b>;
  156. interrupt-parent = <&gpio1>;
  157. interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
  158. #clock-cells = <1>;
  159. clock-output-names = "xin32k", "rk808-clkout2";
  160. pinctrl-names = "default";
  161. pinctrl-0 = <&pmic_int_l>;
  162. rockchip,system-power-controller;
  163. wakeup-source;
  164. vcc1-supply = <&vcc5v0_sys>;
  165. vcc2-supply = <&vcc5v0_sys>;
  166. vcc3-supply = <&vcc5v0_sys>;
  167. vcc4-supply = <&vcc5v0_sys>;
  168. vcc6-supply = <&vcc5v0_sys>;
  169. vcc7-supply = <&vcc5v0_sys>;
  170. vcc8-supply = <&vcc3v3_sys>;
  171. vcc9-supply = <&vcc5v0_sys>;
  172. vcc10-supply = <&vcc5v0_sys>;
  173. vcc11-supply = <&vcc5v0_sys>;
  174. vcc12-supply = <&vcc3v3_sys>;
  175. vddio-supply = <&vcc1v8_pmu>;
  176. regulators {
  177. vdd_center: DCDC_REG1 {
  178. regulator-name = "vdd_center";
  179. regulator-min-microvolt = <750000>;
  180. regulator-max-microvolt = <1350000>;
  181. regulator-ramp-delay = <6001>;
  182. regulator-always-on;
  183. regulator-boot-on;
  184. regulator-state-mem {
  185. regulator-off-in-suspend;
  186. };
  187. };
  188. vdd_cpu_l: DCDC_REG2 {
  189. regulator-name = "vdd_cpu_l";
  190. regulator-min-microvolt = <750000>;
  191. regulator-max-microvolt = <1350000>;
  192. regulator-ramp-delay = <6001>;
  193. regulator-always-on;
  194. regulator-boot-on;
  195. regulator-state-mem {
  196. regulator-off-in-suspend;
  197. };
  198. };
  199. vcc_ddr: DCDC_REG3 {
  200. regulator-name = "vcc_ddr";
  201. regulator-always-on;
  202. regulator-boot-on;
  203. regulator-state-mem {
  204. regulator-on-in-suspend;
  205. };
  206. };
  207. vcc_1v8: DCDC_REG4 {
  208. regulator-name = "vcc_1v8";
  209. regulator-min-microvolt = <1800000>;
  210. regulator-max-microvolt = <1800000>;
  211. regulator-always-on;
  212. regulator-boot-on;
  213. regulator-state-mem {
  214. regulator-on-in-suspend;
  215. regulator-suspend-microvolt = <1800000>;
  216. };
  217. };
  218. vcc_ldo1: LDO_REG1 {
  219. regulator-name = "vcc_ldo1";
  220. regulator-min-microvolt = <1800000>;
  221. regulator-max-microvolt = <1800000>;
  222. regulator-boot-on;
  223. regulator-state-mem {
  224. regulator-off-in-suspend;
  225. };
  226. };
  227. vcc1v8_hdmi: LDO_REG2 {
  228. regulator-name = "vcc1v8_hdmi";
  229. regulator-min-microvolt = <1800000>;
  230. regulator-max-microvolt = <1800000>;
  231. regulator-always-on;
  232. regulator-boot-on;
  233. regulator-state-mem {
  234. regulator-off-in-suspend;
  235. };
  236. };
  237. vcc1v8_pmu: LDO_REG3 {
  238. regulator-name = "vcc1v8_pmu";
  239. regulator-min-microvolt = <1800000>;
  240. regulator-max-microvolt = <1800000>;
  241. regulator-always-on;
  242. regulator-boot-on;
  243. regulator-state-mem {
  244. regulator-on-in-suspend;
  245. regulator-suspend-microvolt = <1800000>;
  246. };
  247. };
  248. vcc_sd: LDO_REG4 {
  249. regulator-name = "vcc_sd";
  250. regulator-min-microvolt = <1800000>;
  251. regulator-max-microvolt = <3000000>;
  252. regulator-always-on;
  253. regulator-boot-on;
  254. regulator-state-mem {
  255. regulator-on-in-suspend;
  256. regulator-suspend-microvolt = <3000000>;
  257. };
  258. };
  259. vcc_ldo5: LDO_REG5 {
  260. regulator-name = "vcc_ldo5";
  261. regulator-min-microvolt = <3000000>;
  262. regulator-max-microvolt = <3000000>;
  263. regulator-boot-on;
  264. regulator-state-mem {
  265. regulator-off-in-suspend;
  266. };
  267. };
  268. vcc_ldo6: LDO_REG6 {
  269. regulator-name = "vcc_ldo6";
  270. regulator-min-microvolt = <1500000>;
  271. regulator-max-microvolt = <1500000>;
  272. regulator-boot-on;
  273. regulator-state-mem {
  274. regulator-off-in-suspend;
  275. };
  276. };
  277. vcc0v9_hdmi: LDO_REG7 {
  278. regulator-name = "vcc0v9_hdmi";
  279. regulator-min-microvolt = <900000>;
  280. regulator-max-microvolt = <900000>;
  281. regulator-always-on;
  282. regulator-boot-on;
  283. regulator-state-mem {
  284. regulator-off-in-suspend;
  285. };
  286. };
  287. vcc_efuse: LDO_REG8 {
  288. regulator-name = "vcc_efuse";
  289. regulator-min-microvolt = <1800000>;
  290. regulator-max-microvolt = <1800000>;
  291. regulator-always-on;
  292. regulator-boot-on;
  293. regulator-state-mem {
  294. regulator-off-in-suspend;
  295. };
  296. };
  297. vcc3v3_s3: SWITCH_REG1 {
  298. regulator-name = "vcc3v3_s3";
  299. regulator-always-on;
  300. regulator-boot-on;
  301. regulator-state-mem {
  302. regulator-off-in-suspend;
  303. };
  304. };
  305. vcc3v3_s0: SWITCH_REG2 {
  306. regulator-name = "vcc3v3_s0";
  307. regulator-always-on;
  308. regulator-boot-on;
  309. regulator-state-mem {
  310. regulator-off-in-suspend;
  311. };
  312. };
  313. };
  314. };
  315. vdd_gpu: regulator@60 {
  316. compatible = "fcs,fan53555";
  317. reg = <0x60>;
  318. fcs,suspend-voltage-selector = <1>;
  319. regulator-name = "vdd_gpu";
  320. regulator-min-microvolt = <600000>;
  321. regulator-max-microvolt = <1230000>;
  322. regulator-ramp-delay = <1000>;
  323. regulator-always-on;
  324. regulator-boot-on;
  325. vin-supply = <&vcc5v0_sys>;
  326. };
  327. };
  328. &i2c7 {
  329. status = "okay";
  330. clock-frequency = <400000>;
  331. fan: fan@18 {
  332. compatible = "ti,amc6821";
  333. reg = <0x18>;
  334. cooling-min-state = <0>;
  335. cooling-max-state = <9>;
  336. #cooling-cells = <2>;
  337. };
  338. rtc_twi: rtc@6f {
  339. compatible = "isil,isl1208";
  340. reg = <0x6f>;
  341. };
  342. };
  343. &i2c8 {
  344. status = "okay";
  345. clock-frequency = <400000>;
  346. vdd_cpu_b: regulator@60 {
  347. compatible = "fcs,fan53555";
  348. reg = <0x60>;
  349. vin-supply = <&vcc5v0_sys>;
  350. regulator-name = "vdd_cpu_b";
  351. regulator-min-microvolt = <600000>;
  352. regulator-max-microvolt = <1230000>;
  353. regulator-ramp-delay = <1000>;
  354. fcs,suspend-voltage-selector = <1>;
  355. regulator-always-on;
  356. regulator-boot-on;
  357. };
  358. };
  359. &i2s0 {
  360. pinctrl-0 = <&i2s0_2ch_bus>;
  361. rockchip,playback-channels = <2>;
  362. rockchip,capture-channels = <2>;
  363. status = "okay";
  364. };
  365. /*
  366. * As Q7 does not specify neither a global nor a RX clock for I2S these
  367. * signals are not used. Furthermore I2S0_LRCK_RX is used as GPIO.
  368. * Therefore we have to redefine the i2s0_2ch_bus definition to prevent
  369. * conflicts.
  370. */
  371. &i2s0_2ch_bus {
  372. rockchip,pins =
  373. <RK_GPIO3 RK_PD0 RK_FUNC_1 &pcfg_pull_none>,
  374. <RK_GPIO3 RK_PD2 RK_FUNC_1 &pcfg_pull_none>,
  375. <RK_GPIO3 RK_PD3 RK_FUNC_1 &pcfg_pull_none>,
  376. <RK_GPIO3 RK_PD7 RK_FUNC_1 &pcfg_pull_none>;
  377. };
  378. &io_domains {
  379. status = "okay";
  380. bt656-supply = <&vcc_1v8>;
  381. audio-supply = <&vcc_1v8>;
  382. sdmmc-supply = <&vcc_sd>;
  383. gpio1830-supply = <&vcc_1v8>;
  384. };
  385. &pmu_io_domains {
  386. status = "okay";
  387. pmu1830-supply = <&vcc_1v8>;
  388. };
  389. &pwm2 {
  390. status = "okay";
  391. };
  392. &pinctrl {
  393. i2c8 {
  394. i2c8_xfer_a: i2c8-xfer {
  395. rockchip,pins =
  396. <RK_GPIO1 RK_PC4 RK_FUNC_1 &pcfg_pull_up>,
  397. <RK_GPIO1 RK_PC5 RK_FUNC_1 &pcfg_pull_up>;
  398. };
  399. };
  400. leds {
  401. led_pin_module: led-module-gpio {
  402. rockchip,pins =
  403. <RK_GPIO2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
  404. };
  405. };
  406. pmic {
  407. pmic_int_l: pmic-int-l {
  408. rockchip,pins =
  409. <RK_GPIO1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
  410. };
  411. };
  412. usb2 {
  413. vcc5v0_host_en: vcc5v0-host-en {
  414. rockchip,pins =
  415. <RK_GPIO4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
  416. };
  417. };
  418. };
  419. &sdhci {
  420. bus-width = <8>;
  421. mmc-hs400-1_8v;
  422. mmc-hs400-enhanced-strobe;
  423. non-removable;
  424. status = "okay";
  425. };
  426. &sdmmc {
  427. vqmmc = <&vcc_sd>;
  428. };
  429. &spi1 {
  430. status = "okay";
  431. norflash: flash@0 {
  432. compatible = "jedec,spi-nor";
  433. reg = <0>;
  434. spi-max-frequency = <50000000>;
  435. };
  436. };
  437. &tcphy1 {
  438. status = "okay";
  439. };
  440. &tsadc {
  441. rockchip,hw-tshut-mode = <1>;
  442. rockchip,hw-tshut-polarity = <1>;
  443. status = "okay";
  444. };
  445. &u2phy1 {
  446. status = "okay";
  447. u2phy1_otg: otg-port {
  448. status = "okay";
  449. };
  450. u2phy1_host: host-port {
  451. phy-supply = <&vcc5v0_host>;
  452. status = "okay";
  453. };
  454. };
  455. &usbdrd3_1 {
  456. status = "okay";
  457. };
  458. &usbdrd_dwc3_1 {
  459. status = "okay";
  460. dr_mode = "host";
  461. };
  462. &usb_host1_ehci {
  463. status = "okay";
  464. };
  465. &usb_host1_ohci {
  466. status = "okay";
  467. };