Advertisement
Guest User

Untitled

a guest
May 9th, 2022
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.14 KB | None | 0 0
  1. [piotro@builder-armv8 linux-5.18]$ cat rk3568-rock-3a.dts
  2. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  3.  
  4. /dts-v1/;
  5. #include <dt-bindings/gpio/gpio.h>
  6. #include <dt-bindings/leds/common.h>
  7. #include <dt-bindings/pinctrl/rockchip.h>
  8. #include <dt-bindings/soc/rockchip,vop2.h>
  9. #include "rk3568.dtsi"
  10.  
  11. / {
  12. model = "Radxa ROCK3 Model A";
  13. compatible = "radxa,rock3a", "rockchip,rk3568";
  14.  
  15. aliases {
  16. ethernet0 = &gmac1;
  17. mmc0 = &sdmmc0;
  18. mmc1 = &sdhci;
  19. };
  20.  
  21. chosen: chosen {
  22. stdout-path = "serial2:1500000n8";
  23. };
  24.  
  25. hdmi-con {
  26. compatible = "hdmi-connector";
  27. type = "a";
  28.  
  29. port {
  30. hdmi_con_in: endpoint {
  31. remote-endpoint = <&hdmi_out_con>;
  32. };
  33. };
  34. };
  35.  
  36. leds {
  37. compatible = "gpio-leds";
  38.  
  39. led_user: led-0 {
  40. gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
  41. function = LED_FUNCTION_HEARTBEAT;
  42. color = <LED_COLOR_ID_BLUE>;
  43. linux,default-trigger = "heartbeat";
  44. pinctrl-names = "default";
  45. pinctrl-0 = <&led_user_en>;
  46. };
  47. };
  48.  
  49. rk809-sound {
  50. compatible = "simple-audio-card";
  51. simple-audio-card,format = "i2s";
  52. simple-audio-card,name = "Analog RK809";
  53. simple-audio-card,mclk-fs = <256>;
  54.  
  55. simple-audio-card,cpu {
  56. sound-dai = <&i2s1_8ch>;
  57. };
  58. simple-audio-card,codec {
  59. sound-dai = <&rk809>;
  60. };
  61. };
  62.  
  63. vcc12v_dcin: vcc12v-dcin {
  64. compatible = "regulator-fixed";
  65. regulator-name = "vcc12v_dcin";
  66. regulator-always-on;
  67. regulator-boot-on;
  68. };
  69.  
  70. vcc3v3_sys: vcc3v3-sys {
  71. compatible = "regulator-fixed";
  72. regulator-name = "vcc3v3_sys";
  73. regulator-always-on;
  74. regulator-boot-on;
  75. regulator-min-microvolt = <3300000>;
  76. regulator-max-microvolt = <3300000>;
  77. vin-supply = <&vcc12v_dcin>;
  78. };
  79.  
  80. vcc5v0_sys: vcc5v0-sys {
  81. compatible = "regulator-fixed";
  82. regulator-name = "vcc5v0_sys";
  83. regulator-always-on;
  84. regulator-boot-on;
  85. regulator-min-microvolt = <5000000>;
  86. regulator-max-microvolt = <5000000>;
  87. vin-supply = <&vcc12v_dcin>;
  88. };
  89.  
  90. vcc5v0_usb: vcc5v0-usb {
  91. compatible = "regulator-fixed";
  92. regulator-name = "vcc5v0_usb";
  93. regulator-always-on;
  94. regulator-boot-on;
  95. regulator-min-microvolt = <5000000>;
  96. regulator-max-microvolt = <5000000>;
  97. vin-supply = <&vcc12v_dcin>;
  98. };
  99.  
  100. vcc5v0_usb_host: vcc5v0-usb-host {
  101. compatible = "regulator-fixed";
  102. enable-active-high;
  103. gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
  104. pinctrl-names = "default";
  105. pinctrl-0 = <&vcc5v0_usb_host_en>;
  106. regulator-name = "vcc5v0_usb_host";
  107. regulator-min-microvolt = <5000000>;
  108. regulator-max-microvolt = <5000000>;
  109. vin-supply = <&vcc5v0_usb>;
  110. };
  111.  
  112. vcc5v0_usb_otg: vcc5v0-otg-regulator {
  113. compatible = "regulator-fixed";
  114. enable-active-high;
  115. gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
  116. pinctrl-names = "default";
  117. pinctrl-0 = <&vcc5v0_otg_en>;
  118. regulator-name = "vcc5v0_otg";
  119. regulator-always-on;
  120. regulator-boot-on;
  121. };
  122.  
  123. vcc5v0_usb_usbhub: vcc5v0-usbhub-regulator {
  124. compatible = "regulator-fixed";
  125. enable-active-high;
  126. gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
  127. pinctrl-names = "default";
  128. pinctrl-0 = <&vcc5v0_hub_en>;
  129. regulator-name = "vcc5v0_hub";
  130. regulator-always-on;
  131. };
  132. };
  133.  
  134. &cpu0 {
  135. cpu-supply = <&vdd_cpu>;
  136. };
  137.  
  138. &cpu1 {
  139. cpu-supply = <&vdd_cpu>;
  140. };
  141.  
  142. &cpu2 {
  143. cpu-supply = <&vdd_cpu>;
  144. };
  145.  
  146. &cpu3 {
  147. cpu-supply = <&vdd_cpu>;
  148. };
  149.  
  150. &gmac1 {
  151. phy-mode = "rgmii";
  152. clock_in_out = "output";
  153.  
  154. snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
  155. snps,reset-active-low;
  156. /* Reset time is 20ms, 100ms for rtl8211f */
  157. snps,reset-delays-us = <0 20000 100000>;
  158.  
  159. assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
  160. assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
  161. assigned-clock-rates = <0>, <125000000>;
  162.  
  163. pinctrl-names = "default";
  164. pinctrl-0 = <&gmac1m1_miim
  165. &gmac1m1_tx_bus2
  166. &gmac1m1_rx_bus2
  167. &gmac1m1_rgmii_clk
  168. &gmac1m1_rgmii_bus>;
  169.  
  170. tx_delay = <0x42>;
  171. rx_delay = <0x28>;
  172.  
  173. phy-handle = <&rgmii_phy1>;
  174. status = "okay";
  175. };
  176.  
  177. &mdio1 {
  178. rgmii_phy1: phy@0 {
  179. compatible = "ethernet-phy-ieee802.3-c22";
  180. reg = <0x0>;
  181. };
  182. };
  183.  
  184. &gpu {
  185. mali-supply = <&vdd_gpu>;
  186. status = "okay";
  187. };
  188.  
  189. &hdmi {
  190. assigned-clocks = <&cru CLK_HDMI_CEC>;
  191. assigned-clock-rates = <32768>;
  192. avdd-0v9-supply = <&vdda0v9_image>;
  193. avdd-1v8-supply = <&vcca1v8_image>;
  194. pinctrl-0 = <&hdmitx_scl &hdmitx_sda &hdmitxm1_cec>;
  195. status = "okay";
  196. };
  197.  
  198. &hdmi_in {
  199. hdmi_in_vp0: endpoint {
  200. remote-endpoint = <&vp0_out_hdmi>;
  201. };
  202. };
  203.  
  204. &hdmi_out {
  205. hdmi_out_con: endpoint {
  206. remote-endpoint = <&hdmi_con_in>;
  207. };
  208. };
  209.  
  210. &i2s0_8ch {
  211. status = "okay";
  212. };
  213.  
  214. &hdmi_sound {
  215. status = "okay";
  216. };
  217.  
  218. &i2c0 {
  219. status = "okay";
  220.  
  221. vdd_cpu: regulator@1c {
  222. compatible = "tcs,tcs4525";
  223. reg = <0x1c>;
  224. fcs,suspend-voltage-selector = <1>;
  225. regulator-name = "vdd_cpu";
  226. regulator-always-on;
  227. regulator-boot-on;
  228. regulator-min-microvolt = <800000>;
  229. regulator-max-microvolt = <1150000>;
  230. regulator-ramp-delay = <2300>;
  231. vin-supply = <&vcc5v0_sys>;
  232.  
  233. regulator-state-mem {
  234. regulator-off-in-suspend;
  235. };
  236. };
  237.  
  238. rk809: pmic@20 {
  239. compatible = "rockchip,rk809";
  240. reg = <0x20>;
  241. interrupt-parent = <&gpio0>;
  242. interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
  243. assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
  244. assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
  245. #clock-cells = <1>;
  246. clock-names = "mclk";
  247. clocks = <&cru I2S1_MCLKOUT_TX>;
  248. pinctrl-names = "default";
  249. pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
  250. rockchip,system-power-controller;
  251. #sound-dai-cells = <0>;
  252. vcc1-supply = <&vcc3v3_sys>;
  253. vcc2-supply = <&vcc3v3_sys>;
  254. vcc3-supply = <&vcc3v3_sys>;
  255. vcc4-supply = <&vcc3v3_sys>;
  256. vcc5-supply = <&vcc3v3_sys>;
  257. vcc6-supply = <&vcc3v3_sys>;
  258. vcc7-supply = <&vcc3v3_sys>;
  259. vcc8-supply = <&vcc3v3_sys>;
  260. vcc9-supply = <&vcc3v3_sys>;
  261. wakeup-source;
  262.  
  263. regulators {
  264. vdd_logic: DCDC_REG1 {
  265. regulator-name = "vdd_logic";
  266. regulator-always-on;
  267. regulator-boot-on;
  268. regulator-init-microvolt = <900000>;
  269. regulator-initial-mode = <0x2>;
  270. regulator-min-microvolt = <500000>;
  271. regulator-max-microvolt = <1350000>;
  272. regulator-ramp-delay = <6001>;
  273.  
  274. regulator-state-mem {
  275. regulator-off-in-suspend;
  276. };
  277. };
  278.  
  279. vdd_gpu: DCDC_REG2 {
  280. regulator-name = "vdd_gpu";
  281. regulator-always-on;
  282. regulator-init-microvolt = <900000>;
  283. regulator-initial-mode = <0x2>;
  284. regulator-min-microvolt = <500000>;
  285. regulator-max-microvolt = <1350000>;
  286. regulator-ramp-delay = <6001>;
  287.  
  288. regulator-state-mem {
  289. regulator-off-in-suspend;
  290. };
  291. };
  292.  
  293. vcc_ddr: DCDC_REG3 {
  294. regulator-name = "vcc_ddr";
  295. regulator-always-on;
  296. regulator-boot-on;
  297. regulator-initial-mode = <0x2>;
  298.  
  299. regulator-state-mem {
  300. regulator-on-in-suspend;
  301. };
  302. };
  303.  
  304. vdd_npu: DCDC_REG4 {
  305. regulator-name = "vdd_npu";
  306. regulator-init-microvolt = <900000>;
  307. regulator-initial-mode = <0x2>;
  308. regulator-min-microvolt = <500000>;
  309. regulator-max-microvolt = <1350000>;
  310. regulator-ramp-delay = <6001>;
  311.  
  312. regulator-state-mem {
  313. regulator-off-in-suspend;
  314. };
  315. };
  316.  
  317. vcc_1v8: DCDC_REG5 {
  318. regulator-name = "vcc_1v8";
  319. regulator-always-on;
  320. regulator-boot-on;
  321. regulator-min-microvolt = <1800000>;
  322. regulator-max-microvolt = <1800000>;
  323.  
  324. regulator-state-mem {
  325. regulator-off-in-suspend;
  326. };
  327. };
  328.  
  329. vdda0v9_image: LDO_REG1 {
  330. regulator-name = "vdda0v9_image";
  331. regulator-min-microvolt = <900000>;
  332. regulator-max-microvolt = <900000>;
  333.  
  334. regulator-state-mem {
  335. regulator-off-in-suspend;
  336. };
  337. };
  338.  
  339. vdda_0v9: LDO_REG2 {
  340. regulator-name = "vdda_0v9";
  341. regulator-always-on;
  342. regulator-boot-on;
  343. regulator-min-microvolt = <900000>;
  344. regulator-max-microvolt = <900000>;
  345.  
  346. regulator-state-mem {
  347. regulator-off-in-suspend;
  348. };
  349. };
  350.  
  351. vdda0v9_pmu: LDO_REG3 {
  352. regulator-name = "vdda0v9_pmu";
  353. regulator-always-on;
  354. regulator-boot-on;
  355. regulator-min-microvolt = <900000>;
  356. regulator-max-microvolt = <900000>;
  357.  
  358. regulator-state-mem {
  359. regulator-on-in-suspend;
  360. regulator-suspend-microvolt = <900000>;
  361. };
  362. };
  363.  
  364. vccio_acodec: LDO_REG4 {
  365. regulator-name = "vccio_acodec";
  366. regulator-always-on;
  367. regulator-min-microvolt = <3300000>;
  368. regulator-max-microvolt = <3300000>;
  369.  
  370. regulator-state-mem {
  371. regulator-off-in-suspend;
  372. };
  373. };
  374.  
  375. vccio_sd: LDO_REG5 {
  376. regulator-name = "vccio_sd";
  377. regulator-min-microvolt = <1800000>;
  378. regulator-max-microvolt = <3300000>;
  379.  
  380. regulator-state-mem {
  381. regulator-off-in-suspend;
  382. };
  383. };
  384.  
  385. vcc3v3_pmu: LDO_REG6 {
  386. regulator-name = "vcc3v3_pmu";
  387. regulator-always-on;
  388. regulator-boot-on;
  389. regulator-min-microvolt = <3300000>;
  390. regulator-max-microvolt = <3300000>;
  391.  
  392. regulator-state-mem {
  393. regulator-on-in-suspend;
  394. regulator-suspend-microvolt = <3300000>;
  395. };
  396. };
  397.  
  398. vcca_1v8: LDO_REG7 {
  399. regulator-name = "vcca_1v8";
  400. regulator-always-on;
  401. regulator-boot-on;
  402. regulator-min-microvolt = <1800000>;
  403. regulator-max-microvolt = <1800000>;
  404.  
  405. regulator-state-mem {
  406. regulator-off-in-suspend;
  407. };
  408. };
  409.  
  410. vcca1v8_pmu: LDO_REG8 {
  411. regulator-name = "vcca1v8_pmu";
  412. regulator-always-on;
  413. regulator-boot-on;
  414. regulator-min-microvolt = <1800000>;
  415. regulator-max-microvolt = <1800000>;
  416.  
  417. regulator-state-mem {
  418. regulator-on-in-suspend;
  419. regulator-suspend-microvolt = <1800000>;
  420. };
  421. };
  422.  
  423. vcca1v8_image: LDO_REG9 {
  424. regulator-name = "vcca1v8_image";
  425. regulator-min-microvolt = <1800000>;
  426. regulator-max-microvolt = <1800000>;
  427.  
  428. regulator-state-mem {
  429. regulator-off-in-suspend;
  430. };
  431. };
  432.  
  433. vcc_3v3: SWITCH_REG1 {
  434. regulator-name = "vcc_3v3";
  435. regulator-always-on;
  436. regulator-boot-on;
  437.  
  438. regulator-state-mem {
  439. regulator-off-in-suspend;
  440. };
  441. };
  442.  
  443. vcc3v3_sd: SWITCH_REG2 {
  444. regulator-name = "vcc3v3_sd";
  445.  
  446. regulator-state-mem {
  447. regulator-off-in-suspend;
  448. };
  449. };
  450. };
  451.  
  452. codec {
  453. mic-in-differential;
  454. };
  455. };
  456. };
  457.  
  458. &i2s1_8ch {
  459. pinctrl-names = "default";
  460. pinctrl-0 = <&i2s1m0_sclktx
  461. &i2s1m0_lrcktx
  462. &i2s1m0_sdi0
  463. &i2s1m0_sdo0>;
  464. rockchip,trcm-sync-tx-only;
  465. status = "okay";
  466. };
  467.  
  468. &pinctrl {
  469. ethernet {
  470. eth_phy_rst: eth_phy_rst {
  471. rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
  472. };
  473. };
  474.  
  475. leds {
  476. led_user_en: led_user_en {
  477. rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
  478. };
  479. };
  480.  
  481. pmic {
  482. pmic_int: pmic_int {
  483. rockchip,pins =
  484. <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  485. };
  486. };
  487.  
  488. usb {
  489. vcc5v0_usb_host_en: vcc5v0_usb_host_en {
  490. rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
  491. };
  492.  
  493. vcc5v0_otg_en: vcc5v0-otg-en {
  494. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
  495. };
  496.  
  497. vcc5v0_hub_en: vcc5v0-hub-en {
  498. rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
  499. };
  500. };
  501. };
  502.  
  503. &pmu_io_domains {
  504. pmuio1-supply = <&vcc3v3_pmu>;
  505. pmuio2-supply = <&vcc3v3_pmu>;
  506. vccio1-supply = <&vccio_acodec>;
  507. vccio2-supply = <&vcc_1v8>;
  508. vccio3-supply = <&vccio_sd>;
  509. vccio4-supply = <&vcc_1v8>;
  510. vccio5-supply = <&vcc_3v3>;
  511. vccio6-supply = <&vcc_1v8>;
  512. vccio7-supply = <&vcc_3v3>;
  513. status = "okay";
  514. };
  515.  
  516. &saradc {
  517. vref-supply = <&vcca_1v8>;
  518. status = "okay";
  519. };
  520.  
  521. &sdhci {
  522. bus-width = <8>;
  523. max-frequency = <200000000>;
  524. non-removable;
  525. pinctrl-names = "default";
  526. pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
  527. vmmc-supply = <&vcc_3v3>;
  528. vqmmc-supply = <&vcc_1v8>;
  529. status = "okay";
  530. };
  531.  
  532. &sdmmc0 {
  533. bus-width = <4>;
  534. cap-sd-highspeed;
  535. cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
  536. disable-wp;
  537. pinctrl-names = "default";
  538. pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
  539. sd-uhs-sdr104;
  540. vmmc-supply = <&vcc3v3_sd>;
  541. vqmmc-supply = <&vccio_sd>;
  542. status = "okay";
  543. };
  544.  
  545. &tsadc {
  546. rockchip,hw-tshut-mode = <1>;
  547. rockchip,hw-tshut-polarity = <0>;
  548. status = "okay";
  549. };
  550.  
  551. &uart2 {
  552. status = "okay";
  553. };
  554.  
  555. &usb_host0_ehci {
  556. status = "okay";
  557. };
  558.  
  559. &vop {
  560. assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
  561. assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
  562. status = "okay";
  563. };
  564.  
  565. &vop_mmu {
  566. status = "okay";
  567. };
  568.  
  569. &vp0 {
  570. vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
  571. reg = <ROCKCHIP_VOP2_EP_HDMI0>;
  572. remote-endpoint = <&hdmi_in_vp0>;
  573. };
  574. };
  575.  
  576. &vpu {
  577. status = "okay";
  578. };
  579.  
  580. &vdpu_mmu {
  581. status = "okay";
  582. };
  583.  
  584. &usb_host0_ehci {
  585. status = "okay";
  586. };
  587.  
  588. &usb_host0_ohci {
  589. status = "okay";
  590. };
  591.  
  592. &usb2phy0 {
  593. status = "okay";
  594. };
  595.  
  596. &usb2phy0_host {
  597. phy-supply = <&vcc5v0_usb_host>;
  598. status = "okay";
  599. };
  600.  
  601. &usb_host1_ehci {
  602. status = "okay";
  603. };
  604.  
  605. &usb_host1_ohci {
  606. status = "okay";
  607. };
  608.  
  609. &usb2phy1 {
  610. status = "okay";
  611. };
  612.  
  613. &usb2phy1_host {
  614. phy-supply = <&vcc5v0_usb_host>;
  615. status = "okay";
  616. };
  617.  
  618. &usb2phy1_otg {
  619. phy-supply = <&vcc5v0_usb_host>;
  620. status = "okay";
  621. };
  622.  
  623. &usbdrd30 {
  624. status = "okay";
  625. };
  626.  
  627. &usbhost30 {
  628. status = "okay";
  629. };
  630.  
  631. &combphy0 {
  632. status = "okay";
  633. };
  634.  
  635. &combphy1 {
  636. status = "okay";
  637. };
  638.  
  639. &combphy2 {
  640. status = "okay";
  641. };
  642.  
  643. &sata1 {
  644. status = "disabled";
  645. };
  646.  
  647. &sata2 {
  648. status = "disabled";
  649. };
  650.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement