Advertisement
Bullet64

DTS

Jun 10th, 2022
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.21 KB | None | 0 0
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. *
  4. */
  5.  
  6. /dts-v1/;
  7.  
  8. #include <dt-bindings/gpio/gpio.h>
  9. #include <dt-bindings/pinctrl/rockchip.h>
  10. #include "rk3566.dtsi"
  11.  
  12. / {
  13. model = "Pine64 RK3566 Quartz64-B Board";
  14. compatible = "pine64,quartz64-b", "rockchip,rk3566";
  15.  
  16. aliases {
  17. ethernet0 = &gmac1;
  18. mmc0 = &sdmmc0;
  19. mmc1 = &sdhci;
  20. mmc2 = &sdmmc1;
  21. };
  22.  
  23. chosen: chosen {
  24. stdout-path = "serial2:1500000n8";
  25. };
  26.  
  27. gmac1_clkin: external-gmac1-clock {
  28. compatible = "fixed-clock";
  29. clock-frequency = <125000000>;
  30. clock-output-names = "gmac1_clkin";
  31. #clock-cells = <0>;
  32. };
  33.  
  34. leds {
  35. compatible = "gpio-leds";
  36.  
  37. led-user {
  38. label = "user-led";
  39. default-state = "on";
  40. gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
  41. linux,default-trigger = "heartbeat";
  42. pinctrl-names = "default";
  43. pinctrl-0 = <&user_led_enable_h>;
  44. retain-state-suspended;
  45. };
  46. };
  47.  
  48. sdio_pwrseq: sdio-pwrseq {
  49. status = "okay";
  50. compatible = "mmc-pwrseq-simple";
  51. clocks = <&rk809 1>;
  52. clock-names = "ext_clock";
  53. pinctrl-names = "default";
  54. pinctrl-0 = <&wifi_enable_h>;
  55. reset-gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_LOW>;
  56. post-power-on-delay-ms = <100>;
  57. power-off-delay-us = <5000000>;
  58. };
  59.  
  60. vcc5v0_in: vcc5v0_in {
  61. compatible = "regulator-fixed";
  62. regulator-name = "vcc5v0_in";
  63. regulator-always-on;
  64. regulator-boot-on;
  65. regulator-min-microvolt = <5000000>;
  66. regulator-max-microvolt = <5000000>;
  67. };
  68.  
  69. vcc5v0_sys: vcc5v0_sys {
  70. compatible = "regulator-fixed";
  71. regulator-name = "vcc5v0_sys";
  72. regulator-always-on;
  73. regulator-boot-on;
  74. regulator-min-microvolt = <5000000>;
  75. regulator-max-microvolt = <5000000>;
  76. vin-supply = <&vcc5v0_in>;
  77. };
  78.  
  79. vcc3v3_sys: vcc3v3_sys {
  80. compatible = "regulator-fixed";
  81. regulator-name = "vcc3v3_sys";
  82. regulator-min-microvolt = <3300000>;
  83. regulator-max-microvolt = <3300000>;
  84. regulator-always-on;
  85. vin-supply = <&vcc5v0_sys>;
  86. };
  87.  
  88. vcc5v0_usb30_host: vcc5v0_usb30_host {
  89. compatible = "regulator-fixed";
  90. regulator-name = "vcc5v0_usb30_host";
  91. enable-active-high;
  92. gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
  93. pinctrl-names = "default";
  94. pinctrl-0 = <&vcc5v0_usb30_host_en_h>;
  95. regulator-always-on;
  96. regulator-min-microvolt = <5000000>;
  97. regulator-max-microvolt = <5000000>;
  98. vin-supply = <&vcc5v0_sys>;
  99. };
  100.  
  101. vcc5v0_usb_otg: vcc5v0_usb_otg {
  102. compatible = "regulator-fixed";
  103. regulator-name = "vcc5v0_usb_otg";
  104. enable-active-high;
  105. gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
  106. pinctrl-names = "default";
  107. pinctrl-0 = <&vcc5v0_usb_otg_en_h>;
  108. regulator-always-on;
  109. regulator-min-microvolt = <5000000>;
  110. regulator-max-microvolt = <5000000>;
  111. vin-supply = <&vcc5v0_sys>;
  112. };
  113.  
  114. vcc3v3_pcie: vcc3v3_pcie {
  115. compatible = "regulator-fixed";
  116. regulator-name = "vcc3v3_pcie";
  117. enable-active-high;
  118. gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
  119. pinctrl-names = "default";
  120. pinctrl-0 = <&vcc3v3_pcie_en_h>;
  121. regulator-min-microvolt = <3300000>;
  122. regulator-max-microvolt = <3300000>;
  123. vin-supply = <&vcc_3v3>;
  124. };
  125. };
  126.  
  127. &combphy1 {
  128. status = "okay";
  129. };
  130.  
  131. &combphy2 {
  132. status = "okay";
  133. };
  134.  
  135. &cpu0 {
  136. cpu-supply = <&vdd_cpu>;
  137. };
  138.  
  139. &cpu1 {
  140. cpu-supply = <&vdd_cpu>;
  141. };
  142.  
  143. &cpu2 {
  144. cpu-supply = <&vdd_cpu>;
  145. };
  146.  
  147. &cpu3 {
  148. cpu-supply = <&vdd_cpu>;
  149. };
  150.  
  151. &gmac1 {
  152. assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
  153. assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
  154. clock_in_out = "input";
  155. phy-mode = "rgmii-id";
  156. phy-supply = <&vcc_3v3>;
  157. pinctrl-names = "default";
  158. pinctrl-0 = <&gmac1m1_miim
  159. &gmac1m1_tx_bus2
  160. &gmac1m1_rx_bus2
  161. &gmac1m1_rgmii_clk
  162. &gmac1m1_clkinout
  163. &gmac1m1_rgmii_bus>;
  164. snps,reset-gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
  165. snps,reset-active-low;
  166. /* Reset time is 20ms, 100ms for rtl8211f, also works well here */
  167. snps,reset-delays-us = <0 20000 100000>;
  168. tx_delay = <0x4f>;
  169. rx_delay = <0x24>;
  170. phy-handle = <&rgmii_phy1>;
  171. status = "okay";
  172. };
  173.  
  174. &i2c0 {
  175. status = "okay";
  176.  
  177. vdd_cpu: regulator@1c {
  178. compatible = "tcs,tcs4525";
  179. reg = <0x1c>;
  180. fcs,suspend-voltage-selector = <1>;
  181. regulator-name = "vdd_cpu";
  182. regulator-min-microvolt = <800000>;
  183. regulator-max-microvolt = <1150000>;
  184. regulator-ramp-delay = <2300>;
  185. regulator-always-on;
  186. regulator-boot-on;
  187. vin-supply = <&vcc5v0_sys>;
  188.  
  189. regulator-state-mem {
  190. regulator-off-in-suspend;
  191. };
  192. };
  193.  
  194. rk809: pmic@20 {
  195. compatible = "rockchip,rk809";
  196. reg = <0x20>;
  197. interrupt-parent = <&gpio0>;
  198. interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
  199. clock-output-names = "rk808-clkout1", "rk808-clkout2";
  200.  
  201. pinctrl-names = "default";
  202. pinctrl-0 = <&pmic_int>;
  203. rockchip,system-power-controller;
  204. wakeup-source;
  205. #clock-cells = <1>;
  206.  
  207. vcc1-supply = <&vcc3v3_sys>;
  208. vcc2-supply = <&vcc3v3_sys>;
  209. vcc3-supply = <&vcc3v3_sys>;
  210. vcc4-supply = <&vcc3v3_sys>;
  211. vcc5-supply = <&vcc3v3_sys>;
  212. vcc6-supply = <&vcc3v3_sys>;
  213. vcc7-supply = <&vcc3v3_sys>;
  214. vcc8-supply = <&vcc3v3_sys>;
  215. vcc9-supply = <&vcc3v3_sys>;
  216.  
  217. regulators {
  218. vdd_log: DCDC_REG1 {
  219. regulator-name = "vdd_log";
  220. regulator-always-on;
  221. regulator-boot-on;
  222. regulator-min-microvolt = <500000>;
  223. regulator-max-microvolt = <1350000>;
  224. regulator-init-microvolt = <900000>;
  225. regulator-ramp-delay = <6001>;
  226.  
  227. regulator-state-mem {
  228. regulator-on-in-suspend;
  229. regulator-suspend-microvolt = <900000>;
  230. };
  231. };
  232.  
  233. vdd_gpu: DCDC_REG2 {
  234. regulator-name = "vdd_gpu";
  235. regulator-always-on;
  236. regulator-boot-on;
  237. regulator-min-microvolt = <900000>;
  238. regulator-max-microvolt = <1350000>;
  239. regulator-init-microvolt = <900000>;
  240. regulator-ramp-delay = <6001>;
  241.  
  242. regulator-state-mem {
  243. regulator-off-in-suspend;
  244. regulator-suspend-microvolt = <900000>;
  245. };
  246. };
  247.  
  248. vcc_ddr: DCDC_REG3 {
  249. regulator-name = "vcc_ddr";
  250. regulator-always-on;
  251. regulator-boot-on;
  252. regulator-initial-mode = <0x2>;
  253. regulator-state-mem {
  254. regulator-on-in-suspend;
  255. };
  256. };
  257.  
  258. vdd_npu: DCDC_REG4 {
  259. regulator-name = "vdd_npu";
  260. regulator-min-microvolt = <900000>;
  261. regulator-max-microvolt = <1350000>;
  262. regulator-initial-mode = <0x2>;
  263. regulator-state-mem {
  264. regulator-off-in-suspend;
  265. };
  266. };
  267.  
  268. vcc_1v8: DCDC_REG5 {
  269. regulator-name = "vcc_1v8";
  270. regulator-always-on;
  271. regulator-boot-on;
  272. regulator-min-microvolt = <1800000>;
  273. regulator-max-microvolt = <1800000>;
  274.  
  275. regulator-state-mem {
  276. regulator-on-in-suspend;
  277. regulator-suspend-microvolt = <1800000>;
  278. };
  279. };
  280.  
  281. vdda0v9_image: LDO_REG1 {
  282. regulator-name = "vdda0v9_image";
  283. regulator-always-on;
  284. regulator-boot-on;
  285. regulator-min-microvolt = <900000>;
  286. regulator-max-microvolt = <900000>;
  287.  
  288. regulator-state-mem {
  289. regulator-on-in-suspend;
  290. regulator-suspend-microvolt = <900000>;
  291. };
  292. };
  293.  
  294. vdda_0v9: LDO_REG2 {
  295. regulator-name = "vdda_0v9";
  296. regulator-always-on;
  297. regulator-boot-on;
  298. regulator-min-microvolt = <900000>;
  299. regulator-max-microvolt = <900000>;
  300.  
  301. regulator-state-mem {
  302. regulator-on-in-suspend;
  303. regulator-suspend-microvolt = <900000>;
  304. };
  305. };
  306.  
  307. vdda0v9_pmu: LDO_REG3 {
  308. regulator-name = "vdda0v9_pmu";
  309. regulator-always-on;
  310. regulator-boot-on;
  311. regulator-min-microvolt = <900000>;
  312. regulator-max-microvolt = <900000>;
  313. regulator-state-mem {
  314. regulator-on-in-suspend;
  315. regulator-suspend-microvolt = <900000>;
  316. };
  317. };
  318.  
  319. vccio_acodec: LDO_REG4 {
  320. regulator-name = "vccio_acodec";
  321. regulator-always-on;
  322. regulator-boot-on;
  323. regulator-min-microvolt = <3300000>;
  324. regulator-max-microvolt = <3300000>;
  325.  
  326. regulator-state-mem {
  327. regulator-on-in-suspend;
  328. regulator-suspend-microvolt = <3300000>;
  329.  
  330. };
  331. };
  332.  
  333. vccio_sd: LDO_REG5 {
  334. regulator-name = "vccio_sd";
  335. regulator-always-on;
  336. regulator-boot-on;
  337. regulator-min-microvolt = <1800000>;
  338. regulator-max-microvolt = <3300000>;
  339.  
  340. regulator-state-mem {
  341. regulator-on-in-suspend;
  342. regulator-suspend-microvolt = <3300000>;
  343. };
  344. };
  345.  
  346. vcc3v3_pmu: LDO_REG6 {
  347. regulator-name = "vcc3v3_pmu";
  348. regulator-always-on;
  349. regulator-boot-on;
  350. regulator-min-microvolt = <3300000>;
  351. regulator-max-microvolt = <3300000>;
  352.  
  353. regulator-state-mem {
  354. regulator-on-in-suspend;
  355. regulator-suspend-microvolt = <3300000>;
  356. };
  357. };
  358.  
  359. vcca_1v8: LDO_REG7 {
  360. regulator-name = "vcca_1v8";
  361. regulator-always-on;
  362. regulator-boot-on;
  363. regulator-min-microvolt = <1800000>;
  364. regulator-max-microvolt = <1800000>;
  365.  
  366. regulator-state-mem {
  367. regulator-on-in-suspend;
  368. regulator-suspend-microvolt = <1800000>;
  369. };
  370. };
  371.  
  372. vcca1v8_pmu: LDO_REG8 {
  373. regulator-name = "vcca1v8_pmu";
  374. regulator-always-on;
  375. regulator-boot-on;
  376. regulator-min-microvolt = <1800000>;
  377. regulator-max-microvolt = <1800000>;
  378.  
  379. regulator-state-mem {
  380. regulator-on-in-suspend;
  381. regulator-suspend-microvolt = <1800000>;
  382. };
  383. };
  384.  
  385. vcca1v8_image: LDO_REG9 {
  386. regulator-name = "vcca1v8_image";
  387. regulator-always-on;
  388. regulator-boot-on;
  389. regulator-min-microvolt = <1800000>;
  390. regulator-max-microvolt = <1800000>;
  391.  
  392. regulator-state-mem {
  393. regulator-on-in-suspend;
  394. regulator-suspend-microvolt = <1800000>;
  395. };
  396. };
  397.  
  398. vcc_3v3: SWITCH_REG1 {
  399. regulator-boot-on;
  400. regulator-name = "vcc_3v3";
  401. };
  402.  
  403. vcc3v3_sd: SWITCH_REG2 {
  404. regulator-name = "vcc3v3_sd";
  405. };
  406. };
  407. };
  408.  
  409. eeprom@51 {
  410. compatible = "belling,bl24c16a", "atmel,24c16";
  411. reg = <0x51>;
  412. pagesize = <16>;
  413. };
  414. };
  415.  
  416. /* i2c2_m1 exposed on csi port, pulled up to vcc_gmac */
  417. &i2c2 {
  418. pinctrl-names = "default";
  419. pinctrl-0 = <&i2c2m1_xfer>;
  420. status = "okay";
  421. };
  422.  
  423. /* i2c3_m1 exposed on dsi port, pulled up to vcc_gmac */
  424. &i2c3 {
  425. pinctrl-names = "default";
  426. pinctrl-0 = <&i2c3m1_xfer>;
  427. status = "okay";
  428. };
  429.  
  430. /* i2c4_m0 is exposed on PI40
  431. * pin 27 - i2c4_sda_m0
  432. * pin 28 - i2c4_scl_m0
  433. */
  434. &i2c4 {
  435. status = "okay";
  436. };
  437.  
  438. /* i2c5_m0 is exposed on PI40
  439. * pin 29 - i2c5_scl_m0
  440. * pin 31 - i2c5_sda_m0
  441. */
  442. &i2c5 {
  443. status = "okay";
  444. };
  445.  
  446. &mdio1 {
  447. rgmii_phy1: ethernet-phy@0 {
  448. compatible = "ethernet-phy-ieee802.3-c22";
  449. reg = <0x1>;
  450. };
  451. };
  452.  
  453. &pcie2x1 {
  454. pinctrl-names = "default";
  455. pinctrl-0 = <&pcie_reset_h>;
  456. reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
  457. vpcie3v3-supply = <&vcc3v3_pcie>;
  458. status = "okay";
  459. };
  460.  
  461. &pinctrl {
  462. bt {
  463. bt_enable_h: bt-enable-h {
  464. rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
  465. };
  466.  
  467. bt_host_wake_l: bt-host-wake-l {
  468. rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_down>;
  469. };
  470.  
  471. bt_wake_l: bt-wake-l {
  472. rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
  473. };
  474. };
  475.  
  476. leds {
  477. user_led_enable_h: user-led-enable-h {
  478. rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
  479. };
  480. };
  481.  
  482. pcie {
  483. vcc3v3_pcie_en_h: vcc3v3-pcie-en-h {
  484. rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
  485. };
  486.  
  487. pcie_reset_h: pcie-reset-h {
  488. rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
  489. };
  490. };
  491.  
  492. pmic {
  493. pmic_int: pmic_int {
  494. rockchip,pins =
  495. <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  496. };
  497. };
  498.  
  499. sdio-pwrseq {
  500. wifi_enable_h: wifi-enable-h {
  501. rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
  502. };
  503. };
  504.  
  505. usb {
  506. vcc5v0_usb30_host_en_h: vcc5v0-usb30-host-en_h {
  507. rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
  508. };
  509.  
  510. vcc5v0_usb_otg_en_h: vcc5v0-usb-otg-en_h {
  511. rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
  512. };
  513. };
  514. };
  515.  
  516. &pmu_io_domains {
  517. status = "okay";
  518. pmuio1-supply = <&vcc3v3_pmu>;
  519. pmuio2-supply = <&vcca1v8_pmu>;
  520. vccio1-supply = <&vccio_acodec>;
  521. vccio2-supply = <&vcc_1v8>;
  522. vccio3-supply = <&vccio_sd>;
  523. vccio4-supply = <&vcca1v8_pmu>;
  524. vccio5-supply = <&vcc_3v3>;
  525. vccio6-supply = <&vcc_3v3>;
  526. vccio7-supply = <&vcc_3v3>;
  527. };
  528.  
  529. &saradc {
  530. vref-supply = <&vcca_1v8>;
  531. status = "okay";
  532. };
  533.  
  534. &sdhci {
  535. bus-width = <8>;
  536. mmc-hs200-1_8v;
  537. non-removable;
  538. vmmc-supply = <&vcc_3v3>;
  539. vqmmc-supply = <&vcc_1v8>;
  540. status = "okay";
  541. };
  542.  
  543. &sdmmc0 {
  544. bus-width = <4>;
  545. cap-sd-highspeed;
  546. cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
  547. disable-wp;
  548. pinctrl-names = "default";
  549. pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
  550. sd-uhs-sdr104;
  551. vmmc-supply = <&vcc3v3_sd>;
  552. vqmmc-supply = <&vccio_sd>;
  553. status = "okay";
  554. };
  555.  
  556. &sdmmc1 {
  557. bus-width = <4>;
  558. cap-sd-highspeed;
  559. cap-sdio-irq;
  560. keep-power-in-suspend;
  561. mmc-pwrseq = <&sdio_pwrseq>;
  562. non-removable;
  563. pinctrl-names = "default";
  564. pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
  565. vmmc-supply = <&vcc3v3_sys>;
  566. vqmmc-supply = <&vcca1v8_pmu>;
  567. status = "okay";
  568. };
  569.  
  570. &sfc {
  571. pinctrl-0 = <&fspi_pins>;
  572. pinctrl-names = "default";
  573. status = "okay";
  574.  
  575. flash@0 {
  576. compatible = "jedec,spi-nor";
  577. reg = <0>;
  578. spi-max-frequency = <24000000>;
  579. spi-rx-bus-width = <4>;
  580. spi-tx-bus-width = <1>;
  581. };
  582. };
  583.  
  584. &tsadc {
  585. status = "okay";
  586. };
  587.  
  588. &uart1 {
  589. pinctrl-names = "default";
  590. pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn &uart1m0_rtsn>;
  591. status = "okay";
  592. uart-has-rtscts;
  593.  
  594. bluetooth {
  595. compatible = "brcm,bcm4345c5";
  596. clocks = <&rk809 1>;
  597. clock-names = "lpo";
  598. device-wake-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
  599. host-wake-gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
  600. shutdown-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
  601. pinctrl-names = "default";
  602. pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
  603. vbat-supply = <&vcc3v3_sys>;
  604. vddio-supply = <&vcca1v8_pmu>;
  605. };
  606. };
  607.  
  608. /* uart2_m0 is exposed on PI40
  609. * pin 8 - uart2_tx_m0
  610. * pin 10 - uart2_rx_m0
  611. */
  612. &uart2 {
  613. status = "okay";
  614. };
  615.  
  616. &usb2phy0_host {
  617. phy-supply = <&vcc5v0_usb30_host>;
  618. status = "okay";
  619. };
  620.  
  621. &usb2phy0_otg {
  622. vbus-supply = <&vcc5v0_usb_otg>;
  623. status = "okay";
  624. };
  625.  
  626. &usb2phy1_otg {
  627. phy-supply = <&vcc5v0_usb30_host>;
  628. status = "okay";
  629. };
  630.  
  631. &usb2phy0 {
  632. status = "okay";
  633. };
  634.  
  635. &usb2phy1 {
  636. status = "okay";
  637. };
  638.  
  639. &usb_host0_xhci {
  640. status = "okay";
  641. };
  642.  
  643. &usb_host1_xhci {
  644. status = "okay";
  645. };
  646.  
  647. &usb_host0_ehci {
  648. status = "okay";
  649. };
  650.  
  651. &usb_host0_ohci {
  652. status = "okay";
  653. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement