1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Google Gru-scarlet board device tree source
5 * Copyright 2018 Google, Inc
8 #include "rk3399-gru.dtsi"
11 chassis-type = "tablet";
15 /* ppvar_sys children, sorted by name */
16 pp1250_s3: pp1250-s3 {
17 compatible = "regulator-fixed";
18 regulator-name = "pp1250_s3";
20 /* EC turns on w/ pp1250_s3_en; always on for AP */
23 regulator-min-microvolt = <1250000>;
24 regulator-max-microvolt = <1250000>;
26 vin-supply = <&ppvar_sys>;
29 pp1250_cam: pp1250-dvdd {
30 compatible = "regulator-fixed";
31 regulator-name = "pp1250_dvdd";
32 pinctrl-names = "default";
33 pinctrl-0 = <&pp1250_cam_en>;
36 gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>;
38 /* 740us delay from gpio output high to pp1250 stable,
39 * rounding up to 1ms for safety.
41 startup-delay-us = <1000>;
42 vin-supply = <&pp1250_s3>;
46 compatible = "regulator-fixed";
47 regulator-name = "pp900_s0";
49 /* EC turns on w/ pp900_s0_en; always on for AP */
52 regulator-min-microvolt = <900000>;
53 regulator-max-microvolt = <900000>;
55 vin-supply = <&ppvar_sys>;
58 ppvarn_lcd: ppvarn-lcd {
59 compatible = "regulator-fixed";
60 regulator-name = "ppvarn_lcd";
61 pinctrl-names = "default";
62 pinctrl-0 = <&ppvarn_lcd_en>;
65 gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
66 vin-supply = <&ppvar_sys>;
69 ppvarp_lcd: ppvarp-lcd {
70 compatible = "regulator-fixed";
71 regulator-name = "ppvarp_lcd";
72 pinctrl-names = "default";
73 pinctrl-0 = <&ppvarp_lcd_en>;
76 gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>;
77 vin-supply = <&ppvar_sys>;
80 /* pp1800 children, sorted by name */
82 compatible = "regulator-fixed";
83 regulator-name = "pp900_s3";
85 /* EC turns on w/ pp900_s3_en; always on for AP */
88 regulator-min-microvolt = <900000>;
89 regulator-max-microvolt = <900000>;
91 vin-supply = <&pp1800>;
94 /* EC turns on pp1800_s3_en */
98 /* pp3300 children, sorted by name */
99 pp2800_cam: pp2800-avdd {
100 compatible = "regulator-fixed";
101 regulator-name = "pp2800_avdd";
102 pinctrl-names = "default";
103 pinctrl-0 = <&pp2800_cam_en>;
106 gpio = <&gpio2 24 GPIO_ACTIVE_HIGH>;
107 startup-delay-us = <100>;
108 vin-supply = <&pp3300>;
111 /* EC turns on pp3300_s0_en */
115 /* EC turns on pp3300_s3_en */
122 * This is a hack to make sure the Bluetooth part of the QCA6174A
123 * is reset at boot by toggling BT_EN. At boot BT_EN is first set
124 * to low when the bt_3v3 regulator is registered (in disabled
125 * state). The fake regulator is configured as a supply of the
126 * wlan_3v3 regulator below. When wlan_3v3 is enabled early in
127 * the boot process it also enables its supply regulator bt_3v3,
128 * which changes BT_EN to high.
131 compatible = "regulator-fixed";
132 regulator-name = "bt_3v3";
133 pinctrl-names = "default";
134 pinctrl-0 = <&bt_en_1v8_l>;
137 gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
138 vin-supply = <&pp3300_s3>;
142 compatible = "regulator-fixed";
143 regulator-name = "wlan_3v3";
144 pinctrl-names = "default";
145 pinctrl-0 = <&wlan_pd_1v8_l>;
148 * The WL_EN pin is driven low when the regulator is
149 * registered, and transitions to high when the PCIe bus
153 gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
156 * Require minimum 10ms from power-on (e.g., PD#) to init PCIe.
157 * TODO (b/64444991): how long to assert PD#?
159 regulator-enable-ramp-delay = <10000>;
160 /* See bt_3v3 hack above */
161 vin-supply = <&bt_3v3>;
164 backlight: backlight {
165 compatible = "pwm-backlight";
166 enable-gpios = <&gpio4 21 GPIO_ACTIVE_HIGH>;
167 pinctrl-names = "default";
168 pinctrl-0 = <&bl_en>;
169 pwms = <&pwm1 0 1000000 0>;
173 compatible = "dmic-codec";
174 dmicen-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
175 pinctrl-names = "default";
176 pinctrl-0 = <&dmic_en>;
177 wakeup-delay-ms = <250>;
180 gpio_keys: gpio-keys {
181 compatible = "gpio-keys";
182 pinctrl-names = "default";
183 pinctrl-0 = <&pen_eject_odl>;
186 label = "Pen Insert";
187 /* Insert = low, eject = high */
188 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
189 linux,code = <SW_PEN_INSERTED>;
190 linux,input-type = <EV_SW>;
196 /* pp900_s0 aliases */
197 pp900_ddrpll_ap: &pp900_s0 {
199 pp900_pcie: &pp900_s0 {
201 pp900_usb: &pp900_s0 {
204 /* pp900_s3 aliases */
205 pp900_emmcpll: &pp900_s3 {
208 /* EC turns on; alias for pp1800_s0 */
209 pp1800_pcie: &pp1800_s0 {
212 /* On scarlet PPVAR(big_cpu, lit_cpu, gpu) need to adjust voltage ranges */
214 ctrl-voltage-range = <800074 1299226>;
215 regulator-min-microvolt = <800074>;
216 regulator-max-microvolt = <1299226>;
220 /* On scarlet ppvar big cpu use pwm3 */
221 pwms = <&pwm3 0 3337 0>;
222 regulator-min-microvolt = <800074>;
223 regulator-max-microvolt = <1299226>;
227 ctrl-voltage-range = <802122 1199620>;
228 regulator-min-microvolt = <802122>;
229 regulator-max-microvolt = <1199620>;
233 regulator-min-microvolt = <802122>;
234 regulator-max-microvolt = <1199620>;
238 ctrl-voltage-range = <799600 1099600>;
239 regulator-min-microvolt = <799600>;
240 regulator-max-microvolt = <1099600>;
244 regulator-min-microvolt = <799600>;
245 regulator-max-microvolt = <1099600>;
249 states = <1800000 0x0>, <3300000 0x1>;
250 regulator-max-microvolt = <3300000>;
254 vin-supply = <&pp3300>;
260 clock-frequency = <400000>;
262 /* These are relatively safe rise/fall times. */
263 i2c-scl-falling-time-ns = <50>;
264 i2c-scl-rising-time-ns = <300>;
266 digitizer: digitizer@9 {
267 compatible = "hid-over-i2c";
269 interrupt-parent = <&gpio1>;
270 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
271 hid-descr-addr = <0x1>;
272 pinctrl-names = "default";
273 pinctrl-0 = <&pen_int_odl &pen_reset_l>;
278 touchscreen: touchscreen@10 {
279 compatible = "elan,ekth3500";
281 interrupt-parent = <&gpio1>;
282 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
283 pinctrl-names = "default";
284 pinctrl-0 = <&touch_int_l &touch_reset_l>;
285 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
292 clock-frequency = <400000>;
294 /* These are relatively safe rise/fall times; TODO: measure */
295 i2c-scl-falling-time-ns = <50>;
296 i2c-scl-rising-time-ns = <300>;
298 /* 24M mclk is shared between world and user cameras */
299 pinctrl-0 = <&i2c7_xfer &test_clkout1>;
301 /* Rear-facing camera */
303 compatible = "ovti,ov5695";
305 pinctrl-names = "default";
306 pinctrl-0 = <&wcam_rst>;
308 clocks = <&cru SCLK_TESTCLKOUT1>;
309 clock-names = "xvclk";
311 avdd-supply = <&pp2800_cam>;
312 dvdd-supply = <&pp1250_cam>;
313 dovdd-supply = <&pp1800_s0>;
314 reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
318 remote-endpoint = <&mipi_in_wcam>;
324 /* Front-facing camera */
326 compatible = "ovti,ov2685";
328 pinctrl-names = "default";
329 pinctrl-0 = <&ucam_rst>;
331 clocks = <&cru SCLK_TESTCLKOUT1>;
332 clock-names = "xvclk";
334 avdd-supply = <&pp2800_cam>;
335 dovdd-supply = <&pp1800_s0>;
336 dvdd-supply = <&pp1800_s0>;
337 reset-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
341 remote-endpoint = <&mipi_in_ucam>;
349 extcon = <&usbc_extcon0>;
354 temperature = <66000>;
358 temperature = <71000>;
362 interrupt-parent = <&gpio1>;
363 interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
368 <&cru PLL_GPLL>, <&cru PLL_CPLL>,
370 <&cru ACLK_PERIHP>, <&cru HCLK_PERIHP>,
372 <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
373 <&cru PCLK_PERILP0>, <&cru ACLK_CCI>,
374 <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>,
380 assigned-clock-rates =
381 <600000000>, <1600000000>,
383 <150000000>, <75000000>,
385 <100000000>, <100000000>,
386 <50000000>, <800000000>,
387 <100000000>, <50000000>,
395 /* The center supply is fixed to .9V on scarlet */
397 center-supply = <&pp900_s0>;
400 /* We don't need .925 V for 928 MHz on scarlet */
403 opp-microvolt = <900000>;
408 gpio-line-names = /* GPIO0 A 0-7 */
414 "WLAN_RF_KILL_1V8_L",
419 "BT_EN_BT_RF_KILL_1V8_L",
420 "PMUIO2_33_18_L_PP3300_S0_EN",
422 "AP_EC_WARM_RESET_REQ",
425 * AP_FLASH_WP_L is crossystem ABI. Schematics call
426 * it AP_FLASH_WP_R_ODL.
432 gpio-line-names = /* GPIO1 A 0-7 */
435 "BT_HOST_WAKE_1V8_L",
436 "WLAN_HOST_WAKE_1V8_L",
443 "AP_SPI_FLASH_MOSI_R",
444 "AP_SPI_FLASH_CLK_R",
445 "AP_SPI_FLASH_CS_L_R",
467 gpio-line-names = /* GPIO2 A 0-7 */
488 "UART_EXPANSION_TX_AP_RX",
489 "UART_AP_TX_EXPANSION_RX",
490 "UART_EXPANSION_RTS_AP_CTS",
491 "UART_AP_RTS_EXPANSION_CTS",
500 "WLAN_PCIE_CLKREQ_1V8_L",
502 "SD_PWR_3000_1800_L";
506 gpio-line-names = /* GPIO3 A 0-7 */
548 gpio-line-names = /* GPIO4 A 0-7 */
550 "AP_I2C_EXPANSION_SDA",
551 "AP_I2C_EXPANSION_SCL",
588 google,remote-bus = <0>;
592 bt656-supply = <&pp1800_s0>; /* APIO2_VDD; 2a 2b */
593 audio-supply = <&pp1800_s0>; /* APIO5_VDD; 3d 4a */
594 gpio1830-supply = <&pp1800_s0>; /* APIO4_VDD; 4c 4d */
602 mipi_in_wcam: endpoint@0 {
604 remote-endpoint = <&wcam_out>;
608 mipi_in_ucam: endpoint@1 {
610 remote-endpoint = <&ucam_out>;
622 sdmode-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
637 mipi_out_panel: endpoint {
638 remote-endpoint = <&mipi_in_panel>;
643 mipi_panel: panel@0 {
644 /* 2 different panels are used, compatibles are in dts files */
646 backlight = <&backlight>;
647 enable-gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>;
648 pinctrl-names = "default";
649 pinctrl-0 = <&display_rst_l>;
652 #address-cells = <1>;
658 mipi_in_panel: endpoint {
659 remote-endpoint = <&mipi_out_panel>;
666 mipi1_in_panel: endpoint@1 {
667 remote-endpoint = <&mipi1_out_panel>;
681 mipi1_out_panel: endpoint {
682 remote-endpoint = <&mipi1_in_panel>;
689 ep-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
691 /* PERST# asserted in S3 */
692 pcie-reset-suspend = <1>;
694 vpcie3v3-supply = <&wlan_3v3>;
695 vpcie1v8-supply = <&pp1800_pcie>;
699 cd-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
703 rockchip,codec = <&max98357a &dmic &codec &cdn_dp>;
710 compatible = "google,cr50";
712 interrupt-parent = <&gpio1>;
713 interrupts = <17 IRQ_TYPE_EDGE_RISING>;
714 pinctrl-names = "default";
715 pinctrl-0 = <&h1_int_od_l>;
716 spi-max-frequency = <800000>;
721 #address-cells = <1>;
724 qca_bt: bluetooth@1 {
725 compatible = "usbcf3,e300", "usb4ca,301a";
727 pinctrl-names = "default";
728 pinctrl-0 = <&bt_host_wake_l>;
729 interrupt-parent = <&gpio1>;
730 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
731 interrupt-names = "wakeup";
735 /* PINCTRL OVERRIDES */
737 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
741 rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
745 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
749 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
753 rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
758 <3 RK_PD0 1 &pcfg_pull_none_6ma>,
759 <3 RK_PD1 1 &pcfg_pull_none_6ma>,
760 <3 RK_PD2 1 &pcfg_pull_none_6ma>,
761 <3 RK_PD3 1 &pcfg_pull_none_6ma>,
762 <3 RK_PD7 1 &pcfg_pull_none_6ma>,
763 <4 RK_PA0 1 &pcfg_pull_none_6ma>;
766 &i2s0_8ch_bus_bclk_off {
768 <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none_6ma>,
769 <3 RK_PD1 1 &pcfg_pull_none_6ma>,
770 <3 RK_PD2 1 &pcfg_pull_none_6ma>,
771 <3 RK_PD3 1 &pcfg_pull_none_6ma>,
772 <3 RK_PD7 1 &pcfg_pull_none_6ma>,
773 <4 RK_PA0 1 &pcfg_pull_none_6ma>;
776 /* there is no external pull up, so need to set this pin pull up */
778 rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>;
782 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
786 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_down>;
790 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
794 rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
799 &ap_pwroff /* AP will auto-assert this when in S3 */
800 &clk_32k /* This pin is always 32k on gru boards */
804 pcfg_pull_none_6ma: pcfg-pull-none-6ma {
806 drive-strength = <6>;
810 pp1250_cam_en: pp1250-dvdd {
811 rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
814 pp2800_cam_en: pp2800-avdd {
815 rockchip,pins = <2 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
819 rockchip,pins = <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
823 rockchip,pins = <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
828 pen_int_odl: pen-int-odl {
829 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
832 pen_reset_l: pen-reset-l {
833 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
837 discrete-regulators {
838 display_rst_l: display-rst-l {
839 rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_down>;
842 ppvarp_lcd_en: ppvarp-lcd-en {
843 rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
846 ppvarn_lcd_en: ppvarn-lcd-en {
847 rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
853 rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
858 pen_eject_odl: pen-eject-odl {
859 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
864 h1_int_od_l: h1-int-od-l {
865 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
871 bt_en_1v8_l: bt-en-1v8-l {
872 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
875 wlan_pd_1v8_l: wlan-pd-1v8-l {
876 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
879 /* Default pull-up, but just to be clear */
880 wlan_rf_kill_1v8_l: wlan-rf-kill-1v8-l {
881 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
884 wifi_perst_l: wifi-perst-l {
885 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
888 wlan_host_wake_l: wlan-host-wake-l {
889 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;