rk3368-geekbox.dts 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. /*
  2. * Copyright (c) 2016 Andreas Färber
  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 = "GeekBox";
  47. compatible = "geekbuying,geekbox", "rockchip,rk3368";
  48. chosen {
  49. stdout-path = "serial2:115200n8";
  50. };
  51. memory@0 {
  52. device_type = "memory";
  53. reg = <0x0 0x0 0x0 0x80000000>;
  54. };
  55. ext_gmac: gmac-clk {
  56. compatible = "fixed-clock";
  57. clock-frequency = <125000000>;
  58. clock-output-names = "ext_gmac";
  59. #clock-cells = <0>;
  60. };
  61. ir: ir-receiver {
  62. compatible = "gpio-ir-receiver";
  63. gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
  64. pinctrl-names = "default";
  65. pinctrl-0 = <&ir_int>;
  66. };
  67. keys: gpio-keys {
  68. compatible = "gpio-keys";
  69. pinctrl-names = "default";
  70. pinctrl-0 = <&pwr_key>;
  71. power {
  72. gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  73. label = "GPIO Power";
  74. linux,code = <KEY_POWER>;
  75. wakeup-source;
  76. };
  77. };
  78. leds: gpio-leds {
  79. compatible = "gpio-leds";
  80. blue {
  81. gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
  82. label = "geekbox:blue:led";
  83. default-state = "on";
  84. };
  85. red {
  86. gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
  87. label = "geekbox:red:led";
  88. default-state = "off";
  89. };
  90. };
  91. vcc_sys: vcc-sys-regulator {
  92. compatible = "regulator-fixed";
  93. regulator-name = "vcc_sys";
  94. regulator-min-microvolt = <5000000>;
  95. regulator-max-microvolt = <5000000>;
  96. regulator-always-on;
  97. regulator-boot-on;
  98. };
  99. };
  100. &emmc {
  101. status = "okay";
  102. bus-width = <8>;
  103. cap-mmc-highspeed;
  104. clock-frequency = <150000000>;
  105. disable-wp;
  106. non-removable;
  107. num-slots = <1>;
  108. vmmc-supply = <&vcc_io>;
  109. vqmmc-supply = <&vcc18_flash>;
  110. pinctrl-names = "default";
  111. pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
  112. };
  113. &gmac {
  114. status = "okay";
  115. phy-supply = <&vcc_lan>;
  116. phy-mode = "rgmii";
  117. clock_in_out = "input";
  118. assigned-clocks = <&cru SCLK_MAC>;
  119. assigned-clock-parents = <&ext_gmac>;
  120. pinctrl-names = "default";
  121. pinctrl-0 = <&rgmii_pins>;
  122. tx_delay = <0x30>;
  123. rx_delay = <0x10>;
  124. };
  125. &i2c0 {
  126. status = "okay";
  127. rk808: pmic@1b {
  128. compatible = "rockchip,rk808";
  129. reg = <0x1b>;
  130. pinctrl-names = "default";
  131. pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
  132. interrupt-parent = <&gpio0>;
  133. interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
  134. rockchip,system-power-controller;
  135. vcc1-supply = <&vcc_sys>;
  136. vcc2-supply = <&vcc_sys>;
  137. vcc3-supply = <&vcc_sys>;
  138. vcc4-supply = <&vcc_sys>;
  139. vcc6-supply = <&vcc_sys>;
  140. vcc7-supply = <&vcc_sys>;
  141. vcc8-supply = <&vcc_io>;
  142. vcc9-supply = <&vcc_sys>;
  143. vcc10-supply = <&vcc_sys>;
  144. vcc11-supply = <&vcc_sys>;
  145. vcc12-supply = <&vcc_io>;
  146. clock-output-names = "xin32k", "rk808-clkout2";
  147. #clock-cells = <1>;
  148. regulators {
  149. vdd_cpu: DCDC_REG1 {
  150. regulator-always-on;
  151. regulator-boot-on;
  152. regulator-min-microvolt = <700000>;
  153. regulator-max-microvolt = <1500000>;
  154. regulator-name = "vdd_cpu";
  155. };
  156. vdd_log: DCDC_REG2 {
  157. regulator-always-on;
  158. regulator-boot-on;
  159. regulator-min-microvolt = <700000>;
  160. regulator-max-microvolt = <1500000>;
  161. regulator-name = "vdd_log";
  162. };
  163. vcc_ddr: DCDC_REG3 {
  164. regulator-always-on;
  165. regulator-boot-on;
  166. regulator-name = "vcc_ddr";
  167. };
  168. vcc_io: DCDC_REG4 {
  169. regulator-always-on;
  170. regulator-boot-on;
  171. regulator-min-microvolt = <3300000>;
  172. regulator-max-microvolt = <3300000>;
  173. regulator-name = "vcc_io";
  174. };
  175. vcc18_flash: LDO_REG1 {
  176. regulator-always-on;
  177. regulator-boot-on;
  178. regulator-min-microvolt = <1800000>;
  179. regulator-max-microvolt = <1800000>;
  180. regulator-name = "vcc18_flash";
  181. };
  182. vcc33_lcd: LDO_REG2 {
  183. regulator-always-on;
  184. regulator-boot-on;
  185. regulator-min-microvolt = <3300000>;
  186. regulator-max-microvolt = <3300000>;
  187. regulator-name = "vcc33_lcd";
  188. };
  189. vdd_10: LDO_REG3 {
  190. regulator-always-on;
  191. regulator-boot-on;
  192. regulator-min-microvolt = <1000000>;
  193. regulator-max-microvolt = <1000000>;
  194. regulator-name = "vdd_10";
  195. };
  196. vcca_18: LDO_REG4 {
  197. regulator-boot-on;
  198. regulator-min-microvolt = <1800000>;
  199. regulator-max-microvolt = <1800000>;
  200. regulator-name = "vcca_18";
  201. };
  202. vccio_sd: LDO_REG5 {
  203. regulator-always-on;
  204. regulator-boot-on;
  205. regulator-min-microvolt = <1800000>;
  206. regulator-max-microvolt = <3300000>;
  207. regulator-name = "vccio_sd";
  208. };
  209. vdd10_lcd: LDO_REG6 {
  210. regulator-always-on;
  211. regulator-boot-on;
  212. regulator-min-microvolt = <1000000>;
  213. regulator-max-microvolt = <1000000>;
  214. regulator-name = "vdd10_lcd";
  215. };
  216. vcc_18: LDO_REG7 {
  217. regulator-always-on;
  218. regulator-boot-on;
  219. regulator-min-microvolt = <1800000>;
  220. regulator-max-microvolt = <1800000>;
  221. regulator-name = "vcc_18";
  222. };
  223. vcc18_lcd: LDO_REG8 {
  224. regulator-always-on;
  225. regulator-boot-on;
  226. regulator-min-microvolt = <1800000>;
  227. regulator-max-microvolt = <1800000>;
  228. regulator-name = "vcc18_lcd";
  229. };
  230. vcc_sd: SWITCH_REG1 {
  231. regulator-name = "vcc_sd";
  232. };
  233. vcc_lan: SWITCH_REG2 {
  234. regulator-always-on;
  235. regulator-boot-on;
  236. regulator-name = "vcc_lan";
  237. };
  238. };
  239. };
  240. };
  241. &pinctrl {
  242. ir {
  243. ir_int: ir-int {
  244. rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_none>;
  245. };
  246. };
  247. keys {
  248. pwr_key: pwr-key {
  249. rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_none>;
  250. };
  251. };
  252. pmic {
  253. pmic_sleep: pmic-sleep {
  254. rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
  255. };
  256. pmic_int: pmic-int {
  257. rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
  258. };
  259. };
  260. };
  261. &tsadc {
  262. status = "okay";
  263. rockchip,hw-tshut-mode = <0>; /* CRU */
  264. rockchip,hw-tshut-polarity = <1>; /* high */
  265. };
  266. &uart2 {
  267. status = "okay";
  268. };
  269. &usb_host0_ehci {
  270. status = "okay";
  271. };
  272. &usb_otg {
  273. status = "okay";
  274. };
  275. &wdt {
  276. status = "okay";
  277. };