rk3288-miqi.dts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. /*
  2. * Copyright (c) 2016 Heiko Stuebner <heiko@sntech.de>
  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. /dts-v1/;
  43. #include <dt-bindings/input/input.h>
  44. #include "rk3288.dtsi"
  45. / {
  46. model = "mqmaker MiQi";
  47. compatible = "mqmaker,miqi", "rockchip,rk3288";
  48. chosen {
  49. stdout-path = "serial2:115200n8";
  50. };
  51. memory {
  52. device_type = "memory";
  53. reg = <0 0x80000000>;
  54. };
  55. ext_gmac: external-gmac-clock {
  56. compatible = "fixed-clock";
  57. #clock-cells = <0>;
  58. clock-frequency = <125000000>;
  59. clock-output-names = "ext_gmac";
  60. };
  61. leds {
  62. compatible = "gpio-leds";
  63. work {
  64. gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
  65. label = "miqi:green:user";
  66. linux,default-trigger = "default-on";
  67. pinctrl-names = "default";
  68. pinctrl-0 = <&led_ctl>;
  69. };
  70. };
  71. vcc_flash: flash-regulator {
  72. compatible = "regulator-fixed";
  73. regulator-name = "vcc_flash";
  74. regulator-min-microvolt = <1800000>;
  75. regulator-max-microvolt = <1800000>;
  76. vin-supply = <&vcc_io>;
  77. };
  78. vcc_host: usb-host-regulator {
  79. compatible = "regulator-fixed";
  80. enable-active-high;
  81. gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&host_vbus_drv>;
  84. regulator-name = "vcc_host";
  85. regulator-min-microvolt = <5000000>;
  86. regulator-max-microvolt = <5000000>;
  87. regulator-always-on;
  88. vin-supply = <&vcc_sys>;
  89. };
  90. vcc_sd: sdmmc-regulator {
  91. compatible = "regulator-fixed";
  92. gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
  93. pinctrl-names = "default";
  94. pinctrl-0 = <&sdmmc_pwr>;
  95. regulator-name = "vcc_sd";
  96. regulator-min-microvolt = <3300000>;
  97. regulator-max-microvolt = <3300000>;
  98. startup-delay-us = <100000>;
  99. vin-supply = <&vcc_io>;
  100. };
  101. vcc_sys: vsys-regulator {
  102. compatible = "regulator-fixed";
  103. regulator-name = "vcc_sys";
  104. regulator-min-microvolt = <5000000>;
  105. regulator-max-microvolt = <5000000>;
  106. regulator-always-on;
  107. regulator-boot-on;
  108. };
  109. };
  110. &cpu0 {
  111. cpu0-supply = <&vdd_cpu>;
  112. };
  113. &emmc {
  114. bus-width = <8>;
  115. cap-mmc-highspeed;
  116. disable-wp;
  117. non-removable;
  118. num-slots = <1>;
  119. pinctrl-names = "default";
  120. pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
  121. vmmc-supply = <&vcc_io>;
  122. vqmmc-supply = <&vcc_flash>;
  123. status = "okay";
  124. };
  125. &gmac {
  126. assigned-clocks = <&cru SCLK_MAC>;
  127. assigned-clock-parents = <&ext_gmac>;
  128. clock_in_out = "input";
  129. pinctrl-names = "default";
  130. pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
  131. phy-supply = <&vcc_lan>;
  132. phy-mode = "rgmii";
  133. snps,reset-active-low;
  134. snps,reset-delays-us = <0 10000 1000000>;
  135. snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
  136. tx_delay = <0x30>;
  137. rx_delay = <0x10>;
  138. status = "ok";
  139. };
  140. &hdmi {
  141. ddc-i2c-bus = <&i2c5>;
  142. status = "okay";
  143. };
  144. &i2c0 {
  145. clock-frequency = <400000>;
  146. status = "okay";
  147. vdd_cpu: syr827@40 {
  148. compatible = "silergy,syr827";
  149. fcs,suspend-voltage-selector = <1>;
  150. reg = <0x40>;
  151. regulator-name = "vdd_cpu";
  152. regulator-min-microvolt = <850000>;
  153. regulator-max-microvolt = <1350000>;
  154. regulator-always-on;
  155. regulator-boot-on;
  156. regulator-enable-ramp-delay = <300>;
  157. regulator-ramp-delay = <8000>;
  158. vin-supply = <&vcc_sys>;
  159. };
  160. vdd_gpu: syr828@41 {
  161. compatible = "silergy,syr828";
  162. fcs,suspend-voltage-selector = <1>;
  163. reg = <0x41>;
  164. regulator-name = "vdd_gpu";
  165. regulator-min-microvolt = <850000>;
  166. regulator-max-microvolt = <1350000>;
  167. regulator-always-on;
  168. vin-supply = <&vcc_sys>;
  169. };
  170. hym8563: hym8563@51 {
  171. compatible = "haoyu,hym8563";
  172. reg = <0x51>;
  173. #clock-cells = <0>;
  174. clock-frequency = <32768>;
  175. clock-output-names = "xin32k";
  176. };
  177. act8846: act8846@5a {
  178. compatible = "active-semi,act8846";
  179. reg = <0x5a>;
  180. pinctrl-names = "default";
  181. pinctrl-0 = <&pmic_vsel>;
  182. system-power-controller;
  183. vp1-supply = <&vcc_sys>;
  184. vp2-supply = <&vcc_sys>;
  185. vp3-supply = <&vcc_sys>;
  186. vp4-supply = <&vcc_sys>;
  187. inl1-supply = <&vcc_sys>;
  188. inl2-supply = <&vcc_sys>;
  189. inl3-supply = <&vcc_20>;
  190. regulators {
  191. vcc_ddr: REG1 {
  192. regulator-name = "vcc_ddr";
  193. regulator-always-on;
  194. };
  195. vcc_io: REG2 {
  196. regulator-name = "vcc_io";
  197. regulator-min-microvolt = <3300000>;
  198. regulator-max-microvolt = <3300000>;
  199. regulator-always-on;
  200. };
  201. vdd_log: REG3 {
  202. regulator-name = "vdd_log";
  203. regulator-min-microvolt = <1100000>;
  204. regulator-max-microvolt = <1100000>;
  205. regulator-always-on;
  206. };
  207. vcc_20: REG4 {
  208. regulator-name = "vcc_20";
  209. regulator-min-microvolt = <2000000>;
  210. regulator-max-microvolt = <2000000>;
  211. regulator-always-on;
  212. };
  213. vccio_sd: REG5 {
  214. regulator-name = "vccio_sd";
  215. regulator-min-microvolt = <3300000>;
  216. regulator-max-microvolt = <3300000>;
  217. regulator-always-on;
  218. };
  219. vdd10_lcd: REG6 {
  220. regulator-name = "vdd10_lcd";
  221. regulator-min-microvolt = <1000000>;
  222. regulator-max-microvolt = <1000000>;
  223. regulator-always-on;
  224. };
  225. vcca_18: REG7 {
  226. regulator-name = "vcca_18";
  227. regulator-min-microvolt = <1800000>;
  228. regulator-max-microvolt = <1800000>;
  229. };
  230. vcca_33: REG8 {
  231. regulator-name = "vcca_33";
  232. regulator-min-microvolt = <3300000>;
  233. regulator-max-microvolt = <3300000>;
  234. };
  235. vcc_lan: REG9 {
  236. regulator-name = "vcc_lan";
  237. regulator-min-microvolt = <3300000>;
  238. regulator-max-microvolt = <3300000>;
  239. };
  240. vdd_10: REG10 {
  241. regulator-name = "vdd_10";
  242. regulator-min-microvolt = <1000000>;
  243. regulator-max-microvolt = <1000000>;
  244. regulator-always-on;
  245. };
  246. vcc_18: REG11 {
  247. regulator-name = "vcc_18";
  248. regulator-min-microvolt = <1800000>;
  249. regulator-max-microvolt = <1800000>;
  250. regulator-always-on;
  251. };
  252. vcc18_lcd: REG12 {
  253. regulator-name = "vcc18_lcd";
  254. regulator-min-microvolt = <1800000>;
  255. regulator-max-microvolt = <1800000>;
  256. regulator-always-on;
  257. };
  258. };
  259. };
  260. };
  261. &i2c1 {
  262. status = "okay";
  263. };
  264. &i2c2 {
  265. status = "okay";
  266. };
  267. &i2c4 {
  268. status = "okay";
  269. };
  270. &i2c5 {
  271. status = "okay";
  272. };
  273. &io_domains {
  274. status = "okay";
  275. audio-supply = <&vcca_33>;
  276. flash0-supply = <&vcc_flash>;
  277. flash1-supply = <&vcc_lan>;
  278. gpio30-supply = <&vcc_io>;
  279. gpio1830-supply = <&vcc_io>;
  280. lcdc-supply = <&vcc_io>;
  281. sdcard-supply = <&vccio_sd>;
  282. wifi-supply = <&vcc_18>;
  283. };
  284. &pinctrl {
  285. pcfg_output_high: pcfg-output-high {
  286. output-high;
  287. };
  288. pcfg_output_low: pcfg-output-low {
  289. output-low;
  290. };
  291. pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
  292. bias-pull-up;
  293. drive-strength = <12>;
  294. };
  295. act8846 {
  296. pmic_int: pmic-int {
  297. rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
  298. };
  299. pmic_sleep: pmic-sleep {
  300. rockchip,pins = <0 0 RK_FUNC_GPIO &pcfg_output_low>;
  301. };
  302. pmic_vsel: pmic-vsel {
  303. rockchip,pins = <7 1 RK_FUNC_GPIO &pcfg_output_low>;
  304. };
  305. };
  306. gmac {
  307. phy_int: phy-int {
  308. rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
  309. };
  310. phy_pmeb: phy-pmeb {
  311. rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
  312. };
  313. phy_rst: phy-rst {
  314. rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
  315. };
  316. };
  317. leds {
  318. led_ctl: led-ctl {
  319. rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>;
  320. };
  321. };
  322. sdmmc {
  323. /*
  324. * Default drive strength isn't enough to achieve even
  325. * high-speed mode on firefly board so bump up to 12ma.
  326. */
  327. sdmmc_bus4: sdmmc-bus4 {
  328. rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
  329. <6 17 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
  330. <6 18 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
  331. <6 19 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
  332. };
  333. sdmmc_clk: sdmmc-clk {
  334. rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_12ma>;
  335. };
  336. sdmmc_cmd: sdmmc-cmd {
  337. rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
  338. };
  339. sdmmc_pwr: sdmmc-pwr {
  340. rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
  341. };
  342. };
  343. usb_host {
  344. host_vbus_drv: host-vbus-drv {
  345. rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
  346. };
  347. };
  348. };
  349. &saradc {
  350. vref-supply = <&vcc_18>;
  351. status = "okay";
  352. };
  353. &sdmmc {
  354. bus-width = <4>;
  355. cap-mmc-highspeed;
  356. cap-sd-highspeed;
  357. card-detect-delay = <200>;
  358. disable-wp;
  359. num-slots = <1>;
  360. pinctrl-names = "default";
  361. pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
  362. vmmc-supply = <&vcc_sd>;
  363. vqmmc-supply = <&vccio_sd>;
  364. status = "okay";
  365. };
  366. &tsadc {
  367. rockchip,hw-tshut-mode = <0>;
  368. rockchip,hw-tshut-polarity = <0>;
  369. status = "okay";
  370. };
  371. &uart2 {
  372. status = "okay";
  373. };
  374. &uart3 {
  375. status = "okay";
  376. };
  377. &usbphy {
  378. status = "okay";
  379. };
  380. &usb_host1 {
  381. status = "okay";
  382. };
  383. &usb_otg {
  384. /*
  385. * The otg controller is the only system power source,
  386. * so needs to always stay in device mode.
  387. */
  388. dr_mode = "peripheral";
  389. status = "okay";
  390. };
  391. &vopb {
  392. status = "okay";
  393. };
  394. &vopb_mmu {
  395. status = "okay";
  396. };
  397. &vopl {
  398. status = "okay";
  399. };
  400. &vopl_mmu {
  401. status = "okay";
  402. };
  403. &wdt {
  404. status = "okay";
  405. };