rk3328-rock64.dts 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2017 PINE64
  4. */
  5. /dts-v1/;
  6. #include "rk3328.dtsi"
  7. / {
  8. model = "Pine64 Rock64";
  9. compatible = "pine64,rock64", "rockchip,rk3328";
  10. aliases {
  11. mmc0 = &sdmmc;
  12. mmc1 = &emmc;
  13. };
  14. chosen {
  15. stdout-path = "serial2:1500000n8";
  16. };
  17. gmac_clkin: external-gmac-clock {
  18. compatible = "fixed-clock";
  19. clock-frequency = <125000000>;
  20. clock-output-names = "gmac_clkin";
  21. #clock-cells = <0>;
  22. };
  23. vcc_sd: sdmmc-regulator {
  24. compatible = "regulator-fixed";
  25. gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
  26. pinctrl-names = "default";
  27. pinctrl-0 = <&sdmmc0m1_pin>;
  28. regulator-name = "vcc_sd";
  29. regulator-min-microvolt = <3300000>;
  30. regulator-max-microvolt = <3300000>;
  31. vin-supply = <&vcc_io>;
  32. };
  33. vcc_host_5v: vcc-host-5v-regulator {
  34. compatible = "regulator-fixed";
  35. gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
  36. pinctrl-names = "default";
  37. pinctrl-0 = <&usb20_host_drv>;
  38. regulator-name = "vcc_host_5v";
  39. regulator-always-on;
  40. regulator-boot-on;
  41. vin-supply = <&vcc_sys>;
  42. };
  43. vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
  44. compatible = "regulator-fixed";
  45. gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
  46. pinctrl-names = "default";
  47. pinctrl-0 = <&usb20_host_drv>;
  48. regulator-name = "vcc_host1_5v";
  49. regulator-always-on;
  50. regulator-boot-on;
  51. vin-supply = <&vcc_sys>;
  52. };
  53. vcc_sys: vcc-sys {
  54. compatible = "regulator-fixed";
  55. regulator-name = "vcc_sys";
  56. regulator-always-on;
  57. regulator-boot-on;
  58. regulator-min-microvolt = <5000000>;
  59. regulator-max-microvolt = <5000000>;
  60. };
  61. ir-receiver {
  62. compatible = "gpio-ir-receiver";
  63. gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
  64. pinctrl-0 = <&ir_int>;
  65. pinctrl-names = "default";
  66. };
  67. leds {
  68. compatible = "gpio-leds";
  69. power_led: led-0 {
  70. gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
  71. linux,default-trigger = "mmc0";
  72. };
  73. standby_led: led-1 {
  74. gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
  75. linux,default-trigger = "heartbeat";
  76. };
  77. };
  78. spdif_sound: spdif-sound {
  79. compatible = "simple-audio-card";
  80. simple-audio-card,name = "SPDIF";
  81. simple-audio-card,cpu {
  82. sound-dai = <&spdif>;
  83. };
  84. simple-audio-card,codec {
  85. sound-dai = <&spdif_dit>;
  86. };
  87. };
  88. spdif_dit: spdif-dit {
  89. compatible = "linux,spdif-dit";
  90. #sound-dai-cells = <0>;
  91. };
  92. };
  93. &analog_sound {
  94. status = "okay";
  95. };
  96. &codec {
  97. mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
  98. status = "okay";
  99. };
  100. &cpu0 {
  101. cpu-supply = <&vdd_arm>;
  102. };
  103. &cpu1 {
  104. cpu-supply = <&vdd_arm>;
  105. };
  106. &cpu2 {
  107. cpu-supply = <&vdd_arm>;
  108. };
  109. &cpu3 {
  110. cpu-supply = <&vdd_arm>;
  111. };
  112. &emmc {
  113. bus-width = <8>;
  114. cap-mmc-highspeed;
  115. mmc-hs200-1_8v;
  116. non-removable;
  117. pinctrl-names = "default";
  118. pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
  119. vmmc-supply = <&vcc_io>;
  120. vqmmc-supply = <&vcc18_emmc>;
  121. status = "okay";
  122. };
  123. &gmac2io {
  124. assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
  125. assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
  126. clock_in_out = "input";
  127. phy-supply = <&vcc_io>;
  128. phy-mode = "rgmii";
  129. pinctrl-names = "default";
  130. pinctrl-0 = <&rgmiim1_pins>;
  131. snps,force_thresh_dma_mode;
  132. snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
  133. snps,reset-active-low;
  134. snps,reset-delays-us = <0 10000 50000>;
  135. tx_delay = <0x24>;
  136. rx_delay = <0x18>;
  137. status = "okay";
  138. };
  139. &hdmi {
  140. status = "okay";
  141. };
  142. &hdmi_sound {
  143. status = "okay";
  144. };
  145. &hdmiphy {
  146. status = "okay";
  147. };
  148. &i2c1 {
  149. status = "okay";
  150. rk805: pmic@18 {
  151. compatible = "rockchip,rk805";
  152. reg = <0x18>;
  153. interrupt-parent = <&gpio2>;
  154. interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
  155. #clock-cells = <1>;
  156. clock-output-names = "xin32k", "rk805-clkout2";
  157. gpio-controller;
  158. #gpio-cells = <2>;
  159. pinctrl-names = "default";
  160. pinctrl-0 = <&pmic_int_l>;
  161. rockchip,system-power-controller;
  162. wakeup-source;
  163. vcc1-supply = <&vcc_sys>;
  164. vcc2-supply = <&vcc_sys>;
  165. vcc3-supply = <&vcc_sys>;
  166. vcc4-supply = <&vcc_sys>;
  167. vcc5-supply = <&vcc_io>;
  168. vcc6-supply = <&vcc_sys>;
  169. regulators {
  170. vdd_logic: DCDC_REG1 {
  171. regulator-name = "vdd_logic";
  172. regulator-min-microvolt = <712500>;
  173. regulator-max-microvolt = <1450000>;
  174. regulator-ramp-delay = <12500>;
  175. regulator-always-on;
  176. regulator-boot-on;
  177. regulator-state-mem {
  178. regulator-on-in-suspend;
  179. regulator-suspend-microvolt = <1000000>;
  180. };
  181. };
  182. vdd_arm: DCDC_REG2 {
  183. regulator-name = "vdd_arm";
  184. regulator-min-microvolt = <712500>;
  185. regulator-max-microvolt = <1450000>;
  186. regulator-ramp-delay = <12500>;
  187. regulator-always-on;
  188. regulator-boot-on;
  189. regulator-state-mem {
  190. regulator-on-in-suspend;
  191. regulator-suspend-microvolt = <950000>;
  192. };
  193. };
  194. vcc_ddr: DCDC_REG3 {
  195. regulator-name = "vcc_ddr";
  196. regulator-always-on;
  197. regulator-boot-on;
  198. regulator-state-mem {
  199. regulator-on-in-suspend;
  200. };
  201. };
  202. vcc_io: DCDC_REG4 {
  203. regulator-name = "vcc_io";
  204. regulator-min-microvolt = <3300000>;
  205. regulator-max-microvolt = <3300000>;
  206. regulator-always-on;
  207. regulator-boot-on;
  208. regulator-state-mem {
  209. regulator-on-in-suspend;
  210. regulator-suspend-microvolt = <3300000>;
  211. };
  212. };
  213. vcc_18: LDO_REG1 {
  214. regulator-name = "vcc_18";
  215. regulator-min-microvolt = <1800000>;
  216. regulator-max-microvolt = <1800000>;
  217. regulator-always-on;
  218. regulator-boot-on;
  219. regulator-state-mem {
  220. regulator-on-in-suspend;
  221. regulator-suspend-microvolt = <1800000>;
  222. };
  223. };
  224. vcc18_emmc: LDO_REG2 {
  225. regulator-name = "vcc18_emmc";
  226. regulator-min-microvolt = <1800000>;
  227. regulator-max-microvolt = <1800000>;
  228. regulator-always-on;
  229. regulator-boot-on;
  230. regulator-state-mem {
  231. regulator-on-in-suspend;
  232. regulator-suspend-microvolt = <1800000>;
  233. };
  234. };
  235. vdd_10: LDO_REG3 {
  236. regulator-name = "vdd_10";
  237. regulator-min-microvolt = <1000000>;
  238. regulator-max-microvolt = <1000000>;
  239. regulator-always-on;
  240. regulator-boot-on;
  241. regulator-state-mem {
  242. regulator-on-in-suspend;
  243. regulator-suspend-microvolt = <1000000>;
  244. };
  245. };
  246. };
  247. };
  248. };
  249. &i2s0 {
  250. status = "okay";
  251. };
  252. &i2s1 {
  253. status = "okay";
  254. };
  255. &io_domains {
  256. status = "okay";
  257. vccio1-supply = <&vcc_io>;
  258. vccio2-supply = <&vcc18_emmc>;
  259. vccio3-supply = <&vcc_io>;
  260. vccio4-supply = <&vcc_18>;
  261. vccio5-supply = <&vcc_io>;
  262. vccio6-supply = <&vcc_io>;
  263. pmuio-supply = <&vcc_io>;
  264. };
  265. &pinctrl {
  266. ir {
  267. ir_int: ir-int {
  268. rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  269. };
  270. };
  271. pmic {
  272. pmic_int_l: pmic-int-l {
  273. rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
  274. };
  275. };
  276. usb2 {
  277. usb20_host_drv: usb20-host-drv {
  278. rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  279. };
  280. };
  281. };
  282. &sdmmc {
  283. bus-width = <4>;
  284. cap-mmc-highspeed;
  285. cap-sd-highspeed;
  286. disable-wp;
  287. max-frequency = <150000000>;
  288. pinctrl-names = "default";
  289. pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
  290. vmmc-supply = <&vcc_sd>;
  291. status = "okay";
  292. };
  293. &spdif {
  294. pinctrl-0 = <&spdifm0_tx>;
  295. status = "okay";
  296. };
  297. &spi0 {
  298. status = "okay";
  299. flash@0 {
  300. compatible = "jedec,spi-nor";
  301. reg = <0>;
  302. /* maximum speed for Rockchip SPI */
  303. spi-max-frequency = <50000000>;
  304. };
  305. };
  306. &tsadc {
  307. rockchip,hw-tshut-mode = <0>;
  308. rockchip,hw-tshut-polarity = <0>;
  309. status = "okay";
  310. };
  311. &uart2 {
  312. status = "okay";
  313. };
  314. &u2phy {
  315. status = "okay";
  316. u2phy_host: host-port {
  317. status = "okay";
  318. };
  319. u2phy_otg: otg-port {
  320. status = "okay";
  321. };
  322. };
  323. &usb20_otg {
  324. dr_mode = "host";
  325. status = "okay";
  326. };
  327. &usbdrd3 {
  328. dr_mode = "host";
  329. status = "okay";
  330. };
  331. &usb_host0_ehci {
  332. status = "okay";
  333. };
  334. &usb_host0_ohci {
  335. status = "okay";
  336. };
  337. &vop {
  338. status = "okay";
  339. };
  340. &vop_mmu {
  341. status = "okay";
  342. };