rk3368-r88.dts 8.2 KB

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