rk3288-popmetal.dtsi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. /*
  2. * This file is dual-licensed: you can use it either under the terms
  3. * of the GPL or the X11 license, at your option. Note that this dual
  4. * licensing only applies to this file, and not this project as a
  5. * whole.
  6. *
  7. * a) This file is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of the
  10. * License, or (at your option) any later version.
  11. *
  12. * This file is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * Or, alternatively,
  18. *
  19. * b) Permission is hereby granted, free of charge, to any person
  20. * obtaining a copy of this software and associated documentation
  21. * files (the "Software"), to deal in the Software without
  22. * restriction, including without limitation the rights to use,
  23. * copy, modify, merge, publish, distribute, sublicense, and/or
  24. * sell copies of the Software, and to permit persons to whom the
  25. * Software is furnished to do so, subject to the following
  26. * conditions:
  27. *
  28. * The above copyright notice and this permission notice shall be
  29. * included in all copies or substantial portions of the Software.
  30. *
  31. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  32. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  33. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  34. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  35. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  36. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  37. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  38. * OTHER DEALINGS IN THE SOFTWARE.
  39. */
  40. #include "rk3288.dtsi"
  41. / {
  42. memory{
  43. device_type = "memory";
  44. reg = <0 0x80000000>;
  45. };
  46. ext_gmac: external-gmac-clock {
  47. compatible = "fixed-clock";
  48. clock-frequency = <125000000>;
  49. clock-output-names = "ext_gmac";
  50. #clock-cells = <0>;
  51. };
  52. gpio-keys {
  53. compatible = "gpio-keys";
  54. autorepeat;
  55. pinctrl-names = "default";
  56. pinctrl-0 = <&pwrbtn>;
  57. power {
  58. gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
  59. label = "GPIO Key Power";
  60. linux,input-type = <1>;
  61. wakeup-source;
  62. debounce-interval = <100>;
  63. };
  64. };
  65. io_domains: io-domains {
  66. compatible = "rockchip,rk3288-io-voltage-domain";
  67. rockchip,grf = <&grf>;
  68. audio-supply = <&vcca_33>;
  69. bb-supply = <&vcc_io>;
  70. dvp-supply = <&vcc18_dvp>;
  71. flash0-supply = <&vcc_flash>;
  72. flash1-supply = <&vcc_lan>;
  73. gpio30-supply = <&vcc_io>;
  74. gpio1830-supply = <&vcc_io>;
  75. lcdc-supply = <&vcc_io>;
  76. sdcard-supply = <&vccio_sd>;
  77. wifi-supply = <&vccio_wl>;
  78. };
  79. ir: ir-receiver {
  80. compatible = "gpio-ir-receiver";
  81. gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&ir_int>;
  84. };
  85. vcc_flash: flash-regulator {
  86. compatible = "regulator-fixed";
  87. regulator-name = "vcc_flash";
  88. regulator-min-microvolt = <1800000>;
  89. regulator-max-microvolt = <1800000>;
  90. vin-supply = <&vcc_io>;
  91. };
  92. vcc_sd: sdmmc-regulator {
  93. compatible = "regulator-fixed";
  94. gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
  95. pinctrl-names = "default";
  96. pinctrl-0 = <&sdmmc_pwr>;
  97. regulator-name = "vcc_sd";
  98. regulator-min-microvolt = <3300000>;
  99. regulator-max-microvolt = <3300000>;
  100. startup-delay-us = <100000>;
  101. vin-supply = <&vcc_io>;
  102. };
  103. vcc_sys: vsys-regulator {
  104. compatible = "regulator-fixed";
  105. regulator-name = "vcc_sys";
  106. regulator-min-microvolt = <5000000>;
  107. regulator-max-microvolt = <5000000>;
  108. regulator-always-on;
  109. regulator-boot-on;
  110. };
  111. /*
  112. * A PT5128 creates both dovdd_1v8 and vcc28_dvp, controlled
  113. * by the dvp_pwr pin.
  114. */
  115. vcc18_dvp: vcc18-dvp-regulator {
  116. compatible = "regulator-fixed";
  117. regulator-name = "vcc18-dvp";
  118. regulator-min-microvolt = <1800000>;
  119. regulator-max-microvolt = <1800000>;
  120. vin-supply = <&vcc28_dvp>;
  121. };
  122. vcc28_dvp: vcc28-dvp-regulator {
  123. compatible = "regulator-fixed";
  124. enable-active-high;
  125. gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
  126. pinctrl-names = "default";
  127. pinctrl-0 = <&dvp_pwr>;
  128. regulator-name = "vcc28_dvp";
  129. regulator-min-microvolt = <2800000>;
  130. regulator-max-microvolt = <2800000>;
  131. regulator-always-on;
  132. vin-supply = <&vcc_io>;
  133. };
  134. };
  135. &cpu0 {
  136. cpu0-supply = <&vdd_cpu>;
  137. };
  138. &emmc {
  139. bus-width = <8>;
  140. cap-mmc-highspeed;
  141. disable-wp;
  142. non-removable;
  143. num-slots = <1>;
  144. pinctrl-names = "default";
  145. pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
  146. vmmc-supply = <&vcc_io>;
  147. vqmmc-supply = <&vcc_flash>;
  148. status = "okay";
  149. };
  150. &sdmmc {
  151. bus-width = <4>;
  152. cap-mmc-highspeed;
  153. cap-sd-highspeed;
  154. card-detect-delay = <200>;
  155. disable-wp;
  156. num-slots = <1>;
  157. pinctrl-names = "default";
  158. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
  159. vmmc-supply = <&vcc_sd>;
  160. vqmmc-supply = <&vccio_sd>;
  161. status = "okay";
  162. };
  163. &gmac {
  164. phy-supply = <&vcc_lan>;
  165. phy-mode = "rgmii";
  166. clock_in_out = "input";
  167. snps,reset-gpio = <&gpio4 7 0>;
  168. snps,reset-active-low;
  169. snps,reset-delays-us = <0 10000 1000000>;
  170. assigned-clocks = <&cru SCLK_MAC>;
  171. assigned-clock-parents = <&ext_gmac>;
  172. pinctrl-names = "default";
  173. pinctrl-0 = <&rgmii_pins>;
  174. tx_delay = <0x30>;
  175. rx_delay = <0x10>;
  176. status = "ok";
  177. };
  178. &hdmi {
  179. ddc-i2c-bus = <&i2c5>;
  180. status = "okay";
  181. };
  182. &i2c0 {
  183. status = "okay";
  184. clock-frequency = <400000>;
  185. rk808: pmic@1b {
  186. compatible = "rockchip,rk808";
  187. reg = <0x1b>;
  188. interrupt-parent = <&gpio0>;
  189. interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
  190. pinctrl-names = "default";
  191. pinctrl-0 = <&pmic_int &global_pwroff>;
  192. rockchip,system-power-controller;
  193. wakeup-source;
  194. #clock-cells = <1>;
  195. clock-output-names = "xin32k", "rk808-clkout2";
  196. vcc1-supply = <&vcc_sys>;
  197. vcc2-supply = <&vcc_sys>;
  198. vcc3-supply = <&vcc_sys>;
  199. vcc4-supply = <&vcc_sys>;
  200. vcc6-supply = <&vcc_sys>;
  201. vcc7-supply = <&vcc_sys>;
  202. vcc8-supply = <&vcc_18>;
  203. vcc9-supply = <&vcc_io>;
  204. vcc10-supply = <&vcc_io>;
  205. vcc11-supply = <&vcc_sys>;
  206. vcc12-supply = <&vcc_io>;
  207. vddio-supply = <&vcc_io>;
  208. regulators {
  209. vdd_cpu: DCDC_REG1 {
  210. regulator-always-on;
  211. regulator-boot-on;
  212. regulator-min-microvolt = <750000>;
  213. regulator-max-microvolt = <1350000>;
  214. regulator-name = "vdd_arm";
  215. regulator-state-mem {
  216. regulator-off-in-suspend;
  217. };
  218. };
  219. vdd_gpu: DCDC_REG2 {
  220. regulator-always-on;
  221. regulator-boot-on;
  222. regulator-min-microvolt = <850000>;
  223. regulator-max-microvolt = <1250000>;
  224. regulator-name = "vdd_gpu";
  225. regulator-state-mem {
  226. regulator-on-in-suspend;
  227. regulator-suspend-microvolt = <1000000>;
  228. };
  229. };
  230. vcc_ddr: DCDC_REG3 {
  231. regulator-always-on;
  232. regulator-boot-on;
  233. regulator-name = "vcc_ddr";
  234. regulator-state-mem {
  235. regulator-on-in-suspend;
  236. };
  237. };
  238. vcc_io: DCDC_REG4 {
  239. regulator-always-on;
  240. regulator-boot-on;
  241. regulator-min-microvolt = <3300000>;
  242. regulator-max-microvolt = <3300000>;
  243. regulator-name = "vcc_io";
  244. regulator-state-mem {
  245. regulator-on-in-suspend;
  246. regulator-suspend-microvolt = <3300000>;
  247. };
  248. };
  249. vcc_lan: LDO_REG1 {
  250. regulator-always-on;
  251. regulator-boot-on;
  252. regulator-min-microvolt = <3300000>;
  253. regulator-max-microvolt = <3300000>;
  254. regulator-name = "vcc_lan";
  255. regulator-state-mem {
  256. regulator-on-in-suspend;
  257. regulator-suspend-microvolt = <3300000>;
  258. };
  259. };
  260. vccio_sd: LDO_REG2 {
  261. regulator-always-on;
  262. regulator-boot-on;
  263. regulator-min-microvolt = <3300000>;
  264. regulator-max-microvolt = <3300000>;
  265. regulator-name = "vccio_sd";
  266. regulator-state-mem {
  267. regulator-off-in-suspend;
  268. };
  269. };
  270. vdd_10: LDO_REG3 {
  271. regulator-always-on;
  272. regulator-boot-on;
  273. regulator-min-microvolt = <1000000>;
  274. regulator-max-microvolt = <1000000>;
  275. regulator-name = "vdd_10";
  276. regulator-state-mem {
  277. regulator-on-in-suspend;
  278. regulator-suspend-microvolt = <1000000>;
  279. };
  280. };
  281. vcc18_lcd: LDO_REG4 {
  282. regulator-always-on;
  283. regulator-boot-on;
  284. regulator-min-microvolt = <1800000>;
  285. regulator-max-microvolt = <1800000>;
  286. regulator-name = "vcc18_lcd";
  287. regulator-state-mem {
  288. regulator-on-in-suspend;
  289. regulator-suspend-microvolt = <1800000>;
  290. };
  291. };
  292. ldo5: LDO_REG5 {
  293. regulator-always-on;
  294. regulator-min-microvolt = <1800000>;
  295. regulator-max-microvolt = <3300000>;
  296. regulator-name = "ldo5";
  297. };
  298. vdd10_lcd: LDO_REG6 {
  299. regulator-always-on;
  300. regulator-boot-on;
  301. regulator-min-microvolt = <1000000>;
  302. regulator-max-microvolt = <1000000>;
  303. regulator-name = "vdd10_lcd";
  304. regulator-state-mem {
  305. regulator-on-in-suspend;
  306. regulator-suspend-microvolt = <1000000>;
  307. };
  308. };
  309. vcc_18: LDO_REG7 {
  310. regulator-always-on;
  311. regulator-boot-on;
  312. regulator-min-microvolt = <1800000>;
  313. regulator-max-microvolt = <1800000>;
  314. regulator-name = "vcc_18";
  315. regulator-state-mem {
  316. regulator-on-in-suspend;
  317. regulator-suspend-microvolt = <1800000>;
  318. };
  319. };
  320. vcca_33: LDO_REG8 {
  321. regulator-always-on;
  322. regulator-boot-on;
  323. regulator-min-microvolt = <3300000>;
  324. regulator-max-microvolt = <3300000>;
  325. regulator-name = "vcca_33";
  326. regulator-state-mem {
  327. regulator-on-in-suspend;
  328. regulator-suspend-microvolt = <3300000>;
  329. };
  330. };
  331. vccio_wl: SWITCH_REG1 {
  332. regulator-always-on;
  333. regulator-boot-on;
  334. regulator-name = "vccio_wl";
  335. regulator-state-mem {
  336. regulator-on-in-suspend;
  337. };
  338. };
  339. vcc_lcd: SWITCH_REG2 {
  340. regulator-always-on;
  341. regulator-boot-on;
  342. regulator-name = "vcc_lcd";
  343. regulator-state-mem {
  344. regulator-on-in-suspend;
  345. };
  346. };
  347. };
  348. };
  349. };
  350. &i2c1 {
  351. status = "okay";
  352. clock-frequency = <400000>;
  353. ak8963: ak8963@0d {
  354. compatible = "asahi-kasei,ak8975";
  355. reg = <0x0d>;
  356. interrupt-parent = <&gpio8>;
  357. interrupts = <1 IRQ_TYPE_EDGE_RISING>;
  358. pinctrl-names = "default";
  359. pinctrl-0 = <&comp_int>;
  360. };
  361. l3g4200d: l3g4200d@68 {
  362. compatible = "st,l3g4200d-gyro";
  363. st,drdy-int-pin = <2>;
  364. reg = <0x6b>;
  365. };
  366. mma8452: mma8452@1d {
  367. compatible = "fsl,mma8452";
  368. reg = <0x1d>;
  369. interrupt-parent = <&gpio8>;
  370. interrupts = <0 IRQ_TYPE_EDGE_RISING>;
  371. pinctrl-names = "default";
  372. pinctrl-0 = <&gsensor_int>;
  373. };
  374. };
  375. &i2c2 {
  376. status = "okay";
  377. };
  378. &i2c3 {
  379. status = "okay";
  380. };
  381. &i2c4 {
  382. status = "okay";
  383. };
  384. &i2c5 {
  385. status = "okay";
  386. };
  387. &pinctrl {
  388. ak8963 {
  389. comp_int: comp-int {
  390. rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
  391. };
  392. };
  393. buttons {
  394. pwrbtn: pwrbtn {
  395. rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
  396. };
  397. };
  398. dvp {
  399. dvp_pwr: dvp-pwr {
  400. rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_pull_none>;
  401. };
  402. };
  403. ir {
  404. ir_int: ir-int {
  405. rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_up>;
  406. };
  407. };
  408. mma8452 {
  409. gsensor_int: gsensor-int {
  410. rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_up>;
  411. };
  412. };
  413. pmic {
  414. pmic_int: pmic-int {
  415. rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
  416. };
  417. };
  418. sdmmc {
  419. sdmmc_pwr: sdmmc-pwr {
  420. rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
  421. };
  422. };
  423. };
  424. &tsadc {
  425. rockchip,hw-tshut-mode = <0>;
  426. rockchip,hw-tshut-polarity = <0>;
  427. status = "okay";
  428. };
  429. &vopb {
  430. status = "okay";
  431. };
  432. &vopb_mmu {
  433. status = "okay";
  434. };
  435. &vopl {
  436. status = "okay";
  437. };
  438. &vopl_mmu {
  439. status = "okay";
  440. };
  441. &uart0 {
  442. status = "okay";
  443. };
  444. &uart1 {
  445. status = "okay";
  446. };
  447. &uart2 {
  448. status = "okay";
  449. };
  450. &uart3 {
  451. status = "okay";
  452. };
  453. &uart4 {
  454. status = "okay";
  455. };
  456. &usbphy {
  457. status = "okay";
  458. };