rk3566-roc-pc.dts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /dts-v1/;
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/pinctrl/rockchip.h>
  5. #include <dt-bindings/soc/rockchip,vop2.h>
  6. #include "rk3566.dtsi"
  7. / {
  8. model = "Firefly Station M2";
  9. compatible = "firefly,rk3566-roc-pc", "rockchip,rk3566";
  10. aliases {
  11. mmc0 = &sdmmc0;
  12. mmc1 = &sdhci;
  13. mmc2 = &sdmmc1;
  14. };
  15. chosen: chosen {
  16. stdout-path = "serial2:1500000n8";
  17. };
  18. gmac1_clkin: external-gmac1-clock {
  19. compatible = "fixed-clock";
  20. clock-frequency = <125000000>;
  21. clock-output-names = "gmac1_clkin";
  22. #clock-cells = <0>;
  23. };
  24. hdmi-con {
  25. compatible = "hdmi-connector";
  26. type = "a";
  27. port {
  28. hdmi_con_in: endpoint {
  29. remote-endpoint = <&hdmi_out_con>;
  30. };
  31. };
  32. };
  33. leds {
  34. compatible = "gpio-leds";
  35. led-user {
  36. label = "user-led";
  37. default-state = "on";
  38. gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
  39. linux,default-trigger = "heartbeat";
  40. pinctrl-names = "default";
  41. pinctrl-0 = <&user_led_enable_h>;
  42. retain-state-suspended;
  43. };
  44. };
  45. sdio_pwrseq: sdio-pwrseq {
  46. status = "okay";
  47. compatible = "mmc-pwrseq-simple";
  48. clocks = <&rk809 1>;
  49. clock-names = "ext_clock";
  50. pinctrl-names = "default";
  51. pinctrl-0 = <&wifi_enable_h>;
  52. reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
  53. };
  54. usb_5v: usb-5v-regulator {
  55. compatible = "regulator-fixed";
  56. regulator-name = "usb_5v";
  57. regulator-always-on;
  58. regulator-boot-on;
  59. regulator-min-microvolt = <5000000>;
  60. regulator-max-microvolt = <5000000>;
  61. };
  62. vcc5v0_sys: vcc5v0-sys-regulator {
  63. compatible = "regulator-fixed";
  64. regulator-name = "vcc5v0_sys";
  65. regulator-always-on;
  66. regulator-boot-on;
  67. regulator-min-microvolt = <5000000>;
  68. regulator-max-microvolt = <5000000>;
  69. vin-supply = <&usb_5v>;
  70. };
  71. vcc3v3_sys: vcc3v3-sys-regulator {
  72. compatible = "regulator-fixed";
  73. regulator-name = "vcc3v3_sys";
  74. regulator-min-microvolt = <3300000>;
  75. regulator-max-microvolt = <3300000>;
  76. regulator-always-on;
  77. vin-supply = <&vcc5v0_sys>;
  78. };
  79. vcc5v0_usb30_host: vcc5v0-usb30-host-regulator {
  80. compatible = "regulator-fixed";
  81. regulator-name = "vcc5v0_usb30_host";
  82. enable-active-high;
  83. gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
  84. pinctrl-names = "default";
  85. pinctrl-0 = <&vcc5v0_usb30_host_en_h>;
  86. regulator-always-on;
  87. regulator-min-microvolt = <5000000>;
  88. regulator-max-microvolt = <5000000>;
  89. vin-supply = <&vcc5v0_sys>;
  90. };
  91. vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
  92. compatible = "regulator-fixed";
  93. regulator-name = "vcc5v0_usb_otg";
  94. enable-active-high;
  95. gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
  96. pinctrl-names = "default";
  97. pinctrl-0 = <&vcc5v0_usb_otg_en_h>;
  98. regulator-always-on;
  99. regulator-min-microvolt = <5000000>;
  100. regulator-max-microvolt = <5000000>;
  101. vin-supply = <&vcc5v0_sys>;
  102. };
  103. };
  104. &combphy1 {
  105. status = "okay";
  106. };
  107. &cpu0 {
  108. cpu-supply = <&vdd_cpu>;
  109. };
  110. &cpu1 {
  111. cpu-supply = <&vdd_cpu>;
  112. };
  113. &cpu2 {
  114. cpu-supply = <&vdd_cpu>;
  115. };
  116. &cpu3 {
  117. cpu-supply = <&vdd_cpu>;
  118. };
  119. &gmac1 {
  120. assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
  121. assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
  122. clock_in_out = "input";
  123. phy-mode = "rgmii";
  124. phy-supply = <&vcc_3v3>;
  125. pinctrl-names = "default";
  126. pinctrl-0 = <&gmac1m0_miim
  127. &gmac1m0_tx_bus2
  128. &gmac1m0_rx_bus2
  129. &gmac1m0_rgmii_clk
  130. &gmac1m0_clkinout
  131. &gmac1m0_rgmii_bus>;
  132. snps,reset-gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
  133. snps,reset-active-low;
  134. /* Reset time is 20ms, 100ms for rtl8211f */
  135. snps,reset-delays-us = <0 20000 100000>;
  136. tx_delay = <0x4f>;
  137. rx_delay = <0x24>;
  138. phy-handle = <&rgmii_phy1>;
  139. status = "okay";
  140. };
  141. &gpu {
  142. mali-supply = <&vdd_gpu>;
  143. status = "okay";
  144. };
  145. &hdmi {
  146. avdd-0v9-supply = <&vdda0v9_image>;
  147. avdd-1v8-supply = <&vcca1v8_image>;
  148. status = "okay";
  149. };
  150. &hdmi_in {
  151. hdmi_in_vp0: endpoint {
  152. remote-endpoint = <&vp0_out_hdmi>;
  153. };
  154. };
  155. &hdmi_out {
  156. hdmi_out_con: endpoint {
  157. remote-endpoint = <&hdmi_con_in>;
  158. };
  159. };
  160. &i2c0 {
  161. status = "okay";
  162. vdd_cpu: regulator@1c {
  163. compatible = "tcs,tcs4525";
  164. reg = <0x1c>;
  165. fcs,suspend-voltage-selector = <1>;
  166. regulator-name = "vdd_cpu";
  167. regulator-min-microvolt = <800000>;
  168. regulator-max-microvolt = <1150000>;
  169. regulator-ramp-delay = <2300>;
  170. regulator-always-on;
  171. regulator-boot-on;
  172. vin-supply = <&vcc5v0_sys>;
  173. regulator-state-mem {
  174. regulator-off-in-suspend;
  175. };
  176. };
  177. rk809: pmic@20 {
  178. compatible = "rockchip,rk809";
  179. reg = <0x20>;
  180. interrupt-parent = <&gpio0>;
  181. interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
  182. clock-output-names = "rk808-clkout1", "rk808-clkout2";
  183. pinctrl-names = "default";
  184. pinctrl-0 = <&pmic_int>;
  185. rockchip,system-power-controller;
  186. wakeup-source;
  187. #clock-cells = <1>;
  188. vcc1-supply = <&vcc3v3_sys>;
  189. vcc2-supply = <&vcc3v3_sys>;
  190. vcc3-supply = <&vcc3v3_sys>;
  191. vcc4-supply = <&vcc3v3_sys>;
  192. vcc5-supply = <&vcc3v3_sys>;
  193. vcc6-supply = <&vcc3v3_sys>;
  194. vcc7-supply = <&vcc3v3_sys>;
  195. vcc8-supply = <&vcc3v3_sys>;
  196. vcc9-supply = <&vcc3v3_sys>;
  197. regulators {
  198. vdd_log: DCDC_REG1 {
  199. regulator-name = "vdd_log";
  200. regulator-always-on;
  201. regulator-boot-on;
  202. regulator-min-microvolt = <500000>;
  203. regulator-max-microvolt = <1350000>;
  204. regulator-init-microvolt = <900000>;
  205. regulator-ramp-delay = <6001>;
  206. regulator-state-mem {
  207. regulator-on-in-suspend;
  208. regulator-suspend-microvolt = <900000>;
  209. };
  210. };
  211. vdd_gpu: DCDC_REG2 {
  212. regulator-name = "vdd_gpu";
  213. regulator-min-microvolt = <900000>;
  214. regulator-max-microvolt = <1350000>;
  215. regulator-init-microvolt = <900000>;
  216. regulator-ramp-delay = <6001>;
  217. regulator-state-mem {
  218. regulator-off-in-suspend;
  219. regulator-suspend-microvolt = <900000>;
  220. };
  221. };
  222. vcc_ddr: DCDC_REG3 {
  223. regulator-name = "vcc_ddr";
  224. regulator-always-on;
  225. regulator-boot-on;
  226. regulator-min-microvolt = <1100000>;
  227. regulator-max-microvolt = <1100000>;
  228. regulator-initial-mode = <0x2>;
  229. regulator-state-mem {
  230. regulator-on-in-suspend;
  231. };
  232. };
  233. vdd_npu: DCDC_REG4 {
  234. regulator-name = "vdd_npu";
  235. regulator-min-microvolt = <900000>;
  236. regulator-max-microvolt = <1350000>;
  237. regulator-initial-mode = <0x2>;
  238. regulator-state-mem {
  239. regulator-off-in-suspend;
  240. };
  241. };
  242. vcc_1v8: DCDC_REG5 {
  243. regulator-name = "vcc_1v8";
  244. regulator-always-on;
  245. regulator-boot-on;
  246. regulator-min-microvolt = <1800000>;
  247. regulator-max-microvolt = <1800000>;
  248. regulator-state-mem {
  249. regulator-on-in-suspend;
  250. regulator-suspend-microvolt = <1800000>;
  251. };
  252. };
  253. vdda0v9_image: LDO_REG1 {
  254. regulator-name = "vdda0v9_image";
  255. regulator-always-on;
  256. regulator-boot-on;
  257. regulator-min-microvolt = <900000>;
  258. regulator-max-microvolt = <900000>;
  259. regulator-state-mem {
  260. regulator-on-in-suspend;
  261. regulator-suspend-microvolt = <900000>;
  262. };
  263. };
  264. vdda_0v9: LDO_REG2 {
  265. regulator-name = "vdda_0v9";
  266. regulator-always-on;
  267. regulator-boot-on;
  268. regulator-min-microvolt = <900000>;
  269. regulator-max-microvolt = <900000>;
  270. regulator-state-mem {
  271. regulator-on-in-suspend;
  272. regulator-suspend-microvolt = <900000>;
  273. };
  274. };
  275. vdda0v9_pmu: LDO_REG3 {
  276. regulator-name = "vdda0v9_pmu";
  277. regulator-always-on;
  278. regulator-boot-on;
  279. regulator-min-microvolt = <900000>;
  280. regulator-max-microvolt = <900000>;
  281. regulator-state-mem {
  282. regulator-on-in-suspend;
  283. regulator-suspend-microvolt = <900000>;
  284. };
  285. };
  286. vccio_acodec: LDO_REG4 {
  287. regulator-name = "vccio_acodec";
  288. regulator-always-on;
  289. regulator-boot-on;
  290. regulator-min-microvolt = <3300000>;
  291. regulator-max-microvolt = <3300000>;
  292. regulator-state-mem {
  293. regulator-on-in-suspend;
  294. regulator-suspend-microvolt = <3300000>;
  295. };
  296. };
  297. vccio_sd: LDO_REG5 {
  298. regulator-name = "vccio_sd";
  299. regulator-always-on;
  300. regulator-boot-on;
  301. regulator-min-microvolt = <1800000>;
  302. regulator-max-microvolt = <3300000>;
  303. regulator-state-mem {
  304. regulator-on-in-suspend;
  305. regulator-suspend-microvolt = <3300000>;
  306. };
  307. };
  308. vcc3v3_pmu: LDO_REG6 {
  309. regulator-name = "vcc3v3_pmu";
  310. regulator-always-on;
  311. regulator-boot-on;
  312. regulator-min-microvolt = <3300000>;
  313. regulator-max-microvolt = <3300000>;
  314. regulator-state-mem {
  315. regulator-on-in-suspend;
  316. regulator-suspend-microvolt = <3300000>;
  317. };
  318. };
  319. vcca_1v8: LDO_REG7 {
  320. regulator-name = "vcca_1v8";
  321. regulator-always-on;
  322. regulator-boot-on;
  323. regulator-min-microvolt = <1800000>;
  324. regulator-max-microvolt = <1800000>;
  325. regulator-state-mem {
  326. regulator-on-in-suspend;
  327. regulator-suspend-microvolt = <1800000>;
  328. };
  329. };
  330. vcca1v8_pmu: LDO_REG8 {
  331. regulator-name = "vcca1v8_pmu";
  332. regulator-always-on;
  333. regulator-boot-on;
  334. regulator-min-microvolt = <1800000>;
  335. regulator-max-microvolt = <1800000>;
  336. regulator-state-mem {
  337. regulator-on-in-suspend;
  338. regulator-suspend-microvolt = <1800000>;
  339. };
  340. };
  341. vcca1v8_image: LDO_REG9 {
  342. regulator-name = "vcca1v8_image";
  343. regulator-always-on;
  344. regulator-boot-on;
  345. regulator-min-microvolt = <1800000>;
  346. regulator-max-microvolt = <1800000>;
  347. regulator-state-mem {
  348. regulator-on-in-suspend;
  349. regulator-suspend-microvolt = <1800000>;
  350. };
  351. };
  352. vcc_3v3: SWITCH_REG1 {
  353. regulator-boot-on;
  354. regulator-name = "vcc3v3";
  355. };
  356. vcc3v3_sd: SWITCH_REG2 {
  357. regulator-name = "vcc3v3_sd";
  358. regulator-always-on;
  359. regulator-boot-on;
  360. };
  361. };
  362. };
  363. };
  364. &i2c1 {
  365. status = "okay";
  366. };
  367. &i2c2 {
  368. status = "okay";
  369. };
  370. &i2c3 {
  371. pinctrl-names = "default";
  372. pinctrl-0 = <&i2c3m0_xfer>;
  373. status = "okay";
  374. };
  375. &mdio1 {
  376. rgmii_phy1: ethernet-phy@0 {
  377. compatible = "ethernet-phy-ieee802.3-c22";
  378. reg = <0x0>;
  379. };
  380. };
  381. &pinctrl {
  382. bt {
  383. bt_enable_h: bt-enable-h {
  384. rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
  385. };
  386. bt_host_wake_l: bt-host-wake-l {
  387. rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_down>;
  388. };
  389. bt_wake_l: bt-wake-l {
  390. rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
  391. };
  392. };
  393. leds {
  394. user_led_enable_h: user-led-enable-h {
  395. rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
  396. };
  397. };
  398. pmic {
  399. pmic_int: pmic_int {
  400. rockchip,pins =
  401. <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  402. };
  403. };
  404. sdio-pwrseq {
  405. wifi_enable_h: wifi-enable-h {
  406. rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
  407. };
  408. };
  409. usb {
  410. vcc5v0_usb30_host_en_h: vcc5v0-usb30-host-en_h {
  411. rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
  412. };
  413. vcc5v0_usb_otg_en_h: vcc5v0-usb-otg-en_h {
  414. rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
  415. };
  416. };
  417. };
  418. &pmu_io_domains {
  419. status = "okay";
  420. pmuio1-supply = <&vcc3v3_pmu>;
  421. pmuio2-supply = <&vcc3v3_pmu>;
  422. vccio1-supply = <&vccio_acodec>;
  423. vccio2-supply = <&vcc_1v8>;
  424. vccio3-supply = <&vccio_sd>;
  425. vccio4-supply = <&vcc_1v8>;
  426. vccio5-supply = <&vcc_3v3>;
  427. vccio6-supply = <&vcc_1v8>;
  428. vccio7-supply = <&vcc_3v3>;
  429. };
  430. &sdhci {
  431. bus-width = <8>;
  432. mmc-hs200-1_8v;
  433. non-removable;
  434. vmmc-supply = <&vcc_3v3>;
  435. vqmmc-supply = <&vcc_1v8>;
  436. status = "okay";
  437. };
  438. &sdmmc0 {
  439. bus-width = <4>;
  440. cap-sd-highspeed;
  441. cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
  442. disable-wp;
  443. pinctrl-names = "default";
  444. pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
  445. sd-uhs-sdr104;
  446. vmmc-supply = <&vcc3v3_sd>;
  447. vqmmc-supply = <&vccio_sd>;
  448. status = "okay";
  449. };
  450. &sdmmc1 {
  451. bus-width = <4>;
  452. cap-sd-highspeed;
  453. cap-sdio-irq;
  454. keep-power-in-suspend;
  455. mmc-pwrseq = <&sdio_pwrseq>;
  456. vmmc-supply = <&vcc3v3_sys>;
  457. vqmmc-supply = <&vcca1v8_pmu>;
  458. pinctrl-names = "default";
  459. pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
  460. status = "okay";
  461. };
  462. &tsadc {
  463. status = "okay";
  464. };
  465. &uart0 {
  466. pinctrl-names = "default";
  467. pinctrl-0 = <&uart0_xfer>;
  468. status = "okay";
  469. };
  470. &uart1 {
  471. pinctrl-names = "default";
  472. pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
  473. status = "okay";
  474. uart-has-rtscts;
  475. bluetooth {
  476. compatible = "brcm,bcm43438-bt";
  477. clocks = <&rk809 1>;
  478. clock-names = "lpo";
  479. device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
  480. host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
  481. shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
  482. pinctrl-names = "default";
  483. pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
  484. vbat-supply = <&vcc3v3_sys>;
  485. vddio-supply = <&vcca1v8_pmu>;
  486. };
  487. };
  488. &uart2 {
  489. status = "okay";
  490. };
  491. &usb2phy0_host {
  492. phy-supply = <&vcc5v0_usb30_host>;
  493. status = "okay";
  494. };
  495. &usb2phy0_otg {
  496. phy-supply = <&vcc5v0_usb_otg>;
  497. status = "okay";
  498. };
  499. &usb2phy1_otg {
  500. phy-supply = <&vcc5v0_usb30_host>;
  501. status = "okay";
  502. };
  503. &usb2phy0 {
  504. status = "okay";
  505. };
  506. &usb2phy1 {
  507. status = "okay";
  508. };
  509. &usb_host0_xhci {
  510. status = "okay";
  511. };
  512. &usb_host1_xhci {
  513. status = "okay";
  514. };
  515. &usb_host0_ehci {
  516. status = "okay";
  517. };
  518. &usb_host0_ohci {
  519. status = "okay";
  520. };
  521. &vop {
  522. assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
  523. assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
  524. status = "okay";
  525. };
  526. &vop_mmu {
  527. status = "okay";
  528. };
  529. &vp0 {
  530. vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
  531. reg = <ROCKCHIP_VOP2_EP_HDMI0>;
  532. remote-endpoint = <&hdmi_in_vp0>;
  533. };
  534. };