rk3399-puma.dtsi 10 KB

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