rk3328-rock64.dts 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. /*
  2. * Copyright (c) 2017 PINE64
  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 library 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 library 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 "rk3328.dtsi"
  44. / {
  45. model = "Pine64 Rock64";
  46. compatible = "pine64,rock64", "rockchip,rk3328";
  47. chosen {
  48. stdout-path = "serial2:1500000n8";
  49. };
  50. gmac_clkin: external-gmac-clock {
  51. compatible = "fixed-clock";
  52. clock-frequency = <125000000>;
  53. clock-output-names = "gmac_clkin";
  54. #clock-cells = <0>;
  55. };
  56. vcc_sd: sdmmc-regulator {
  57. compatible = "regulator-fixed";
  58. gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
  59. pinctrl-names = "default";
  60. pinctrl-0 = <&sdmmc0m1_gpio>;
  61. regulator-name = "vcc_sd";
  62. regulator-min-microvolt = <3300000>;
  63. regulator-max-microvolt = <3300000>;
  64. vin-supply = <&vcc_io>;
  65. };
  66. vcc_host_5v: vcc-host-5v-regulator {
  67. compatible = "regulator-fixed";
  68. enable-active-high;
  69. gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
  70. pinctrl-names = "default";
  71. pinctrl-0 = <&usb30_host_drv>;
  72. regulator-name = "vcc_host_5v";
  73. regulator-always-on;
  74. vin-supply = <&vcc_sys>;
  75. };
  76. vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
  77. compatible = "regulator-fixed";
  78. enable-active-high;
  79. gpio = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
  80. pinctrl-names = "default";
  81. pinctrl-0 = <&usb20_host_drv>;
  82. regulator-name = "vcc_host1_5v";
  83. regulator-always-on;
  84. vin-supply = <&vcc_sys>;
  85. };
  86. vcc_sys: vcc-sys {
  87. compatible = "regulator-fixed";
  88. regulator-name = "vcc_sys";
  89. regulator-always-on;
  90. regulator-boot-on;
  91. regulator-min-microvolt = <5000000>;
  92. regulator-max-microvolt = <5000000>;
  93. };
  94. };
  95. &cpu0 {
  96. cpu-supply = <&vdd_arm>;
  97. };
  98. &cpu1 {
  99. cpu-supply = <&vdd_arm>;
  100. };
  101. &cpu2 {
  102. cpu-supply = <&vdd_arm>;
  103. };
  104. &cpu3 {
  105. cpu-supply = <&vdd_arm>;
  106. };
  107. &emmc {
  108. bus-width = <8>;
  109. cap-mmc-highspeed;
  110. non-removable;
  111. pinctrl-names = "default";
  112. pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
  113. vmmc-supply = <&vcc_io>;
  114. vqmmc-supply = <&vcc18_emmc>;
  115. status = "okay";
  116. };
  117. &gmac2io {
  118. assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
  119. assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
  120. clock_in_out = "input";
  121. phy-supply = <&vcc_io>;
  122. phy-mode = "rgmii";
  123. pinctrl-names = "default";
  124. pinctrl-0 = <&rgmiim1_pins>;
  125. snps,force_thresh_dma_mode;
  126. snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
  127. snps,reset-active-low;
  128. snps,reset-delays-us = <0 10000 50000>;
  129. tx_delay = <0x24>;
  130. rx_delay = <0x18>;
  131. status = "okay";
  132. };
  133. &i2c1 {
  134. status = "okay";
  135. rk805: rk805@18 {
  136. compatible = "rockchip,rk805";
  137. reg = <0x18>;
  138. interrupt-parent = <&gpio2>;
  139. interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
  140. #clock-cells = <1>;
  141. clock-output-names = "xin32k", "rk805-clkout2";
  142. pinctrl-names = "default";
  143. pinctrl-0 = <&pmic_int_l>;
  144. rockchip,system-power-controller;
  145. wakeup-source;
  146. vcc1-supply = <&vcc_sys>;
  147. vcc2-supply = <&vcc_sys>;
  148. vcc3-supply = <&vcc_sys>;
  149. vcc4-supply = <&vcc_sys>;
  150. vcc5-supply = <&vcc_io>;
  151. vcc6-supply = <&vcc_sys>;
  152. regulators {
  153. vdd_logic: DCDC_REG1 {
  154. regulator-name = "vdd_logic";
  155. regulator-min-microvolt = <712500>;
  156. regulator-max-microvolt = <1450000>;
  157. regulator-ramp-delay = <12500>;
  158. regulator-always-on;
  159. regulator-boot-on;
  160. regulator-state-mem {
  161. regulator-on-in-suspend;
  162. regulator-suspend-microvolt = <1000000>;
  163. };
  164. };
  165. vdd_arm: DCDC_REG2 {
  166. regulator-name = "vdd_arm";
  167. regulator-min-microvolt = <712500>;
  168. regulator-max-microvolt = <1450000>;
  169. regulator-ramp-delay = <12500>;
  170. regulator-always-on;
  171. regulator-boot-on;
  172. regulator-state-mem {
  173. regulator-on-in-suspend;
  174. regulator-suspend-microvolt = <950000>;
  175. };
  176. };
  177. vcc_ddr: DCDC_REG3 {
  178. regulator-name = "vcc_ddr";
  179. regulator-always-on;
  180. regulator-boot-on;
  181. regulator-state-mem {
  182. regulator-on-in-suspend;
  183. };
  184. };
  185. vcc_io: DCDC_REG4 {
  186. regulator-name = "vcc_io";
  187. regulator-min-microvolt = <3300000>;
  188. regulator-max-microvolt = <3300000>;
  189. regulator-always-on;
  190. regulator-boot-on;
  191. regulator-state-mem {
  192. regulator-on-in-suspend;
  193. regulator-suspend-microvolt = <3300000>;
  194. };
  195. };
  196. vcc_18: LDO_REG1 {
  197. regulator-name = "vdd_18";
  198. regulator-min-microvolt = <1800000>;
  199. regulator-max-microvolt = <1800000>;
  200. regulator-always-on;
  201. regulator-boot-on;
  202. regulator-state-mem {
  203. regulator-on-in-suspend;
  204. regulator-suspend-microvolt = <1800000>;
  205. };
  206. };
  207. vcc18_emmc: LDO_REG2 {
  208. regulator-name = "vcc_18emmc";
  209. regulator-min-microvolt = <1800000>;
  210. regulator-max-microvolt = <1800000>;
  211. regulator-always-on;
  212. regulator-boot-on;
  213. regulator-state-mem {
  214. regulator-on-in-suspend;
  215. regulator-suspend-microvolt = <1800000>;
  216. };
  217. };
  218. vdd_10: LDO_REG3 {
  219. regulator-name = "vdd_10";
  220. regulator-min-microvolt = <1000000>;
  221. regulator-max-microvolt = <1000000>;
  222. regulator-always-on;
  223. regulator-boot-on;
  224. regulator-state-mem {
  225. regulator-on-in-suspend;
  226. regulator-suspend-microvolt = <1000000>;
  227. };
  228. };
  229. };
  230. };
  231. };
  232. &io_domains {
  233. status = "okay";
  234. vccio1-supply = <&vcc_io>;
  235. vccio2-supply = <&vcc18_emmc>;
  236. vccio3-supply = <&vcc_io>;
  237. vccio4-supply = <&vcc_18>;
  238. vccio5-supply = <&vcc_io>;
  239. vccio6-supply = <&vcc_io>;
  240. pmuio-supply = <&vcc_io>;
  241. };
  242. &pinctrl {
  243. pmic {
  244. pmic_int_l: pmic-int-l {
  245. rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
  246. };
  247. };
  248. usb2 {
  249. usb20_host_drv: usb20-host-drv {
  250. rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
  251. };
  252. };
  253. usb3 {
  254. usb30_host_drv: usb30-host-drv {
  255. rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
  256. };
  257. };
  258. };
  259. &sdmmc {
  260. bus-width = <4>;
  261. cap-mmc-highspeed;
  262. cap-sd-highspeed;
  263. disable-wp;
  264. max-frequency = <150000000>;
  265. pinctrl-names = "default";
  266. pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
  267. vmmc-supply = <&vcc_sd>;
  268. status = "okay";
  269. };
  270. &tsadc {
  271. rockchip,hw-tshut-mode = <0>;
  272. rockchip,hw-tshut-polarity = <0>;
  273. status = "okay";
  274. };
  275. &uart2 {
  276. status = "okay";
  277. };
  278. &u2phy {
  279. status = "okay";
  280. u2phy_host: host-port {
  281. status = "okay";
  282. };
  283. u2phy_otg: otg-port {
  284. status = "okay";
  285. };
  286. };
  287. &usb20_otg {
  288. dr_mode = "host";
  289. status = "okay";
  290. };
  291. &usb_host0_ehci {
  292. status = "okay";
  293. };
  294. &usb_host0_ohci {
  295. status = "okay";
  296. };