rk3399-gru.dtsi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Google Gru (and derivatives) board device tree source
  4. *
  5. * Copyright 2016-2017 Google, Inc
  6. */
  7. #include <dt-bindings/input/input.h>
  8. #include "rk3399.dtsi"
  9. #include "rk3399-op1-opp.dtsi"
  10. / {
  11. aliases {
  12. mmc0 = &sdmmc;
  13. mmc1 = &sdhci;
  14. };
  15. chosen {
  16. stdout-path = "serial2:115200n8";
  17. };
  18. /*
  19. * Power Tree
  20. *
  21. * In general an attempt is made to include all rails called out by
  22. * the schematic as long as those rails interact in some way with
  23. * the AP. AKA:
  24. * - Rails that only connect to the EC (or devices that the EC talks to)
  25. * are not included.
  26. * - Rails _are_ included if the rails go to the AP even if the AP
  27. * doesn't currently care about them / they are always on. The idea
  28. * here is that it makes it easier to map to the schematic or extend
  29. * later.
  30. *
  31. * If two rails are substantially the same from the AP's point of
  32. * view, though, we won't create a full fixed regulator. We'll just
  33. * put the child rail as an alias of the parent rail. Sometimes rails
  34. * look the same to the AP because one of these is true:
  35. * - The EC controls the enable and the EC always enables a rail as
  36. * long as the AP is running.
  37. * - The rails are actually connected to each other by a jumper and
  38. * the distinction is just there to add clarity/flexibility to the
  39. * schematic.
  40. */
  41. ppvar_sys: ppvar-sys {
  42. compatible = "regulator-fixed";
  43. regulator-name = "ppvar_sys";
  44. regulator-always-on;
  45. regulator-boot-on;
  46. };
  47. pp1200_lpddr: pp1200-lpddr {
  48. compatible = "regulator-fixed";
  49. regulator-name = "pp1200_lpddr";
  50. /* EC turns on w/ lpddr_pwr_en; always on for AP */
  51. regulator-always-on;
  52. regulator-boot-on;
  53. regulator-min-microvolt = <1200000>;
  54. regulator-max-microvolt = <1200000>;
  55. vin-supply = <&ppvar_sys>;
  56. };
  57. pp1800: pp1800 {
  58. compatible = "regulator-fixed";
  59. regulator-name = "pp1800";
  60. /* Always on when ppvar_sys shows power good */
  61. regulator-always-on;
  62. regulator-boot-on;
  63. regulator-min-microvolt = <1800000>;
  64. regulator-max-microvolt = <1800000>;
  65. vin-supply = <&ppvar_sys>;
  66. };
  67. pp3300: pp3300 {
  68. compatible = "regulator-fixed";
  69. regulator-name = "pp3300";
  70. /* Always on; plain and simple */
  71. regulator-always-on;
  72. regulator-boot-on;
  73. regulator-min-microvolt = <3300000>;
  74. regulator-max-microvolt = <3300000>;
  75. vin-supply = <&ppvar_sys>;
  76. };
  77. pp5000: pp5000 {
  78. compatible = "regulator-fixed";
  79. regulator-name = "pp5000";
  80. /* EC turns on w/ pp5000_en; always on for AP */
  81. regulator-always-on;
  82. regulator-boot-on;
  83. regulator-min-microvolt = <5000000>;
  84. regulator-max-microvolt = <5000000>;
  85. vin-supply = <&ppvar_sys>;
  86. };
  87. ppvar_bigcpu_pwm: ppvar-bigcpu-pwm {
  88. compatible = "pwm-regulator";
  89. regulator-name = "ppvar_bigcpu_pwm";
  90. pwms = <&pwm1 0 3337 0>;
  91. pwm-supply = <&ppvar_sys>;
  92. pwm-dutycycle-range = <100 0>;
  93. pwm-dutycycle-unit = <100>;
  94. /* EC turns on w/ ap_core_en; always on for AP */
  95. regulator-always-on;
  96. regulator-boot-on;
  97. regulator-min-microvolt = <800107>;
  98. regulator-max-microvolt = <1302232>;
  99. };
  100. ppvar_bigcpu: ppvar-bigcpu {
  101. compatible = "vctrl-regulator";
  102. regulator-name = "ppvar_bigcpu";
  103. regulator-min-microvolt = <800107>;
  104. regulator-max-microvolt = <1302232>;
  105. ctrl-supply = <&ppvar_bigcpu_pwm>;
  106. ctrl-voltage-range = <800107 1302232>;
  107. regulator-settling-time-up-us = <322>;
  108. };
  109. ppvar_litcpu_pwm: ppvar-litcpu-pwm {
  110. compatible = "pwm-regulator";
  111. regulator-name = "ppvar_litcpu_pwm";
  112. pwms = <&pwm2 0 3337 0>;
  113. pwm-supply = <&ppvar_sys>;
  114. pwm-dutycycle-range = <100 0>;
  115. pwm-dutycycle-unit = <100>;
  116. /* EC turns on w/ ap_core_en; always on for AP */
  117. regulator-always-on;
  118. regulator-boot-on;
  119. regulator-min-microvolt = <797743>;
  120. regulator-max-microvolt = <1307837>;
  121. };
  122. ppvar_litcpu: ppvar-litcpu {
  123. compatible = "vctrl-regulator";
  124. regulator-name = "ppvar_litcpu";
  125. regulator-min-microvolt = <797743>;
  126. regulator-max-microvolt = <1307837>;
  127. ctrl-supply = <&ppvar_litcpu_pwm>;
  128. ctrl-voltage-range = <797743 1307837>;
  129. regulator-settling-time-up-us = <384>;
  130. };
  131. ppvar_gpu_pwm: ppvar-gpu-pwm {
  132. compatible = "pwm-regulator";
  133. regulator-name = "ppvar_gpu_pwm";
  134. pwms = <&pwm0 0 3337 0>;
  135. pwm-supply = <&ppvar_sys>;
  136. pwm-dutycycle-range = <100 0>;
  137. pwm-dutycycle-unit = <100>;
  138. /* EC turns on w/ ap_core_en; always on for AP */
  139. regulator-always-on;
  140. regulator-boot-on;
  141. regulator-min-microvolt = <786384>;
  142. regulator-max-microvolt = <1217747>;
  143. };
  144. ppvar_gpu: ppvar-gpu {
  145. compatible = "vctrl-regulator";
  146. regulator-name = "ppvar_gpu";
  147. regulator-min-microvolt = <786384>;
  148. regulator-max-microvolt = <1217747>;
  149. ctrl-supply = <&ppvar_gpu_pwm>;
  150. ctrl-voltage-range = <786384 1217747>;
  151. regulator-settling-time-up-us = <390>;
  152. };
  153. /* EC turns on w/ pp900_ddrpll_en */
  154. pp900_ddrpll: pp900-ap {
  155. };
  156. /* EC turns on w/ pp900_pll_en */
  157. pp900_pll: pp900-ap {
  158. };
  159. /* EC turns on w/ pp900_pmu_en */
  160. pp900_pmu: pp900-ap {
  161. };
  162. /* EC turns on w/ pp1800_s0_en_l */
  163. pp1800_ap_io: pp1800_emmc: pp1800_nfc: pp1800_s0: pp1800 {
  164. };
  165. /* EC turns on w/ pp1800_avdd_en_l */
  166. pp1800_avdd: pp1800 {
  167. };
  168. /* EC turns on w/ pp1800_lid_en_l */
  169. pp1800_lid: pp1800_mic: pp1800 {
  170. };
  171. /* EC turns on w/ lpddr_pwr_en */
  172. pp1800_lpddr: pp1800 {
  173. };
  174. /* EC turns on w/ pp1800_pmu_en_l */
  175. pp1800_pmu: pp1800 {
  176. };
  177. /* EC turns on w/ pp1800_usb_en_l */
  178. pp1800_usb: pp1800 {
  179. };
  180. pp3000_sd_slot: pp3000-sd-slot {
  181. compatible = "regulator-fixed";
  182. regulator-name = "pp3000_sd_slot";
  183. pinctrl-names = "default";
  184. pinctrl-0 = <&sd_slot_pwr_en>;
  185. enable-active-high;
  186. gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
  187. vin-supply = <&pp3000>;
  188. };
  189. /*
  190. * Technically, this is a small abuse of 'regulator-gpio'; this
  191. * regulator is a mux between pp1800 and pp3300. pp1800 and pp3300 are
  192. * always on though, so it is sufficient to simply control the mux
  193. * here.
  194. */
  195. ppvar_sd_card_io: ppvar-sd-card-io {
  196. compatible = "regulator-gpio";
  197. regulator-name = "ppvar_sd_card_io";
  198. pinctrl-names = "default";
  199. pinctrl-0 = <&sd_io_pwr_en &sd_pwr_1800_sel>;
  200. enable-active-high;
  201. enable-gpio = <&gpio2 2 GPIO_ACTIVE_HIGH>;
  202. gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;
  203. states = <1800000 0x1>,
  204. <3000000 0x0>;
  205. regulator-min-microvolt = <1800000>;
  206. regulator-max-microvolt = <3000000>;
  207. };
  208. /* EC turns on w/ pp3300_trackpad_en_l */
  209. pp3300_trackpad: pp3300-trackpad {
  210. };
  211. /* EC turns on w/ usb_a_en */
  212. pp5000_usb_a_vbus: pp5000 {
  213. };
  214. ap_rtc_clk: ap-rtc-clk {
  215. compatible = "fixed-clock";
  216. clock-frequency = <32768>;
  217. clock-output-names = "xin32k";
  218. #clock-cells = <0>;
  219. };
  220. max98357a: max98357a {
  221. compatible = "maxim,max98357a";
  222. pinctrl-names = "default";
  223. pinctrl-0 = <&sdmode_en>;
  224. sdmode-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
  225. sdmode-delay = <2>;
  226. #sound-dai-cells = <0>;
  227. status = "okay";
  228. };
  229. sound: sound {
  230. compatible = "rockchip,rk3399-gru-sound";
  231. rockchip,cpu = <&i2s0 &spdif>;
  232. };
  233. };
  234. &cdn_dp {
  235. status = "okay";
  236. };
  237. /*
  238. * Set some suspend operating points to avoid OVP in suspend
  239. *
  240. * When we go into S3 ARM Trusted Firmware will transition our PWM regulators
  241. * from wherever they're at back to the "default" operating point (whatever
  242. * voltage we get when we set the PWM pins to "input").
  243. *
  244. * This quick transition under light load has the possibility to trigger the
  245. * regulator "over voltage protection" (OVP).
  246. *
  247. * To make extra certain that we don't hit this OVP at suspend time, we'll
  248. * transition to a voltage that's much closer to the default (~1.0 V) so that
  249. * there will not be a big jump. Technically we only need to get within 200 mV
  250. * of the default voltage, but the speed here should be fast enough and we need
  251. * suspend/resume to be rock solid.
  252. */
  253. &cluster0_opp {
  254. opp05 {
  255. opp-suspend;
  256. };
  257. };
  258. &cluster1_opp {
  259. opp06 {
  260. opp-suspend;
  261. };
  262. };
  263. &cpu_l0 {
  264. cpu-supply = <&ppvar_litcpu>;
  265. };
  266. &cpu_l1 {
  267. cpu-supply = <&ppvar_litcpu>;
  268. };
  269. &cpu_l2 {
  270. cpu-supply = <&ppvar_litcpu>;
  271. };
  272. &cpu_l3 {
  273. cpu-supply = <&ppvar_litcpu>;
  274. };
  275. &cpu_b0 {
  276. cpu-supply = <&ppvar_bigcpu>;
  277. };
  278. &cpu_b1 {
  279. cpu-supply = <&ppvar_bigcpu>;
  280. };
  281. &cru {
  282. assigned-clocks =
  283. <&cru PLL_GPLL>, <&cru PLL_CPLL>,
  284. <&cru PLL_NPLL>,
  285. <&cru ACLK_PERIHP>, <&cru HCLK_PERIHP>,
  286. <&cru PCLK_PERIHP>,
  287. <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
  288. <&cru PCLK_PERILP0>, <&cru ACLK_CCI>,
  289. <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>,
  290. <&cru ACLK_VIO>, <&cru ACLK_HDCP>,
  291. <&cru ACLK_GIC_PRE>,
  292. <&cru PCLK_DDR>;
  293. assigned-clock-rates =
  294. <600000000>, <800000000>,
  295. <1000000000>,
  296. <150000000>, <75000000>,
  297. <37500000>,
  298. <100000000>, <100000000>,
  299. <50000000>, <800000000>,
  300. <100000000>, <50000000>,
  301. <400000000>, <400000000>,
  302. <200000000>,
  303. <200000000>;
  304. };
  305. &dfi {
  306. status = "okay";
  307. };
  308. &dmc {
  309. status = "okay";
  310. rockchip,pd-idle-ns = <160>;
  311. rockchip,sr-idle-ns = <10240>;
  312. rockchip,sr-mc-gate-idle-ns = <40960>;
  313. rockchip,srpd-lite-idle-ns = <61440>;
  314. rockchip,standby-idle-ns = <81920>;
  315. rockchip,ddr3_odt_dis_freq = <666000000>;
  316. rockchip,lpddr3_odt_dis_freq = <666000000>;
  317. rockchip,lpddr4_odt_dis_freq = <666000000>;
  318. rockchip,sr-mc-gate-idle-dis-freq-hz = <1000000000>;
  319. rockchip,srpd-lite-idle-dis-freq-hz = <0>;
  320. rockchip,standby-idle-dis-freq-hz = <928000000>;
  321. };
  322. &dmc_opp_table {
  323. opp03 {
  324. opp-suspend;
  325. };
  326. };
  327. &emmc_phy {
  328. status = "okay";
  329. };
  330. &gpu {
  331. mali-supply = <&ppvar_gpu>;
  332. status = "okay";
  333. };
  334. ap_i2c_ts: &i2c3 {
  335. status = "okay";
  336. clock-frequency = <400000>;
  337. /* These are relatively safe rise/fall times */
  338. i2c-scl-falling-time-ns = <50>;
  339. i2c-scl-rising-time-ns = <300>;
  340. };
  341. ap_i2c_audio: &i2c8 {
  342. status = "okay";
  343. clock-frequency = <400000>;
  344. /* These are relatively safe rise/fall times */
  345. i2c-scl-falling-time-ns = <50>;
  346. i2c-scl-rising-time-ns = <300>;
  347. codec: da7219@1a {
  348. compatible = "dlg,da7219";
  349. reg = <0x1a>;
  350. interrupt-parent = <&gpio1>;
  351. interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
  352. clocks = <&cru SCLK_I2S_8CH_OUT>;
  353. clock-names = "mclk";
  354. dlg,micbias-lvl = <2600>;
  355. dlg,mic-amp-in-sel = "diff";
  356. pinctrl-names = "default";
  357. pinctrl-0 = <&headset_int_l>;
  358. VDD-supply = <&pp1800>;
  359. VDDMIC-supply = <&pp3300>;
  360. VDDIO-supply = <&pp1800>;
  361. da7219_aad {
  362. dlg,adc-1bit-rpt = <1>;
  363. dlg,btn-avg = <4>;
  364. dlg,btn-cfg = <50>;
  365. dlg,mic-det-thr = <500>;
  366. dlg,jack-ins-deb = <20>;
  367. dlg,jack-det-rate = "32ms_64ms";
  368. dlg,jack-rem-deb = <1>;
  369. dlg,a-d-btn-thr = <0xa>;
  370. dlg,d-b-btn-thr = <0x16>;
  371. dlg,b-c-btn-thr = <0x21>;
  372. dlg,c-mic-btn-thr = <0x3E>;
  373. };
  374. };
  375. };
  376. &i2s0 {
  377. status = "okay";
  378. };
  379. &io_domains {
  380. status = "okay";
  381. audio-supply = <&pp1800_audio>; /* APIO5_VDD; 3d 4a */
  382. bt656-supply = <&pp1800_ap_io>; /* APIO2_VDD; 2a 2b */
  383. gpio1830-supply = <&pp3000_ap>; /* APIO4_VDD; 4c 4d */
  384. sdmmc-supply = <&ppvar_sd_card_io>; /* SDMMC0_VDD; 4b */
  385. };
  386. &pcie0 {
  387. status = "okay";
  388. ep-gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>;
  389. pinctrl-names = "default";
  390. pinctrl-0 = <&pcie_clkreqn_cpm>, <&wifi_perst_l>;
  391. vpcie3v3-supply = <&pp3300_wifi_bt>;
  392. vpcie1v8-supply = <&wlan_pd_n>; /* HACK: see &wlan_pd_n */
  393. vpcie0v9-supply = <&pp900_pcie>;
  394. pci_rootport: pcie@0,0 {
  395. reg = <0x0000 0 0 0 0>;
  396. #address-cells = <3>;
  397. #size-cells = <2>;
  398. ranges;
  399. };
  400. };
  401. &pcie_phy {
  402. status = "okay";
  403. };
  404. &pmu_io_domains {
  405. status = "okay";
  406. pmu1830-supply = <&pp1800_pmu>; /* PMUIO2_VDD */
  407. };
  408. &pwm0 {
  409. status = "okay";
  410. };
  411. &pwm1 {
  412. status = "okay";
  413. };
  414. &pwm2 {
  415. status = "okay";
  416. };
  417. &pwm3 {
  418. status = "okay";
  419. };
  420. &sdhci {
  421. /*
  422. * Signal integrity isn't great at 200 MHz and 150 MHz (DDR) gives the
  423. * same (or nearly the same) performance for all eMMC that are intended
  424. * to be used.
  425. */
  426. assigned-clock-rates = <150000000>;
  427. bus-width = <8>;
  428. mmc-hs400-1_8v;
  429. mmc-hs400-enhanced-strobe;
  430. non-removable;
  431. status = "okay";
  432. };
  433. &sdmmc {
  434. status = "okay";
  435. /*
  436. * Note: configure "sdmmc_cd" as card detect even though it's actually
  437. * hooked to ground. Because we specified "cd-gpios" below dw_mmc
  438. * should be ignoring card detect anyway. Specifying the pin as
  439. * sdmmc_cd means that even if you've got GRF_SOC_CON7[12] (force_jtag)
  440. * turned on that the system will still make sure the port is
  441. * configured as SDMMC and not JTAG.
  442. */
  443. pinctrl-names = "default";
  444. pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_cd_pin
  445. &sdmmc_bus4>;
  446. bus-width = <4>;
  447. cap-mmc-highspeed;
  448. cap-sd-highspeed;
  449. cd-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>;
  450. disable-wp;
  451. sd-uhs-sdr12;
  452. sd-uhs-sdr25;
  453. sd-uhs-sdr50;
  454. sd-uhs-sdr104;
  455. vmmc-supply = <&pp3000_sd_slot>;
  456. vqmmc-supply = <&ppvar_sd_card_io>;
  457. };
  458. &spdif {
  459. status = "okay";
  460. /*
  461. * SPDIF is routed internally to DP; we either don't use these pins, or
  462. * mux them to something else.
  463. */
  464. /delete-property/ pinctrl-0;
  465. /delete-property/ pinctrl-names;
  466. };
  467. &spi1 {
  468. status = "okay";
  469. pinctrl-names = "default", "sleep";
  470. pinctrl-1 = <&spi1_sleep>;
  471. flash@0 {
  472. compatible = "jedec,spi-nor";
  473. reg = <0>;
  474. /* May run faster once verified. */
  475. spi-max-frequency = <10000000>;
  476. };
  477. };
  478. &spi2 {
  479. status = "okay";
  480. };
  481. &spi5 {
  482. status = "okay";
  483. cros_ec: ec@0 {
  484. compatible = "google,cros-ec-spi";
  485. reg = <0>;
  486. interrupt-parent = <&gpio0>;
  487. interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
  488. pinctrl-names = "default";
  489. pinctrl-0 = <&ec_ap_int_l>;
  490. spi-max-frequency = <3000000>;
  491. i2c_tunnel: i2c-tunnel {
  492. compatible = "google,cros-ec-i2c-tunnel";
  493. google,remote-bus = <4>;
  494. #address-cells = <1>;
  495. #size-cells = <0>;
  496. };
  497. usbc_extcon0: extcon0 {
  498. compatible = "google,extcon-usbc-cros-ec";
  499. google,usb-port-id = <0>;
  500. };
  501. };
  502. };
  503. &tsadc {
  504. status = "okay";
  505. rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
  506. rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
  507. };
  508. &tcphy0 {
  509. status = "okay";
  510. extcon = <&usbc_extcon0>;
  511. };
  512. &u2phy0 {
  513. status = "okay";
  514. };
  515. &u2phy0_host {
  516. status = "okay";
  517. };
  518. &u2phy1_host {
  519. status = "okay";
  520. };
  521. &u2phy0_otg {
  522. status = "okay";
  523. };
  524. &u2phy1_otg {
  525. status = "okay";
  526. };
  527. &uart2 {
  528. status = "okay";
  529. };
  530. &usb_host0_ohci {
  531. status = "okay";
  532. };
  533. &usbdrd3_0 {
  534. status = "okay";
  535. extcon = <&usbc_extcon0>;
  536. };
  537. &usbdrd_dwc3_0 {
  538. status = "okay";
  539. dr_mode = "host";
  540. };
  541. &vopb {
  542. status = "okay";
  543. };
  544. &vopb_mmu {
  545. status = "okay";
  546. };
  547. &vopl {
  548. status = "okay";
  549. };
  550. &vopl_mmu {
  551. status = "okay";
  552. };
  553. #include <arm/cros-ec-keyboard.dtsi>
  554. #include <arm/cros-ec-sbs.dtsi>
  555. &pinctrl {
  556. /*
  557. * pinctrl settings for pins that have no real owners.
  558. *
  559. * At the moment settings are identical for S0 and S3, but if we later
  560. * need to configure things differently for S3 we'll adjust here.
  561. */
  562. pinctrl-names = "default";
  563. pinctrl-0 = <
  564. &ap_pwroff /* AP will auto-assert this when in S3 */
  565. &clk_32k /* This pin is always 32k on gru boards */
  566. >;
  567. pcfg_output_low: pcfg-output-low {
  568. output-low;
  569. };
  570. pcfg_output_high: pcfg-output-high {
  571. output-high;
  572. };
  573. pcfg_pull_none_8ma: pcfg-pull-none-8ma {
  574. bias-disable;
  575. drive-strength = <8>;
  576. };
  577. backlight-enable {
  578. bl_en: bl-en {
  579. rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
  580. };
  581. };
  582. cros-ec {
  583. ec_ap_int_l: ec-ap-int-l {
  584. rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
  585. };
  586. };
  587. discrete-regulators {
  588. sd_io_pwr_en: sd-io-pwr-en {
  589. rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO
  590. &pcfg_pull_none>;
  591. };
  592. sd_pwr_1800_sel: sd-pwr-1800-sel {
  593. rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO
  594. &pcfg_pull_none>;
  595. };
  596. sd_slot_pwr_en: sd-slot-pwr-en {
  597. rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO
  598. &pcfg_pull_none>;
  599. };
  600. };
  601. codec {
  602. /* Has external pullup */
  603. headset_int_l: headset-int-l {
  604. rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
  605. };
  606. mic_int: mic-int {
  607. rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
  608. };
  609. };
  610. max98357a {
  611. sdmode_en: sdmode-en {
  612. rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_down>;
  613. };
  614. };
  615. pcie {
  616. pcie_clkreqn_cpm: pci-clkreqn-cpm {
  617. /*
  618. * Since our pcie doesn't support ClockPM(CPM), we want
  619. * to hack this as gpio, so the EP could be able to
  620. * de-assert it along and make ClockPM(CPM) work.
  621. */
  622. rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
  623. };
  624. };
  625. sdmmc {
  626. /*
  627. * We run sdmmc at max speed; bump up drive strength.
  628. * We also have external pulls, so disable the internal ones.
  629. */
  630. sdmmc_bus4: sdmmc-bus4 {
  631. rockchip,pins =
  632. <4 RK_PB0 1 &pcfg_pull_none_8ma>,
  633. <4 RK_PB1 1 &pcfg_pull_none_8ma>,
  634. <4 RK_PB2 1 &pcfg_pull_none_8ma>,
  635. <4 RK_PB3 1 &pcfg_pull_none_8ma>;
  636. };
  637. sdmmc_clk: sdmmc-clk {
  638. rockchip,pins =
  639. <4 RK_PB4 1 &pcfg_pull_none_8ma>;
  640. };
  641. sdmmc_cmd: sdmmc-cmd {
  642. rockchip,pins =
  643. <4 RK_PB5 1 &pcfg_pull_none_8ma>;
  644. };
  645. /*
  646. * In our case the official card detect is hooked to ground
  647. * to avoid getting access to JTAG just by sticking something
  648. * in the SD card slot (see the force_jtag bit in the TRM).
  649. *
  650. * We still configure it as card detect because it doesn't
  651. * hurt and dw_mmc will ignore it. We make sure to disable
  652. * the pull though so we don't burn needless power.
  653. */
  654. sdmmc_cd: sdmmc-cd {
  655. rockchip,pins =
  656. <0 RK_PA7 1 &pcfg_pull_none>;
  657. };
  658. /* This is where we actually hook up CD; has external pull */
  659. sdmmc_cd_pin: sdmmc-cd-pin {
  660. rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
  661. };
  662. };
  663. spi1 {
  664. spi1_sleep: spi1-sleep {
  665. /*
  666. * Pull down SPI1 CLK/CS/RX/TX during suspend, to
  667. * prevent leakage.
  668. */
  669. rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_down>,
  670. <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>,
  671. <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>,
  672. <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
  673. };
  674. };
  675. touchscreen {
  676. touch_int_l: touch-int-l {
  677. rockchip,pins = <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
  678. };
  679. touch_reset_l: touch-reset-l {
  680. rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
  681. };
  682. };
  683. trackpad {
  684. ap_i2c_tp_pu_en: ap-i2c-tp-pu-en {
  685. rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_output_high>;
  686. };
  687. trackpad_int_l: trackpad-int-l {
  688. rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
  689. };
  690. };
  691. wifi: wifi {
  692. wlan_module_reset_l: wlan-module-reset-l {
  693. rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  694. };
  695. bt_host_wake_l: bt-host-wake-l {
  696. /* Kevin has an external pull up, but Gru does not */
  697. rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  698. };
  699. };
  700. write-protect {
  701. ap_fw_wp: ap-fw-wp {
  702. rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
  703. };
  704. };
  705. };