rk3399-pinebook-pro.dts 22 KB

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