1c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2c66ec88fSEmmanuel Vadot/*
3c66ec88fSEmmanuel Vadot * Google Gru-Chromebook shared properties
4c66ec88fSEmmanuel Vadot *
5c66ec88fSEmmanuel Vadot * Copyright 2018 Google, Inc
6c66ec88fSEmmanuel Vadot */
7c66ec88fSEmmanuel Vadot
8c66ec88fSEmmanuel Vadot#include "rk3399-gru.dtsi"
9c66ec88fSEmmanuel Vadot
10c66ec88fSEmmanuel Vadot/ {
11c66ec88fSEmmanuel Vadot	pp900_ap: pp900-ap {
12c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
13c66ec88fSEmmanuel Vadot		regulator-name = "pp900_ap";
14c66ec88fSEmmanuel Vadot
15c66ec88fSEmmanuel Vadot		/* EC turns on w/ pp900_ap_en; always on for AP */
16c66ec88fSEmmanuel Vadot		regulator-always-on;
17c66ec88fSEmmanuel Vadot		regulator-boot-on;
18c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <900000>;
19c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <900000>;
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel Vadot		vin-supply = <&ppvar_sys>;
22c66ec88fSEmmanuel Vadot	};
23c66ec88fSEmmanuel Vadot
24c66ec88fSEmmanuel Vadot	/* EC turns on w/ pp900_usb_en */
25c66ec88fSEmmanuel Vadot	pp900_usb: pp900-ap {
26c66ec88fSEmmanuel Vadot	};
27c66ec88fSEmmanuel Vadot
28c66ec88fSEmmanuel Vadot	/* EC turns on w/ pp900_pcie_en */
29c66ec88fSEmmanuel Vadot	pp900_pcie: pp900-ap {
30c66ec88fSEmmanuel Vadot	};
31c66ec88fSEmmanuel Vadot
32c66ec88fSEmmanuel Vadot	pp3000: pp3000 {
33c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
34c66ec88fSEmmanuel Vadot		regulator-name = "pp3000";
35c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
36c66ec88fSEmmanuel Vadot		pinctrl-0 = <&pp3000_en>;
37c66ec88fSEmmanuel Vadot
38c66ec88fSEmmanuel Vadot		enable-active-high;
39c66ec88fSEmmanuel Vadot		gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
40c66ec88fSEmmanuel Vadot
41c66ec88fSEmmanuel Vadot		regulator-always-on;
42c66ec88fSEmmanuel Vadot		regulator-boot-on;
43c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <3000000>;
44c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <3000000>;
45c66ec88fSEmmanuel Vadot
46c66ec88fSEmmanuel Vadot		vin-supply = <&ppvar_sys>;
47c66ec88fSEmmanuel Vadot	};
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot	ppvar_centerlogic_pwm: ppvar-centerlogic-pwm {
50c66ec88fSEmmanuel Vadot		compatible = "pwm-regulator";
51c66ec88fSEmmanuel Vadot		regulator-name = "ppvar_centerlogic_pwm";
52c66ec88fSEmmanuel Vadot
53c66ec88fSEmmanuel Vadot		pwms = <&pwm3 0 3337 0>;
54c66ec88fSEmmanuel Vadot		pwm-supply = <&ppvar_sys>;
55c66ec88fSEmmanuel Vadot		pwm-dutycycle-range = <100 0>;
56c66ec88fSEmmanuel Vadot		pwm-dutycycle-unit = <100>;
57c66ec88fSEmmanuel Vadot
58c66ec88fSEmmanuel Vadot		/* EC turns on w/ ppvar_centerlogic_en; always on for AP */
59c66ec88fSEmmanuel Vadot		regulator-always-on;
60c66ec88fSEmmanuel Vadot		regulator-boot-on;
61c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <799434>;
62c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <1049925>;
63c66ec88fSEmmanuel Vadot	};
64c66ec88fSEmmanuel Vadot
65c66ec88fSEmmanuel Vadot	ppvar_centerlogic: ppvar-centerlogic {
66c66ec88fSEmmanuel Vadot		compatible = "vctrl-regulator";
67c66ec88fSEmmanuel Vadot		regulator-name = "ppvar_centerlogic";
68c66ec88fSEmmanuel Vadot
69c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <799434>;
70c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <1049925>;
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel Vadot		ctrl-supply = <&ppvar_centerlogic_pwm>;
73c66ec88fSEmmanuel Vadot		ctrl-voltage-range = <799434 1049925>;
74c66ec88fSEmmanuel Vadot
75c66ec88fSEmmanuel Vadot		regulator-settling-time-up-us = <378>;
76c66ec88fSEmmanuel Vadot		min-slew-down-rate = <225>;
77c66ec88fSEmmanuel Vadot		ovp-threshold-percent = <16>;
78c66ec88fSEmmanuel Vadot	};
79c66ec88fSEmmanuel Vadot
80c66ec88fSEmmanuel Vadot	/* Schematics call this PPVAR even though it's fixed */
81c66ec88fSEmmanuel Vadot	ppvar_logic: ppvar-logic {
82c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
83c66ec88fSEmmanuel Vadot		regulator-name = "ppvar_logic";
84c66ec88fSEmmanuel Vadot
85c66ec88fSEmmanuel Vadot		/* EC turns on w/ ppvar_logic_en; always on for AP */
86c66ec88fSEmmanuel Vadot		regulator-always-on;
87c66ec88fSEmmanuel Vadot		regulator-boot-on;
88c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <900000>;
89c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <900000>;
90c66ec88fSEmmanuel Vadot
91c66ec88fSEmmanuel Vadot		vin-supply = <&ppvar_sys>;
92c66ec88fSEmmanuel Vadot	};
93c66ec88fSEmmanuel Vadot
94c66ec88fSEmmanuel Vadot	pp1800_audio: pp1800-audio {
95c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
96c66ec88fSEmmanuel Vadot		regulator-name = "pp1800_audio";
97c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
98c66ec88fSEmmanuel Vadot		pinctrl-0 = <&pp1800_audio_en>;
99c66ec88fSEmmanuel Vadot
100c66ec88fSEmmanuel Vadot		enable-active-high;
101c66ec88fSEmmanuel Vadot		gpio = <&gpio0 2 GPIO_ACTIVE_HIGH>;
102c66ec88fSEmmanuel Vadot
103c66ec88fSEmmanuel Vadot		regulator-always-on;
104c66ec88fSEmmanuel Vadot		regulator-boot-on;
105c66ec88fSEmmanuel Vadot
106c66ec88fSEmmanuel Vadot		vin-supply = <&pp1800>;
107c66ec88fSEmmanuel Vadot	};
108c66ec88fSEmmanuel Vadot
109c66ec88fSEmmanuel Vadot	/* gpio is shared with pp3300_wifi_bt */
110c66ec88fSEmmanuel Vadot	pp1800_pcie: pp1800-pcie {
111c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
112c66ec88fSEmmanuel Vadot		regulator-name = "pp1800_pcie";
113c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
114c66ec88fSEmmanuel Vadot		pinctrl-0 = <&wlan_module_pd_l>;
115c66ec88fSEmmanuel Vadot
116c66ec88fSEmmanuel Vadot		enable-active-high;
117c66ec88fSEmmanuel Vadot		gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
118c66ec88fSEmmanuel Vadot
119c66ec88fSEmmanuel Vadot		/*
120c66ec88fSEmmanuel Vadot		 * Need to wait 1ms + ramp-up time before we can power on WiFi.
121c66ec88fSEmmanuel Vadot		 * This has been approximated as 8ms total.
122c66ec88fSEmmanuel Vadot		 */
123c66ec88fSEmmanuel Vadot		regulator-enable-ramp-delay = <8000>;
124c66ec88fSEmmanuel Vadot
125c66ec88fSEmmanuel Vadot		vin-supply = <&pp1800>;
126c66ec88fSEmmanuel Vadot	};
127c66ec88fSEmmanuel Vadot
128c66ec88fSEmmanuel Vadot	/* Always on; plain and simple */
129c66ec88fSEmmanuel Vadot	pp3000_ap: pp3000_emmc: pp3000 {
130c66ec88fSEmmanuel Vadot	};
131c66ec88fSEmmanuel Vadot
132c66ec88fSEmmanuel Vadot	pp1500_ap_io: pp1500-ap-io {
133c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
134c66ec88fSEmmanuel Vadot		regulator-name = "pp1500_ap_io";
135c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
136c66ec88fSEmmanuel Vadot		pinctrl-0 = <&pp1500_en>;
137c66ec88fSEmmanuel Vadot
138c66ec88fSEmmanuel Vadot		enable-active-high;
139c66ec88fSEmmanuel Vadot		gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
140c66ec88fSEmmanuel Vadot
141c66ec88fSEmmanuel Vadot		regulator-always-on;
142c66ec88fSEmmanuel Vadot		regulator-boot-on;
143c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <1500000>;
144c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <1500000>;
145c66ec88fSEmmanuel Vadot
146c66ec88fSEmmanuel Vadot		vin-supply = <&pp1800>;
147c66ec88fSEmmanuel Vadot	};
148c66ec88fSEmmanuel Vadot
149c66ec88fSEmmanuel Vadot	pp3300_disp: pp3300-disp {
150c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
151c66ec88fSEmmanuel Vadot		regulator-name = "pp3300_disp";
152c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
153c66ec88fSEmmanuel Vadot		pinctrl-0 = <&pp3300_disp_en>;
154c66ec88fSEmmanuel Vadot
155c66ec88fSEmmanuel Vadot		enable-active-high;
156c66ec88fSEmmanuel Vadot		gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>;
157c66ec88fSEmmanuel Vadot
158c66ec88fSEmmanuel Vadot		startup-delay-us = <2000>;
159c66ec88fSEmmanuel Vadot		vin-supply = <&pp3300>;
160c66ec88fSEmmanuel Vadot	};
161c66ec88fSEmmanuel Vadot
162c66ec88fSEmmanuel Vadot	/* EC turns on w/ pp3300_usb_en_l */
163c66ec88fSEmmanuel Vadot	pp3300_usb: pp3300 {
164c66ec88fSEmmanuel Vadot	};
165c66ec88fSEmmanuel Vadot
166c66ec88fSEmmanuel Vadot	/* gpio is shared with pp1800_pcie and pinctrl is set there */
167c66ec88fSEmmanuel Vadot	pp3300_wifi_bt: pp3300-wifi-bt {
168c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
169c66ec88fSEmmanuel Vadot		regulator-name = "pp3300_wifi_bt";
170c66ec88fSEmmanuel Vadot
171c66ec88fSEmmanuel Vadot		enable-active-high;
172c66ec88fSEmmanuel Vadot		gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
173c66ec88fSEmmanuel Vadot
174c66ec88fSEmmanuel Vadot		vin-supply = <&pp3300>;
175c66ec88fSEmmanuel Vadot	};
176c66ec88fSEmmanuel Vadot
177c66ec88fSEmmanuel Vadot	/*
178c66ec88fSEmmanuel Vadot	 * This is a bit of a hack. The WiFi module should be reset at least
179c66ec88fSEmmanuel Vadot	 * 1ms after its regulators have ramped up (max rampup time is ~7ms).
180c66ec88fSEmmanuel Vadot	 * With some stretching of the imagination, we can call the 1.8V
181c66ec88fSEmmanuel Vadot	 * regulator a supply.
182c66ec88fSEmmanuel Vadot	 */
183c66ec88fSEmmanuel Vadot	wlan_pd_n: wlan-pd-n {
184c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
185c66ec88fSEmmanuel Vadot		regulator-name = "wlan_pd_n";
186c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
187c66ec88fSEmmanuel Vadot		pinctrl-0 = <&wlan_module_reset_l>;
188c66ec88fSEmmanuel Vadot
189c66ec88fSEmmanuel Vadot		enable-active-high;
190c66ec88fSEmmanuel Vadot		gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
191c66ec88fSEmmanuel Vadot
192c66ec88fSEmmanuel Vadot		vin-supply = <&pp1800_pcie>;
193c66ec88fSEmmanuel Vadot	};
194c66ec88fSEmmanuel Vadot
195c66ec88fSEmmanuel Vadot	backlight: backlight {
196c66ec88fSEmmanuel Vadot		compatible = "pwm-backlight";
197c66ec88fSEmmanuel Vadot		enable-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
198c66ec88fSEmmanuel Vadot		power-supply = <&pp3300_disp>;
199c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
200c66ec88fSEmmanuel Vadot		pinctrl-0 = <&bl_en>;
201c66ec88fSEmmanuel Vadot	};
202c66ec88fSEmmanuel Vadot
203c66ec88fSEmmanuel Vadot	gpio_keys: gpio-keys {
204c66ec88fSEmmanuel Vadot		compatible = "gpio-keys";
205c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
206c66ec88fSEmmanuel Vadot		pinctrl-0 = <&bt_host_wake_l>;
207c66ec88fSEmmanuel Vadot
208b97ee269SEmmanuel Vadot		wake_on_bt: key-wake-on-bt {
209c66ec88fSEmmanuel Vadot			label = "Wake-on-Bluetooth";
210c66ec88fSEmmanuel Vadot			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
211c66ec88fSEmmanuel Vadot			linux,code = <KEY_WAKEUP>;
212c66ec88fSEmmanuel Vadot			wakeup-source;
213c66ec88fSEmmanuel Vadot		};
214c66ec88fSEmmanuel Vadot	};
215c66ec88fSEmmanuel Vadot};
216c66ec88fSEmmanuel Vadot
217c66ec88fSEmmanuel Vadot&ppvar_bigcpu {
218c66ec88fSEmmanuel Vadot	min-slew-down-rate = <225>;
219c66ec88fSEmmanuel Vadot	ovp-threshold-percent = <16>;
220c66ec88fSEmmanuel Vadot};
221c66ec88fSEmmanuel Vadot
222c66ec88fSEmmanuel Vadot&ppvar_litcpu {
223c66ec88fSEmmanuel Vadot	min-slew-down-rate = <225>;
224c66ec88fSEmmanuel Vadot	ovp-threshold-percent = <16>;
225c66ec88fSEmmanuel Vadot};
226c66ec88fSEmmanuel Vadot
227c66ec88fSEmmanuel Vadot&ppvar_gpu {
228c66ec88fSEmmanuel Vadot	min-slew-down-rate = <225>;
229c66ec88fSEmmanuel Vadot	ovp-threshold-percent = <16>;
230c66ec88fSEmmanuel Vadot};
231c66ec88fSEmmanuel Vadot
232c66ec88fSEmmanuel Vadot&cdn_dp {
233c66ec88fSEmmanuel Vadot	extcon = <&usbc_extcon0>, <&usbc_extcon1>;
234c66ec88fSEmmanuel Vadot};
235c66ec88fSEmmanuel Vadot
236d5b0e70fSEmmanuel Vadot&dmc {
237d5b0e70fSEmmanuel Vadot	center-supply = <&ppvar_centerlogic>;
238d5b0e70fSEmmanuel Vadot	rockchip,pd-idle-dis-freq-hz = <800000000>;
239d5b0e70fSEmmanuel Vadot	rockchip,sr-idle-dis-freq-hz = <800000000>;
240d5b0e70fSEmmanuel Vadot	rockchip,sr-mc-gate-idle-dis-freq-hz = <800000000>;
241d5b0e70fSEmmanuel Vadot};
242d5b0e70fSEmmanuel Vadot
243c66ec88fSEmmanuel Vadot&edp {
244c66ec88fSEmmanuel Vadot	status = "okay";
245c66ec88fSEmmanuel Vadot
246b97ee269SEmmanuel Vadot	/*
247b97ee269SEmmanuel Vadot	 * eDP PHY/clk don't sync reliably at anything other than 24 MHz. Only
248b97ee269SEmmanuel Vadot	 * set this here, because rk3399-gru.dtsi ensures we can generate this
249b97ee269SEmmanuel Vadot	 * off GPLL=600MHz, whereas some other RK3399 boards may not.
250b97ee269SEmmanuel Vadot	 */
251b97ee269SEmmanuel Vadot	assigned-clocks = <&cru PCLK_EDP>;
252b97ee269SEmmanuel Vadot	assigned-clock-rates = <24000000>;
253b97ee269SEmmanuel Vadot
254c66ec88fSEmmanuel Vadot	ports {
255c66ec88fSEmmanuel Vadot		edp_out: port@1 {
256c66ec88fSEmmanuel Vadot			reg = <1>;
257c66ec88fSEmmanuel Vadot			#address-cells = <1>;
258c66ec88fSEmmanuel Vadot			#size-cells = <0>;
259c66ec88fSEmmanuel Vadot
260c66ec88fSEmmanuel Vadot			edp_out_panel: endpoint@0 {
261c66ec88fSEmmanuel Vadot				reg = <0>;
262c66ec88fSEmmanuel Vadot				remote-endpoint = <&panel_in_edp>;
263c66ec88fSEmmanuel Vadot			};
264c66ec88fSEmmanuel Vadot		};
265c66ec88fSEmmanuel Vadot	};
266c66ec88fSEmmanuel Vadot};
267c66ec88fSEmmanuel Vadot
2688cc087a1SEmmanuel Vadot&gpio0 {
2698cc087a1SEmmanuel Vadot	gpio-line-names = /* GPIO0 A 0-7 */
2708cc087a1SEmmanuel Vadot			  "AP_RTC_CLK_IN",
2718cc087a1SEmmanuel Vadot			  "EC_AP_INT_L",
2728cc087a1SEmmanuel Vadot			  "PP1800_AUDIO_EN",
2738cc087a1SEmmanuel Vadot			  "BT_HOST_WAKE_L",
2748cc087a1SEmmanuel Vadot			  "WLAN_MODULE_PD_L",
2758cc087a1SEmmanuel Vadot			  "H1_INT_OD_L",
2768cc087a1SEmmanuel Vadot			  "CENTERLOGIC_DVS_PWM",
2778cc087a1SEmmanuel Vadot			  "",
2788cc087a1SEmmanuel Vadot
2798cc087a1SEmmanuel Vadot			  /* GPIO0 B 0-4 */
2808cc087a1SEmmanuel Vadot			  "WIFI_HOST_WAKE_L",
2818cc087a1SEmmanuel Vadot			  "PMUIO2_33_18_L",
2828cc087a1SEmmanuel Vadot			  "PP1500_EN",
2838cc087a1SEmmanuel Vadot			  "AP_EC_WARM_RESET_REQ",
2848cc087a1SEmmanuel Vadot			  "PP3000_EN";
2858cc087a1SEmmanuel Vadot};
2868cc087a1SEmmanuel Vadot
2878cc087a1SEmmanuel Vadot&gpio1 {
2888cc087a1SEmmanuel Vadot	gpio-line-names = /* GPIO1 A 0-7 */
2898cc087a1SEmmanuel Vadot			  "",
2908cc087a1SEmmanuel Vadot			  "",
2918cc087a1SEmmanuel Vadot			  "SPK_PA_EN",
2928cc087a1SEmmanuel Vadot			  "",
2938cc087a1SEmmanuel Vadot			  "TRACKPAD_INT_L",
2948cc087a1SEmmanuel Vadot			  "AP_EC_S3_S0_L",
2958cc087a1SEmmanuel Vadot			  "AP_EC_OVERTEMP",
2968cc087a1SEmmanuel Vadot			  "AP_SPI_FLASH_MISO",
2978cc087a1SEmmanuel Vadot
2988cc087a1SEmmanuel Vadot			  /* GPIO1 B 0-7 */
2998cc087a1SEmmanuel Vadot			  "AP_SPI_FLASH_MOSI_R",
3008cc087a1SEmmanuel Vadot			  "AP_SPI_FLASH_CLK_R",
3018cc087a1SEmmanuel Vadot			  "AP_SPI_FLASH_CS_L_R",
3028cc087a1SEmmanuel Vadot			  "WLAN_MODULE_RESET_L",
3038cc087a1SEmmanuel Vadot			  "WIFI_DISABLE_L",
3048cc087a1SEmmanuel Vadot			  "MIC_INT",
3058cc087a1SEmmanuel Vadot			  "",
3068cc087a1SEmmanuel Vadot			  "AP_I2C_DVS_SDA",
3078cc087a1SEmmanuel Vadot
3088cc087a1SEmmanuel Vadot			  /* GPIO1 C 0-7 */
3098cc087a1SEmmanuel Vadot			  "AP_I2C_DVS_SCL",
3108cc087a1SEmmanuel Vadot			  "AP_BL_EN",
3118cc087a1SEmmanuel Vadot			  /*
3128cc087a1SEmmanuel Vadot			   * AP_FLASH_WP is crossystem ABI. Schematics call it
3138cc087a1SEmmanuel Vadot			   * AP_FW_WP or CPU1_FW_WP, depending on the variant.
3148cc087a1SEmmanuel Vadot			   */
3158cc087a1SEmmanuel Vadot			  "AP_FLASH_WP",
3168cc087a1SEmmanuel Vadot			  "LITCPU_DVS_PWM",
3178cc087a1SEmmanuel Vadot			  "AP_I2C_AUDIO_SDA",
3188cc087a1SEmmanuel Vadot			  "AP_I2C_AUDIO_SCL",
3198cc087a1SEmmanuel Vadot			  "",
3208cc087a1SEmmanuel Vadot			  "HEADSET_INT_L";
3218cc087a1SEmmanuel Vadot};
3228cc087a1SEmmanuel Vadot
3238cc087a1SEmmanuel Vadot&gpio2 {
3248cc087a1SEmmanuel Vadot	gpio-line-names = /* GPIO2 A 0-7 */
3258cc087a1SEmmanuel Vadot			  "",
3268cc087a1SEmmanuel Vadot			  "",
3278cc087a1SEmmanuel Vadot			  "SD_IO_PWR_EN",
3288cc087a1SEmmanuel Vadot			  "",
3298cc087a1SEmmanuel Vadot			  "",
3308cc087a1SEmmanuel Vadot			  "",
3318cc087a1SEmmanuel Vadot			  "",
3328cc087a1SEmmanuel Vadot			  "",
3338cc087a1SEmmanuel Vadot
3348cc087a1SEmmanuel Vadot			  /* GPIO2 B 0-7 */
3358cc087a1SEmmanuel Vadot			  "",
3368cc087a1SEmmanuel Vadot			  "",
3378cc087a1SEmmanuel Vadot			  "",
3388cc087a1SEmmanuel Vadot			  "",
3398cc087a1SEmmanuel Vadot			  "",
3408cc087a1SEmmanuel Vadot			  "",
3418cc087a1SEmmanuel Vadot			  "",
3428cc087a1SEmmanuel Vadot			  "",
3438cc087a1SEmmanuel Vadot
3448cc087a1SEmmanuel Vadot			  /* GPIO2 C 0-7 */
3458cc087a1SEmmanuel Vadot			  "",
3468cc087a1SEmmanuel Vadot			  "",
3478cc087a1SEmmanuel Vadot			  "",
3488cc087a1SEmmanuel Vadot			  "",
3498cc087a1SEmmanuel Vadot			  "AP_SPI_EC_MISO",
3508cc087a1SEmmanuel Vadot			  "AP_SPI_EC_MOSI",
3518cc087a1SEmmanuel Vadot			  "AP_SPI_EC_CLK",
3528cc087a1SEmmanuel Vadot			  "AP_SPI_EC_CS_L",
3538cc087a1SEmmanuel Vadot
3548cc087a1SEmmanuel Vadot			  /* GPIO2 D 0-4 */
3558cc087a1SEmmanuel Vadot			  "BT_DEV_WAKE_L",
3568cc087a1SEmmanuel Vadot			  "",
3578cc087a1SEmmanuel Vadot			  "WIFI_PCIE_CLKREQ_L",
3588cc087a1SEmmanuel Vadot			  "WIFI_PERST_L",
3598cc087a1SEmmanuel Vadot			  "SD_PWR_3000_1800_L";
3608cc087a1SEmmanuel Vadot};
3618cc087a1SEmmanuel Vadot
3628cc087a1SEmmanuel Vadot&gpio3 {
3638cc087a1SEmmanuel Vadot	gpio-line-names = /* GPIO3 A 0-7 */
3648cc087a1SEmmanuel Vadot			  "",
3658cc087a1SEmmanuel Vadot			  "",
3668cc087a1SEmmanuel Vadot			  "",
3678cc087a1SEmmanuel Vadot			  "",
3688cc087a1SEmmanuel Vadot			  "AP_SPI_TPM_MISO",
3698cc087a1SEmmanuel Vadot			  "AP_SPI_TPM_MOSI_R",
3708cc087a1SEmmanuel Vadot			  "AP_SPI_TPM_CLK_R",
3718cc087a1SEmmanuel Vadot			  "AP_SPI_TPM_CS_L_R",
3728cc087a1SEmmanuel Vadot
3738cc087a1SEmmanuel Vadot			  /* GPIO3 B 0-7 */
3748cc087a1SEmmanuel Vadot			  "EC_IN_RW",
3758cc087a1SEmmanuel Vadot			  "",
3768cc087a1SEmmanuel Vadot			  "AP_I2C_TP_SDA",
3778cc087a1SEmmanuel Vadot			  "AP_I2C_TP_SCL",
3788cc087a1SEmmanuel Vadot			  "AP_I2C_TP_PU_EN",
3798cc087a1SEmmanuel Vadot			  "TOUCH_INT_L",
3808cc087a1SEmmanuel Vadot			  "",
3818cc087a1SEmmanuel Vadot			  "",
3828cc087a1SEmmanuel Vadot
3838cc087a1SEmmanuel Vadot			  /* GPIO3 C 0-7 */
3848cc087a1SEmmanuel Vadot			  "",
3858cc087a1SEmmanuel Vadot			  "",
3868cc087a1SEmmanuel Vadot			  "",
3878cc087a1SEmmanuel Vadot			  "",
3888cc087a1SEmmanuel Vadot			  "",
3898cc087a1SEmmanuel Vadot			  "",
3908cc087a1SEmmanuel Vadot			  "",
3918cc087a1SEmmanuel Vadot			  "",
3928cc087a1SEmmanuel Vadot
3938cc087a1SEmmanuel Vadot			  /* GPIO3 D 0-7 */
3948cc087a1SEmmanuel Vadot			  "I2S0_SCLK",
3958cc087a1SEmmanuel Vadot			  "I2S0_LRCK_RX",
3968cc087a1SEmmanuel Vadot			  "I2S0_LRCK_TX",
3978cc087a1SEmmanuel Vadot			  "I2S0_SDI_0",
3988cc087a1SEmmanuel Vadot			  "I2S0_SDI_1",
3998cc087a1SEmmanuel Vadot			  "",
4008cc087a1SEmmanuel Vadot			  "I2S0_SDO_1",
4018cc087a1SEmmanuel Vadot			  "I2S0_SDO_0";
4028cc087a1SEmmanuel Vadot};
4038cc087a1SEmmanuel Vadot
4048cc087a1SEmmanuel Vadot&gpio4 {
4058cc087a1SEmmanuel Vadot	gpio-line-names = /* GPIO4 A 0-7 */
4068cc087a1SEmmanuel Vadot			  "I2S_MCLK",
4078cc087a1SEmmanuel Vadot			  "AP_I2C_MIC_SDA",
4088cc087a1SEmmanuel Vadot			  "AP_I2C_MIC_SCL",
4098cc087a1SEmmanuel Vadot			  "",
4108cc087a1SEmmanuel Vadot			  "",
4118cc087a1SEmmanuel Vadot			  "",
4128cc087a1SEmmanuel Vadot			  "",
4138cc087a1SEmmanuel Vadot			  "",
4148cc087a1SEmmanuel Vadot
4158cc087a1SEmmanuel Vadot			  /* GPIO4 B 0-7 */
4168cc087a1SEmmanuel Vadot			  "",
4178cc087a1SEmmanuel Vadot			  "",
4188cc087a1SEmmanuel Vadot			  "",
4198cc087a1SEmmanuel Vadot			  "",
4208cc087a1SEmmanuel Vadot			  "",
4218cc087a1SEmmanuel Vadot			  "",
4228cc087a1SEmmanuel Vadot			  "",
4238cc087a1SEmmanuel Vadot			  "",
4248cc087a1SEmmanuel Vadot
4258cc087a1SEmmanuel Vadot			  /* GPIO4 C 0-7 */
4268cc087a1SEmmanuel Vadot			  "AP_I2C_TS_SDA",
4278cc087a1SEmmanuel Vadot			  "AP_I2C_TS_SCL",
4288cc087a1SEmmanuel Vadot			  "GPU_DVS_PWM",
4298cc087a1SEmmanuel Vadot			  "UART_DBG_TX_AP_RX",
4308cc087a1SEmmanuel Vadot			  "UART_AP_TX_DBG_RX",
4318cc087a1SEmmanuel Vadot			  "",
4328cc087a1SEmmanuel Vadot			  "BIGCPU_DVS_PWM",
4338cc087a1SEmmanuel Vadot			  "EDP_HPD_3V0",
4348cc087a1SEmmanuel Vadot
4358cc087a1SEmmanuel Vadot			  /* GPIO4 D 0-5 */
4368cc087a1SEmmanuel Vadot			  "SD_CARD_DET_L",
4378cc087a1SEmmanuel Vadot			  "USB_DP_HPD",
4388cc087a1SEmmanuel Vadot			  "TOUCH_RESET_L",
4398cc087a1SEmmanuel Vadot			  "PP3300_DISP_EN",
4408cc087a1SEmmanuel Vadot			  "",
4418cc087a1SEmmanuel Vadot			  "SD_SLOT_PWR_EN";
4428cc087a1SEmmanuel Vadot};
4438cc087a1SEmmanuel Vadot
444c66ec88fSEmmanuel Vadotap_i2c_mic: &i2c1 {
445c66ec88fSEmmanuel Vadot	status = "okay";
446c66ec88fSEmmanuel Vadot
447c66ec88fSEmmanuel Vadot	clock-frequency = <400000>;
448c66ec88fSEmmanuel Vadot
449c66ec88fSEmmanuel Vadot	/* These are relatively safe rise/fall times */
450c66ec88fSEmmanuel Vadot	i2c-scl-falling-time-ns = <50>;
451c66ec88fSEmmanuel Vadot	i2c-scl-rising-time-ns = <300>;
452c66ec88fSEmmanuel Vadot
453c66ec88fSEmmanuel Vadot	headsetcodec: rt5514@57 {
454c66ec88fSEmmanuel Vadot		compatible = "realtek,rt5514";
455c66ec88fSEmmanuel Vadot		reg = <0x57>;
456c66ec88fSEmmanuel Vadot		realtek,dmic-init-delay-ms = <20>;
457c66ec88fSEmmanuel Vadot	};
458c66ec88fSEmmanuel Vadot};
459c66ec88fSEmmanuel Vadot
460c66ec88fSEmmanuel Vadotap_i2c_tp: &i2c5 {
461c66ec88fSEmmanuel Vadot	status = "okay";
462c66ec88fSEmmanuel Vadot
463c66ec88fSEmmanuel Vadot	clock-frequency = <400000>;
464c66ec88fSEmmanuel Vadot
465c66ec88fSEmmanuel Vadot	/* These are relatively safe rise/fall times */
466c66ec88fSEmmanuel Vadot	i2c-scl-falling-time-ns = <50>;
467c66ec88fSEmmanuel Vadot	i2c-scl-rising-time-ns = <300>;
468c66ec88fSEmmanuel Vadot
469c66ec88fSEmmanuel Vadot	/*
470c66ec88fSEmmanuel Vadot	 * Note strange pullup enable.  Apparently this avoids leakage but
471c66ec88fSEmmanuel Vadot	 * still allows us to get nice 4.7K pullups for high speed i2c
472c66ec88fSEmmanuel Vadot	 * transfers.  Basically we want the pullup on whenever the ap is
473c66ec88fSEmmanuel Vadot	 * alive, so the "en" pin just gets set to output high.
474c66ec88fSEmmanuel Vadot	 */
475c66ec88fSEmmanuel Vadot	pinctrl-0 = <&i2c5_xfer &ap_i2c_tp_pu_en>;
476c66ec88fSEmmanuel Vadot};
477c66ec88fSEmmanuel Vadot
478c66ec88fSEmmanuel Vadot&cros_ec {
479c9ccf3a3SEmmanuel Vadot	cros_ec_pwm: pwm {
480c66ec88fSEmmanuel Vadot		compatible = "google,cros-ec-pwm";
481c66ec88fSEmmanuel Vadot		#pwm-cells = <1>;
482c66ec88fSEmmanuel Vadot	};
483c66ec88fSEmmanuel Vadot
484c66ec88fSEmmanuel Vadot	usbc_extcon1: extcon1 {
485c66ec88fSEmmanuel Vadot		compatible = "google,extcon-usbc-cros-ec";
486c66ec88fSEmmanuel Vadot		google,usb-port-id = <1>;
487c66ec88fSEmmanuel Vadot	};
488c66ec88fSEmmanuel Vadot};
489c66ec88fSEmmanuel Vadot
490c66ec88fSEmmanuel Vadot&sound {
491c66ec88fSEmmanuel Vadot	rockchip,codec = <&max98357a &headsetcodec
492c66ec88fSEmmanuel Vadot			  &codec &wacky_spi_audio &cdn_dp>;
493c66ec88fSEmmanuel Vadot};
494c66ec88fSEmmanuel Vadot
495c66ec88fSEmmanuel Vadot&spi2 {
496c66ec88fSEmmanuel Vadot	wacky_spi_audio: spi2@0 {
497c66ec88fSEmmanuel Vadot		compatible = "realtek,rt5514";
498c66ec88fSEmmanuel Vadot		reg = <0>;
499c66ec88fSEmmanuel Vadot		interrupt-parent = <&gpio1>;
500c66ec88fSEmmanuel Vadot		interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
501c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
502c66ec88fSEmmanuel Vadot		pinctrl-0 = <&mic_int>;
503c66ec88fSEmmanuel Vadot		/* May run faster once verified. */
504c66ec88fSEmmanuel Vadot		spi-max-frequency = <10000000>;
505c66ec88fSEmmanuel Vadot		wakeup-source;
506c66ec88fSEmmanuel Vadot	};
507c66ec88fSEmmanuel Vadot};
508c66ec88fSEmmanuel Vadot
509c66ec88fSEmmanuel Vadot&pci_rootport {
510c66ec88fSEmmanuel Vadot	mvl_wifi: wifi@0,0 {
511c66ec88fSEmmanuel Vadot		compatible = "pci1b4b,2b42";
512*84943d6fSEmmanuel Vadot		reg = <0x0000 0x0 0x0 0x0 0x0>;
513c66ec88fSEmmanuel Vadot		interrupt-parent = <&gpio0>;
514c66ec88fSEmmanuel Vadot		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
515c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
516c66ec88fSEmmanuel Vadot		pinctrl-0 = <&wlan_host_wake_l>;
517c66ec88fSEmmanuel Vadot		wakeup-source;
518c66ec88fSEmmanuel Vadot	};
519c66ec88fSEmmanuel Vadot};
520c66ec88fSEmmanuel Vadot
521c66ec88fSEmmanuel Vadot&tcphy1 {
522c66ec88fSEmmanuel Vadot	status = "okay";
523c66ec88fSEmmanuel Vadot	extcon = <&usbc_extcon1>;
524c66ec88fSEmmanuel Vadot};
525c66ec88fSEmmanuel Vadot
526c66ec88fSEmmanuel Vadot&u2phy1 {
527c66ec88fSEmmanuel Vadot	status = "okay";
528c66ec88fSEmmanuel Vadot};
529c66ec88fSEmmanuel Vadot
530c66ec88fSEmmanuel Vadot&usb_host0_ehci {
531c66ec88fSEmmanuel Vadot	status = "okay";
532c66ec88fSEmmanuel Vadot};
533c66ec88fSEmmanuel Vadot
534c66ec88fSEmmanuel Vadot&usb_host1_ehci {
535c66ec88fSEmmanuel Vadot	status = "okay";
536c66ec88fSEmmanuel Vadot};
537c66ec88fSEmmanuel Vadot
538c66ec88fSEmmanuel Vadot&usb_host1_ohci {
539c66ec88fSEmmanuel Vadot	status = "okay";
540c66ec88fSEmmanuel Vadot};
541c66ec88fSEmmanuel Vadot
542c66ec88fSEmmanuel Vadot&usbdrd3_1 {
543c66ec88fSEmmanuel Vadot	status = "okay";
544c66ec88fSEmmanuel Vadot	extcon = <&usbc_extcon1>;
545c66ec88fSEmmanuel Vadot};
546c66ec88fSEmmanuel Vadot
547c66ec88fSEmmanuel Vadot&usbdrd_dwc3_1 {
548c66ec88fSEmmanuel Vadot	status = "okay";
549c66ec88fSEmmanuel Vadot	dr_mode = "host";
550c66ec88fSEmmanuel Vadot};
551c66ec88fSEmmanuel Vadot
552c66ec88fSEmmanuel Vadot&pinctrl {
553c66ec88fSEmmanuel Vadot	discrete-regulators {
554c66ec88fSEmmanuel Vadot		pp1500_en: pp1500-en {
555c66ec88fSEmmanuel Vadot			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO
556c66ec88fSEmmanuel Vadot					 &pcfg_pull_none>;
557c66ec88fSEmmanuel Vadot		};
558c66ec88fSEmmanuel Vadot
559c66ec88fSEmmanuel Vadot		pp1800_audio_en: pp1800-audio-en {
560c66ec88fSEmmanuel Vadot			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO
561c66ec88fSEmmanuel Vadot					 &pcfg_pull_down>;
562c66ec88fSEmmanuel Vadot		};
563c66ec88fSEmmanuel Vadot
564c66ec88fSEmmanuel Vadot		pp3000_en: pp3000-en {
565c66ec88fSEmmanuel Vadot			rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO
566c66ec88fSEmmanuel Vadot					 &pcfg_pull_none>;
567c66ec88fSEmmanuel Vadot		};
568c66ec88fSEmmanuel Vadot
569c66ec88fSEmmanuel Vadot		pp3300_disp_en: pp3300-disp-en {
570c66ec88fSEmmanuel Vadot			rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO
571c66ec88fSEmmanuel Vadot					 &pcfg_pull_none>;
572c66ec88fSEmmanuel Vadot		};
573c66ec88fSEmmanuel Vadot
574c66ec88fSEmmanuel Vadot		wlan_module_pd_l: wlan-module-pd-l {
575c66ec88fSEmmanuel Vadot			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO
576c66ec88fSEmmanuel Vadot					 &pcfg_pull_down>;
577c66ec88fSEmmanuel Vadot		};
578c66ec88fSEmmanuel Vadot	};
579c66ec88fSEmmanuel Vadot};
580c66ec88fSEmmanuel Vadot
581c66ec88fSEmmanuel Vadot&wifi {
582c66ec88fSEmmanuel Vadot	wifi_perst_l: wifi-perst-l {
583c66ec88fSEmmanuel Vadot		rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
584c66ec88fSEmmanuel Vadot	};
585c66ec88fSEmmanuel Vadot
586c66ec88fSEmmanuel Vadot	wlan_host_wake_l: wlan-host-wake-l {
587b97ee269SEmmanuel Vadot		/* Kevin has an external pull up, but Bob does not */
588c66ec88fSEmmanuel Vadot		rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
589c66ec88fSEmmanuel Vadot	};
590c66ec88fSEmmanuel Vadot};
591