rc-pi-3562-v1_0.dtsi 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. // SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2. /*
  3. * Copyright (c) 2022 Rockchip Electronics Co., Ltd.
  4. *
  5. */
  6. #include <dt-bindings/display/drm_mipi_dsi.h>
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/pinctrl/rockchip.h>
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/pinctrl/rockchip.h>
  11. #include <dt-bindings/sensor-dev.h>
  12. #include <dt-bindings/input/input.h>
  13. #include "rk3562.dtsi"
  14. #include "rk3562-linux.dtsi"
  15. #include "rk3562-rk809.dtsi"
  16. #include "rk3562-amp.dtsi"
  17. / {
  18. model = "Rockchip RK3562 IDO EVB3562 V2 Board";
  19. compatible = "rockchip,Industio-EVB3562V2-VS1.0.0", "rockchip,rk3562";
  20. adc_keys: adc-keys {
  21. compatible = "adc-keys";
  22. io-channels = <&saradc0 1>;
  23. io-channel-names = "buttons";
  24. keyup-threshold-microvolt = <1800000>;
  25. poll-interval = <100>;
  26. vol-up-key {
  27. linux,code = <KEY_VOLUMEUP>;
  28. label = "volume up";
  29. press-threshold-microvolt = <17000>;
  30. };
  31. vol-down-key {
  32. linux,code = <KEY_VOLUMEDOWN>;
  33. label = "volume down";
  34. press-threshold-microvolt = <414000>;
  35. };
  36. menu-key {
  37. linux,code = <KEY_MENU>;
  38. label = "menu";
  39. press-threshold-microvolt = <800000>;
  40. };
  41. back-key {
  42. linux,code = <KEY_BACK>;
  43. label = "back";
  44. press-threshold-microvolt = <1200000>;
  45. };
  46. };
  47. bt_sco: bt-sco {
  48. status = "okay";
  49. compatible = "delta,dfbmcs320";
  50. #sound-dai-cells = <0>;
  51. };
  52. bt_sound: bt-sound {
  53. status = "okay";
  54. compatible = "simple-audio-card";
  55. simple-audio-card,format = "dsp_a";
  56. simple-audio-card,bitclock-inversion = <0>;
  57. simple-audio-card,mclk-fs = <256>;
  58. simple-audio-card,name = "rockchip,bt";
  59. simple-audio-card,cpu {
  60. sound-dai = <&sai2>;
  61. };
  62. simple-audio-card,codec {
  63. sound-dai = <&bt_sco>;
  64. };
  65. };
  66. dc_12v: dc-12v {
  67. compatible = "regulator-fixed";
  68. regulator-name = "dc_12v";
  69. regulator-always-on;
  70. regulator-boot-on;
  71. regulator-min-microvolt = <12000000>;
  72. regulator-max-microvolt = <12000000>;
  73. };
  74. rk809_sound: rk809-sound {
  75. status = "okay";
  76. compatible = "rockchip,multicodecs-card";
  77. rockchip,card-name = "rockchip-rk809";
  78. hp-det-gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
  79. rockchip,format = "i2s";
  80. rockchip,mclk-fs = <256>;
  81. rockchip,cpu = <&sai0>;
  82. rockchip,codec = <&rk809_codec>;
  83. pinctrl-names = "default";
  84. pinctrl-0 = <&hp_det>;
  85. };
  86. vcc3v3_pcie20: vcc3v3-pcie20 {
  87. compatible = "regulator-fixed";
  88. regulator-name = "vcc3v3_pcie20";
  89. regulator-min-microvolt = <3300000>;
  90. regulator-max-microvolt = <3300000>;
  91. enable-active-high;
  92. // gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
  93. startup-delay-us = <5000>;
  94. vin-supply = <&dc_12v>;
  95. status = "okay";
  96. };
  97. vcc5v0_sys: vcc5v0-sys {
  98. compatible = "regulator-fixed";
  99. regulator-name = "vcc5v0_sys";
  100. regulator-always-on;
  101. regulator-boot-on;
  102. regulator-min-microvolt = <5000000>;
  103. regulator-max-microvolt = <5000000>;
  104. vin-supply = <&dc_12v>;
  105. };
  106. vcc5v0_usb: vcc5v0-usb {
  107. compatible = "regulator-fixed";
  108. regulator-name = "vcc5v0_usb";
  109. regulator-always-on;
  110. regulator-boot-on;
  111. regulator-min-microvolt = <5000000>;
  112. regulator-max-microvolt = <5000000>;
  113. vin-supply = <&dc_12v>;
  114. };
  115. vcc5v0_usb_host: vcc5v0-usb-host {
  116. compatible = "regulator-fixed";
  117. regulator-name = "vcc5v0_usb_host";
  118. regulator-boot-on;
  119. regulator-always-on;
  120. regulator-min-microvolt = <5000000>;
  121. regulator-max-microvolt = <5000000>;
  122. enable-active-high;
  123. // gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
  124. vin-supply = <&vcc5v0_usb>;
  125. pinctrl-names = "default";
  126. // pinctrl-0 = <&usb_host_pwren>;
  127. };
  128. vcc5v0_usb_otg: vcc5v0-usb-otg {
  129. compatible = "regulator-fixed";
  130. regulator-name = "vcc5v0_usb_otg";
  131. regulator-min-microvolt = <5000000>;
  132. regulator-max-microvolt = <5000000>;
  133. enable-active-high;
  134. gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
  135. vin-supply = <&vcc5v0_usb>;
  136. pinctrl-names = "default";
  137. pinctrl-0 = <&usb_otg_pwren>;
  138. };
  139. vcc3v3_clk: vcc3v3-clk {
  140. compatible = "regulator-fixed";
  141. regulator-name = "vcc3v3_clk";
  142. regulator-min-microvolt = <3300000>;
  143. regulator-max-microvolt = <3300000>;
  144. vin-supply = <&vcc5v0_sys>;
  145. };
  146. vcc3v3_sys: vcc-sys {
  147. compatible = "regulator-fixed";
  148. regulator-name = "vcc3v3_sys";
  149. regulator-always-on;
  150. regulator-boot-on;
  151. regulator-min-microvolt = <3300000>;
  152. regulator-max-microvolt = <3300000>;
  153. vin-supply = <&dc_12v>;
  154. };
  155. vcc25_ddr: vcc25-ddr {
  156. compatible = "regulator-fixed";
  157. regulator-name = "vcc25_ddr";
  158. regulator-always-on;
  159. regulator-boot-on;
  160. regulator-min-microvolt = <2500000>;
  161. regulator-max-microvolt = <2500000>;
  162. vin-supply = <&vcc3v3_sys>;
  163. };
  164. vdd_npu: vdd-npu {
  165. compatible = "pwm-regulator";
  166. pwms = <&pwm6 0 5000 1>;
  167. regulator-name = "vdd_npu";
  168. regulator-min-microvolt = <800000>;
  169. regulator-max-microvolt = <1100000>;
  170. regulator-init-microvolt = <900000>;
  171. regulator-always-on;
  172. regulator-boot-on;
  173. regulator-settling-time-up-us = <250>;
  174. pwm-supply = <&vcc5v0_sys>;
  175. voltage-table = <1000000 80>,
  176. <975000 75>,
  177. <925000 66>,
  178. <875000 57>,
  179. <825000 47>;
  180. status = "okay";
  181. };
  182. sdio_pwrseq: sdio-pwrseq {
  183. compatible = "mmc-pwrseq-simple";
  184. clocks = <&rk809 1>;
  185. clock-names = "ext_clock";
  186. pinctrl-names = "default";
  187. pinctrl-0 = <&wifi_enable_h>;
  188. /*
  189. * On the module itself this is one of these (depending
  190. * on the actual card populated):
  191. * - SDIO_RESET_L_WL_REG_ON
  192. * - PDN (power down when low)
  193. */
  194. post-power-on-delay-ms = <200>;
  195. reset-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
  196. };
  197. wireless-wlan {
  198. compatible = "wlan-platdata";
  199. rockchip,grf = <&sys_grf>;
  200. wifi_chip_type = "ap6256";
  201. pinctrl-names = "default";
  202. pinctrl-0 = <&wifi_host_wake_irq>;
  203. WIFI,host_wake_irq = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
  204. // WIFI,poweren_gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
  205. status = "okay";
  206. };
  207. wireless-bluetooth {
  208. compatible = "bluetooth-platdata";
  209. clocks = <&rk809 1>;
  210. clock-names = "ext_clock";
  211. //wifi-bt-power-toggle;
  212. uart_rts_gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>;
  213. pinctrl-names = "default", "rts_gpio";
  214. pinctrl-0 = <&uart1m0_rtsn>, <&bt_reset_gpio>, <&bt_wake_gpio>, <&bt_irq_gpio>;
  215. pinctrl-1 = <&uart1_gpios>;
  216. BT,reset_gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
  217. BT,wake_gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>;
  218. BT,wake_host_irq = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
  219. status = "okay";
  220. };
  221. test-power {
  222. status = "okay";
  223. };
  224. leds: leds {
  225. status = "okay";
  226. compatible = "gpio-leds";
  227. pinctrl-names = "default";
  228. pinctrl-0 =<&leds_gpio>;
  229. heartbeat {
  230. gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
  231. linux,default-trigger = "heartbeat";
  232. };
  233. usb_host2 {
  234. gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>;
  235. default-state = "on";
  236. };
  237. usb_host3 {
  238. gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
  239. default-state = "on";
  240. };
  241. usb_host4 {
  242. gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
  243. default-state = "on";
  244. };
  245. 4g_pwr {
  246. gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_HIGH>;
  247. default-state = "on";
  248. };
  249. };
  250. };
  251. &gmac0 {
  252. phy-mode = "rgmii";
  253. clock_in_out = "input";
  254. snps,reset-gpio = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
  255. snps,reset-active-low;
  256. /* Reset time is 20ms, 100ms for rtl8211f */
  257. snps,reset-delays-us = <0 50000 100000>;
  258. //RTL8811
  259. // tx_delay = <0x3c>;
  260. // rx_delay = <0x2f>;
  261. tx_delay = <0x2c>;
  262. rx_delay = <0x35>;
  263. pinctrl-names = "default";
  264. pinctrl-0 = <&rgmiim0_miim
  265. &rgmiim0_tx_bus2
  266. &rgmiim0_rx_bus2
  267. &rgmiim0_rgmii_clk
  268. &rgmiim0_rgmii_bus
  269. &rgmiim0_clk>;
  270. phy-handle = <&rgmii_phy>;
  271. status = "okay";
  272. };
  273. &gmac1 {
  274. phy-mode = "rmii";
  275. clock_in_out = "input";
  276. // snps,reset-gpio = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
  277. snps,reset-active-low;
  278. snps,reset-delays-us = <0 20000 100000>;
  279. tx_delay = <0x10>;
  280. rx_delay = <0x2f>;
  281. pinctrl-names="default";
  282. // pinctrl-0 = <&rmii_pins>;
  283. phy-handle = <&rgmii_phy1>;
  284. status = "disabled";
  285. };
  286. &mdio1 {
  287. rgmii_phy1: phy@1 {
  288. compatible = "ethernet-phy-ieee802.3-c22";
  289. reg = <0x01>;
  290. };
  291. };
  292. &mdio0 {
  293. rgmii_phy: phy@1 {
  294. compatible = "ethernet-phy-ieee802.3-c22";
  295. reg = <0x1>;
  296. };
  297. };
  298. &pinctrl {
  299. headphone {
  300. hp_det: hp-det {
  301. rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
  302. };
  303. };
  304. sdio-pwrseq {
  305. wifi_enable_h: wifi-enable-h {
  306. rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
  307. };
  308. };
  309. usb {
  310. usb_host_pwren: usb-host-pwren {
  311. rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
  312. };
  313. usb_otg_pwren: usb-otg-pwren {
  314. rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
  315. };
  316. };
  317. wireless-wlan {
  318. wifi_host_wake_irq: wifi-host-wake-irq {
  319. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>;
  320. };
  321. };
  322. wireless-bluetooth {
  323. uart1_gpios: uart1-gpios {
  324. rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
  325. };
  326. bt_reset_gpio: bt-reset-gpio {
  327. rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
  328. };
  329. bt_wake_gpio: bt-wake-gpio {
  330. rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
  331. };
  332. bt_irq_gpio: bt-irq-gpio {
  333. rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
  334. };
  335. };
  336. gpio-leds {
  337. leds_gpio: leds-gpio {
  338. rockchip,pins =
  339. <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,
  340. <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,
  341. <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,
  342. <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
  343. <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
  344. };
  345. };
  346. };
  347. &pwm6 {
  348. pinctrl-0 = <&pwm6m0_pins>;
  349. status = "okay";
  350. };
  351. &sai0 {
  352. status = "disabled";
  353. pinctrl-names = "default";
  354. pinctrl-0 = <&i2s0m0_lrck
  355. &i2s0m0_sclk
  356. &i2s0m0_sdi0
  357. &i2s0m0_sdo0>;
  358. };
  359. &sdhci {
  360. bus-width = <8>;
  361. no-sdio;
  362. no-sd;
  363. non-removable;
  364. max-frequency = <200000000>;
  365. mmc-hs400-1_8v;
  366. mmc-hs400-enhanced-strobe;
  367. full-pwr-cycle-in-suspend;
  368. status = "okay";
  369. };
  370. &sdmmc0 {
  371. max-frequency = <150000000>;
  372. supports-sd;
  373. no-sdio;
  374. no-mmc;
  375. bus-width = <4>;
  376. cap-mmc-highspeed;
  377. cap-sd-highspeed;
  378. disable-wp;
  379. sd-uhs-sdr104;
  380. vmmc-supply = <&vcc3v3_sd>;
  381. vqmmc-supply = <&vccio_sd>;
  382. pinctrl-names = "default";
  383. pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
  384. status = "disabled";
  385. };
  386. &sdmmc1 {
  387. max-frequency = <150000000>;
  388. no-sd;
  389. no-mmc;
  390. bus-width = <4>;
  391. disable-wp;
  392. cap-sd-highspeed;
  393. cap-sdio-irq;
  394. keep-power-in-suspend;
  395. mmc-pwrseq = <&sdio_pwrseq>;
  396. non-removable;
  397. pinctrl-names = "default";
  398. pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
  399. // sd-uhs-sdr104;
  400. status = "okay";
  401. };
  402. &u2phy {
  403. status = "okay";
  404. };
  405. &u2phy_host {
  406. status = "okay";
  407. phy-supply = <&vcc5v0_usb_host>;
  408. };
  409. &u2phy_otg {
  410. status = "okay";
  411. vbus-supply = <&vcc5v0_usb_otg>;
  412. };
  413. &usb_host0_ehci {
  414. status = "okay";
  415. };
  416. &usb_host0_ohci {
  417. status = "okay";
  418. };
  419. &usbdrd30 {
  420. status = "okay";
  421. };
  422. &usbdrd_dwc3 {
  423. status = "okay";
  424. dr_mode = "otg";
  425. extcon = <&u2phy>;
  426. maximum-speed = "high-speed";
  427. phys = <&u2phy_otg>;
  428. phy-names = "usb2-phy";
  429. snps,dis_u2_susphy_quirk;
  430. snps,usb2-lpm-disable;
  431. };
  432. &combphy_pu {
  433. status = "okay";
  434. };
  435. &pcie2x1 {
  436. pinctrl-0 = <&pcie20m1_pins>;
  437. reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
  438. vpcie3v3-supply = <&vcc3v3_pcie20>;
  439. status = "okay";
  440. };
  441. &uart1 {
  442. pinctrl-names = "default";
  443. pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
  444. };
  445. &uart3 {
  446. pinctrl-names = "default";
  447. pinctrl-0 = <&uart3m1_xfer>;
  448. };
  449. &uart6 {
  450. status = "disabled";
  451. pinctrl-names = "default";
  452. pinctrl-0 = <&uart6m0_xfer>;
  453. };
  454. &uart8 {
  455. pinctrl-names = "default";
  456. pinctrl-0 = <&uart8m0_xfer>;
  457. };
  458. &uart9 {
  459. pinctrl-names = "default";
  460. pinctrl-0 = <&uart9m1_xfer>;
  461. };
  462. &can0 {
  463. status = "disabled";
  464. pinctrl-names = "default";
  465. pinctrl-0 = <&can0m2_pins>;
  466. };
  467. &spi0 {
  468. status = "disabled";
  469. pinctrl-0 = <&spi0m0_pins &spi0m0_csn0>;
  470. spi_dev@0 {
  471. compatible = "rockchip,spidev";
  472. reg = <0>;
  473. spi-max-frequency = <12000000>;
  474. spi-lsb-first;
  475. };
  476. };
  477. &saradc0 {
  478. status = "okay";
  479. vref-supply = <&vcc_1v8>;
  480. };
  481. &saradc1 {
  482. status = "okay";
  483. vref-supply = <&vcc_1v8>;
  484. };
  485. &tsadc {
  486. status = "okay";
  487. };
  488. &rk809_codec {
  489. spk-ctl-gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
  490. use-ext-amplifier;
  491. spk-mute-delay-ms = <300>;
  492. };
  493. &cpu0 {
  494. cpu-supply = <&vdd_cpu>;
  495. };
  496. &dfi {
  497. status = "okay";
  498. };
  499. &rknpu {
  500. rknpu-supply = <&vdd_npu>;
  501. status = "okay";
  502. };
  503. &rknpu_mmu {
  504. status = "okay";
  505. };
  506. &gpu {
  507. status = "okay";
  508. mali-supply = <&vdd_gpu>;
  509. };
  510. &jpegd {
  511. status = "okay";
  512. };
  513. &jpegd_mmu {
  514. status = "okay";
  515. };
  516. &mpp_srv {
  517. status = "okay";
  518. };
  519. &rga2 {
  520. status = "okay";
  521. };
  522. &rga2_mmu {
  523. status = "okay";
  524. };
  525. &rkvdec {
  526. status = "okay";
  527. };
  528. &rkvdec_mmu {
  529. status = "okay";
  530. };
  531. &rkvenc {
  532. status = "okay";
  533. };
  534. &rkvenc_mmu {
  535. status = "okay";
  536. };
  537. &vop {
  538. status = "okay";
  539. };
  540. &vop_mmu {
  541. status = "okay";
  542. };
  543. &bt_sco {
  544. status = "okay";
  545. };
  546. &bt_sound {
  547. status = "okay";
  548. };
  549. &sai2 {
  550. status = "okay";
  551. pinctrl-names = "default";
  552. pinctrl-0 = <&i2s2m0_lrck
  553. &i2s2m0_sclk
  554. &i2s2m0_sdi
  555. &i2s2m0_sdo>;
  556. };