rk3399-gru.dtsi 17 KB

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