rk3288-miqi.dts 11 KB

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