rk3288-tinker.dtsi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
  4. */
  5. #include "rk3288.dtsi"
  6. #include <dt-bindings/input/input.h>
  7. #include <dt-bindings/clock/rockchip,rk808.h>
  8. / {
  9. chosen {
  10. stdout-path = "serial2:115200n8";
  11. };
  12. memory {
  13. reg = <0x0 0x0 0x0 0x80000000>;
  14. device_type = "memory";
  15. };
  16. ext_gmac: external-gmac-clock {
  17. compatible = "fixed-clock";
  18. #clock-cells = <0>;
  19. clock-frequency = <125000000>;
  20. clock-output-names = "ext_gmac";
  21. };
  22. gpio-keys {
  23. compatible = "gpio-keys";
  24. autorepeat;
  25. pinctrl-names = "default";
  26. pinctrl-0 = <&pwrbtn>;
  27. button {
  28. gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  29. linux,code = <KEY_POWER>;
  30. label = "GPIO Key Power";
  31. linux,input-type = <1>;
  32. wakeup-source;
  33. debounce-interval = <100>;
  34. };
  35. };
  36. gpio-leds {
  37. compatible = "gpio-leds";
  38. act_led: led-0 {
  39. gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
  40. linux,default-trigger = "mmc0";
  41. };
  42. heartbeat_led: led-1 {
  43. gpios = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
  44. linux,default-trigger = "heartbeat";
  45. };
  46. pwr_led: led-2 {
  47. gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
  48. linux,default-trigger = "default-on";
  49. };
  50. };
  51. sdio_pwrseq: sdio-pwrseq {
  52. compatible = "mmc-pwrseq-simple";
  53. clocks = <&rk808 RK808_CLKOUT1>;
  54. clock-names = "ext_clock";
  55. pinctrl-names = "default";
  56. pinctrl-0 = <&wifi_enable>;
  57. reset-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_LOW>,
  58. <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
  59. };
  60. sound {
  61. compatible = "simple-audio-card";
  62. simple-audio-card,format = "i2s";
  63. simple-audio-card,name = "rockchip,tinker-codec";
  64. simple-audio-card,mclk-fs = <512>;
  65. simple-audio-card,codec {
  66. sound-dai = <&hdmi>;
  67. };
  68. simple-audio-card,cpu {
  69. sound-dai = <&i2s>;
  70. };
  71. };
  72. vcc_sys: vsys-regulator {
  73. compatible = "regulator-fixed";
  74. regulator-name = "vcc_sys";
  75. regulator-min-microvolt = <5000000>;
  76. regulator-max-microvolt = <5000000>;
  77. regulator-always-on;
  78. regulator-boot-on;
  79. };
  80. vcc_sd: sdmmc-regulator {
  81. compatible = "regulator-fixed";
  82. gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
  83. pinctrl-names = "default";
  84. pinctrl-0 = <&sdmmc_pwr>;
  85. regulator-name = "vcc_sd";
  86. regulator-min-microvolt = <3300000>;
  87. regulator-max-microvolt = <3300000>;
  88. startup-delay-us = <100000>;
  89. vin-supply = <&vcc_io>;
  90. };
  91. };
  92. &cpu0 {
  93. cpu0-supply = <&vdd_cpu>;
  94. };
  95. &cpu_opp_table {
  96. opp-1704000000 {
  97. opp-hz = /bits/ 64 <1704000000>;
  98. opp-microvolt = <1350000>;
  99. };
  100. opp-1800000000 {
  101. opp-hz = /bits/ 64 <1800000000>;
  102. opp-microvolt = <1400000>;
  103. };
  104. };
  105. &gmac {
  106. assigned-clocks = <&cru SCLK_MAC>;
  107. assigned-clock-parents = <&ext_gmac>;
  108. clock_in_out = "input";
  109. phy-mode = "rgmii";
  110. phy-supply = <&vcc33_lan>;
  111. pinctrl-names = "default";
  112. pinctrl-0 = <&rgmii_pins>;
  113. snps,reset-gpio = <&gpio4 7 0>;
  114. snps,reset-active-low;
  115. snps,reset-delays-us = <0 10000 1000000>;
  116. tx_delay = <0x30>;
  117. rx_delay = <0x10>;
  118. status = "okay";
  119. };
  120. &gpu {
  121. mali-supply = <&vdd_gpu>;
  122. status = "okay";
  123. };
  124. &hdmi {
  125. ddc-i2c-bus = <&i2c5>;
  126. status = "okay";
  127. };
  128. &i2c0 {
  129. clock-frequency = <400000>;
  130. status = "okay";
  131. rk808: pmic@1b {
  132. compatible = "rockchip,rk808";
  133. reg = <0x1b>;
  134. interrupt-parent = <&gpio0>;
  135. interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
  136. #clock-cells = <1>;
  137. clock-output-names = "xin32k", "rk808-clkout2";
  138. dvs-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>,
  139. <&gpio0 12 GPIO_ACTIVE_HIGH>;
  140. pinctrl-names = "default";
  141. pinctrl-0 = <&pmic_int &global_pwroff &dvs_1 &dvs_2>;
  142. rockchip,system-power-controller;
  143. wakeup-source;
  144. vcc1-supply = <&vcc_sys>;
  145. vcc2-supply = <&vcc_sys>;
  146. vcc3-supply = <&vcc_sys>;
  147. vcc4-supply = <&vcc_sys>;
  148. vcc6-supply = <&vcc_sys>;
  149. vcc7-supply = <&vcc_sys>;
  150. vcc8-supply = <&vcc_io>;
  151. vcc9-supply = <&vcc_io>;
  152. vcc10-supply = <&vcc_io>;
  153. vcc11-supply = <&vcc_sys>;
  154. vcc12-supply = <&vcc_io>;
  155. vddio-supply = <&vcc_io>;
  156. regulators {
  157. vdd_cpu: DCDC_REG1 {
  158. regulator-always-on;
  159. regulator-boot-on;
  160. regulator-min-microvolt = <750000>;
  161. regulator-max-microvolt = <1400000>;
  162. regulator-name = "vdd_arm";
  163. regulator-ramp-delay = <6000>;
  164. regulator-state-mem {
  165. regulator-off-in-suspend;
  166. };
  167. };
  168. vdd_gpu: DCDC_REG2 {
  169. regulator-always-on;
  170. regulator-boot-on;
  171. regulator-min-microvolt = <850000>;
  172. regulator-max-microvolt = <1250000>;
  173. regulator-name = "vdd_gpu";
  174. regulator-ramp-delay = <6000>;
  175. regulator-state-mem {
  176. regulator-on-in-suspend;
  177. regulator-suspend-microvolt = <1000000>;
  178. };
  179. };
  180. vcc_ddr: DCDC_REG3 {
  181. regulator-always-on;
  182. regulator-boot-on;
  183. regulator-name = "vcc_ddr";
  184. regulator-state-mem {
  185. regulator-on-in-suspend;
  186. };
  187. };
  188. vcc_io: DCDC_REG4 {
  189. regulator-always-on;
  190. regulator-boot-on;
  191. regulator-min-microvolt = <3300000>;
  192. regulator-max-microvolt = <3300000>;
  193. regulator-name = "vcc_io";
  194. regulator-state-mem {
  195. regulator-on-in-suspend;
  196. regulator-suspend-microvolt = <3300000>;
  197. };
  198. };
  199. vcc18_ldo1: LDO_REG1 {
  200. regulator-always-on;
  201. regulator-boot-on;
  202. regulator-min-microvolt = <1800000>;
  203. regulator-max-microvolt = <1800000>;
  204. regulator-name = "vcc18_ldo1";
  205. regulator-state-mem {
  206. regulator-on-in-suspend;
  207. regulator-suspend-microvolt = <1800000>;
  208. };
  209. };
  210. vcc33_mipi: LDO_REG2 {
  211. regulator-always-on;
  212. regulator-boot-on;
  213. regulator-min-microvolt = <3300000>;
  214. regulator-max-microvolt = <3300000>;
  215. regulator-name = "vcc33_mipi";
  216. regulator-state-mem {
  217. regulator-off-in-suspend;
  218. };
  219. };
  220. vdd_10: LDO_REG3 {
  221. regulator-always-on;
  222. regulator-boot-on;
  223. regulator-min-microvolt = <1000000>;
  224. regulator-max-microvolt = <1000000>;
  225. regulator-name = "vdd_10";
  226. regulator-state-mem {
  227. regulator-on-in-suspend;
  228. regulator-suspend-microvolt = <1000000>;
  229. };
  230. };
  231. vcc18_codec: LDO_REG4 {
  232. regulator-always-on;
  233. regulator-boot-on;
  234. regulator-min-microvolt = <1800000>;
  235. regulator-max-microvolt = <1800000>;
  236. regulator-name = "vcc18_codec";
  237. regulator-state-mem {
  238. regulator-on-in-suspend;
  239. regulator-suspend-microvolt = <1800000>;
  240. };
  241. };
  242. vccio_sd: LDO_REG5 {
  243. regulator-always-on;
  244. regulator-boot-on;
  245. regulator-min-microvolt = <1800000>;
  246. regulator-max-microvolt = <3300000>;
  247. regulator-name = "vccio_sd";
  248. regulator-state-mem {
  249. regulator-on-in-suspend;
  250. regulator-suspend-microvolt = <3300000>;
  251. };
  252. };
  253. vdd10_lcd: LDO_REG6 {
  254. regulator-always-on;
  255. regulator-boot-on;
  256. regulator-min-microvolt = <1000000>;
  257. regulator-max-microvolt = <1000000>;
  258. regulator-name = "vdd10_lcd";
  259. regulator-state-mem {
  260. regulator-on-in-suspend;
  261. regulator-suspend-microvolt = <1000000>;
  262. };
  263. };
  264. vcc_18: LDO_REG7 {
  265. regulator-always-on;
  266. regulator-boot-on;
  267. regulator-min-microvolt = <1800000>;
  268. regulator-max-microvolt = <1800000>;
  269. regulator-name = "vcc_18";
  270. regulator-state-mem {
  271. regulator-on-in-suspend;
  272. regulator-suspend-microvolt = <1800000>;
  273. };
  274. };
  275. vcc18_lcd: LDO_REG8 {
  276. regulator-always-on;
  277. regulator-boot-on;
  278. regulator-min-microvolt = <1800000>;
  279. regulator-max-microvolt = <1800000>;
  280. regulator-name = "vcc18_lcd";
  281. regulator-state-mem {
  282. regulator-on-in-suspend;
  283. regulator-suspend-microvolt = <1800000>;
  284. };
  285. };
  286. vcc33_sd: SWITCH_REG1 {
  287. regulator-always-on;
  288. regulator-boot-on;
  289. regulator-name = "vcc33_sd";
  290. regulator-state-mem {
  291. regulator-on-in-suspend;
  292. };
  293. };
  294. vcc33_lan: SWITCH_REG2 {
  295. regulator-always-on;
  296. regulator-boot-on;
  297. regulator-name = "vcc33_lan";
  298. regulator-state-mem {
  299. regulator-on-in-suspend;
  300. };
  301. };
  302. };
  303. };
  304. };
  305. &i2c2 {
  306. status = "okay";
  307. };
  308. &i2c5 {
  309. status = "okay";
  310. };
  311. &i2s {
  312. #sound-dai-cells = <0>;
  313. status = "okay";
  314. };
  315. &io_domains {
  316. status = "okay";
  317. sdcard-supply = <&vccio_sd>;
  318. wifi-supply = <&vcc_18>;
  319. };
  320. &pinctrl {
  321. pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
  322. drive-strength = <8>;
  323. };
  324. pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
  325. bias-pull-up;
  326. drive-strength = <8>;
  327. };
  328. backlight {
  329. bl_en: bl-en {
  330. rockchip,pins = <7 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  331. };
  332. };
  333. buttons {
  334. pwrbtn: pwrbtn {
  335. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  336. };
  337. };
  338. eth_phy {
  339. eth_phy_pwr: eth-phy-pwr {
  340. rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
  341. };
  342. };
  343. pmic {
  344. pmic_int: pmic-int {
  345. rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
  346. };
  347. dvs_1: dvs-1 {
  348. rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_down>;
  349. };
  350. dvs_2: dvs-2 {
  351. rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
  352. };
  353. };
  354. sdmmc {
  355. sdmmc_bus4: sdmmc-bus4 {
  356. rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_8ma>,
  357. <6 RK_PC1 1 &pcfg_pull_up_drv_8ma>,
  358. <6 RK_PC2 1 &pcfg_pull_up_drv_8ma>,
  359. <6 RK_PC3 1 &pcfg_pull_up_drv_8ma>;
  360. };
  361. sdmmc_clk: sdmmc-clk {
  362. rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>;
  363. };
  364. sdmmc_cmd: sdmmc-cmd {
  365. rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>;
  366. };
  367. sdmmc_pwr: sdmmc-pwr {
  368. rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  369. };
  370. };
  371. usb {
  372. host_vbus_drv: host-vbus-drv {
  373. rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
  374. };
  375. pwr_3g: pwr-3g {
  376. rockchip,pins = <7 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
  377. };
  378. };
  379. sdio {
  380. wifi_enable: wifi-enable {
  381. rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
  382. <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
  383. };
  384. };
  385. };
  386. &pwm0 {
  387. status = "okay";
  388. };
  389. &saradc {
  390. vref-supply = <&vcc18_ldo1>;
  391. status = "okay";
  392. };
  393. &sdmmc {
  394. bus-width = <4>;
  395. cap-mmc-highspeed;
  396. cap-sd-highspeed;
  397. broken-cd;
  398. disable-wp; /* wp not hooked up */
  399. pinctrl-names = "default";
  400. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
  401. status = "okay";
  402. vmmc-supply = <&vcc33_sd>;
  403. vqmmc-supply = <&vccio_sd>;
  404. };
  405. &sdio0 {
  406. bus-width = <4>;
  407. cap-sd-highspeed;
  408. cap-sdio-irq;
  409. keep-power-in-suspend;
  410. max-frequency = <50000000>;
  411. mmc-pwrseq = <&sdio_pwrseq>;
  412. non-removable;
  413. pinctrl-names = "default";
  414. pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
  415. sd-uhs-sdr12;
  416. sd-uhs-sdr25;
  417. sd-uhs-sdr50;
  418. vmmc-supply = <&vcc_io>;
  419. vqmmc-supply = <&vcc_18>;
  420. status = "okay";
  421. };
  422. &tsadc {
  423. rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
  424. rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
  425. status = "okay";
  426. };
  427. &uart0 {
  428. status = "okay";
  429. };
  430. &uart1 {
  431. status = "okay";
  432. };
  433. &uart2 {
  434. status = "okay";
  435. };
  436. &uart3 {
  437. status = "okay";
  438. };
  439. &uart4 {
  440. status = "okay";
  441. };
  442. &usbphy {
  443. status = "okay";
  444. };
  445. &usb_host0_ehci {
  446. status = "okay";
  447. };
  448. &usb_host1 {
  449. status = "okay";
  450. };
  451. &usb_otg {
  452. status = "okay";
  453. };
  454. &vopb {
  455. status = "okay";
  456. };
  457. &vopb_mmu {
  458. status = "okay";
  459. };
  460. &vopl {
  461. status = "okay";
  462. };
  463. &vopl_mmu {
  464. status = "okay";
  465. };
  466. &wdt {
  467. status = "okay";
  468. };