rk3399-gru-scarlet.dtsi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Google Gru-scarlet board device tree source
  4. *
  5. * Copyright 2018 Google, Inc
  6. */
  7. #include "rk3399-gru.dtsi"
  8. /{
  9. chassis-type = "tablet";
  10. /* Power tree */
  11. /* ppvar_sys children, sorted by name */
  12. pp1250_s3: pp1250-s3 {
  13. compatible = "regulator-fixed";
  14. regulator-name = "pp1250_s3";
  15. /* EC turns on w/ pp1250_s3_en; always on for AP */
  16. regulator-always-on;
  17. regulator-boot-on;
  18. regulator-min-microvolt = <1250000>;
  19. regulator-max-microvolt = <1250000>;
  20. vin-supply = <&ppvar_sys>;
  21. };
  22. pp1250_cam: pp1250-dvdd {
  23. compatible = "regulator-fixed";
  24. regulator-name = "pp1250_dvdd";
  25. pinctrl-names = "default";
  26. pinctrl-0 = <&pp1250_cam_en>;
  27. enable-active-high;
  28. gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>;
  29. /* 740us delay from gpio output high to pp1250 stable,
  30. * rounding up to 1ms for safety.
  31. */
  32. startup-delay-us = <1000>;
  33. vin-supply = <&pp1250_s3>;
  34. };
  35. pp900_s0: pp900-s0 {
  36. compatible = "regulator-fixed";
  37. regulator-name = "pp900_s0";
  38. /* EC turns on w/ pp900_s0_en; always on for AP */
  39. regulator-always-on;
  40. regulator-boot-on;
  41. regulator-min-microvolt = <900000>;
  42. regulator-max-microvolt = <900000>;
  43. vin-supply = <&ppvar_sys>;
  44. };
  45. ppvarn_lcd: ppvarn-lcd {
  46. compatible = "regulator-fixed";
  47. regulator-name = "ppvarn_lcd";
  48. pinctrl-names = "default";
  49. pinctrl-0 = <&ppvarn_lcd_en>;
  50. enable-active-high;
  51. gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
  52. vin-supply = <&ppvar_sys>;
  53. };
  54. ppvarp_lcd: ppvarp-lcd {
  55. compatible = "regulator-fixed";
  56. regulator-name = "ppvarp_lcd";
  57. pinctrl-names = "default";
  58. pinctrl-0 = <&ppvarp_lcd_en>;
  59. enable-active-high;
  60. gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>;
  61. vin-supply = <&ppvar_sys>;
  62. };
  63. /* pp1800 children, sorted by name */
  64. pp900_s3: pp900-s3 {
  65. compatible = "regulator-fixed";
  66. regulator-name = "pp900_s3";
  67. /* EC turns on w/ pp900_s3_en; always on for AP */
  68. regulator-always-on;
  69. regulator-boot-on;
  70. regulator-min-microvolt = <900000>;
  71. regulator-max-microvolt = <900000>;
  72. vin-supply = <&pp1800>;
  73. };
  74. /* EC turns on pp1800_s3_en */
  75. pp1800_s3: pp1800 {
  76. };
  77. /* pp3300 children, sorted by name */
  78. pp2800_cam: pp2800-avdd {
  79. compatible = "regulator-fixed";
  80. regulator-name = "pp2800_avdd";
  81. pinctrl-names = "default";
  82. pinctrl-0 = <&pp2800_cam_en>;
  83. enable-active-high;
  84. gpio = <&gpio2 24 GPIO_ACTIVE_HIGH>;
  85. startup-delay-us = <100>;
  86. vin-supply = <&pp3300>;
  87. };
  88. /* EC turns on pp3300_s0_en */
  89. pp3300_s0: pp3300 {
  90. };
  91. /* EC turns on pp3300_s3_en */
  92. pp3300_s3: pp3300 {
  93. };
  94. /*
  95. * See b/66922012
  96. *
  97. * This is a hack to make sure the Bluetooth part of the QCA6174A
  98. * is reset at boot by toggling BT_EN. At boot BT_EN is first set
  99. * to low when the bt_3v3 regulator is registered (in disabled
  100. * state). The fake regulator is configured as a supply of the
  101. * wlan_3v3 regulator below. When wlan_3v3 is enabled early in
  102. * the boot process it also enables its supply regulator bt_3v3,
  103. * which changes BT_EN to high.
  104. */
  105. bt_3v3: bt-3v3 {
  106. compatible = "regulator-fixed";
  107. regulator-name = "bt_3v3";
  108. pinctrl-names = "default";
  109. pinctrl-0 = <&bt_en_1v8_l>;
  110. enable-active-high;
  111. gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
  112. vin-supply = <&pp3300_s3>;
  113. };
  114. wlan_3v3: wlan-3v3 {
  115. compatible = "regulator-fixed";
  116. regulator-name = "wlan_3v3";
  117. pinctrl-names = "default";
  118. pinctrl-0 = <&wlan_pd_1v8_l>;
  119. /*
  120. * The WL_EN pin is driven low when the regulator is
  121. * registered, and transitions to high when the PCIe bus
  122. * is powered up.
  123. */
  124. enable-active-high;
  125. gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
  126. /*
  127. * Require minimum 10ms from power-on (e.g., PD#) to init PCIe.
  128. * TODO (b/64444991): how long to assert PD#?
  129. */
  130. regulator-enable-ramp-delay = <10000>;
  131. /* See bt_3v3 hack above */
  132. vin-supply = <&bt_3v3>;
  133. };
  134. backlight: backlight {
  135. compatible = "pwm-backlight";
  136. enable-gpios = <&gpio4 21 GPIO_ACTIVE_HIGH>;
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&bl_en>;
  139. pwms = <&pwm1 0 1000000 0>;
  140. pwm-delay-us = <10000>;
  141. };
  142. dmic: dmic {
  143. compatible = "dmic-codec";
  144. dmicen-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
  145. pinctrl-names = "default";
  146. pinctrl-0 = <&dmic_en>;
  147. wakeup-delay-ms = <250>;
  148. };
  149. gpio_keys: gpio-keys {
  150. compatible = "gpio-keys";
  151. pinctrl-names = "default";
  152. pinctrl-0 = <&pen_eject_odl>;
  153. switch-pen-insert {
  154. label = "Pen Insert";
  155. /* Insert = low, eject = high */
  156. gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
  157. linux,code = <SW_PEN_INSERTED>;
  158. linux,input-type = <EV_SW>;
  159. wakeup-source;
  160. };
  161. };
  162. };
  163. /* pp900_s0 aliases */
  164. pp900_ddrpll_ap: &pp900_s0 {
  165. };
  166. pp900_pcie: &pp900_s0 {
  167. };
  168. pp900_usb: &pp900_s0 {
  169. };
  170. /* pp900_s3 aliases */
  171. pp900_emmcpll: &pp900_s3 {
  172. };
  173. /* EC turns on; alias for pp1800_s0 */
  174. pp1800_pcie: &pp1800_s0 {
  175. };
  176. /* On scarlet PPVAR(big_cpu, lit_cpu, gpu) need to adjust voltage ranges */
  177. &ppvar_bigcpu {
  178. ctrl-voltage-range = <800074 1299226>;
  179. regulator-min-microvolt = <800074>;
  180. regulator-max-microvolt = <1299226>;
  181. };
  182. &ppvar_bigcpu_pwm {
  183. /* On scarlet ppvar big cpu use pwm3 */
  184. pwms = <&pwm3 0 3337 0>;
  185. regulator-min-microvolt = <800074>;
  186. regulator-max-microvolt = <1299226>;
  187. };
  188. &ppvar_litcpu {
  189. ctrl-voltage-range = <802122 1199620>;
  190. regulator-min-microvolt = <802122>;
  191. regulator-max-microvolt = <1199620>;
  192. };
  193. &ppvar_litcpu_pwm {
  194. regulator-min-microvolt = <802122>;
  195. regulator-max-microvolt = <1199620>;
  196. };
  197. &ppvar_gpu {
  198. ctrl-voltage-range = <799600 1099600>;
  199. regulator-min-microvolt = <799600>;
  200. regulator-max-microvolt = <1099600>;
  201. };
  202. &ppvar_gpu_pwm {
  203. regulator-min-microvolt = <799600>;
  204. regulator-max-microvolt = <1099600>;
  205. };
  206. &ppvar_sd_card_io {
  207. states = <1800000 0x0>, <3300000 0x1>;
  208. regulator-max-microvolt = <3300000>;
  209. };
  210. &pp3000_sd_slot {
  211. vin-supply = <&pp3300>;
  212. };
  213. ap_i2c_dig: &i2c2 {
  214. status = "okay";
  215. clock-frequency = <400000>;
  216. /* These are relatively safe rise/fall times. */
  217. i2c-scl-falling-time-ns = <50>;
  218. i2c-scl-rising-time-ns = <300>;
  219. digitizer: digitizer@9 {
  220. compatible = "hid-over-i2c";
  221. reg = <0x9>;
  222. interrupt-parent = <&gpio1>;
  223. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  224. hid-descr-addr = <0x1>;
  225. pinctrl-names = "default";
  226. pinctrl-0 = <&pen_int_odl &pen_reset_l>;
  227. };
  228. };
  229. &ap_i2c_ts {
  230. touchscreen: touchscreen@10 {
  231. compatible = "elan,ekth3500";
  232. reg = <0x10>;
  233. interrupt-parent = <&gpio1>;
  234. interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
  235. pinctrl-names = "default";
  236. pinctrl-0 = <&touch_int_l &touch_reset_l>;
  237. reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  238. };
  239. };
  240. camera: &i2c7 {
  241. status = "okay";
  242. clock-frequency = <400000>;
  243. /* These are relatively safe rise/fall times; TODO: measure */
  244. i2c-scl-falling-time-ns = <50>;
  245. i2c-scl-rising-time-ns = <300>;
  246. /* 24M mclk is shared between world and user cameras */
  247. pinctrl-0 = <&i2c7_xfer &test_clkout1>;
  248. /* Rear-facing camera */
  249. wcam: camera@36 {
  250. compatible = "ovti,ov5695";
  251. reg = <0x36>;
  252. pinctrl-names = "default";
  253. pinctrl-0 = <&wcam_rst>;
  254. clocks = <&cru SCLK_TESTCLKOUT1>;
  255. clock-names = "xvclk";
  256. avdd-supply = <&pp2800_cam>;
  257. dvdd-supply = <&pp1250_cam>;
  258. dovdd-supply = <&pp1800_s0>;
  259. reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
  260. port {
  261. wcam_out: endpoint {
  262. remote-endpoint = <&mipi_in_wcam>;
  263. data-lanes = <1 2>;
  264. };
  265. };
  266. };
  267. /* Front-facing camera */
  268. ucam: camera@3c {
  269. compatible = "ovti,ov2685";
  270. reg = <0x3c>;
  271. pinctrl-names = "default";
  272. pinctrl-0 = <&ucam_rst>;
  273. clocks = <&cru SCLK_TESTCLKOUT1>;
  274. clock-names = "xvclk";
  275. avdd-supply = <&pp2800_cam>;
  276. dovdd-supply = <&pp1800_s0>;
  277. dvdd-supply = <&pp1800_s0>;
  278. reset-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
  279. port {
  280. ucam_out: endpoint {
  281. remote-endpoint = <&mipi_in_ucam>;
  282. data-lanes = <1>;
  283. };
  284. };
  285. };
  286. };
  287. &cdn_dp {
  288. extcon = <&usbc_extcon0>;
  289. phys = <&tcphy0_dp>;
  290. };
  291. &cpu_alert0 {
  292. temperature = <66000>;
  293. };
  294. &cpu_alert1 {
  295. temperature = <71000>;
  296. };
  297. &cros_ec {
  298. interrupt-parent = <&gpio1>;
  299. interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
  300. };
  301. &cru {
  302. assigned-clocks =
  303. <&cru PLL_GPLL>, <&cru PLL_CPLL>,
  304. <&cru PLL_NPLL>,
  305. <&cru ACLK_PERIHP>, <&cru HCLK_PERIHP>,
  306. <&cru PCLK_PERIHP>,
  307. <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
  308. <&cru PCLK_PERILP0>, <&cru ACLK_CCI>,
  309. <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>,
  310. <&cru ACLK_VIO>,
  311. <&cru ACLK_GIC_PRE>,
  312. <&cru PCLK_DDR>,
  313. <&cru ACLK_HDCP>,
  314. <&cru ACLK_VDU>;
  315. assigned-clock-rates =
  316. <600000000>, <1600000000>,
  317. <1000000000>,
  318. <150000000>, <75000000>,
  319. <37500000>,
  320. <100000000>, <100000000>,
  321. <50000000>, <800000000>,
  322. <100000000>, <50000000>,
  323. <400000000>,
  324. <200000000>,
  325. <200000000>,
  326. <400000000>,
  327. <400000000>;
  328. };
  329. /* The center supply is fixed to .9V on scarlet */
  330. &dmc {
  331. center-supply = <&pp900_s0>;
  332. };
  333. /* We don't need .925 V for 928 MHz on scarlet */
  334. &dmc_opp_table {
  335. opp03 {
  336. opp-microvolt = <900000>;
  337. };
  338. };
  339. &gpio0 {
  340. gpio-line-names = /* GPIO0 A 0-7 */
  341. "CLK_32K_AP",
  342. "EC_IN_RW_OD",
  343. "SPK_PA_EN",
  344. "WLAN_PERST_1V8_L",
  345. "WLAN_PD_1V8_L",
  346. "WLAN_RF_KILL_1V8_L",
  347. "BIGCPU_DVS_PWM",
  348. "SD_CD_L_JTAG_EN",
  349. /* GPIO0 B 0-5 */
  350. "BT_EN_BT_RF_KILL_1V8_L",
  351. "PMUIO2_33_18_L_PP3300_S0_EN",
  352. "TOUCH_RESET_L",
  353. "AP_EC_WARM_RESET_REQ",
  354. "PEN_RESET_L",
  355. /*
  356. * AP_FLASH_WP_L is crossystem ABI. Schematics call
  357. * it AP_FLASH_WP_R_ODL.
  358. */
  359. "AP_FLASH_WP_L";
  360. };
  361. &gpio1 {
  362. gpio-line-names = /* GPIO1 A 0-7 */
  363. "PEN_INT_ODL",
  364. "PEN_EJECT_ODL",
  365. "BT_HOST_WAKE_1V8_L",
  366. "WLAN_HOST_WAKE_1V8_L",
  367. "TOUCH_INT_ODL",
  368. "AP_EC_S3_S0_L",
  369. "AP_EC_OVERTEMP",
  370. "AP_SPI_FLASH_MISO",
  371. /* GPIO1 B 0-7 */
  372. "AP_SPI_FLASH_MOSI_R",
  373. "AP_SPI_FLASH_CLK_R",
  374. "AP_SPI_FLASH_CS_L_R",
  375. "SD_CARD_DET_ODL",
  376. "",
  377. "AP_EXPANSION_IO1",
  378. "AP_EXPANSION_IO2",
  379. "AP_I2C_DISP_SDA",
  380. /* GPIO1 C 0-7 */
  381. "AP_I2C_DISP_SCL",
  382. "H1_INT_ODL",
  383. "EC_AP_INT_ODL",
  384. "LITCPU_DVS_PWM",
  385. "AP_I2C_AUDIO_SDA",
  386. "AP_I2C_AUDIO_SCL",
  387. "AP_EXPANSION_IO3",
  388. "HEADSET_INT_ODL",
  389. /* GPIO1 D0 */
  390. "AP_EXPANSION_IO4";
  391. };
  392. &gpio2 {
  393. gpio-line-names = /* GPIO2 A 0-7 */
  394. "AP_I2C_PEN_SDA",
  395. "AP_I2C_PEN_SCL",
  396. "SD_IO_PWR_EN",
  397. "UCAM_RST_L",
  398. "PP1250_CAM_EN",
  399. "WCAM_RST_L",
  400. "AP_EXPANSION_IO5",
  401. "AP_I2C_CAM_SDA",
  402. /* GPIO2 B 0-7 */
  403. "AP_I2C_CAM_SCL",
  404. "AP_H1_SPI_MISO",
  405. "AP_H1_SPI_MOSI",
  406. "AP_H1_SPI_CLK",
  407. "AP_H1_SPI_CS_L",
  408. "",
  409. "",
  410. "",
  411. /* GPIO2 C 0-7 */
  412. "UART_EXPANSION_TX_AP_RX",
  413. "UART_AP_TX_EXPANSION_RX",
  414. "UART_EXPANSION_RTS_AP_CTS",
  415. "UART_AP_RTS_EXPANSION_CTS",
  416. "AP_SPI_EC_MISO",
  417. "AP_SPI_EC_MOSI",
  418. "AP_SPI_EC_CLK",
  419. "AP_SPI_EC_CS_L",
  420. /* GPIO2 D 0-4 */
  421. "PP2800_CAM_EN",
  422. "CLK_24M_CAM",
  423. "WLAN_PCIE_CLKREQ_1V8_L",
  424. "",
  425. "SD_PWR_3000_1800_L";
  426. };
  427. &gpio3 {
  428. gpio-line-names = /* GPIO3 A 0-7 */
  429. "",
  430. "",
  431. "",
  432. "",
  433. "",
  434. "",
  435. "",
  436. "",
  437. /* GPIO3 B 0-7 */
  438. "",
  439. "",
  440. "",
  441. "",
  442. "",
  443. "",
  444. "",
  445. "",
  446. /* GPIO3 C 0-7 */
  447. "",
  448. "",
  449. "",
  450. "",
  451. "",
  452. "",
  453. "",
  454. "",
  455. /* GPIO3 D 0-7 */
  456. "I2S0_SCLK",
  457. "I2S0_LRCK_RX",
  458. "I2S0_LRCK_TX",
  459. "I2S0_SDI_0",
  460. "STRAP_LCDBIAS_L",
  461. "STRAP_FEATURE_1",
  462. "STRAP_FEATURE_2",
  463. "I2S0_SDO_0";
  464. };
  465. &gpio4 {
  466. gpio-line-names = /* GPIO4 A 0-7 */
  467. "I2S_MCLK",
  468. "AP_I2C_EXPANSION_SDA",
  469. "AP_I2C_EXPANSION_SCL",
  470. "DMIC_EN",
  471. "",
  472. "",
  473. "",
  474. "",
  475. /* GPIO4 B 0-7 */
  476. "",
  477. "",
  478. "",
  479. "",
  480. "",
  481. "",
  482. "",
  483. "",
  484. /* GPIO4 C 0-7 */
  485. "AP_I2C_TS_SDA",
  486. "AP_I2C_TS_SCL",
  487. "GPU_DVS_PWM",
  488. "UART_DBG_TX_AP_RX",
  489. "UART_AP_TX_DBG_RX",
  490. "BL_EN",
  491. "BL_PWM",
  492. "",
  493. /* GPIO4 D 0-5 */
  494. "",
  495. "DISPLAY_RST_L",
  496. "",
  497. "PPVARP_LCD_EN",
  498. "PPVARN_LCD_EN",
  499. "SD_SLOT_PWR_EN";
  500. };
  501. &i2c_tunnel {
  502. google,remote-bus = <0>;
  503. };
  504. &io_domains {
  505. bt656-supply = <&pp1800_s0>; /* APIO2_VDD; 2a 2b */
  506. audio-supply = <&pp1800_s0>; /* APIO5_VDD; 3d 4a */
  507. gpio1830-supply = <&pp1800_s0>; /* APIO4_VDD; 4c 4d */
  508. };
  509. &isp0 {
  510. status = "okay";
  511. ports {
  512. port@0 {
  513. mipi_in_wcam: endpoint@0 {
  514. reg = <0>;
  515. remote-endpoint = <&wcam_out>;
  516. data-lanes = <1 2>;
  517. };
  518. mipi_in_ucam: endpoint@1 {
  519. reg = <1>;
  520. remote-endpoint = <&ucam_out>;
  521. data-lanes = <1>;
  522. };
  523. };
  524. };
  525. };
  526. &isp0_mmu {
  527. status = "okay";
  528. };
  529. &max98357a {
  530. sdmode-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
  531. };
  532. &mipi_dphy_rx0 {
  533. status = "okay";
  534. };
  535. &mipi_dsi {
  536. status = "okay";
  537. clock-master;
  538. ports {
  539. mipi_out: port@1 {
  540. reg = <1>;
  541. mipi_out_panel: endpoint {
  542. remote-endpoint = <&mipi_in_panel>;
  543. };
  544. };
  545. };
  546. mipi_panel: panel@0 {
  547. /* 2 different panels are used, compatibles are in dts files */
  548. reg = <0>;
  549. backlight = <&backlight>;
  550. enable-gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>;
  551. pinctrl-names = "default";
  552. pinctrl-0 = <&display_rst_l>;
  553. ports {
  554. #address-cells = <1>;
  555. #size-cells = <0>;
  556. port@0 {
  557. reg = <0>;
  558. mipi_in_panel: endpoint {
  559. remote-endpoint = <&mipi_out_panel>;
  560. };
  561. };
  562. port@1 {
  563. reg = <1>;
  564. mipi1_in_panel: endpoint@1 {
  565. remote-endpoint = <&mipi1_out_panel>;
  566. };
  567. };
  568. };
  569. };
  570. };
  571. &mipi_dsi1 {
  572. status = "okay";
  573. ports {
  574. mipi1_out: port@1 {
  575. reg = <1>;
  576. mipi1_out_panel: endpoint {
  577. remote-endpoint = <&mipi1_in_panel>;
  578. };
  579. };
  580. };
  581. };
  582. &pcie0 {
  583. ep-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
  584. /* PERST# asserted in S3 */
  585. pcie-reset-suspend = <1>;
  586. vpcie3v3-supply = <&wlan_3v3>;
  587. vpcie1v8-supply = <&pp1800_pcie>;
  588. };
  589. &sdmmc {
  590. cd-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
  591. };
  592. &sound {
  593. rockchip,codec = <&max98357a &dmic &codec &cdn_dp>;
  594. };
  595. &spi2 {
  596. status = "okay";
  597. cr50@0 {
  598. compatible = "google,cr50";
  599. reg = <0>;
  600. interrupt-parent = <&gpio1>;
  601. interrupts = <17 IRQ_TYPE_EDGE_RISING>;
  602. pinctrl-names = "default";
  603. pinctrl-0 = <&h1_int_od_l>;
  604. spi-max-frequency = <800000>;
  605. };
  606. };
  607. &usb_host0_ohci {
  608. #address-cells = <1>;
  609. #size-cells = <0>;
  610. qca_bt: bluetooth@1 {
  611. compatible = "usbcf3,e300", "usb4ca,301a";
  612. reg = <1>;
  613. pinctrl-names = "default";
  614. pinctrl-0 = <&bt_host_wake_l>;
  615. interrupt-parent = <&gpio1>;
  616. interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
  617. interrupt-names = "wakeup";
  618. };
  619. };
  620. /* PINCTRL OVERRIDES */
  621. &ap_fw_wp {
  622. rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
  623. };
  624. &bl_en {
  625. rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
  626. };
  627. &bt_host_wake_l {
  628. rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  629. };
  630. &ec_ap_int_l {
  631. rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
  632. };
  633. &headset_int_l {
  634. rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
  635. };
  636. &i2s0_8ch_bus {
  637. rockchip,pins =
  638. <3 RK_PD0 1 &pcfg_pull_none_6ma>,
  639. <3 RK_PD1 1 &pcfg_pull_none_6ma>,
  640. <3 RK_PD2 1 &pcfg_pull_none_6ma>,
  641. <3 RK_PD3 1 &pcfg_pull_none_6ma>,
  642. <3 RK_PD7 1 &pcfg_pull_none_6ma>,
  643. <4 RK_PA0 1 &pcfg_pull_none_6ma>;
  644. };
  645. &i2s0_8ch_bus_bclk_off {
  646. rockchip,pins =
  647. <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none_6ma>,
  648. <3 RK_PD1 1 &pcfg_pull_none_6ma>,
  649. <3 RK_PD2 1 &pcfg_pull_none_6ma>,
  650. <3 RK_PD3 1 &pcfg_pull_none_6ma>,
  651. <3 RK_PD7 1 &pcfg_pull_none_6ma>,
  652. <4 RK_PA0 1 &pcfg_pull_none_6ma>;
  653. };
  654. /* there is no external pull up, so need to set this pin pull up */
  655. &sdmmc_cd_pin {
  656. rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>;
  657. };
  658. &sd_pwr_1800_sel {
  659. rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
  660. };
  661. &sdmode_en {
  662. rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_down>;
  663. };
  664. &touch_reset_l {
  665. rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
  666. };
  667. &touch_int_l {
  668. rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
  669. };
  670. &pinctrl {
  671. pinctrl-0 = <
  672. &ap_pwroff /* AP will auto-assert this when in S3 */
  673. &clk_32k /* This pin is always 32k on gru boards */
  674. &wlan_rf_kill_1v8_l
  675. >;
  676. pcfg_pull_none_6ma: pcfg-pull-none-6ma {
  677. bias-disable;
  678. drive-strength = <6>;
  679. };
  680. camera {
  681. pp1250_cam_en: pp1250-dvdd {
  682. rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
  683. };
  684. pp2800_cam_en: pp2800-avdd {
  685. rockchip,pins = <2 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
  686. };
  687. ucam_rst: ucam_rst {
  688. rockchip,pins = <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
  689. };
  690. wcam_rst: wcam_rst {
  691. rockchip,pins = <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
  692. };
  693. };
  694. digitizer {
  695. pen_int_odl: pen-int-odl {
  696. rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
  697. };
  698. pen_reset_l: pen-reset-l {
  699. rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
  700. };
  701. };
  702. discrete-regulators {
  703. display_rst_l: display-rst-l {
  704. rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_down>;
  705. };
  706. ppvarp_lcd_en: ppvarp-lcd-en {
  707. rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
  708. };
  709. ppvarn_lcd_en: ppvarn-lcd-en {
  710. rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
  711. };
  712. };
  713. dmic {
  714. dmic_en: dmic-en {
  715. rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
  716. };
  717. };
  718. pen {
  719. pen_eject_odl: pen-eject-odl {
  720. rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
  721. };
  722. };
  723. tpm {
  724. h1_int_od_l: h1-int-od-l {
  725. rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
  726. };
  727. };
  728. };
  729. &wifi {
  730. bt_en_1v8_l: bt-en-1v8-l {
  731. rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
  732. };
  733. wlan_pd_1v8_l: wlan-pd-1v8-l {
  734. rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
  735. };
  736. /* Default pull-up, but just to be clear */
  737. wlan_rf_kill_1v8_l: wlan-rf-kill-1v8-l {
  738. rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  739. };
  740. wifi_perst_l: wifi-perst-l {
  741. rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
  742. };
  743. wlan_host_wake_l: wlan-host-wake-l {
  744. rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  745. };
  746. };