rk3288-popmetal.dts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2014, 2015 Andy Yan <[email protected]>
  4. */
  5. /dts-v1/;
  6. #include <dt-bindings/input/input.h>
  7. #include "rk3288.dtsi"
  8. / {
  9. model = "PopMetal-RK3288";
  10. compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288";
  11. memory@0 {
  12. device_type = "memory";
  13. reg = <0x0 0x0 0x0 0x80000000>;
  14. };
  15. ext_gmac: external-gmac-clock {
  16. compatible = "fixed-clock";
  17. clock-frequency = <125000000>;
  18. clock-output-names = "ext_gmac";
  19. #clock-cells = <0>;
  20. };
  21. gpio-keys {
  22. compatible = "gpio-keys";
  23. autorepeat;
  24. pinctrl-names = "default";
  25. pinctrl-0 = <&pwrbtn>;
  26. key-power {
  27. gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  28. linux,code = <KEY_POWER>;
  29. label = "GPIO Key Power";
  30. linux,input-type = <1>;
  31. wakeup-source;
  32. debounce-interval = <100>;
  33. };
  34. };
  35. ir: ir-receiver {
  36. compatible = "gpio-ir-receiver";
  37. gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
  38. pinctrl-names = "default";
  39. pinctrl-0 = <&ir_int>;
  40. };
  41. vcc_flash: flash-regulator {
  42. compatible = "regulator-fixed";
  43. regulator-name = "vcc_flash";
  44. regulator-min-microvolt = <1800000>;
  45. regulator-max-microvolt = <1800000>;
  46. vin-supply = <&vcc_io>;
  47. };
  48. vcc_sd: sdmmc-regulator {
  49. compatible = "regulator-fixed";
  50. gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
  51. pinctrl-names = "default";
  52. pinctrl-0 = <&sdmmc_pwr>;
  53. regulator-name = "vcc_sd";
  54. regulator-min-microvolt = <3300000>;
  55. regulator-max-microvolt = <3300000>;
  56. startup-delay-us = <100000>;
  57. vin-supply = <&vcc_io>;
  58. };
  59. vcc_sys: vsys-regulator {
  60. compatible = "regulator-fixed";
  61. regulator-name = "vcc_sys";
  62. regulator-min-microvolt = <5000000>;
  63. regulator-max-microvolt = <5000000>;
  64. regulator-always-on;
  65. regulator-boot-on;
  66. };
  67. /*
  68. * A PT5128 creates both dovdd_1v8 and vcc28_dvp, controlled
  69. * by the dvp_pwr pin.
  70. */
  71. vcc18_dvp: vcc18-dvp-regulator {
  72. compatible = "regulator-fixed";
  73. regulator-name = "vcc18-dvp";
  74. regulator-min-microvolt = <1800000>;
  75. regulator-max-microvolt = <1800000>;
  76. vin-supply = <&vcc28_dvp>;
  77. };
  78. vcc28_dvp: vcc28-dvp-regulator {
  79. compatible = "regulator-fixed";
  80. enable-active-high;
  81. gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&dvp_pwr>;
  84. regulator-name = "vcc28_dvp";
  85. regulator-min-microvolt = <2800000>;
  86. regulator-max-microvolt = <2800000>;
  87. regulator-always-on;
  88. vin-supply = <&vcc_io>;
  89. };
  90. };
  91. &cpu0 {
  92. cpu-supply = <&vdd_cpu>;
  93. };
  94. &cpu1 {
  95. cpu-supply = <&vdd_cpu>;
  96. };
  97. &cpu2 {
  98. cpu-supply = <&vdd_cpu>;
  99. };
  100. &cpu3 {
  101. cpu-supply = <&vdd_cpu>;
  102. };
  103. &emmc {
  104. bus-width = <8>;
  105. cap-mmc-highspeed;
  106. mmc-ddr-1_8v;
  107. mmc-hs200-1_8v;
  108. non-removable;
  109. pinctrl-names = "default";
  110. pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
  111. vmmc-supply = <&vcc_io>;
  112. vqmmc-supply = <&vcc_flash>;
  113. status = "okay";
  114. };
  115. &sdmmc {
  116. bus-width = <4>;
  117. cap-mmc-highspeed;
  118. cap-sd-highspeed;
  119. card-detect-delay = <200>;
  120. disable-wp; /* wp not hooked up */
  121. pinctrl-names = "default";
  122. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
  123. sd-uhs-sdr12;
  124. sd-uhs-sdr25;
  125. sd-uhs-sdr50;
  126. sd-uhs-sdr104;
  127. vmmc-supply = <&vcc_sd>;
  128. vqmmc-supply = <&vccio_sd>;
  129. status = "okay";
  130. };
  131. &gmac {
  132. phy-supply = <&vcc_lan>;
  133. phy-mode = "rgmii";
  134. clock_in_out = "input";
  135. snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
  136. snps,reset-active-low;
  137. snps,reset-delays-us = <0 10000 1000000>;
  138. assigned-clocks = <&cru SCLK_MAC>;
  139. assigned-clock-parents = <&ext_gmac>;
  140. pinctrl-names = "default";
  141. pinctrl-0 = <&rgmii_pins>;
  142. tx_delay = <0x30>;
  143. rx_delay = <0x10>;
  144. status = "okay";
  145. };
  146. &hdmi {
  147. ddc-i2c-bus = <&i2c5>;
  148. status = "okay";
  149. };
  150. &i2c0 {
  151. status = "okay";
  152. clock-frequency = <400000>;
  153. rk808: pmic@1b {
  154. compatible = "rockchip,rk808";
  155. reg = <0x1b>;
  156. interrupt-parent = <&gpio0>;
  157. interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
  158. pinctrl-names = "default";
  159. pinctrl-0 = <&pmic_int &global_pwroff>;
  160. rockchip,system-power-controller;
  161. wakeup-source;
  162. #clock-cells = <1>;
  163. clock-output-names = "xin32k", "rk808-clkout2";
  164. vcc1-supply = <&vcc_sys>;
  165. vcc2-supply = <&vcc_sys>;
  166. vcc3-supply = <&vcc_sys>;
  167. vcc4-supply = <&vcc_sys>;
  168. vcc6-supply = <&vcc_sys>;
  169. vcc7-supply = <&vcc_sys>;
  170. vcc8-supply = <&vcc_18>;
  171. vcc9-supply = <&vcc_io>;
  172. vcc10-supply = <&vcc_io>;
  173. vcc11-supply = <&vcc_sys>;
  174. vcc12-supply = <&vcc_io>;
  175. vddio-supply = <&vcc_io>;
  176. regulators {
  177. vdd_cpu: DCDC_REG1 {
  178. regulator-always-on;
  179. regulator-boot-on;
  180. regulator-min-microvolt = <750000>;
  181. regulator-max-microvolt = <1350000>;
  182. regulator-name = "vdd_arm";
  183. regulator-state-mem {
  184. regulator-off-in-suspend;
  185. };
  186. };
  187. vdd_gpu: DCDC_REG2 {
  188. regulator-always-on;
  189. regulator-boot-on;
  190. regulator-min-microvolt = <850000>;
  191. regulator-max-microvolt = <1250000>;
  192. regulator-name = "vdd_gpu";
  193. regulator-state-mem {
  194. regulator-on-in-suspend;
  195. regulator-suspend-microvolt = <1000000>;
  196. };
  197. };
  198. vcc_ddr: DCDC_REG3 {
  199. regulator-always-on;
  200. regulator-boot-on;
  201. regulator-name = "vcc_ddr";
  202. regulator-state-mem {
  203. regulator-on-in-suspend;
  204. };
  205. };
  206. vcc_io: DCDC_REG4 {
  207. regulator-always-on;
  208. regulator-boot-on;
  209. regulator-min-microvolt = <3300000>;
  210. regulator-max-microvolt = <3300000>;
  211. regulator-name = "vcc_io";
  212. regulator-state-mem {
  213. regulator-on-in-suspend;
  214. regulator-suspend-microvolt = <3300000>;
  215. };
  216. };
  217. vcc_lan: LDO_REG1 {
  218. regulator-always-on;
  219. regulator-boot-on;
  220. regulator-min-microvolt = <3300000>;
  221. regulator-max-microvolt = <3300000>;
  222. regulator-name = "vcc_lan";
  223. regulator-state-mem {
  224. regulator-on-in-suspend;
  225. regulator-suspend-microvolt = <3300000>;
  226. };
  227. };
  228. vccio_sd: LDO_REG2 {
  229. regulator-always-on;
  230. regulator-boot-on;
  231. regulator-min-microvolt = <1800000>;
  232. regulator-max-microvolt = <3300000>;
  233. regulator-name = "vccio_sd";
  234. regulator-state-mem {
  235. regulator-off-in-suspend;
  236. };
  237. };
  238. vdd_10: LDO_REG3 {
  239. regulator-always-on;
  240. regulator-boot-on;
  241. regulator-min-microvolt = <1000000>;
  242. regulator-max-microvolt = <1000000>;
  243. regulator-name = "vdd_10";
  244. regulator-state-mem {
  245. regulator-on-in-suspend;
  246. regulator-suspend-microvolt = <1000000>;
  247. };
  248. };
  249. vcc18_lcd: LDO_REG4 {
  250. regulator-always-on;
  251. regulator-boot-on;
  252. regulator-min-microvolt = <1800000>;
  253. regulator-max-microvolt = <1800000>;
  254. regulator-name = "vcc18_lcd";
  255. regulator-state-mem {
  256. regulator-on-in-suspend;
  257. regulator-suspend-microvolt = <1800000>;
  258. };
  259. };
  260. ldo5: LDO_REG5 {
  261. regulator-always-on;
  262. regulator-min-microvolt = <1800000>;
  263. regulator-max-microvolt = <3300000>;
  264. regulator-name = "ldo5";
  265. };
  266. vdd10_lcd: LDO_REG6 {
  267. regulator-always-on;
  268. regulator-boot-on;
  269. regulator-min-microvolt = <1000000>;
  270. regulator-max-microvolt = <1000000>;
  271. regulator-name = "vdd10_lcd";
  272. regulator-state-mem {
  273. regulator-on-in-suspend;
  274. regulator-suspend-microvolt = <1000000>;
  275. };
  276. };
  277. vcc_18: LDO_REG7 {
  278. regulator-always-on;
  279. regulator-boot-on;
  280. regulator-min-microvolt = <1800000>;
  281. regulator-max-microvolt = <1800000>;
  282. regulator-name = "vcc_18";
  283. regulator-state-mem {
  284. regulator-on-in-suspend;
  285. regulator-suspend-microvolt = <1800000>;
  286. };
  287. };
  288. vcca_33: LDO_REG8 {
  289. regulator-always-on;
  290. regulator-boot-on;
  291. regulator-min-microvolt = <3300000>;
  292. regulator-max-microvolt = <3300000>;
  293. regulator-name = "vcca_33";
  294. regulator-state-mem {
  295. regulator-on-in-suspend;
  296. regulator-suspend-microvolt = <3300000>;
  297. };
  298. };
  299. vccio_wl: SWITCH_REG1 {
  300. regulator-always-on;
  301. regulator-boot-on;
  302. regulator-name = "vccio_wl";
  303. regulator-state-mem {
  304. regulator-on-in-suspend;
  305. };
  306. };
  307. vcc_lcd: SWITCH_REG2 {
  308. regulator-always-on;
  309. regulator-boot-on;
  310. regulator-name = "vcc_lcd";
  311. regulator-state-mem {
  312. regulator-on-in-suspend;
  313. };
  314. };
  315. };
  316. };
  317. };
  318. &i2c1 {
  319. status = "okay";
  320. clock-frequency = <400000>;
  321. ak8963: ak8963@d {
  322. compatible = "asahi-kasei,ak8975";
  323. reg = <0x0d>;
  324. interrupt-parent = <&gpio8>;
  325. interrupts = <RK_PA1 IRQ_TYPE_EDGE_RISING>;
  326. pinctrl-names = "default";
  327. pinctrl-0 = <&comp_int>;
  328. vdd-supply = <&vcc_io>;
  329. vid-supply = <&vcc_io>;
  330. };
  331. l3g4200d: l3g4200d@69 {
  332. compatible = "st,l3g4200d-gyro";
  333. st,drdy-int-pin = <2>;
  334. reg = <0x69>;
  335. vdd-supply = <&vcc_io>;
  336. vddio-supply = <&vcc_io>;
  337. };
  338. mma8452: mma8452@1d {
  339. compatible = "fsl,mma8452";
  340. reg = <0x1d>;
  341. interrupt-parent = <&gpio8>;
  342. interrupts = <RK_PA0 IRQ_TYPE_EDGE_RISING>;
  343. pinctrl-names = "default";
  344. pinctrl-0 = <&gsensor_int>;
  345. };
  346. };
  347. &i2c2 {
  348. status = "okay";
  349. };
  350. &i2c3 {
  351. status = "okay";
  352. };
  353. &i2c4 {
  354. status = "okay";
  355. };
  356. &i2c5 {
  357. status = "okay";
  358. };
  359. &io_domains {
  360. status = "okay";
  361. audio-supply = <&vcca_33>;
  362. bb-supply = <&vcc_io>;
  363. dvp-supply = <&vcc18_dvp>;
  364. flash0-supply = <&vcc_flash>;
  365. flash1-supply = <&vcc_lan>;
  366. gpio30-supply = <&vcc_io>;
  367. gpio1830-supply = <&vcc_io>;
  368. lcdc-supply = <&vcc_io>;
  369. sdcard-supply = <&vccio_sd>;
  370. wifi-supply = <&vccio_wl>;
  371. };
  372. &pinctrl {
  373. ak8963 {
  374. comp_int: comp-int {
  375. rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
  376. };
  377. };
  378. buttons {
  379. pwrbtn: pwrbtn {
  380. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  381. };
  382. };
  383. dvp {
  384. dvp_pwr: dvp-pwr {
  385. rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
  386. };
  387. };
  388. ir {
  389. ir_int: ir-int {
  390. rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
  391. };
  392. };
  393. mma8452 {
  394. gsensor_int: gsensor-int {
  395. rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
  396. };
  397. };
  398. pmic {
  399. pmic_int: pmic-int {
  400. rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
  401. };
  402. };
  403. sdmmc {
  404. sdmmc_pwr: sdmmc-pwr {
  405. rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  406. };
  407. };
  408. };
  409. &tsadc {
  410. rockchip,hw-tshut-mode = <0>;
  411. rockchip,hw-tshut-polarity = <0>;
  412. status = "okay";
  413. };
  414. &vopb {
  415. status = "okay";
  416. };
  417. &vopb_mmu {
  418. status = "okay";
  419. };
  420. &vopl {
  421. status = "okay";
  422. };
  423. &vopl_mmu {
  424. status = "okay";
  425. };
  426. &uart0 {
  427. status = "okay";
  428. };
  429. &uart1 {
  430. status = "okay";
  431. };
  432. &uart2 {
  433. status = "okay";
  434. };
  435. &uart3 {
  436. status = "okay";
  437. };
  438. &uart4 {
  439. status = "okay";
  440. };
  441. &usbphy {
  442. status = "okay";
  443. };
  444. &usb_otg {
  445. status = "okay";
  446. };