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>;
170 pwm-delay-us = <10000>;
174 compatible = "dmic-codec";
175 dmicen-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
176 pinctrl-names = "default";
177 pinctrl-0 = <&dmic_en>;
178 wakeup-delay-ms = <250>;
181 gpio_keys: gpio-keys {
182 compatible = "gpio-keys";
183 pinctrl-names = "default";
184 pinctrl-0 = <&pen_eject_odl>;
187 label = "Pen Insert";
188 /* Insert = low, eject = high */
189 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
190 linux,code = <SW_PEN_INSERTED>;
191 linux,input-type = <EV_SW>;
197 /* pp900_s0 aliases */
198 pp900_ddrpll_ap: &pp900_s0 {
200 pp900_pcie: &pp900_s0 {
202 pp900_usb: &pp900_s0 {
205 /* pp900_s3 aliases */
206 pp900_emmcpll: &pp900_s3 {
209 /* EC turns on; alias for pp1800_s0 */
210 pp1800_pcie: &pp1800_s0 {
213 /* On scarlet PPVAR(big_cpu, lit_cpu, gpu) need to adjust voltage ranges */
215 ctrl-voltage-range = <800074 1299226>;
216 regulator-min-microvolt = <800074>;
217 regulator-max-microvolt = <1299226>;
221 /* On scarlet ppvar big cpu use pwm3 */
222 pwms = <&pwm3 0 3337 0>;
223 regulator-min-microvolt = <800074>;
224 regulator-max-microvolt = <1299226>;
228 ctrl-voltage-range = <802122 1199620>;
229 regulator-min-microvolt = <802122>;
230 regulator-max-microvolt = <1199620>;
234 regulator-min-microvolt = <802122>;
235 regulator-max-microvolt = <1199620>;
239 ctrl-voltage-range = <799600 1099600>;
240 regulator-min-microvolt = <799600>;
241 regulator-max-microvolt = <1099600>;
245 regulator-min-microvolt = <799600>;
246 regulator-max-microvolt = <1099600>;
250 states = <1800000 0x0>, <3300000 0x1>;
251 regulator-max-microvolt = <3300000>;
255 vin-supply = <&pp3300>;
261 clock-frequency = <400000>;
263 /* These are relatively safe rise/fall times. */
264 i2c-scl-falling-time-ns = <50>;
265 i2c-scl-rising-time-ns = <300>;
267 digitizer: digitizer@9 {
268 compatible = "hid-over-i2c";
270 interrupt-parent = <&gpio1>;
271 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
272 hid-descr-addr = <0x1>;
273 pinctrl-names = "default";
274 pinctrl-0 = <&pen_int_odl &pen_reset_l>;
279 touchscreen: touchscreen@10 {
280 compatible = "elan,ekth3500";
282 interrupt-parent = <&gpio1>;
283 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
284 pinctrl-names = "default";
285 pinctrl-0 = <&touch_int_l &touch_reset_l>;
286 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
293 clock-frequency = <400000>;
295 /* These are relatively safe rise/fall times; TODO: measure */
296 i2c-scl-falling-time-ns = <50>;
297 i2c-scl-rising-time-ns = <300>;
299 /* 24M mclk is shared between world and user cameras */
300 pinctrl-0 = <&i2c7_xfer &test_clkout1>;
302 /* Rear-facing camera */
304 compatible = "ovti,ov5695";
306 pinctrl-names = "default";
307 pinctrl-0 = <&wcam_rst>;
309 clocks = <&cru SCLK_TESTCLKOUT1>;
310 clock-names = "xvclk";
312 avdd-supply = <&pp2800_cam>;
313 dvdd-supply = <&pp1250_cam>;
314 dovdd-supply = <&pp1800_s0>;
315 reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
319 remote-endpoint = <&mipi_in_wcam>;
325 /* Front-facing camera */
327 compatible = "ovti,ov2685";
329 pinctrl-names = "default";
330 pinctrl-0 = <&ucam_rst>;
332 clocks = <&cru SCLK_TESTCLKOUT1>;
333 clock-names = "xvclk";
335 avdd-supply = <&pp2800_cam>;
336 dovdd-supply = <&pp1800_s0>;
337 dvdd-supply = <&pp1800_s0>;
338 reset-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
342 remote-endpoint = <&mipi_in_ucam>;
350 extcon = <&usbc_extcon0>;
355 temperature = <66000>;
359 temperature = <71000>;
363 interrupt-parent = <&gpio1>;
364 interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
369 <&cru PLL_GPLL>, <&cru PLL_CPLL>,
371 <&cru ACLK_PERIHP>, <&cru HCLK_PERIHP>,
373 <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
374 <&cru PCLK_PERILP0>, <&cru ACLK_CCI>,
375 <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>,
381 assigned-clock-rates =
382 <600000000>, <1600000000>,
384 <150000000>, <75000000>,
386 <100000000>, <100000000>,
387 <50000000>, <800000000>,
388 <100000000>, <50000000>,
396 /* The center supply is fixed to .9V on scarlet */
398 center-supply = <&pp900_s0>;
401 /* We don't need .925 V for 928 MHz on scarlet */
404 opp-microvolt = <900000>;
409 gpio-line-names = /* GPIO0 A 0-7 */
415 "WLAN_RF_KILL_1V8_L",
420 "BT_EN_BT_RF_KILL_1V8_L",
421 "PMUIO2_33_18_L_PP3300_S0_EN",
423 "AP_EC_WARM_RESET_REQ",
426 * AP_FLASH_WP_L is crossystem ABI. Schematics call
427 * it AP_FLASH_WP_R_ODL.
433 gpio-line-names = /* GPIO1 A 0-7 */
436 "BT_HOST_WAKE_1V8_L",
437 "WLAN_HOST_WAKE_1V8_L",
444 "AP_SPI_FLASH_MOSI_R",
445 "AP_SPI_FLASH_CLK_R",
446 "AP_SPI_FLASH_CS_L_R",
468 gpio-line-names = /* GPIO2 A 0-7 */
489 "UART_EXPANSION_TX_AP_RX",
490 "UART_AP_TX_EXPANSION_RX",
491 "UART_EXPANSION_RTS_AP_CTS",
492 "UART_AP_RTS_EXPANSION_CTS",
501 "WLAN_PCIE_CLKREQ_1V8_L",
503 "SD_PWR_3000_1800_L";
507 gpio-line-names = /* GPIO3 A 0-7 */
549 gpio-line-names = /* GPIO4 A 0-7 */
551 "AP_I2C_EXPANSION_SDA",
552 "AP_I2C_EXPANSION_SCL",
589 google,remote-bus = <0>;
593 bt656-supply = <&pp1800_s0>; /* APIO2_VDD; 2a 2b */
594 audio-supply = <&pp1800_s0>; /* APIO5_VDD; 3d 4a */
595 gpio1830-supply = <&pp1800_s0>; /* APIO4_VDD; 4c 4d */
603 mipi_in_wcam: endpoint@0 {
605 remote-endpoint = <&wcam_out>;
609 mipi_in_ucam: endpoint@1 {
611 remote-endpoint = <&ucam_out>;
623 sdmode-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
638 mipi_out_panel: endpoint {
639 remote-endpoint = <&mipi_in_panel>;
644 mipi_panel: panel@0 {
645 /* 2 different panels are used, compatibles are in dts files */
647 backlight = <&backlight>;
648 enable-gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>;
649 pinctrl-names = "default";
650 pinctrl-0 = <&display_rst_l>;
653 #address-cells = <1>;
659 mipi_in_panel: endpoint {
660 remote-endpoint = <&mipi_out_panel>;
667 mipi1_in_panel: endpoint@1 {
668 remote-endpoint = <&mipi1_out_panel>;
682 mipi1_out_panel: endpoint {
683 remote-endpoint = <&mipi1_in_panel>;
690 ep-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
692 /* PERST# asserted in S3 */
693 pcie-reset-suspend = <1>;
695 vpcie3v3-supply = <&wlan_3v3>;
696 vpcie1v8-supply = <&pp1800_pcie>;
700 cd-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
704 rockchip,codec = <&max98357a &dmic &codec &cdn_dp>;
711 compatible = "google,cr50";
713 interrupt-parent = <&gpio1>;
714 interrupts = <17 IRQ_TYPE_EDGE_RISING>;
715 pinctrl-names = "default";
716 pinctrl-0 = <&h1_int_od_l>;
717 spi-max-frequency = <800000>;
722 #address-cells = <1>;
725 qca_bt: bluetooth@1 {
726 compatible = "usbcf3,e300", "usb4ca,301a";
728 pinctrl-names = "default";
729 pinctrl-0 = <&bt_host_wake_l>;
730 interrupt-parent = <&gpio1>;
731 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
732 interrupt-names = "wakeup";
736 /* PINCTRL OVERRIDES */
738 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
742 rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
746 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
750 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
754 rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
759 <3 RK_PD0 1 &pcfg_pull_none_6ma>,
760 <3 RK_PD1 1 &pcfg_pull_none_6ma>,
761 <3 RK_PD2 1 &pcfg_pull_none_6ma>,
762 <3 RK_PD3 1 &pcfg_pull_none_6ma>,
763 <3 RK_PD7 1 &pcfg_pull_none_6ma>,
764 <4 RK_PA0 1 &pcfg_pull_none_6ma>;
767 &i2s0_8ch_bus_bclk_off {
769 <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none_6ma>,
770 <3 RK_PD1 1 &pcfg_pull_none_6ma>,
771 <3 RK_PD2 1 &pcfg_pull_none_6ma>,
772 <3 RK_PD3 1 &pcfg_pull_none_6ma>,
773 <3 RK_PD7 1 &pcfg_pull_none_6ma>,
774 <4 RK_PA0 1 &pcfg_pull_none_6ma>;
777 /* there is no external pull up, so need to set this pin pull up */
779 rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>;
783 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
787 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_down>;
791 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
795 rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
800 &ap_pwroff /* AP will auto-assert this when in S3 */
801 &clk_32k /* This pin is always 32k on gru boards */
805 pcfg_pull_none_6ma: pcfg-pull-none-6ma {
807 drive-strength = <6>;
811 pp1250_cam_en: pp1250-dvdd {
812 rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
815 pp2800_cam_en: pp2800-avdd {
816 rockchip,pins = <2 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
820 rockchip,pins = <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
824 rockchip,pins = <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
829 pen_int_odl: pen-int-odl {
830 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
833 pen_reset_l: pen-reset-l {
834 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
838 discrete-regulators {
839 display_rst_l: display-rst-l {
840 rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_down>;
843 ppvarp_lcd_en: ppvarp-lcd-en {
844 rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
847 ppvarn_lcd_en: ppvarn-lcd-en {
848 rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
854 rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
859 pen_eject_odl: pen-eject-odl {
860 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
865 h1_int_od_l: h1-int-od-l {
866 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
872 bt_en_1v8_l: bt-en-1v8-l {
873 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
876 wlan_pd_1v8_l: wlan-pd-1v8-l {
877 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
880 /* Default pull-up, but just to be clear */
881 wlan_rf_kill_1v8_l: wlan-rf-kill-1v8-l {
882 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
885 wifi_perst_l: wifi-perst-l {
886 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
889 wlan_host_wake_l: wlan-host-wake-l {
890 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;