Advertisement
Guest User

Untitled

a guest
Jan 9th, 2022
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.50 KB | None | 0 0
  1. [piotro@builder-armv8 rockchip]$ cat rk3566-x96_x6.dts
  2. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  3.  
  4. /dts-v1/;
  5.  
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/pinctrl/rockchip.h>
  8. //#include <dt-bindings/soc/rockchip,vop2.h>
  9. #include "rk3566.dtsi"
  10.  
  11. / {
  12. model = "X96 X6 TvBox";
  13. compatible = "pine64,quartz64-a", "rockchip,rk3566";
  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. gmac1_clkin: external-gmac1-clock {
  26. compatible = "fixed-clock";
  27. clock-frequency = <125000000>;
  28. clock-output-names = "gmac1_clkin";
  29. #clock-cells = <0>;
  30. };
  31.  
  32. // hdmi-con {
  33. // compatible = "hdmi-connector";
  34. // type = "c";
  35.  
  36. // port {
  37. // hdmi_con_in: endpoint {
  38. // remote-endpoint = <&hdmi_out_con>;
  39. // };
  40. // };
  41. // };
  42.  
  43. leds {
  44. compatible = "gpio-leds";
  45.  
  46. led-work {
  47. label = "work-led";
  48. default-state = "off";
  49. gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
  50. pinctrl-names = "default";
  51. pinctrl-0 = <&work_led_enable_h>;
  52. retain-state-suspended;
  53. };
  54.  
  55. led-diy {
  56. label = "diy-led";
  57. default-state = "on";
  58. gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
  59. linux,default-trigger = "heartbeat";
  60. pinctrl-names = "default";
  61. pinctrl-0 = <&diy_led_enable_h>;
  62. retain-state-suspended;
  63. };
  64. };
  65.  
  66. rk817-sound {
  67. compatible = "simple-audio-card";
  68. simple-audio-card,format = "i2s";
  69. simple-audio-card,name = "Analog RK817";
  70. simple-audio-card,mclk-fs = <256>;
  71.  
  72. simple-audio-card,cpu {
  73. sound-dai = <&i2s1_8ch>;
  74. };
  75.  
  76. simple-audio-card,codec {
  77. sound-dai = <&rk817>;
  78. };
  79. };
  80.  
  81. spdif_dit: spdif-dit {
  82. compatible = "linux,spdif-dit";
  83. #sound-dai-cells = <0>;
  84. };
  85.  
  86. spdif_sound: spdif-sound {
  87. compatible = "simple-audio-card";
  88. simple-audio-card,name = "SPDIF";
  89.  
  90. simple-audio-card,cpu {
  91. sound-dai = <&spdif>;
  92. };
  93.  
  94. simple-audio-card,codec {
  95. sound-dai = <&spdif_dit>;
  96. };
  97. };
  98.  
  99. vcc12v_dcin: vcc12v_dcin {
  100. compatible = "regulator-fixed";
  101. regulator-name = "vcc12v_dcin";
  102. regulator-always-on;
  103. regulator-boot-on;
  104. regulator-min-microvolt = <12000000>;
  105. regulator-max-microvolt = <12000000>;
  106. };
  107.  
  108. /* vbus feeds the rk817 usb input.
  109. * With no battery attached, also feeds vcc_bat+
  110. * via ON/OFF_BAT jumper
  111. */
  112. vbus: vbus {
  113. compatible = "regulator-fixed";
  114. regulator-name = "vbus";
  115. regulator-always-on;
  116. regulator-boot-on;
  117. regulator-min-microvolt = <5000000>;
  118. regulator-max-microvolt = <5000000>;
  119. vin-supply = <&vcc12v_dcin>;
  120. };
  121.  
  122. vcc5v0_usb: vcc5v0_usb {
  123. compatible = "regulator-fixed";
  124. regulator-name = "vcc5v0_usb";
  125. regulator-always-on;
  126. regulator-boot-on;
  127. regulator-min-microvolt = <5000000>;
  128. regulator-max-microvolt = <5000000>;
  129. vin-supply = <&vcc12v_dcin>;
  130. };
  131.  
  132. vcc3v3_sd: vcc3v3_sd {
  133. compatible = "regulator-fixed";
  134. enable-active-low;
  135. gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  136. pinctrl-names = "default";
  137. pinctrl-0 = <&vcc_sd_h>;
  138. regulator-boot-on;
  139. regulator-name = "vcc3v3_sd";
  140. regulator-min-microvolt = <3300000>;
  141. regulator-max-microvolt = <3300000>;
  142. vin-supply = <&vcc_3v3>;
  143. };
  144.  
  145. /* sourced from vbus and vcc_bat+ via rk817 sw5 */
  146. vcc_sys: vcc_sys {
  147. compatible = "regulator-fixed";
  148. regulator-name = "vcc_sys";
  149. regulator-always-on;
  150. regulator-boot-on;
  151. regulator-min-microvolt = <4400000>;
  152. regulator-max-microvolt = <4400000>;
  153. vin-supply = <&vbus>;
  154. };
  155.  
  156. reg_vcc3v3: vcc3v3 {
  157. compatible = "regulator-fixed";
  158. regulator-name = "vcc3v3";
  159. regulator-min-microvolt = <3300000>;
  160. regulator-max-microvolt = <3300000>;
  161. };
  162. };
  163.  
  164. &cpu0 {
  165. cpu-supply = <&vdd_cpu>;
  166. };
  167.  
  168. &cpu1 {
  169. cpu-supply = <&vdd_cpu>;
  170. };
  171.  
  172. &cpu2 {
  173. cpu-supply = <&vdd_cpu>;
  174. };
  175.  
  176. &cpu3 {
  177. cpu-supply = <&vdd_cpu>;
  178. };
  179.  
  180. &cpu_thermal {
  181. trips {
  182. cpu_hot: cpu_hot {
  183. temperature = <55000>;
  184. hysteresis = <2000>;
  185. type = "active";
  186. };
  187. };
  188.  
  189. cooling-maps {
  190. map1 {
  191. trip = <&cpu_hot>;
  192. };
  193. };
  194. };
  195.  
  196. &gmac1 {
  197. assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
  198. assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
  199. clock_in_out = "input";
  200. phy-supply = <&reg_vcc3v3>;
  201. phy-mode = "rgmii";
  202. pinctrl-names = "default";
  203. pinctrl-0 = <&gmac1m0_miim
  204. &gmac1m0_tx_bus2
  205. &gmac1m0_rx_bus2
  206. &gmac1m0_rgmii_clk
  207. &gmac1m0_clkinout
  208. &gmac1m0_rgmii_bus>;
  209. snps,reset-gpio = <&gpio0 RK_PC3 GPIO_ACTIVE_LOW>;
  210. snps,reset-active-low;
  211. /* Reset time is 20ms, 100ms for rtl8211f */
  212. snps,reset-delays-us = <0 20000 100000>;
  213. tx_delay = <0x30>;
  214. rx_delay = <0x10>;
  215. phy-handle = <&rgmii_phy1>;
  216. status = "okay";
  217. };
  218.  
  219. //&hdmi {
  220. // avdd-0v9-supply = <&vdda_0v9>;
  221. // avdd-1v8-supply = <&vcc_1v8>;
  222. // status = "okay";
  223. //};
  224.  
  225. //&hdmi_out {
  226. // hdmi_out_con: endpoint {
  227. // remote-endpoint = <&hdmi_con_in>;
  228. // };
  229. //};
  230.  
  231. //&hdmi_sound {
  232. // status = "okay";
  233. //};
  234.  
  235. //&gpu {
  236. // mali-supply = <&vdd_gpu>;
  237. // status = "okay";
  238. //};
  239.  
  240. &i2c0 {
  241. status = "okay";
  242.  
  243. vdd_cpu: regulator@1c {
  244. compatible = "tcs,tcs4525";
  245. reg = <0x1c>;
  246. fcs,suspend-voltage-selector = <1>;
  247. regulator-name = "vdd_cpu";
  248. regulator-min-microvolt = <800000>;
  249. regulator-max-microvolt = <1150000>;
  250. regulator-ramp-delay = <2300>;
  251. regulator-always-on;
  252. regulator-boot-on;
  253. vin-supply = <&vcc_sys>;
  254.  
  255. regulator-state-mem {
  256. regulator-off-in-suspend;
  257. };
  258. };
  259.  
  260. rk817: pmic@20 {
  261. compatible = "rockchip,rk817";
  262. reg = <0x20>;
  263. interrupt-parent = <&gpio0>;
  264. interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
  265. assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
  266. assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
  267. clock-names = "mclk";
  268. clocks = <&cru I2S1_MCLKOUT_TX>;
  269. clock-output-names = "rk808-clkout1", "rk808-clkout2";
  270. #clock-cells = <1>;
  271. pinctrl-names = "default";
  272. pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
  273. rockchip,system-power-controller;
  274. #sound-dai-cells = <0>;
  275. wakeup-source;
  276.  
  277. vcc1-supply = <&vcc_sys>;
  278. vcc2-supply = <&vcc_sys>;
  279. vcc3-supply = <&vcc_sys>;
  280. vcc4-supply = <&vcc_sys>;
  281. vcc5-supply = <&vcc_sys>;
  282. vcc6-supply = <&vcc_sys>;
  283. vcc7-supply = <&vcc_sys>;
  284. vcc8-supply = <&vcc_sys>;
  285. vcc9-supply = <&dcdc_boost>;
  286.  
  287. regulators {
  288. vdd_logic: DCDC_REG1 {
  289. regulator-always-on;
  290. regulator-boot-on;
  291. regulator-min-microvolt = <500000>;
  292. regulator-max-microvolt = <1350000>;
  293. regulator-init-microvolt = <900000>;
  294. regulator-ramp-delay = <6001>;
  295. regulator-initial-mode = <0x2>;
  296. regulator-name = "vdd_logic";
  297. regulator-state-mem {
  298. regulator-on-in-suspend;
  299. regulator-suspend-microvolt = <900000>;
  300. };
  301. };
  302.  
  303. vdd_gpu: DCDC_REG2 {
  304. regulator-always-on;
  305. regulator-boot-on;
  306. regulator-min-microvolt = <500000>;
  307. regulator-max-microvolt = <1350000>;
  308. regulator-init-microvolt = <900000>;
  309. regulator-ramp-delay = <6001>;
  310. regulator-initial-mode = <0x2>;
  311. regulator-name = "vdd_gpu";
  312. regulator-state-mem {
  313. regulator-off-in-suspend;
  314. };
  315. };
  316.  
  317. vcc_ddr: DCDC_REG3 {
  318. regulator-always-on;
  319. regulator-boot-on;
  320. regulator-min-microvolt = <1100000>;
  321. regulator-max-microvolt = <1100000>;
  322. regulator-initial-mode = <0x2>;
  323. regulator-name = "vcc_ddr";
  324. regulator-state-mem {
  325. regulator-on-in-suspend;
  326. };
  327. };
  328.  
  329. vcc_3v3: DCDC_REG4 {
  330. regulator-always-on;
  331. regulator-boot-on;
  332. regulator-min-microvolt = <3300000>;
  333. regulator-max-microvolt = <3300000>;
  334. regulator-initial-mode = <0x2>;
  335. regulator-name = "vcc_3v3";
  336. regulator-state-mem {
  337. regulator-off-in-suspend;
  338. };
  339. };
  340.  
  341. vcca1v8_pmu: LDO_REG1 {
  342. regulator-always-on;
  343. regulator-boot-on;
  344. regulator-min-microvolt = <1800000>;
  345. regulator-max-microvolt = <1800000>;
  346. regulator-name = "vcca1v8_pmu";
  347. regulator-state-mem {
  348. regulator-on-in-suspend;
  349. regulator-suspend-microvolt = <1800000>;
  350. };
  351. };
  352.  
  353. vdda_0v9: LDO_REG2 {
  354. regulator-always-on;
  355. regulator-boot-on;
  356. regulator-min-microvolt = <900000>;
  357. regulator-max-microvolt = <900000>;
  358. regulator-name = "vdda_0v9";
  359. regulator-state-mem {
  360. regulator-off-in-suspend;
  361. };
  362. };
  363.  
  364. vdda0v9_pmu: LDO_REG3 {
  365. regulator-always-on;
  366. regulator-boot-on;
  367. regulator-min-microvolt = <900000>;
  368. regulator-max-microvolt = <900000>;
  369. regulator-name = "vdda0v9_pmu";
  370. regulator-state-mem {
  371. regulator-on-in-suspend;
  372. regulator-suspend-microvolt = <900000>;
  373. };
  374. };
  375.  
  376. vccio_acodec: LDO_REG4 {
  377. regulator-always-on;
  378. regulator-boot-on;
  379. regulator-min-microvolt = <3300000>;
  380. regulator-max-microvolt = <3300000>;
  381. regulator-name = "vccio_acodec";
  382. regulator-state-mem {
  383. regulator-off-in-suspend;
  384. };
  385. };
  386.  
  387. vccio_sd: LDO_REG5 {
  388. regulator-always-on;
  389. regulator-boot-on;
  390. regulator-min-microvolt = <1800000>;
  391. regulator-max-microvolt = <3300000>;
  392. regulator-name = "vccio_sd";
  393. regulator-state-mem {
  394. regulator-off-in-suspend;
  395. };
  396. };
  397.  
  398. vcc3v3_pmu: LDO_REG6 {
  399. regulator-always-on;
  400. regulator-boot-on;
  401. regulator-min-microvolt = <3300000>;
  402. regulator-max-microvolt = <3300000>;
  403. regulator-name = "vcc3v3_pmu";
  404. regulator-state-mem {
  405. regulator-on-in-suspend;
  406. regulator-suspend-microvolt = <3300000>;
  407. };
  408. };
  409.  
  410. vcc_1v8: LDO_REG7 {
  411. regulator-always-on;
  412. regulator-boot-on;
  413. regulator-min-microvolt = <1800000>;
  414. regulator-max-microvolt = <1800000>;
  415. regulator-name = "vcc_1v8";
  416. regulator-state-mem {
  417. regulator-off-in-suspend;
  418. };
  419. };
  420.  
  421. vcc1v8_dvp: LDO_REG8 {
  422. regulator-always-on;
  423. regulator-boot-on;
  424. regulator-min-microvolt = <1800000>;
  425. regulator-max-microvolt = <1800000>;
  426. regulator-name = "vcc1v8_dvp";
  427. regulator-state-mem {
  428. regulator-off-in-suspend;
  429. };
  430. };
  431.  
  432. vcc2v8_dvp: LDO_REG9 {
  433. regulator-always-on;
  434. regulator-boot-on;
  435. regulator-min-microvolt = <2800000>;
  436. regulator-max-microvolt = <2800000>;
  437. regulator-name = "vcc2v8_dvp";
  438. regulator-state-mem {
  439. regulator-off-in-suspend;
  440. };
  441. };
  442.  
  443. dcdc_boost: BOOST {
  444. regulator-always-on;
  445. regulator-boot-on;
  446. regulator-min-microvolt = <5000000>;
  447. regulator-max-microvolt = <5000000>;
  448. regulator-name = "boost";
  449. regulator-state-mem {
  450. regulator-off-in-suspend;
  451. };
  452. };
  453.  
  454. otg_switch: OTG_SWITCH {
  455. regulator-name = "otg_switch";
  456. regulator-state-mem {
  457. regulator-off-in-suspend;
  458. };
  459. };
  460. };
  461. };
  462. };
  463.  
  464. //&i2s0_8ch {
  465. // status = "okay";
  466. //};
  467.  
  468. &i2s1_8ch {
  469. pinctrl-names = "default";
  470. pinctrl-0 = <&i2s1m0_sclktx
  471. &i2s1m0_lrcktx
  472. &i2s1m0_sdi0
  473. &i2s1m0_sdo0>;
  474. rockchip,trcm-sync-tx-only;
  475. status = "okay";
  476. };
  477.  
  478. &mdio1 {
  479. rgmii_phy1: ethernet-phy@0 {
  480. compatible = "ethernet-phy-ieee802.3-c22";
  481. reg = <0>;
  482. };
  483. };
  484.  
  485. &pinctrl {
  486. bt {
  487. bt_enable_h: bt-enable-h {
  488. rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
  489. };
  490.  
  491. bt_host_wake_l: bt-host-wake-l {
  492. rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_down>;
  493. };
  494.  
  495. bt_wake_l: bt-wake-l {
  496. rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
  497. };
  498. };
  499.  
  500. leds {
  501. work_led_enable_h: work-led-enable-h {
  502. rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
  503. };
  504.  
  505. diy_led_enable_h: diy-led-enable-h {
  506. rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
  507. };
  508. };
  509.  
  510. pmic {
  511. pmic_int_l: pmic-int-l {
  512. rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  513. };
  514. };
  515.  
  516. vcc_sd {
  517. vcc_sd_h: vcc-sd-h {
  518. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
  519. };
  520. };
  521. };
  522.  
  523. &sdhci {
  524. bus-width = <8>;
  525. mmc-hs200-1_8v;
  526. non-removable;
  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. vmmc-supply = <&reg_vcc3v3>;
  540. status = "okay";
  541. };
  542.  
  543. &spdif {
  544. status = "okay";
  545. };
  546.  
  547. //&spi1 {
  548. // pinctrl-names = "default";
  549. // pinctrl-0 = <&spi1m1_cs0 &spi1m1_pins>;
  550. //};
  551.  
  552. &tsadc {
  553. /* tshut mode 0:CRU 1:GPIO */
  554. rockchip,hw-tshut-mode = <1>;
  555. /* tshut polarity 0:LOW 1:HIGH */
  556. rockchip,hw-tshut-polarity = <0>;
  557. status = "okay";
  558. };
  559.  
  560. &uart0 {
  561. pinctrl-names = "default";
  562. pinctrl-0 = <&uart0_xfer>;
  563. status = "okay";
  564. };
  565.  
  566. &uart1 {
  567. pinctrl-names = "default";
  568. pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
  569. status = "okay";
  570. uart-has-rtscts;
  571.  
  572. bluetooth {
  573. compatible = "brcm,bcm43438-bt";
  574. clocks = <&rk817 1>;
  575. clock-names = "lpo";
  576. device-wake-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
  577. host-wake-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
  578. shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
  579. pinctrl-names = "default";
  580. pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
  581. vbat-supply = <&vcc_sys>;
  582. vddio-supply = <&vcca1v8_pmu>;
  583. };
  584. };
  585.  
  586. &uart2 {
  587. status = "okay";
  588. };
  589.  
  590. //&vop {
  591. // assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
  592. // assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
  593. // status = "okay";
  594. //};
  595.  
  596. //&vop_mmu {
  597. // status = "okay";
  598. //};
  599.  
  600. //&hdmi_in {
  601. // hdmi_in_vp0: endpoint@0 {
  602. // reg = <0>;
  603. // remote-endpoint = <&vp0_out_hdmi>;
  604. // };
  605. //};
  606.  
  607. //&vp0 {
  608. // vp0_out_hdmi: endpoint@RK3568_VOP2_EP_HDMI {
  609. // reg = <RK3568_VOP2_EP_HDMI>;
  610. // remote-endpoint = <&hdmi_in_vp0>;
  611. // };
  612. //};
  613.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement