rk3399-pinebook-pro.dts 22 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
  4. * Copyright (c) 2018 Akash Gajjar <Akash_Gajjar@mentor.com>
  5. * Copyright (c) 2020 Tobias Schramm <t.schramm@manjaro.org>
  6. */
  7. /dts-v1/;
  8. #include <dt-bindings/input/gpio-keys.h>
  9. #include <dt-bindings/input/linux-event-codes.h>
  10. #include <dt-bindings/pwm/pwm.h>
  11. #include <dt-bindings/usb/pd.h>
  12. #include <dt-bindings/leds/common.h>
  13. #include "rk3399.dtsi"
  14. #include "rk3399-opp.dtsi"
  15. / {
  16. model = "Pine64 Pinebook Pro";
  17. compatible = "pine64,pinebook-pro", "rockchip,rk3399";
  18. chosen {
  19. stdout-path = "serial2:1500000n8";
  20. };
  21. backlight: edp-backlight {
  22. compatible = "pwm-backlight";
  23. power-supply = <&vcc_12v>;
  24. pwms = <&pwm0 0 740740 0>;
  25. };
  26. edp_panel: edp-panel {
  27. compatible = "boe,nv140fhmn49";
  28. backlight = <&backlight>;
  29. enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
  30. pinctrl-names = "default";
  31. pinctrl-0 = <&panel_en_gpio>;
  32. power-supply = <&vcc3v3_panel>;
  33. ports {
  34. #address-cells = <1>;
  35. #size-cells = <0>;
  36. port@0 {
  37. reg = <0>;
  38. #address-cells = <1>;
  39. #size-cells = <0>;
  40. panel_in_edp: endpoint@0 {
  41. reg = <0>;
  42. remote-endpoint = <&edp_out_panel>;
  43. };
  44. };
  45. };
  46. };
  47. /*
  48. * Use separate nodes for gpio-keys to allow for selective deactivation
  49. * of wakeup sources via sysfs without disabling the whole key
  50. */
  51. gpio-key-lid {
  52. compatible = "gpio-keys";
  53. pinctrl-names = "default";
  54. pinctrl-0 = <&lidbtn_gpio>;
  55. lid {
  56. debounce-interval = <20>;
  57. gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_LOW>;
  58. label = "Lid";
  59. linux,code = <SW_LID>;
  60. linux,input-type = <EV_SW>;
  61. wakeup-event-action = <EV_ACT_DEASSERTED>;
  62. wakeup-source;
  63. };
  64. };
  65. gpio-key-power {
  66. compatible = "gpio-keys";
  67. pinctrl-names = "default";
  68. pinctrl-0 = <&pwrbtn_gpio>;
  69. power {
  70. debounce-interval = <20>;
  71. gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
  72. label = "Power";
  73. linux,code = <KEY_POWER>;
  74. wakeup-source;
  75. };
  76. };
  77. leds {
  78. compatible = "gpio-leds";
  79. pinctrl-names = "default";
  80. pinctrl-0 = <&pwrled_gpio &slpled_gpio>;
  81. green-led {
  82. color = <LED_COLOR_ID_GREEN>;
  83. default-state = "on";
  84. function = LED_FUNCTION_POWER;
  85. gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
  86. label = "green:power";
  87. };
  88. red-led {
  89. color = <LED_COLOR_ID_RED>;
  90. default-state = "off";
  91. function = LED_FUNCTION_STANDBY;
  92. gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
  93. label = "red:standby";
  94. panic-indicator;
  95. retain-state-suspended;
  96. };
  97. };
  98. /* Power sequence for SDIO WiFi module */
  99. sdio_pwrseq: sdio-pwrseq {
  100. compatible = "mmc-pwrseq-simple";
  101. clocks = <&rk808 1>;
  102. clock-names = "ext_clock";
  103. pinctrl-names = "default";
  104. pinctrl-0 = <&wifi_enable_h_gpio>;
  105. post-power-on-delay-ms = <100>;
  106. power-off-delay-us = <500000>;
  107. /* WL_REG_ON on module */
  108. reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
  109. };
  110. /* Audio components */
  111. es8316-sound {
  112. compatible = "simple-audio-card";
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&hp_det_gpio>;
  115. simple-audio-card,name = "rockchip,es8316-codec";
  116. simple-audio-card,format = "i2s";
  117. simple-audio-card,mclk-fs = <256>;
  118. simple-audio-card,widgets =
  119. "Microphone", "Mic Jack",
  120. "Headphone", "Headphones",
  121. "Speaker", "Speaker";
  122. simple-audio-card,routing =
  123. "MIC1", "Mic Jack",
  124. "Headphones", "HPOL",
  125. "Headphones", "HPOR",
  126. "Speaker Amplifier INL", "HPOL",
  127. "Speaker Amplifier INR", "HPOR",
  128. "Speaker", "Speaker Amplifier OUTL",
  129. "Speaker", "Speaker Amplifier OUTR";
  130. simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
  131. simple-audio-card,aux-devs = <&speaker_amp>;
  132. simple-audio-card,pin-switches = "Speaker";
  133. simple-audio-card,cpu {
  134. sound-dai = <&i2s1>;
  135. };
  136. simple-audio-card,codec {
  137. sound-dai = <&es8316>;
  138. };
  139. };
  140. speaker_amp: speaker-amplifier {
  141. compatible = "simple-audio-amplifier";
  142. enable-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_HIGH>;
  143. sound-name-prefix = "Speaker Amplifier";
  144. VCC-supply = <&pa_5v>;
  145. };
  146. /* Power tree */
  147. /* Root power source */
  148. vcc_sysin: vcc-sysin {
  149. compatible = "regulator-fixed";
  150. regulator-name = "vcc_sysin";
  151. regulator-always-on;
  152. regulator-boot-on;
  153. };
  154. /* Regulators supplied by vcc_sysin */
  155. /* LCD backlight supply */
  156. vcc_12v: vcc-12v {
  157. compatible = "regulator-fixed";
  158. regulator-name = "vcc_12v";
  159. regulator-always-on;
  160. regulator-boot-on;
  161. regulator-min-microvolt = <12000000>;
  162. regulator-max-microvolt = <12000000>;
  163. vin-supply = <&vcc_sysin>;
  164. regulator-state-mem {
  165. regulator-off-in-suspend;
  166. };
  167. };
  168. /* Main 3.3 V supply */
  169. vcc3v3_sys: wifi_bat: vcc3v3-sys {
  170. compatible = "regulator-fixed";
  171. regulator-name = "vcc3v3_sys";
  172. regulator-always-on;
  173. regulator-boot-on;
  174. regulator-min-microvolt = <3300000>;
  175. regulator-max-microvolt = <3300000>;
  176. vin-supply = <&vcc_sysin>;
  177. regulator-state-mem {
  178. regulator-on-in-suspend;
  179. };
  180. };
  181. /* 5 V USB power supply */
  182. vcc5v0_usb: pa_5v: vcc5v0-usb-regulator {
  183. compatible = "regulator-fixed";
  184. enable-active-high;
  185. gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
  186. pinctrl-names = "default";
  187. pinctrl-0 = <&pwr_5v_gpio>;
  188. regulator-name = "vcc5v0_usb";
  189. regulator-always-on;
  190. regulator-min-microvolt = <5000000>;
  191. regulator-max-microvolt = <5000000>;
  192. vin-supply = <&vcc_sysin>;
  193. regulator-state-mem {
  194. regulator-off-in-suspend;
  195. };
  196. };
  197. /* RK3399 logic supply */
  198. vdd_log: vdd-log {
  199. compatible = "pwm-regulator";
  200. pwms = <&pwm2 0 25000 1>;
  201. regulator-name = "vdd_log";
  202. regulator-always-on;
  203. regulator-boot-on;
  204. regulator-min-microvolt = <800000>;
  205. regulator-max-microvolt = <1400000>;
  206. vin-supply = <&vcc_sysin>;
  207. regulator-state-mem {
  208. regulator-on-in-suspend;
  209. };
  210. };
  211. /* Regulators supplied by vcc3v3_sys */
  212. /* 0.9 V supply, always on */
  213. vcc_0v9: vcc-0v9 {
  214. compatible = "regulator-fixed";
  215. regulator-name = "vcc_0v9";
  216. regulator-always-on;
  217. regulator-boot-on;
  218. regulator-min-microvolt = <900000>;
  219. regulator-max-microvolt = <900000>;
  220. vin-supply = <&vcc3v3_sys>;
  221. };
  222. /* S3 1.8 V supply, switched by vcc1v8_s3 */
  223. vcca1v8_s3: vcc1v8-s3 {
  224. compatible = "regulator-fixed";
  225. regulator-name = "vcca1v8_s3";
  226. regulator-always-on;
  227. regulator-boot-on;
  228. regulator-min-microvolt = <1800000>;
  229. regulator-max-microvolt = <1800000>;
  230. vin-supply = <&vcc3v3_sys>;
  231. };
  232. /* micro SD card power */
  233. vcc3v0_sd: vcc3v0-sd {
  234. compatible = "regulator-fixed";
  235. enable-active-high;
  236. gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
  237. pinctrl-names = "default";
  238. pinctrl-0 = <&sdmmc0_pwr_h_gpio>;
  239. regulator-name = "vcc3v0_sd";
  240. regulator-always-on;
  241. regulator-min-microvolt = <3000000>;
  242. regulator-max-microvolt = <3000000>;
  243. vin-supply = <&vcc3v3_sys>;
  244. regulator-state-mem {
  245. regulator-off-in-suspend;
  246. };
  247. };
  248. /* LCD panel power, called VCC3V3_S0 in schematic */
  249. vcc3v3_panel: vcc3v3-panel {
  250. compatible = "regulator-fixed";
  251. enable-active-high;
  252. gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
  253. pinctrl-names = "default";
  254. pinctrl-0 = <&lcdvcc_en_gpio>;
  255. regulator-name = "vcc3v3_panel";
  256. regulator-always-on;
  257. regulator-min-microvolt = <3300000>;
  258. regulator-max-microvolt = <3300000>;
  259. regulator-enable-ramp-delay = <100000>;
  260. vin-supply = <&vcc3v3_sys>;
  261. regulator-state-mem {
  262. regulator-off-in-suspend;
  263. };
  264. };
  265. /* M.2 adapter power, switched by vcc1v8_s3 */
  266. vcc3v3_ssd: vcc3v3-ssd {
  267. compatible = "regulator-fixed";
  268. regulator-name = "vcc3v3_ssd";
  269. regulator-min-microvolt = <3300000>;
  270. regulator-max-microvolt = <3300000>;
  271. vin-supply = <&vcc3v3_sys>;
  272. };
  273. /* Regulators supplied by vcc5v0_usb */
  274. /* USB 3 port power supply regulator */
  275. vcc5v0_otg: vcc5v0-otg {
  276. compatible = "regulator-fixed";
  277. enable-active-high;
  278. gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
  279. pinctrl-names = "default";
  280. pinctrl-0 = <&vcc5v0_host_en_gpio>;
  281. regulator-name = "vcc5v0_otg";
  282. regulator-always-on;
  283. regulator-min-microvolt = <5000000>;
  284. regulator-max-microvolt = <5000000>;
  285. vin-supply = <&vcc5v0_usb>;
  286. regulator-state-mem {
  287. regulator-off-in-suspend;
  288. };
  289. };
  290. /* Regulators supplied by vcc5v0_usb */
  291. /* Type C port power supply regulator */
  292. vbus_5vout: vbus_typec: vbus-5vout {
  293. compatible = "regulator-fixed";
  294. enable-active-high;
  295. gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
  296. pinctrl-names = "default";
  297. pinctrl-0 = <&vcc5v0_typec0_en_gpio>;
  298. regulator-name = "vbus_5vout";
  299. regulator-min-microvolt = <5000000>;
  300. regulator-max-microvolt = <5000000>;
  301. vin-supply = <&vcc5v0_usb>;
  302. regulator-state-mem {
  303. regulator-off-in-suspend;
  304. };
  305. };
  306. /* Regulators supplied by vcc_1v8 */
  307. /* Primary 0.9 V LDO */
  308. vcca0v9_s3: vcca0v9-s3 {
  309. compatible = "regulator-fixed";
  310. regulator-name = "vcc0v9_s3";
  311. regulator-min-microvolt = <5000000>;
  312. regulator-max-microvolt = <5000000>;
  313. vin-supply = <&vcc_1v8>;
  314. regulator-state-mem {
  315. regulator-on-in-suspend;
  316. };
  317. };
  318. mains_charger: dc-charger {
  319. compatible = "gpio-charger";
  320. charger-type = "mains";
  321. gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_LOW>;
  322. /* Also triggered by USB charger */
  323. pinctrl-names = "default";
  324. pinctrl-0 = <&dc_det_gpio>;
  325. };
  326. };
  327. &cdn_dp {
  328. status = "okay";
  329. };
  330. &cpu_b0 {
  331. cpu-supply = <&vdd_cpu_b>;
  332. };
  333. &cpu_b1 {
  334. cpu-supply = <&vdd_cpu_b>;
  335. };
  336. &cpu_l0 {
  337. cpu-supply = <&vdd_cpu_l>;
  338. };
  339. &cpu_l1 {
  340. cpu-supply = <&vdd_cpu_l>;
  341. };
  342. &cpu_l2 {
  343. cpu-supply = <&vdd_cpu_l>;
  344. };
  345. &cpu_l3 {
  346. cpu-supply = <&vdd_cpu_l>;
  347. };
  348. &edp {
  349. force-hpd;
  350. pinctrl-names = "default";
  351. pinctrl-0 = <&edp_hpd>;
  352. status = "okay";
  353. ports {
  354. edp_out: port@1 {
  355. reg = <1>;
  356. #address-cells = <1>;
  357. #size-cells = <0>;
  358. edp_out_panel: endpoint@0 {
  359. reg = <0>;
  360. remote-endpoint = <&panel_in_edp>;
  361. };
  362. };
  363. };
  364. };
  365. &emmc_phy {
  366. status = "okay";
  367. };
  368. &gpu {
  369. mali-supply = <&vdd_gpu>;
  370. status = "okay";
  371. };
  372. &hdmi_sound {
  373. status = "okay";
  374. };
  375. &i2c0 {
  376. clock-frequency = <400000>;
  377. i2c-scl-falling-time-ns = <4>;
  378. i2c-scl-rising-time-ns = <168>;
  379. status = "okay";
  380. rk808: pmic@1b {
  381. compatible = "rockchip,rk808";
  382. reg = <0x1b>;
  383. #clock-cells = <1>;
  384. clock-output-names = "xin32k", "rk808-clkout2";
  385. interrupt-parent = <&gpio3>;
  386. interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
  387. pinctrl-names = "default";
  388. pinctrl-0 = <&pmic_int_l_gpio>;
  389. rockchip,system-power-controller;
  390. wakeup-source;
  391. vcc1-supply = <&vcc_sysin>;
  392. vcc2-supply = <&vcc_sysin>;
  393. vcc3-supply = <&vcc_sysin>;
  394. vcc4-supply = <&vcc_sysin>;
  395. vcc6-supply = <&vcc_sysin>;
  396. vcc7-supply = <&vcc_sysin>;
  397. vcc8-supply = <&vcc3v3_sys>;
  398. vcc9-supply = <&vcc_sysin>;
  399. vcc10-supply = <&vcc_sysin>;
  400. vcc11-supply = <&vcc_sysin>;
  401. vcc12-supply = <&vcc3v3_sys>;
  402. vcc13-supply = <&vcc_sysin>;
  403. vcc14-supply = <&vcc_sysin>;
  404. regulators {
  405. /* rk3399 center logic supply */
  406. vdd_center: DCDC_REG1 {
  407. regulator-name = "vdd_center";
  408. regulator-always-on;
  409. regulator-boot-on;
  410. regulator-min-microvolt = <750000>;
  411. regulator-max-microvolt = <1350000>;
  412. regulator-ramp-delay = <6001>;
  413. regulator-state-mem {
  414. regulator-off-in-suspend;
  415. };
  416. };
  417. vdd_cpu_l: DCDC_REG2 {
  418. regulator-name = "vdd_cpu_l";
  419. regulator-always-on;
  420. regulator-boot-on;
  421. regulator-min-microvolt = <750000>;
  422. regulator-max-microvolt = <1350000>;
  423. regulator-ramp-delay = <6001>;
  424. regulator-state-mem {
  425. regulator-off-in-suspend;
  426. };
  427. };
  428. vcc_ddr: DCDC_REG3 {
  429. regulator-name = "vcc_ddr";
  430. regulator-always-on;
  431. regulator-boot-on;
  432. regulator-state-mem {
  433. regulator-on-in-suspend;
  434. };
  435. };
  436. vcc_1v8: vcc_wl: DCDC_REG4 {
  437. regulator-name = "vcc_1v8";
  438. regulator-always-on;
  439. regulator-boot-on;
  440. regulator-min-microvolt = <1800000>;
  441. regulator-max-microvolt = <1800000>;
  442. regulator-state-mem {
  443. regulator-on-in-suspend;
  444. regulator-suspend-microvolt = <1800000>;
  445. };
  446. };
  447. /* not used */
  448. LDO_REG1 {
  449. };
  450. /* not used */
  451. LDO_REG2 {
  452. };
  453. vcc1v8_pmupll: LDO_REG3 {
  454. regulator-name = "vcc1v8_pmupll";
  455. regulator-always-on;
  456. regulator-boot-on;
  457. regulator-min-microvolt = <1800000>;
  458. regulator-max-microvolt = <1800000>;
  459. regulator-state-mem {
  460. regulator-on-in-suspend;
  461. regulator-suspend-microvolt = <1800000>;
  462. };
  463. };
  464. vcc_sdio: LDO_REG4 {
  465. regulator-name = "vcc_sdio";
  466. regulator-always-on;
  467. regulator-boot-on;
  468. regulator-min-microvolt = <1800000>;
  469. regulator-max-microvolt = <3000000>;
  470. regulator-state-mem {
  471. regulator-on-in-suspend;
  472. regulator-suspend-microvolt = <3000000>;
  473. };
  474. };
  475. vcca3v0_codec: LDO_REG5 {
  476. regulator-name = "vcca3v0_codec";
  477. regulator-always-on;
  478. regulator-boot-on;
  479. regulator-min-microvolt = <3000000>;
  480. regulator-max-microvolt = <3000000>;
  481. regulator-state-mem {
  482. regulator-off-in-suspend;
  483. };
  484. };
  485. vcc_1v5: LDO_REG6 {
  486. regulator-name = "vcc_1v5";
  487. regulator-always-on;
  488. regulator-boot-on;
  489. regulator-min-microvolt = <1500000>;
  490. regulator-max-microvolt = <1500000>;
  491. regulator-state-mem {
  492. regulator-on-in-suspend;
  493. regulator-suspend-microvolt = <1500000>;
  494. };
  495. };
  496. vcca1v8_codec: LDO_REG7 {
  497. regulator-name = "vcca1v8_codec";
  498. regulator-always-on;
  499. regulator-boot-on;
  500. regulator-min-microvolt = <1800000>;
  501. regulator-max-microvolt = <1800000>;
  502. regulator-state-mem {
  503. regulator-off-in-suspend;
  504. };
  505. };
  506. vcc_3v0: LDO_REG8 {
  507. regulator-name = "vcc_3v0";
  508. regulator-always-on;
  509. regulator-boot-on;
  510. regulator-min-microvolt = <3000000>;
  511. regulator-max-microvolt = <3000000>;
  512. regulator-state-mem {
  513. regulator-on-in-suspend;
  514. regulator-suspend-microvolt = <3000000>;
  515. };
  516. };
  517. vcc3v3_s3: SWITCH_REG1 {
  518. regulator-name = "vcc3v3_s3";
  519. regulator-always-on;
  520. regulator-boot-on;
  521. regulator-state-mem {
  522. regulator-off-in-suspend;
  523. };
  524. };
  525. vcc3v3_s0: SWITCH_REG2 {
  526. regulator-name = "vcc3v3_s0";
  527. regulator-always-on;
  528. regulator-boot-on;
  529. regulator-state-mem {
  530. regulator-off-in-suspend;
  531. };
  532. };
  533. };
  534. };
  535. vdd_cpu_b: regulator@40 {
  536. compatible = "silergy,syr827";
  537. reg = <0x40>;
  538. fcs,suspend-voltage-selector = <1>;
  539. pinctrl-names = "default";
  540. pinctrl-0 = <&vsel1_gpio>;
  541. regulator-name = "vdd_cpu_b";
  542. regulator-always-on;
  543. regulator-boot-on;
  544. regulator-min-microvolt = <712500>;
  545. regulator-max-microvolt = <1500000>;
  546. regulator-ramp-delay = <1000>;
  547. vin-supply = <&vcc_1v8>;
  548. regulator-state-mem {
  549. regulator-off-in-suspend;
  550. };
  551. };
  552. vdd_gpu: regulator@41 {
  553. compatible = "silergy,syr828";
  554. reg = <0x41>;
  555. fcs,suspend-voltage-selector = <1>;
  556. pinctrl-names = "default";
  557. pinctrl-0 = <&vsel2_gpio>;
  558. regulator-name = "vdd_gpu";
  559. regulator-always-on;
  560. regulator-boot-on;
  561. regulator-min-microvolt = <712500>;
  562. regulator-max-microvolt = <1500000>;
  563. regulator-ramp-delay = <1000>;
  564. vin-supply = <&vcc_1v8>;
  565. regulator-state-mem {
  566. regulator-off-in-suspend;
  567. };
  568. };
  569. };
  570. &i2c1 {
  571. clock-frequency = <100000>;
  572. i2c-scl-falling-time-ns = <4>;
  573. i2c-scl-rising-time-ns = <168>;
  574. status = "okay";
  575. es8316: es8316@11 {
  576. compatible = "everest,es8316";
  577. reg = <0x11>;
  578. clocks = <&cru SCLK_I2S_8CH_OUT>;
  579. clock-names = "mclk";
  580. #sound-dai-cells = <0>;
  581. };
  582. };
  583. &i2c3 {
  584. i2c-scl-falling-time-ns = <15>;
  585. i2c-scl-rising-time-ns = <450>;
  586. status = "okay";
  587. };
  588. &i2c4 {
  589. i2c-scl-falling-time-ns = <20>;
  590. i2c-scl-rising-time-ns = <600>;
  591. status = "okay";
  592. fusb0: fusb30x@22 {
  593. compatible = "fcs,fusb302";
  594. reg = <0x22>;
  595. fcs,int_n = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
  596. pinctrl-names = "default";
  597. pinctrl-0 = <&fusb0_int_gpio>;
  598. vbus-supply = <&vbus_typec>;
  599. connector {
  600. compatible = "usb-c-connector";
  601. data-role = "host";
  602. label = "USB-C";
  603. op-sink-microwatt = <1000000>;
  604. power-role = "dual";
  605. sink-pdos =
  606. <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
  607. source-pdos =
  608. <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
  609. try-power-role = "sink";
  610. ports {
  611. #address-cells = <1>;
  612. #size-cells = <0>;
  613. port@0 {
  614. reg = <0>;
  615. usbc_hs: endpoint {
  616. remote-endpoint =
  617. <&u2phy0_typec_hs>;
  618. };
  619. };
  620. port@1 {
  621. reg = <1>;
  622. usbc_ss: endpoint {
  623. remote-endpoint =
  624. <&tcphy0_typec_ss>;
  625. };
  626. };
  627. port@2 {
  628. reg = <2>;
  629. usbc_dp: endpoint {
  630. remote-endpoint =
  631. <&tcphy0_typec_dp>;
  632. };
  633. };
  634. };
  635. };
  636. };
  637. };
  638. &i2s1 {
  639. #sound-dai-cells = <0>;
  640. pinctrl-names = "default";
  641. pinctrl-0 = <&i2s_8ch_mclk_gpio>, <&i2s1_2ch_bus>;
  642. rockchip,capture-channels = <8>;
  643. rockchip,playback-channels = <8>;
  644. status = "okay";
  645. };
  646. &io_domains {
  647. audio-supply = <&vcc_3v0>;
  648. gpio1830-supply = <&vcc_3v0>;
  649. sdmmc-supply = <&vcc_sdio>;
  650. status = "okay";
  651. };
  652. &pcie_phy {
  653. status = "okay";
  654. };
  655. &pcie0 {
  656. bus-scan-delay-ms = <1000>;
  657. ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
  658. max-link-speed = <2>;
  659. num-lanes = <4>;
  660. pinctrl-names = "default";
  661. pinctrl-0 = <&pcie_clkreqn_cpm>;
  662. vpcie0v9-supply = <&vcca0v9_s3>;
  663. vpcie1v8-supply = <&vcca1v8_s3>;
  664. vpcie3v3-supply = <&vcc3v3_ssd>;
  665. status = "okay";
  666. };
  667. &pinctrl {
  668. buttons {
  669. pwrbtn_gpio: pwrbtn-gpio {
  670. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  671. };
  672. lidbtn_gpio: lidbtn-gpio {
  673. rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
  674. };
  675. };
  676. dc-charger {
  677. dc_det_gpio: dc-det-gpio {
  678. rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
  679. };
  680. };
  681. es8316 {
  682. hp_det_gpio: hp-det-gpio {
  683. rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
  684. };
  685. };
  686. fusb302x {
  687. fusb0_int_gpio: fusb0-int-gpio {
  688. rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
  689. };
  690. };
  691. i2s1 {
  692. i2s_8ch_mclk_gpio: i2s-8ch-mclk-gpio {
  693. rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>;
  694. };
  695. };
  696. lcd-panel {
  697. lcdvcc_en_gpio: lcdvcc-en-gpio {
  698. rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
  699. };
  700. panel_en_gpio: panel-en-gpio {
  701. rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
  702. };
  703. lcd_panel_reset_gpio: lcd-panel-reset-gpio {
  704. rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
  705. };
  706. };
  707. leds {
  708. pwrled_gpio: pwrled_gpio {
  709. rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  710. };
  711. slpled_gpio: slpled_gpio {
  712. rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  713. };
  714. };
  715. pmic {
  716. pmic_int_l_gpio: pmic-int-l-gpio {
  717. rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
  718. };
  719. vsel1_gpio: vsel1-gpio {
  720. rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
  721. };
  722. vsel2_gpio: vsel2-gpio {
  723. rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  724. };
  725. };
  726. sdcard {
  727. sdmmc0_pwr_h_gpio: sdmmc0-pwr-h-gpio {
  728. rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
  729. };
  730. };
  731. sdio-pwrseq {
  732. wifi_enable_h_gpio: wifi-enable-h-gpio {
  733. rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
  734. };
  735. };
  736. usb-typec {
  737. vcc5v0_typec0_en_gpio: vcc5v0-typec0-en-gpio {
  738. rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  739. };
  740. };
  741. usb2 {
  742. pwr_5v_gpio: pwr-5v-gpio {
  743. rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
  744. };
  745. vcc5v0_host_en_gpio: vcc5v0-host-en-gpio {
  746. rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
  747. };
  748. };
  749. wireless-bluetooth {
  750. bt_wake_gpio: bt-wake-gpio {
  751. rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
  752. };
  753. bt_host_wake_gpio: bt-host-wake-gpio {
  754. rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
  755. };
  756. bt_reset_gpio: bt-reset-gpio {
  757. rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
  758. };
  759. };
  760. };
  761. &pmu_io_domains {
  762. pmu1830-supply = <&vcc_3v0>;
  763. status = "okay";
  764. };
  765. &pwm0 {
  766. status = "okay";
  767. };
  768. &pwm2 {
  769. status = "okay";
  770. };
  771. &saradc {
  772. vref-supply = <&vcca1v8_s3>;
  773. status = "okay";
  774. };
  775. &sdmmc {
  776. bus-width = <4>;
  777. cap-mmc-highspeed;
  778. cap-sd-highspeed;
  779. cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
  780. disable-wp;
  781. pinctrl-names = "default";
  782. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
  783. sd-uhs-sdr104;
  784. vmmc-supply = <&vcc3v0_sd>;
  785. vqmmc-supply = <&vcc_sdio>;
  786. status = "okay";
  787. };
  788. &sdio0 {
  789. bus-width = <4>;
  790. cap-sd-highspeed;
  791. cap-sdio-irq;
  792. keep-power-in-suspend;
  793. mmc-pwrseq = <&sdio_pwrseq>;
  794. non-removable;
  795. pinctrl-names = "default";
  796. pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
  797. sd-uhs-sdr104;
  798. status = "okay";
  799. };
  800. &sdhci {
  801. bus-width = <8>;
  802. mmc-hs200-1_8v;
  803. non-removable;
  804. status = "okay";
  805. };
  806. &spi1 {
  807. max-freq = <10000000>;
  808. status = "okay";
  809. spiflash: flash@0 {
  810. compatible = "jedec,spi-nor";
  811. reg = <0>;
  812. m25p,fast-read;
  813. spi-max-frequency = <10000000>;
  814. };
  815. };
  816. &tcphy0 {
  817. status = "okay";
  818. };
  819. &tcphy0_dp {
  820. port {
  821. tcphy0_typec_dp: endpoint {
  822. remote-endpoint = <&usbc_dp>;
  823. };
  824. };
  825. };
  826. &tcphy0_usb3 {
  827. port {
  828. tcphy0_typec_ss: endpoint {
  829. remote-endpoint = <&usbc_ss>;
  830. };
  831. };
  832. };
  833. &tcphy1 {
  834. status = "okay";
  835. };
  836. &tsadc {
  837. /* tshut mode 0:CRU 1:GPIO */
  838. rockchip,hw-tshut-mode = <1>;
  839. /* tshut polarity 0:LOW 1:HIGH */
  840. rockchip,hw-tshut-polarity = <1>;
  841. status = "okay";
  842. };
  843. &u2phy0 {
  844. status = "okay";
  845. u2phy0_otg: otg-port {
  846. status = "okay";
  847. };
  848. u2phy0_host: host-port {
  849. phy-supply = <&vcc5v0_otg>;
  850. status = "okay";
  851. };
  852. port {
  853. u2phy0_typec_hs: endpoint {
  854. remote-endpoint = <&usbc_hs>;
  855. };
  856. };
  857. };
  858. &u2phy1 {
  859. status = "okay";
  860. u2phy1_otg: otg-port {
  861. status = "okay";
  862. };
  863. u2phy1_host: host-port {
  864. phy-supply = <&vcc5v0_otg>;
  865. status = "okay";
  866. };
  867. };
  868. &uart0 {
  869. pinctrl-names = "default";
  870. pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
  871. uart-has-rtscts;
  872. status = "okay";
  873. bluetooth {
  874. compatible = "brcm,bcm4345c5";
  875. clocks = <&rk808 1>;
  876. clock-names = "lpo";
  877. device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
  878. host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
  879. max-speed = <1500000>;
  880. pinctrl-names = "default";
  881. pinctrl-0 = <&bt_host_wake_gpio &bt_wake_gpio &bt_reset_gpio>;
  882. shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
  883. vbat-supply = <&wifi_bat>;
  884. vddio-supply = <&vcc_wl>;
  885. };
  886. };
  887. &uart2 {
  888. status = "okay";
  889. };
  890. &usb_host0_ehci {
  891. status = "okay";
  892. };
  893. &usb_host0_ohci {
  894. status = "okay";
  895. };
  896. &usb_host1_ehci {
  897. status = "okay";
  898. };
  899. &usb_host1_ohci {
  900. status = "okay";
  901. };
  902. &usbdrd3_0 {
  903. status = "okay";
  904. };
  905. &usbdrd_dwc3_0 {
  906. dr_mode = "host";
  907. status = "okay";
  908. };
  909. &usbdrd3_1 {
  910. status = "okay";
  911. };
  912. &usbdrd_dwc3_1 {
  913. dr_mode = "host";
  914. status = "okay";
  915. };
  916. &vopb {
  917. status = "okay";
  918. };
  919. &vopb_mmu {
  920. status = "okay";
  921. };
  922. &vopl {
  923. status = "okay";
  924. };
  925. &vopl_mmu {
  926. status = "okay";
  927. };