rk3328-rock-pi-e.dts 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * (C) Copyright 2020 Chen-Yu Tsai <[email protected]>
  4. *
  5. * Based on ./rk3328-rock64.dts, which is
  6. *
  7. * Copyright (c) 2017 PINE64
  8. */
  9. /dts-v1/;
  10. #include <dt-bindings/gpio/gpio.h>
  11. #include <dt-bindings/input/input.h>
  12. #include <dt-bindings/leds/common.h>
  13. #include <dt-bindings/pinctrl/rockchip.h>
  14. #include "rk3328.dtsi"
  15. / {
  16. model = "Radxa ROCK Pi E";
  17. compatible = "radxa,rockpi-e", "rockchip,rk3328";
  18. aliases {
  19. mmc0 = &sdmmc;
  20. mmc1 = &emmc;
  21. };
  22. chosen {
  23. stdout-path = "serial2:1500000n8";
  24. };
  25. adc-keys {
  26. compatible = "adc-keys";
  27. io-channels = <&saradc 0>;
  28. io-channel-names = "buttons";
  29. keyup-threshold-microvolt = <1750000>;
  30. /* This button is unpopulated out of the factory. */
  31. button-recovery {
  32. label = "Recovery";
  33. linux,code = <KEY_VENDOR>;
  34. press-threshold-microvolt = <10000>;
  35. };
  36. };
  37. gmac_clkin: external-gmac-clock {
  38. compatible = "fixed-clock";
  39. clock-frequency = <125000000>;
  40. clock-output-names = "gmac_clkin";
  41. #clock-cells = <0>;
  42. };
  43. leds {
  44. compatible = "gpio-leds";
  45. pinctrl-0 = <&led_pin>;
  46. pinctrl-names = "default";
  47. led-0 {
  48. color = <LED_COLOR_ID_BLUE>;
  49. gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
  50. linux,default-trigger = "heartbeat";
  51. };
  52. };
  53. vcc_sd: sdmmc-regulator {
  54. compatible = "regulator-fixed";
  55. gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
  56. pinctrl-names = "default";
  57. pinctrl-0 = <&sdmmc0m1_pin>;
  58. regulator-name = "vcc_sd";
  59. regulator-boot-on;
  60. vin-supply = <&vcc_io>;
  61. };
  62. vcc_host_5v: vcc-host-5v-regulator {
  63. compatible = "regulator-fixed";
  64. gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&usb30_host_drv>;
  67. enable-active-high;
  68. regulator-name = "vcc_host_5v";
  69. regulator-always-on;
  70. regulator-boot-on;
  71. vin-supply = <&vcc_sys>;
  72. };
  73. vcc_sys: vcc-sys {
  74. compatible = "regulator-fixed";
  75. regulator-name = "vcc_sys";
  76. regulator-always-on;
  77. regulator-boot-on;
  78. regulator-min-microvolt = <5000000>;
  79. regulator-max-microvolt = <5000000>;
  80. };
  81. vcc_wifi: vcc-wifi-regulator {
  82. compatible = "regulator-fixed";
  83. gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
  84. pinctrl-names = "default";
  85. pinctrl-0 = <&wifi_en>;
  86. regulator-name = "vcc_wifi";
  87. regulator-always-on;
  88. regulator-boot-on;
  89. vin-supply = <&vcc_io>;
  90. };
  91. };
  92. &analog_sound {
  93. status = "okay";
  94. };
  95. &codec {
  96. status = "okay";
  97. };
  98. &cpu0 {
  99. cpu-supply = <&vdd_arm>;
  100. };
  101. &cpu1 {
  102. cpu-supply = <&vdd_arm>;
  103. };
  104. &cpu2 {
  105. cpu-supply = <&vdd_arm>;
  106. };
  107. &cpu3 {
  108. cpu-supply = <&vdd_arm>;
  109. };
  110. &emmc {
  111. bus-width = <8>;
  112. cap-mmc-highspeed;
  113. mmc-ddr-1_8v;
  114. mmc-hs200-1_8v;
  115. non-removable;
  116. pinctrl-names = "default";
  117. pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
  118. vmmc-supply = <&vcc_io>;
  119. vqmmc-supply = <&vcc18_emmc>;
  120. status = "okay";
  121. };
  122. &gmac2io {
  123. assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
  124. assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
  125. clock_in_out = "input";
  126. phy-handle = <&rtl8211e>;
  127. phy-mode = "rgmii";
  128. phy-supply = <&vcc_io>;
  129. pinctrl-names = "default";
  130. pinctrl-0 = <&rgmiim1_pins>;
  131. snps,aal;
  132. snps,rxpbl = <0x4>;
  133. snps,txpbl = <0x4>;
  134. tx_delay = <0x26>;
  135. rx_delay = <0x11>;
  136. status = "okay";
  137. mdio {
  138. compatible = "snps,dwmac-mdio";
  139. #address-cells = <1>;
  140. #size-cells = <0>;
  141. rtl8211e: ethernet-phy@1 {
  142. reg = <1>;
  143. pinctrl-0 = <&eth_phy_int_pin>, <&eth_phy_reset_pin>;
  144. pinctrl-names = "default";
  145. interrupt-parent = <&gpio1>;
  146. interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
  147. reset-assert-us = <10000>;
  148. reset-deassert-us = <50000>;
  149. reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
  150. };
  151. };
  152. };
  153. &gmac2phy {
  154. status = "okay";
  155. };
  156. &i2c1 {
  157. status = "okay";
  158. rk805: pmic@18 {
  159. compatible = "rockchip,rk805";
  160. reg = <0x18>;
  161. interrupt-parent = <&gpio2>;
  162. interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
  163. #clock-cells = <1>;
  164. clock-output-names = "xin32k", "rk805-clkout2";
  165. gpio-controller;
  166. #gpio-cells = <2>;
  167. pinctrl-names = "default";
  168. pinctrl-0 = <&pmic_int_l>;
  169. rockchip,system-power-controller;
  170. wakeup-source;
  171. vcc1-supply = <&vcc_sys>;
  172. vcc2-supply = <&vcc_sys>;
  173. vcc3-supply = <&vcc_sys>;
  174. vcc4-supply = <&vcc_sys>;
  175. vcc5-supply = <&vcc_io>;
  176. vcc6-supply = <&vcc_sys>;
  177. regulators {
  178. vdd_log: DCDC_REG1 {
  179. regulator-name = "vdd_log";
  180. regulator-always-on;
  181. regulator-boot-on;
  182. regulator-min-microvolt = <712500>;
  183. regulator-max-microvolt = <1450000>;
  184. regulator-ramp-delay = <12500>;
  185. regulator-state-mem {
  186. regulator-on-in-suspend;
  187. regulator-suspend-microvolt = <1000000>;
  188. };
  189. };
  190. vdd_arm: DCDC_REG2 {
  191. regulator-name = "vdd_arm";
  192. regulator-always-on;
  193. regulator-boot-on;
  194. regulator-min-microvolt = <712500>;
  195. regulator-max-microvolt = <1450000>;
  196. regulator-ramp-delay = <12500>;
  197. regulator-state-mem {
  198. regulator-on-in-suspend;
  199. regulator-suspend-microvolt = <950000>;
  200. };
  201. };
  202. vcc_ddr: DCDC_REG3 {
  203. regulator-name = "vcc_ddr";
  204. regulator-always-on;
  205. regulator-boot-on;
  206. regulator-state-mem {
  207. regulator-on-in-suspend;
  208. };
  209. };
  210. vcc_io: DCDC_REG4 {
  211. regulator-name = "vcc_io";
  212. regulator-always-on;
  213. regulator-boot-on;
  214. regulator-min-microvolt = <3300000>;
  215. regulator-max-microvolt = <3300000>;
  216. regulator-state-mem {
  217. regulator-on-in-suspend;
  218. regulator-suspend-microvolt = <3300000>;
  219. };
  220. };
  221. vcc_18: LDO_REG1 {
  222. regulator-name = "vcc_18";
  223. regulator-always-on;
  224. regulator-boot-on;
  225. regulator-min-microvolt = <1800000>;
  226. regulator-max-microvolt = <1800000>;
  227. regulator-state-mem {
  228. regulator-on-in-suspend;
  229. regulator-suspend-microvolt = <1800000>;
  230. };
  231. };
  232. vcc18_emmc: LDO_REG2 {
  233. regulator-name = "vcc18_emmc";
  234. regulator-always-on;
  235. regulator-boot-on;
  236. regulator-min-microvolt = <1800000>;
  237. regulator-max-microvolt = <1800000>;
  238. regulator-state-mem {
  239. regulator-on-in-suspend;
  240. regulator-suspend-microvolt = <1800000>;
  241. };
  242. };
  243. vdd_10: LDO_REG3 {
  244. regulator-name = "vdd_10";
  245. regulator-always-on;
  246. regulator-boot-on;
  247. regulator-min-microvolt = <1000000>;
  248. regulator-max-microvolt = <1000000>;
  249. regulator-state-mem {
  250. regulator-on-in-suspend;
  251. regulator-suspend-microvolt = <1000000>;
  252. };
  253. };
  254. };
  255. };
  256. };
  257. &i2s1 {
  258. status = "okay";
  259. };
  260. &io_domains {
  261. pmuio-supply = <&vcc_io>;
  262. vccio1-supply = <&vcc_io>;
  263. vccio2-supply = <&vcc18_emmc>;
  264. vccio3-supply = <&vcc_io>;
  265. vccio4-supply = <&vcc_io>;
  266. vccio5-supply = <&vcc_io>;
  267. vccio6-supply = <&vcc_io>;
  268. status = "okay";
  269. };
  270. &pinctrl {
  271. ephy {
  272. eth_phy_int_pin: eth-phy-int-pin {
  273. rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_down>;
  274. };
  275. eth_phy_reset_pin: eth-phy-reset-pin {
  276. rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
  277. };
  278. };
  279. leds {
  280. led_pin: led-pin {
  281. rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
  282. };
  283. };
  284. pmic {
  285. pmic_int_l: pmic-int-l {
  286. rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
  287. };
  288. };
  289. usb3 {
  290. usb30_host_drv: usb30-host-drv {
  291. rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
  292. };
  293. };
  294. wifi {
  295. wifi_en: wifi-en {
  296. rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
  297. };
  298. };
  299. };
  300. &sdmmc {
  301. bus-width = <4>;
  302. cap-sd-highspeed;
  303. disable-wp;
  304. pinctrl-names = "default";
  305. pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>;
  306. vmmc-supply = <&vcc_sd>;
  307. status = "okay";
  308. };
  309. &saradc {
  310. vref-supply = <&vcc_18>;
  311. status = "okay";
  312. };
  313. &tsadc {
  314. status = "okay";
  315. };
  316. &u2phy {
  317. status = "okay";
  318. };
  319. &u2phy_host {
  320. status = "okay";
  321. };
  322. &uart2 {
  323. status = "okay";
  324. };
  325. &usbdrd3 {
  326. dr_mode = "host";
  327. status = "okay";
  328. };
  329. &usb_host0_ehci {
  330. status = "okay";
  331. };