rk3368-r88.dts 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. /*
  2. * Copyright (c) 2015 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 "rk3368.dtsi"
  44. #include <dt-bindings/input/input.h>
  45. / {
  46. model = "Rockchip R88";
  47. compatible = "rockchip,r88", "rockchip,rk3368";
  48. chosen {
  49. stdout-path = "serial2:115200n8";
  50. };
  51. memory {
  52. device_type = "memory";
  53. reg = <0x0 0x0 0x0 0x40000000>;
  54. };
  55. emmc_pwrseq: emmc-pwrseq {
  56. compatible = "mmc-pwrseq-emmc";
  57. pinctrl-0 = <&emmc_reset>;
  58. pinctrl-names = "default";
  59. reset-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
  60. };
  61. keys: gpio-keys {
  62. compatible = "gpio-keys";
  63. pinctrl-names = "default";
  64. pinctrl-0 = <&pwr_key>;
  65. power {
  66. wakeup-source;
  67. gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  68. label = "GPIO Power";
  69. linux,code = <KEY_POWER>;
  70. };
  71. };
  72. leds: gpio-leds {
  73. compatible = "gpio-leds";
  74. work {
  75. gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>;
  76. label = "r88:green:led";
  77. pinctrl-names = "default";
  78. pinctrl-0 = <&led_ctl>;
  79. };
  80. };
  81. ir: ir-receiver {
  82. compatible = "gpio-ir-receiver";
  83. gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
  84. pinctrl-names = "default";
  85. pinctrl-0 = <&ir_int>;
  86. };
  87. sdio_pwrseq: sdio-pwrseq {
  88. compatible = "mmc-pwrseq-simple";
  89. clocks = <&hym8563>;
  90. clock-names = "ext_clock";
  91. pinctrl-names = "default";
  92. pinctrl-0 = <&bt_rst>, <&wifi_reg_on>;
  93. reset-gpios =
  94. /* BT_RST_N */
  95. <&gpio3 5 GPIO_ACTIVE_LOW>,
  96. /* WL_REG_ON */
  97. <&gpio3 4 GPIO_ACTIVE_LOW>;
  98. };
  99. vcc_18: vcc18-regulator {
  100. compatible = "regulator-fixed";
  101. regulator-name = "vcc_18";
  102. regulator-min-microvolt = <1800000>;
  103. regulator-max-microvolt = <1800000>;
  104. regulator-always-on;
  105. regulator-boot-on;
  106. vin-supply = <&vcc_sys>;
  107. };
  108. /* supplies both host and otg */
  109. vcc_host: vcc-host-regulator {
  110. compatible = "regulator-fixed";
  111. enable-active-high;
  112. gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&host_vbus_drv>;
  115. regulator-name = "vcc_host";
  116. regulator-always-on;
  117. regulator-boot-on;
  118. vin-supply = <&vcc_sys>;
  119. };
  120. vcc_io: vcc-io-regulator {
  121. compatible = "regulator-fixed";
  122. regulator-name = "vcc_io";
  123. regulator-min-microvolt = <3300000>;
  124. regulator-max-microvolt = <3300000>;
  125. regulator-always-on;
  126. regulator-boot-on;
  127. vin-supply = <&vcc_sys>;
  128. };
  129. vcc_lan: vcc-lan-regulator {
  130. compatible = "regulator-fixed";
  131. regulator-name = "vcc_lan";
  132. regulator-min-microvolt = <3300000>;
  133. regulator-max-microvolt = <3300000>;
  134. regulator-always-on;
  135. regulator-boot-on;
  136. vin-supply = <&vcc_io>;
  137. };
  138. vcc_sys: vcc-sys-regulator {
  139. compatible = "regulator-fixed";
  140. regulator-name = "vcc_sys";
  141. regulator-min-microvolt = <5000000>;
  142. regulator-max-microvolt = <5000000>;
  143. regulator-always-on;
  144. regulator-boot-on;
  145. };
  146. vccio_wl: vccio-wl-regulator {
  147. compatible = "regulator-fixed";
  148. regulator-name = "vccio_wl";
  149. regulator-min-microvolt = <3300000>;
  150. regulator-max-microvolt = <3300000>;
  151. regulator-always-on;
  152. regulator-boot-on;
  153. vin-supply = <&vcc_io>;
  154. };
  155. vdd_10: vdd-10-regulator {
  156. compatible = "regulator-fixed";
  157. regulator-name = "vdd_10";
  158. regulator-min-microvolt = <1000000>;
  159. regulator-max-microvolt = <1000000>;
  160. regulator-always-on;
  161. regulator-boot-on;
  162. vin-supply = <&vcc_sys>;
  163. };
  164. };
  165. &emmc {
  166. bus-width = <8>;
  167. cap-mmc-highspeed;
  168. disable-wp;
  169. mmc-pwrseq = <&emmc_pwrseq>;
  170. non-removable;
  171. num-slots = <1>;
  172. pinctrl-names = "default";
  173. pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
  174. status = "okay";
  175. };
  176. &gmac {
  177. phy-supply = <&vcc_lan>;
  178. phy-mode = "rmii";
  179. clock_in_out = "output";
  180. snps,reset-gpio = <&gpio3 12 0>;
  181. snps,reset-active-low;
  182. snps,reset-delays-us = <0 10000 1000000>;
  183. pinctrl-names = "default";
  184. pinctrl-0 = <&rmii_pins>;
  185. tx_delay = <0x30>;
  186. rx_delay = <0x10>;
  187. status = "ok";
  188. };
  189. &i2c0 {
  190. status = "okay";
  191. vdd_cpu: syr827@40 {
  192. compatible = "silergy,syr827";
  193. reg = <0x40>;
  194. fcs,suspend-voltage-selector = <1>;
  195. regulator-name = "vdd_cpu";
  196. regulator-enable-ramp-delay = <300>;
  197. regulator-min-microvolt = <712500>;
  198. regulator-max-microvolt = <1500000>;
  199. regulator-ramp-delay = <8000>;
  200. regulator-always-on;
  201. regulator-boot-on;
  202. vin-supply = <&vcc_sys>;
  203. };
  204. hym8563: hym8563@51 {
  205. compatible = "haoyu,hym8563";
  206. reg = <0x51>;
  207. #clock-cells = <0>;
  208. clock-frequency = <32768>;
  209. clock-output-names = "xin32k";
  210. /* rtc_int is not connected */
  211. };
  212. };
  213. &io_domains {
  214. status = "ok";
  215. audio-supply = <&vcc_io>;
  216. gpio30-supply = <&vcc_io>;
  217. gpio1830-supply = <&vcc_io>;
  218. wifi-supply = <&vccio_wl>;
  219. };
  220. &sdio0 {
  221. assigned-clocks = <&cru SCLK_SDIO0>;
  222. assigned-clock-parents = <&cru PLL_CPLL>;
  223. bus-width = <4>;
  224. cap-sd-highspeed;
  225. cap-sdio-irq;
  226. keep-power-in-suspend;
  227. mmc-pwrseq = <&sdio_pwrseq>;
  228. non-removable;
  229. num-slots = <1>;
  230. pinctrl-names = "default";
  231. pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_bus4>;
  232. vmmc-supply = <&vcc_io>;
  233. vqmmc-supply = <&vccio_wl>;
  234. status = "okay";
  235. };
  236. &pinctrl {
  237. pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
  238. bias-disable;
  239. drive-strength = <8>;
  240. };
  241. pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
  242. bias-pull-up;
  243. drive-strength = <8>;
  244. };
  245. emmc {
  246. emmc_bus8: emmc-bus8 {
  247. rockchip,pins = <1 18 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
  248. <1 19 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
  249. <1 20 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
  250. <1 21 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
  251. <1 22 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
  252. <1 23 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
  253. <1 24 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
  254. <1 25 RK_FUNC_2 &pcfg_pull_up_drv_8ma>;
  255. };
  256. emmc-clk {
  257. rockchip,pins = <2 4 RK_FUNC_2 &pcfg_pull_none_drv_8ma>;
  258. };
  259. emmc-cmd {
  260. rockchip,pins = <1 26 RK_FUNC_2 &pcfg_pull_up_drv_8ma>;
  261. };
  262. emmc_reset: emmc-reset {
  263. rockchip,pins = <2 3 RK_FUNC_GPIO &pcfg_pull_none>;
  264. };
  265. };
  266. ir {
  267. ir_int: ir-int {
  268. rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_up>;
  269. };
  270. };
  271. keys {
  272. pwr_key: pwr-key {
  273. rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_up>;
  274. };
  275. };
  276. leds {
  277. stby_pwren: stby-pwren {
  278. rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
  279. };
  280. led_ctl: led-ctl {
  281. rockchip,pins = <3 29 RK_FUNC_GPIO &pcfg_pull_none>;
  282. };
  283. };
  284. sdio {
  285. wifi_reg_on: wifi-reg-on {
  286. rockchip,pins = <3 4 RK_FUNC_GPIO &pcfg_pull_none>;
  287. };
  288. bt_rst: bt-rst {
  289. rockchip,pins = <3 5 RK_FUNC_GPIO &pcfg_pull_none>;
  290. };
  291. };
  292. usb {
  293. host_vbus_drv: host-vbus-drv {
  294. rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_none>;
  295. };
  296. };
  297. };
  298. &pmu_io_domains {
  299. status = "okay";
  300. pmu-supply = <&vcc_io>;
  301. vop-supply = <&vcc_io>;
  302. };
  303. &saradc {
  304. vref-supply = <&vcc_18>;
  305. status = "okay";
  306. };
  307. &tsadc {
  308. rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
  309. rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
  310. status = "okay";
  311. };
  312. &uart2 {
  313. status = "okay";
  314. };
  315. &usb_host0_ehci {
  316. status = "okay";
  317. };
  318. &usb_otg {
  319. dr_mode = "host";
  320. status = "okay";
  321. };
  322. &wdt {
  323. status = "okay";
  324. };