rk3399-puma.dtsi 12 KB

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