rk3288-vmarc-som.dtsi 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
  4. * Copyright (c) 2019 Vamrs Limited
  5. * Copyright (c) 2019 Amarula Solutions(India)
  6. */
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/pinctrl/rockchip.h>
  9. / {
  10. compatible = "vamrs,rk3288-vmarc-som", "rockchip,rk3288";
  11. vccio_flash: vccio-flash-regulator {
  12. compatible = "regulator-fixed";
  13. regulator-name = "vccio_flash";
  14. regulator-min-microvolt = <1800000>;
  15. regulator-max-microvolt = <1800000>;
  16. vin-supply = <&vcc_io>;
  17. };
  18. };
  19. &emmc {
  20. bus-width = <8>;
  21. cap-mmc-highspeed;
  22. disable-wp;
  23. non-removable;
  24. pinctrl-names = "default";
  25. pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
  26. vmmc-supply = <&vcc_io>;
  27. vqmmc-supply = <&vccio_flash>;
  28. status = "okay";
  29. };
  30. &gmac {
  31. assigned-clocks = <&cru SCLK_MAC>;
  32. phy-supply = <&vcc_io>;
  33. snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
  34. };
  35. &hdmi {
  36. ddc-i2c-bus = <&i2c5>;
  37. pinctrl-names = "default";
  38. pinctrl-0 = <&hdmi_cec_c0>;
  39. };
  40. &i2c0 {
  41. clock-frequency = <400000>;
  42. status = "okay";
  43. rk808: pmic@1b {
  44. compatible = "rockchip,rk808";
  45. reg = <0x1b>;
  46. interrupt-parent = <&gpio0>;
  47. interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
  48. pinctrl-names = "default";
  49. pinctrl-0 = <&pmic_int &global_pwroff>;
  50. rockchip,system-power-controller;
  51. wakeup-source;
  52. #clock-cells = <1>;
  53. clock-output-names = "rk808-clkout1", "rk808-clkout2";
  54. vcc1-supply = <&vcc5v0_sys>;
  55. vcc2-supply = <&vcc5v0_sys>;
  56. vcc3-supply = <&vcc5v0_sys>;
  57. vcc4-supply = <&vcc5v0_sys>;
  58. vcc6-supply = <&vcc5v0_sys>;
  59. vcc7-supply = <&vcc5v0_sys>;
  60. vcc8-supply = <&vcc_io>;
  61. vcc9-supply = <&vcc_io>;
  62. vcc10-supply = <&vcc5v0_sys>;
  63. vcc11-supply = <&vcc5v0_sys>;
  64. vcc12-supply = <&vcc_io>;
  65. vddio-supply = <&vcc_io>;
  66. regulators {
  67. vdd_cpu: DCDC_REG1 {
  68. regulator-name = "vdd_arm";
  69. regulator-always-on;
  70. regulator-boot-on;
  71. regulator-min-microvolt = <750000>;
  72. regulator-max-microvolt = <1400000>;
  73. regulator-state-mem {
  74. regulator-off-in-suspend;
  75. };
  76. };
  77. vdd_gpu: DCDC_REG2 {
  78. regulator-name = "vdd_gpu";
  79. regulator-always-on;
  80. regulator-boot-on;
  81. regulator-min-microvolt = <850000>;
  82. regulator-max-microvolt = <1250000>;
  83. regulator-ramp-delay = <6000>;
  84. regulator-state-mem {
  85. regulator-off-in-suspend;
  86. };
  87. };
  88. vcc_ddr: DCDC_REG3 {
  89. regulator-name = "vcc_ddr";
  90. regulator-always-on;
  91. regulator-boot-on;
  92. regulator-state-mem {
  93. regulator-on-in-suspend;
  94. };
  95. };
  96. vcc_io: DCDC_REG4 {
  97. regulator-name = "vcc_io";
  98. regulator-always-on;
  99. regulator-boot-on;
  100. regulator-min-microvolt = <3300000>;
  101. regulator-max-microvolt = <3300000>;
  102. regulator-state-mem {
  103. regulator-on-in-suspend;
  104. regulator-suspend-microvolt = <3300000>;
  105. };
  106. };
  107. vcc_tp: LDO_REG1 {
  108. regulator-name = "vcc_tp";
  109. regulator-always-on;
  110. regulator-boot-on;
  111. regulator-min-microvolt = <3300000>;
  112. regulator-max-microvolt = <3300000>;
  113. regulator-state-mem {
  114. regulator-off-in-suspend;
  115. };
  116. };
  117. vcca_codec: LDO_REG2 {
  118. regulator-name = "vcca_codec";
  119. regulator-always-on;
  120. regulator-boot-on;
  121. regulator-min-microvolt = <3300000>;
  122. regulator-max-microvolt = <3300000>;
  123. regulator-state-mem {
  124. regulator-on-in-suspend;
  125. regulator-suspend-microvolt = <3300000>;
  126. };
  127. };
  128. vdd_10: LDO_REG3 {
  129. regulator-name = "vdd_10";
  130. regulator-always-on;
  131. regulator-boot-on;
  132. regulator-min-microvolt = <1000000>;
  133. regulator-max-microvolt = <1000000>;
  134. regulator-state-mem {
  135. regulator-on-in-suspend;
  136. regulator-suspend-microvolt = <1000000>;
  137. };
  138. };
  139. vcc_wl: LDO_REG4 {
  140. regulator-name = "vcc_wl";
  141. regulator-always-on;
  142. regulator-boot-on;
  143. regulator-min-microvolt = <1800000>;
  144. regulator-max-microvolt = <1800000>;
  145. regulator-state-mem {
  146. regulator-on-in-suspend;
  147. };
  148. };
  149. vccio_sd: LDO_REG5 {
  150. regulator-name = "vccio_sd";
  151. regulator-always-on;
  152. regulator-boot-on;
  153. regulator-min-microvolt = <1800000>;
  154. regulator-max-microvolt = <3300000>;
  155. regulator-state-mem {
  156. regulator-on-in-suspend;
  157. regulator-suspend-microvolt = <3300000>;
  158. };
  159. };
  160. vdd10_lcd: LDO_REG6 {
  161. regulator-name = "vdd10_lcd";
  162. regulator-always-on;
  163. regulator-boot-on;
  164. regulator-min-microvolt = <1000000>;
  165. regulator-max-microvolt = <1000000>;
  166. regulator-state-mem {
  167. regulator-off-in-suspend;
  168. };
  169. };
  170. vcc_18: LDO_REG7 {
  171. regulator-name = "vcc_18";
  172. regulator-always-on;
  173. regulator-boot-on;
  174. regulator-min-microvolt = <1800000>;
  175. regulator-max-microvolt = <1800000>;
  176. regulator-state-mem {
  177. regulator-on-in-suspend;
  178. regulator-suspend-microvolt = <1800000>;
  179. };
  180. };
  181. vcc18_lcd: LDO_REG8 {
  182. regulator-name = "vcc18_lcd";
  183. regulator-always-on;
  184. regulator-boot-on;
  185. regulator-min-microvolt = <1800000>;
  186. regulator-max-microvolt = <1800000>;
  187. regulator-state-mem {
  188. regulator-off-in-suspend;
  189. };
  190. };
  191. vcc_sd: SWITCH_REG1 {
  192. regulator-name = "vcc_sd";
  193. regulator-always-on;
  194. regulator-boot-on;
  195. regulator-state-mem {
  196. regulator-off-in-suspend;
  197. };
  198. };
  199. vcc_lcd: SWITCH_REG2 {
  200. regulator-name = "vcc_lcd";
  201. regulator-always-on;
  202. regulator-boot-on;
  203. regulator-state-mem {
  204. regulator-off-in-suspend;
  205. };
  206. };
  207. };
  208. };
  209. };
  210. &i2c1 {
  211. clock-frequency = <400000>;
  212. status = "okay";
  213. hym8563: rtc@51 {
  214. compatible = "haoyu,hym8563";
  215. reg = <0x51>;
  216. interrupt-parent = <&gpio5>;
  217. interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
  218. #clock-cells = <0>;
  219. clock-output-names = "hym8563";
  220. pinctrl-names = "default";
  221. pinctrl-0 = <&hym8563_int>;
  222. };
  223. };
  224. &i2c5 {
  225. status = "okay";
  226. };
  227. &io_domains {
  228. bb-supply = <&vcc_io>;
  229. flash0-supply = <&vccio_flash>;
  230. gpio1830-supply = <&vcc_18>;
  231. gpio30-supply = <&vcc_io>;
  232. sdcard-supply = <&vccio_sd>;
  233. wifi-supply = <&vcc_wl>;
  234. status = "okay";
  235. };
  236. &pinctrl {
  237. hym8563 {
  238. hym8563_int: hym8563-int {
  239. rockchip,pins = <5 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
  240. };
  241. };
  242. pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
  243. drive-strength = <8>;
  244. };
  245. pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
  246. bias-pull-up;
  247. drive-strength = <8>;
  248. };
  249. pmic {
  250. pmic_int: pmic-int {
  251. rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
  252. };
  253. };
  254. sdio-pwrseq {
  255. wifi_enable_h: wifi-enable-h {
  256. rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
  257. };
  258. };
  259. sdmmc {
  260. sdmmc_bus4: sdmmc-bus4 {
  261. rockchip,pins =
  262. <6 RK_PC0 1 &pcfg_pull_up_drv_8ma>,
  263. <6 RK_PC1 1 &pcfg_pull_up_drv_8ma>,
  264. <6 RK_PC2 1 &pcfg_pull_up_drv_8ma>,
  265. <6 RK_PC3 1 &pcfg_pull_up_drv_8ma>;
  266. };
  267. sdmmc_clk: sdmmc-clk {
  268. rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>;
  269. };
  270. sdmmc_cmd: sdmmc-cmd {
  271. rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>;
  272. };
  273. };
  274. vbus_host {
  275. usb1_en_oc: usb1-en-oc {
  276. rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
  277. };
  278. };
  279. vbus_typec {
  280. usb0_en_oc: usb0-en-oc {
  281. rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
  282. };
  283. };
  284. };
  285. &sdio_pwrseq {
  286. /*
  287. * On the module itself this is one of these (depending
  288. * on the actual card populated):
  289. * - SDIO_RESET_L_WL_REG_ON
  290. * - PDN (power down when low)
  291. */
  292. reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>; /* WIFI_REG_ON */
  293. };
  294. &usbphy {
  295. status = "okay";
  296. };
  297. &usb_host0_ehci {
  298. status = "okay";
  299. };
  300. &usb_host0_ohci {
  301. status = "okay";
  302. };
  303. &usb_host1 {
  304. status = "okay";
  305. };
  306. &usb_otg {
  307. status = "okay";
  308. };
  309. &vbus_host {
  310. enable-active-high;
  311. gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */
  312. };
  313. &vbus_typec {
  314. enable-active-high;
  315. gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */
  316. };