1a0aa6bfeSHeiko Stuebner// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2a0aa6bfeSHeiko Stuebner/*
3a0aa6bfeSHeiko Stuebner * Google Gru-Chromebook shared properties
4a0aa6bfeSHeiko Stuebner *
5a0aa6bfeSHeiko Stuebner * Copyright 2018 Google, Inc
6a0aa6bfeSHeiko Stuebner */
7a0aa6bfeSHeiko Stuebner
8a0aa6bfeSHeiko Stuebner#include "rk3399-gru.dtsi"
9a0aa6bfeSHeiko Stuebner
10a0aa6bfeSHeiko Stuebner/ {
11a0aa6bfeSHeiko Stuebner	pp900_ap: pp900-ap {
12a0aa6bfeSHeiko Stuebner		compatible = "regulator-fixed";
13a0aa6bfeSHeiko Stuebner		regulator-name = "pp900_ap";
14a0aa6bfeSHeiko Stuebner
15a0aa6bfeSHeiko Stuebner		/* EC turns on w/ pp900_ap_en; always on for AP */
16a0aa6bfeSHeiko Stuebner		regulator-always-on;
17a0aa6bfeSHeiko Stuebner		regulator-boot-on;
18a0aa6bfeSHeiko Stuebner		regulator-min-microvolt = <900000>;
19a0aa6bfeSHeiko Stuebner		regulator-max-microvolt = <900000>;
20a0aa6bfeSHeiko Stuebner
21a0aa6bfeSHeiko Stuebner		vin-supply = <&ppvar_sys>;
22a0aa6bfeSHeiko Stuebner	};
23a0aa6bfeSHeiko Stuebner
24a0aa6bfeSHeiko Stuebner	/* EC turns on w/ pp900_usb_en */
25a0aa6bfeSHeiko Stuebner	pp900_usb: pp900-ap {
26a0aa6bfeSHeiko Stuebner	};
27a0aa6bfeSHeiko Stuebner
28a0aa6bfeSHeiko Stuebner	/* EC turns on w/ pp900_pcie_en */
29a0aa6bfeSHeiko Stuebner	pp900_pcie: pp900-ap {
30a0aa6bfeSHeiko Stuebner	};
31a0aa6bfeSHeiko Stuebner
32a0aa6bfeSHeiko Stuebner	pp3000: pp3000 {
33a0aa6bfeSHeiko Stuebner		compatible = "regulator-fixed";
34a0aa6bfeSHeiko Stuebner		regulator-name = "pp3000";
35a0aa6bfeSHeiko Stuebner		pinctrl-names = "default";
36a0aa6bfeSHeiko Stuebner		pinctrl-0 = <&pp3000_en>;
37a0aa6bfeSHeiko Stuebner
38a0aa6bfeSHeiko Stuebner		enable-active-high;
39a0aa6bfeSHeiko Stuebner		gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
40a0aa6bfeSHeiko Stuebner
41a0aa6bfeSHeiko Stuebner		regulator-always-on;
42a0aa6bfeSHeiko Stuebner		regulator-boot-on;
43a0aa6bfeSHeiko Stuebner		regulator-min-microvolt = <3000000>;
44a0aa6bfeSHeiko Stuebner		regulator-max-microvolt = <3000000>;
45a0aa6bfeSHeiko Stuebner
46a0aa6bfeSHeiko Stuebner		vin-supply = <&ppvar_sys>;
47a0aa6bfeSHeiko Stuebner	};
48a0aa6bfeSHeiko Stuebner
49a0aa6bfeSHeiko Stuebner	ppvar_centerlogic_pwm: ppvar-centerlogic-pwm {
50a0aa6bfeSHeiko Stuebner		compatible = "pwm-regulator";
51a0aa6bfeSHeiko Stuebner		regulator-name = "ppvar_centerlogic_pwm";
52a0aa6bfeSHeiko Stuebner
53a0aa6bfeSHeiko Stuebner		pwms = <&pwm3 0 3337 0>;
54a0aa6bfeSHeiko Stuebner		pwm-supply = <&ppvar_sys>;
55a0aa6bfeSHeiko Stuebner		pwm-dutycycle-range = <100 0>;
56a0aa6bfeSHeiko Stuebner		pwm-dutycycle-unit = <100>;
57a0aa6bfeSHeiko Stuebner
58a0aa6bfeSHeiko Stuebner		/* EC turns on w/ ppvar_centerlogic_en; always on for AP */
59a0aa6bfeSHeiko Stuebner		regulator-always-on;
60a0aa6bfeSHeiko Stuebner		regulator-boot-on;
61a0aa6bfeSHeiko Stuebner		regulator-min-microvolt = <799434>;
62a0aa6bfeSHeiko Stuebner		regulator-max-microvolt = <1049925>;
63a0aa6bfeSHeiko Stuebner	};
64a0aa6bfeSHeiko Stuebner
65a0aa6bfeSHeiko Stuebner	ppvar_centerlogic: ppvar-centerlogic {
66a0aa6bfeSHeiko Stuebner		compatible = "vctrl-regulator";
67a0aa6bfeSHeiko Stuebner		regulator-name = "ppvar_centerlogic";
68a0aa6bfeSHeiko Stuebner
69a0aa6bfeSHeiko Stuebner		regulator-min-microvolt = <799434>;
70a0aa6bfeSHeiko Stuebner		regulator-max-microvolt = <1049925>;
71a0aa6bfeSHeiko Stuebner
72a0aa6bfeSHeiko Stuebner		ctrl-supply = <&ppvar_centerlogic_pwm>;
73a0aa6bfeSHeiko Stuebner		ctrl-voltage-range = <799434 1049925>;
74a0aa6bfeSHeiko Stuebner
75a0aa6bfeSHeiko Stuebner		regulator-settling-time-up-us = <378>;
76a0aa6bfeSHeiko Stuebner		min-slew-down-rate = <225>;
77a0aa6bfeSHeiko Stuebner		ovp-threshold-percent = <16>;
78a0aa6bfeSHeiko Stuebner	};
79a0aa6bfeSHeiko Stuebner
80a0aa6bfeSHeiko Stuebner	/* Schematics call this PPVAR even though it's fixed */
81a0aa6bfeSHeiko Stuebner	ppvar_logic: ppvar-logic {
82a0aa6bfeSHeiko Stuebner		compatible = "regulator-fixed";
83a0aa6bfeSHeiko Stuebner		regulator-name = "ppvar_logic";
84a0aa6bfeSHeiko Stuebner
85a0aa6bfeSHeiko Stuebner		/* EC turns on w/ ppvar_logic_en; always on for AP */
86a0aa6bfeSHeiko Stuebner		regulator-always-on;
87a0aa6bfeSHeiko Stuebner		regulator-boot-on;
88a0aa6bfeSHeiko Stuebner		regulator-min-microvolt = <900000>;
89a0aa6bfeSHeiko Stuebner		regulator-max-microvolt = <900000>;
90a0aa6bfeSHeiko Stuebner
91a0aa6bfeSHeiko Stuebner		vin-supply = <&ppvar_sys>;
92a0aa6bfeSHeiko Stuebner	};
93a0aa6bfeSHeiko Stuebner
94a0aa6bfeSHeiko Stuebner	pp1800_audio: pp1800-audio {
95a0aa6bfeSHeiko Stuebner		compatible = "regulator-fixed";
96a0aa6bfeSHeiko Stuebner		regulator-name = "pp1800_audio";
97a0aa6bfeSHeiko Stuebner		pinctrl-names = "default";
98a0aa6bfeSHeiko Stuebner		pinctrl-0 = <&pp1800_audio_en>;
99a0aa6bfeSHeiko Stuebner
100a0aa6bfeSHeiko Stuebner		enable-active-high;
101a0aa6bfeSHeiko Stuebner		gpio = <&gpio0 2 GPIO_ACTIVE_HIGH>;
102a0aa6bfeSHeiko Stuebner
103a0aa6bfeSHeiko Stuebner		regulator-always-on;
104a0aa6bfeSHeiko Stuebner		regulator-boot-on;
105a0aa6bfeSHeiko Stuebner
106a0aa6bfeSHeiko Stuebner		vin-supply = <&pp1800>;
107a0aa6bfeSHeiko Stuebner	};
108a0aa6bfeSHeiko Stuebner
109a0aa6bfeSHeiko Stuebner	/* gpio is shared with pp3300_wifi_bt */
110a0aa6bfeSHeiko Stuebner	pp1800_pcie: pp1800-pcie {
111a0aa6bfeSHeiko Stuebner		compatible = "regulator-fixed";
112a0aa6bfeSHeiko Stuebner		regulator-name = "pp1800_pcie";
113a0aa6bfeSHeiko Stuebner		pinctrl-names = "default";
114a0aa6bfeSHeiko Stuebner		pinctrl-0 = <&wlan_module_pd_l>;
115a0aa6bfeSHeiko Stuebner
116a0aa6bfeSHeiko Stuebner		enable-active-high;
117a0aa6bfeSHeiko Stuebner		gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
118a0aa6bfeSHeiko Stuebner
119a0aa6bfeSHeiko Stuebner		/*
120a0aa6bfeSHeiko Stuebner		 * Need to wait 1ms + ramp-up time before we can power on WiFi.
121a0aa6bfeSHeiko Stuebner		 * This has been approximated as 8ms total.
122a0aa6bfeSHeiko Stuebner		 */
123a0aa6bfeSHeiko Stuebner		regulator-enable-ramp-delay = <8000>;
124a0aa6bfeSHeiko Stuebner
125a0aa6bfeSHeiko Stuebner		vin-supply = <&pp1800>;
126a0aa6bfeSHeiko Stuebner	};
127a0aa6bfeSHeiko Stuebner
128a0aa6bfeSHeiko Stuebner	/* Always on; plain and simple */
129a0aa6bfeSHeiko Stuebner	pp3000_ap: pp3000_emmc: pp3000 {
130a0aa6bfeSHeiko Stuebner	};
131a0aa6bfeSHeiko Stuebner
132a0aa6bfeSHeiko Stuebner	pp1500_ap_io: pp1500-ap-io {
133a0aa6bfeSHeiko Stuebner		compatible = "regulator-fixed";
134a0aa6bfeSHeiko Stuebner		regulator-name = "pp1500_ap_io";
135a0aa6bfeSHeiko Stuebner		pinctrl-names = "default";
136a0aa6bfeSHeiko Stuebner		pinctrl-0 = <&pp1500_en>;
137a0aa6bfeSHeiko Stuebner
138a0aa6bfeSHeiko Stuebner		enable-active-high;
139a0aa6bfeSHeiko Stuebner		gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
140a0aa6bfeSHeiko Stuebner
141a0aa6bfeSHeiko Stuebner		regulator-always-on;
142a0aa6bfeSHeiko Stuebner		regulator-boot-on;
143a0aa6bfeSHeiko Stuebner		regulator-min-microvolt = <1500000>;
144a0aa6bfeSHeiko Stuebner		regulator-max-microvolt = <1500000>;
145a0aa6bfeSHeiko Stuebner
146a0aa6bfeSHeiko Stuebner		vin-supply = <&pp1800>;
147a0aa6bfeSHeiko Stuebner	};
148a0aa6bfeSHeiko Stuebner
149a0aa6bfeSHeiko Stuebner	pp3300_disp: pp3300-disp {
150a0aa6bfeSHeiko Stuebner		compatible = "regulator-fixed";
151a0aa6bfeSHeiko Stuebner		regulator-name = "pp3300_disp";
152a0aa6bfeSHeiko Stuebner		pinctrl-names = "default";
153a0aa6bfeSHeiko Stuebner		pinctrl-0 = <&pp3300_disp_en>;
154a0aa6bfeSHeiko Stuebner
155a0aa6bfeSHeiko Stuebner		enable-active-high;
156a0aa6bfeSHeiko Stuebner		gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>;
157a0aa6bfeSHeiko Stuebner
158a0aa6bfeSHeiko Stuebner		startup-delay-us = <2000>;
159a0aa6bfeSHeiko Stuebner		vin-supply = <&pp3300>;
160a0aa6bfeSHeiko Stuebner	};
161a0aa6bfeSHeiko Stuebner
162a0aa6bfeSHeiko Stuebner	/* EC turns on w/ pp3300_usb_en_l */
163a0aa6bfeSHeiko Stuebner	pp3300_usb: pp3300 {
164a0aa6bfeSHeiko Stuebner	};
165a0aa6bfeSHeiko Stuebner
166a0aa6bfeSHeiko Stuebner	/* gpio is shared with pp1800_pcie and pinctrl is set there */
167a0aa6bfeSHeiko Stuebner	pp3300_wifi_bt: pp3300-wifi-bt {
168a0aa6bfeSHeiko Stuebner		compatible = "regulator-fixed";
169a0aa6bfeSHeiko Stuebner		regulator-name = "pp3300_wifi_bt";
170a0aa6bfeSHeiko Stuebner
171a0aa6bfeSHeiko Stuebner		enable-active-high;
172a0aa6bfeSHeiko Stuebner		gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
173a0aa6bfeSHeiko Stuebner
174a0aa6bfeSHeiko Stuebner		vin-supply = <&pp3300>;
175a0aa6bfeSHeiko Stuebner	};
176a0aa6bfeSHeiko Stuebner
177a0aa6bfeSHeiko Stuebner	/*
178a0aa6bfeSHeiko Stuebner	 * This is a bit of a hack. The WiFi module should be reset at least
179a0aa6bfeSHeiko Stuebner	 * 1ms after its regulators have ramped up (max rampup time is ~7ms).
180a0aa6bfeSHeiko Stuebner	 * With some stretching of the imagination, we can call the 1.8V
181a0aa6bfeSHeiko Stuebner	 * regulator a supply.
182a0aa6bfeSHeiko Stuebner	 */
183a0aa6bfeSHeiko Stuebner	wlan_pd_n: wlan-pd-n {
184a0aa6bfeSHeiko Stuebner		compatible = "regulator-fixed";
185a0aa6bfeSHeiko Stuebner		regulator-name = "wlan_pd_n";
186a0aa6bfeSHeiko Stuebner		pinctrl-names = "default";
187a0aa6bfeSHeiko Stuebner		pinctrl-0 = <&wlan_module_reset_l>;
188a0aa6bfeSHeiko Stuebner
189a0aa6bfeSHeiko Stuebner		enable-active-high;
190a0aa6bfeSHeiko Stuebner		gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
191a0aa6bfeSHeiko Stuebner
192a0aa6bfeSHeiko Stuebner		vin-supply = <&pp1800_pcie>;
193a0aa6bfeSHeiko Stuebner	};
194d67a38c5SHeiko Stuebner
195d67a38c5SHeiko Stuebner	backlight: backlight {
196d67a38c5SHeiko Stuebner		compatible = "pwm-backlight";
197d67a38c5SHeiko Stuebner		enable-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
198d67a38c5SHeiko Stuebner		power-supply = <&pp3300_disp>;
199d67a38c5SHeiko Stuebner		pinctrl-names = "default";
200d67a38c5SHeiko Stuebner		pinctrl-0 = <&bl_en>;
201d67a38c5SHeiko Stuebner	};
2025364a0b4SBrian Norris
2035364a0b4SBrian Norris	gpio_keys: gpio-keys {
2045364a0b4SBrian Norris		compatible = "gpio-keys";
2055364a0b4SBrian Norris		pinctrl-names = "default";
2065364a0b4SBrian Norris		pinctrl-0 = <&bt_host_wake_l>;
2075364a0b4SBrian Norris
208517ed0ffSKrzysztof Kozlowski		wake_on_bt: key-wake-on-bt {
2095364a0b4SBrian Norris			label = "Wake-on-Bluetooth";
2105364a0b4SBrian Norris			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
2115364a0b4SBrian Norris			linux,code = <KEY_WAKEUP>;
2125364a0b4SBrian Norris			wakeup-source;
2135364a0b4SBrian Norris		};
2145364a0b4SBrian Norris	};
215a0aa6bfeSHeiko Stuebner};
216a0aa6bfeSHeiko Stuebner
217a0aa6bfeSHeiko Stuebner&ppvar_bigcpu {
218a0aa6bfeSHeiko Stuebner	min-slew-down-rate = <225>;
219a0aa6bfeSHeiko Stuebner	ovp-threshold-percent = <16>;
220a0aa6bfeSHeiko Stuebner};
221a0aa6bfeSHeiko Stuebner
222a0aa6bfeSHeiko Stuebner&ppvar_litcpu {
223a0aa6bfeSHeiko Stuebner	min-slew-down-rate = <225>;
224a0aa6bfeSHeiko Stuebner	ovp-threshold-percent = <16>;
225a0aa6bfeSHeiko Stuebner};
226a0aa6bfeSHeiko Stuebner
227a0aa6bfeSHeiko Stuebner&ppvar_gpu {
228a0aa6bfeSHeiko Stuebner	min-slew-down-rate = <225>;
229a0aa6bfeSHeiko Stuebner	ovp-threshold-percent = <16>;
230a0aa6bfeSHeiko Stuebner};
231a0aa6bfeSHeiko Stuebner
232a0aa6bfeSHeiko Stuebner&cdn_dp {
233a0aa6bfeSHeiko Stuebner	extcon = <&usbc_extcon0>, <&usbc_extcon1>;
234a0aa6bfeSHeiko Stuebner};
235a0aa6bfeSHeiko Stuebner
23680bc6f34SLin Huang&dmc {
23780bc6f34SLin Huang	center-supply = <&ppvar_centerlogic>;
23880bc6f34SLin Huang	rockchip,pd-idle-dis-freq-hz = <800000000>;
23980bc6f34SLin Huang	rockchip,sr-idle-dis-freq-hz = <800000000>;
24080bc6f34SLin Huang	rockchip,sr-mc-gate-idle-dis-freq-hz = <800000000>;
24180bc6f34SLin Huang};
24280bc6f34SLin Huang
243d67a38c5SHeiko Stuebner&edp {
244d67a38c5SHeiko Stuebner	status = "okay";
245d67a38c5SHeiko Stuebner
2468123437cSzain wang	/*
2478123437cSzain wang	 * eDP PHY/clk don't sync reliably at anything other than 24 MHz. Only
2488123437cSzain wang	 * set this here, because rk3399-gru.dtsi ensures we can generate this
2498123437cSzain wang	 * off GPLL=600MHz, whereas some other RK3399 boards may not.
2508123437cSzain wang	 */
2518123437cSzain wang	assigned-clocks = <&cru PCLK_EDP>;
2528123437cSzain wang	assigned-clock-rates = <24000000>;
2538123437cSzain wang
254d67a38c5SHeiko Stuebner	ports {
255d67a38c5SHeiko Stuebner		edp_out: port@1 {
256d67a38c5SHeiko Stuebner			reg = <1>;
257d67a38c5SHeiko Stuebner			#address-cells = <1>;
258d67a38c5SHeiko Stuebner			#size-cells = <0>;
259d67a38c5SHeiko Stuebner
260d67a38c5SHeiko Stuebner			edp_out_panel: endpoint@0 {
261d67a38c5SHeiko Stuebner				reg = <0>;
262d67a38c5SHeiko Stuebner				remote-endpoint = <&panel_in_edp>;
263d67a38c5SHeiko Stuebner			};
264d67a38c5SHeiko Stuebner		};
265d67a38c5SHeiko Stuebner	};
266d67a38c5SHeiko Stuebner};
267d67a38c5SHeiko Stuebner
268ae044309SBrian Norris&gpio0 {
269ae044309SBrian Norris	gpio-line-names = /* GPIO0 A 0-7 */
270ae044309SBrian Norris			  "AP_RTC_CLK_IN",
271ae044309SBrian Norris			  "EC_AP_INT_L",
272ae044309SBrian Norris			  "PP1800_AUDIO_EN",
273ae044309SBrian Norris			  "BT_HOST_WAKE_L",
274ae044309SBrian Norris			  "WLAN_MODULE_PD_L",
275ae044309SBrian Norris			  "H1_INT_OD_L",
276ae044309SBrian Norris			  "CENTERLOGIC_DVS_PWM",
277ae044309SBrian Norris			  "",
278ae044309SBrian Norris
279ae044309SBrian Norris			  /* GPIO0 B 0-4 */
280ae044309SBrian Norris			  "WIFI_HOST_WAKE_L",
281ae044309SBrian Norris			  "PMUIO2_33_18_L",
282ae044309SBrian Norris			  "PP1500_EN",
283ae044309SBrian Norris			  "AP_EC_WARM_RESET_REQ",
284ae044309SBrian Norris			  "PP3000_EN";
285ae044309SBrian Norris};
286ae044309SBrian Norris
287ae044309SBrian Norris&gpio1 {
288ae044309SBrian Norris	gpio-line-names = /* GPIO1 A 0-7 */
289ae044309SBrian Norris			  "",
290ae044309SBrian Norris			  "",
291ae044309SBrian Norris			  "SPK_PA_EN",
292ae044309SBrian Norris			  "",
293ae044309SBrian Norris			  "TRACKPAD_INT_L",
294ae044309SBrian Norris			  "AP_EC_S3_S0_L",
295ae044309SBrian Norris			  "AP_EC_OVERTEMP",
296ae044309SBrian Norris			  "AP_SPI_FLASH_MISO",
297ae044309SBrian Norris
298ae044309SBrian Norris			  /* GPIO1 B 0-7 */
299ae044309SBrian Norris			  "AP_SPI_FLASH_MOSI_R",
300ae044309SBrian Norris			  "AP_SPI_FLASH_CLK_R",
301ae044309SBrian Norris			  "AP_SPI_FLASH_CS_L_R",
302ae044309SBrian Norris			  "WLAN_MODULE_RESET_L",
303ae044309SBrian Norris			  "WIFI_DISABLE_L",
304ae044309SBrian Norris			  "MIC_INT",
305ae044309SBrian Norris			  "",
306ae044309SBrian Norris			  "AP_I2C_DVS_SDA",
307ae044309SBrian Norris
308ae044309SBrian Norris			  /* GPIO1 C 0-7 */
309ae044309SBrian Norris			  "AP_I2C_DVS_SCL",
310ae044309SBrian Norris			  "AP_BL_EN",
311ae044309SBrian Norris			  /*
312ae044309SBrian Norris			   * AP_FLASH_WP is crossystem ABI. Schematics call it
313ae044309SBrian Norris			   * AP_FW_WP or CPU1_FW_WP, depending on the variant.
314ae044309SBrian Norris			   */
315ae044309SBrian Norris			  "AP_FLASH_WP",
316ae044309SBrian Norris			  "LITCPU_DVS_PWM",
317ae044309SBrian Norris			  "AP_I2C_AUDIO_SDA",
318ae044309SBrian Norris			  "AP_I2C_AUDIO_SCL",
319ae044309SBrian Norris			  "",
320ae044309SBrian Norris			  "HEADSET_INT_L";
321ae044309SBrian Norris};
322ae044309SBrian Norris
323ae044309SBrian Norris&gpio2 {
324ae044309SBrian Norris	gpio-line-names = /* GPIO2 A 0-7 */
325ae044309SBrian Norris			  "",
326ae044309SBrian Norris			  "",
327ae044309SBrian Norris			  "SD_IO_PWR_EN",
328ae044309SBrian Norris			  "",
329ae044309SBrian Norris			  "",
330ae044309SBrian Norris			  "",
331ae044309SBrian Norris			  "",
332ae044309SBrian Norris			  "",
333ae044309SBrian Norris
334ae044309SBrian Norris			  /* GPIO2 B 0-7 */
335ae044309SBrian Norris			  "",
336ae044309SBrian Norris			  "",
337ae044309SBrian Norris			  "",
338ae044309SBrian Norris			  "",
339ae044309SBrian Norris			  "",
340ae044309SBrian Norris			  "",
341ae044309SBrian Norris			  "",
342ae044309SBrian Norris			  "",
343ae044309SBrian Norris
344ae044309SBrian Norris			  /* GPIO2 C 0-7 */
345ae044309SBrian Norris			  "",
346ae044309SBrian Norris			  "",
347ae044309SBrian Norris			  "",
348ae044309SBrian Norris			  "",
349ae044309SBrian Norris			  "AP_SPI_EC_MISO",
350ae044309SBrian Norris			  "AP_SPI_EC_MOSI",
351ae044309SBrian Norris			  "AP_SPI_EC_CLK",
352ae044309SBrian Norris			  "AP_SPI_EC_CS_L",
353ae044309SBrian Norris
354ae044309SBrian Norris			  /* GPIO2 D 0-4 */
355ae044309SBrian Norris			  "BT_DEV_WAKE_L",
356ae044309SBrian Norris			  "",
357ae044309SBrian Norris			  "WIFI_PCIE_CLKREQ_L",
358ae044309SBrian Norris			  "WIFI_PERST_L",
359ae044309SBrian Norris			  "SD_PWR_3000_1800_L";
360ae044309SBrian Norris};
361ae044309SBrian Norris
362ae044309SBrian Norris&gpio3 {
363ae044309SBrian Norris	gpio-line-names = /* GPIO3 A 0-7 */
364ae044309SBrian Norris			  "",
365ae044309SBrian Norris			  "",
366ae044309SBrian Norris			  "",
367ae044309SBrian Norris			  "",
368ae044309SBrian Norris			  "AP_SPI_TPM_MISO",
369ae044309SBrian Norris			  "AP_SPI_TPM_MOSI_R",
370ae044309SBrian Norris			  "AP_SPI_TPM_CLK_R",
371ae044309SBrian Norris			  "AP_SPI_TPM_CS_L_R",
372ae044309SBrian Norris
373ae044309SBrian Norris			  /* GPIO3 B 0-7 */
374ae044309SBrian Norris			  "EC_IN_RW",
375ae044309SBrian Norris			  "",
376ae044309SBrian Norris			  "AP_I2C_TP_SDA",
377ae044309SBrian Norris			  "AP_I2C_TP_SCL",
378ae044309SBrian Norris			  "AP_I2C_TP_PU_EN",
379ae044309SBrian Norris			  "TOUCH_INT_L",
380ae044309SBrian Norris			  "",
381ae044309SBrian Norris			  "",
382ae044309SBrian Norris
383ae044309SBrian Norris			  /* GPIO3 C 0-7 */
384ae044309SBrian Norris			  "",
385ae044309SBrian Norris			  "",
386ae044309SBrian Norris			  "",
387ae044309SBrian Norris			  "",
388ae044309SBrian Norris			  "",
389ae044309SBrian Norris			  "",
390ae044309SBrian Norris			  "",
391ae044309SBrian Norris			  "",
392ae044309SBrian Norris
393ae044309SBrian Norris			  /* GPIO3 D 0-7 */
394ae044309SBrian Norris			  "I2S0_SCLK",
395ae044309SBrian Norris			  "I2S0_LRCK_RX",
396ae044309SBrian Norris			  "I2S0_LRCK_TX",
397ae044309SBrian Norris			  "I2S0_SDI_0",
398ae044309SBrian Norris			  "I2S0_SDI_1",
399ae044309SBrian Norris			  "",
400ae044309SBrian Norris			  "I2S0_SDO_1",
401ae044309SBrian Norris			  "I2S0_SDO_0";
402ae044309SBrian Norris};
403ae044309SBrian Norris
404ae044309SBrian Norris&gpio4 {
405ae044309SBrian Norris	gpio-line-names = /* GPIO4 A 0-7 */
406ae044309SBrian Norris			  "I2S_MCLK",
407ae044309SBrian Norris			  "AP_I2C_MIC_SDA",
408ae044309SBrian Norris			  "AP_I2C_MIC_SCL",
409ae044309SBrian Norris			  "",
410ae044309SBrian Norris			  "",
411ae044309SBrian Norris			  "",
412ae044309SBrian Norris			  "",
413ae044309SBrian Norris			  "",
414ae044309SBrian Norris
415ae044309SBrian Norris			  /* GPIO4 B 0-7 */
416ae044309SBrian Norris			  "",
417ae044309SBrian Norris			  "",
418ae044309SBrian Norris			  "",
419ae044309SBrian Norris			  "",
420ae044309SBrian Norris			  "",
421ae044309SBrian Norris			  "",
422ae044309SBrian Norris			  "",
423ae044309SBrian Norris			  "",
424ae044309SBrian Norris
425ae044309SBrian Norris			  /* GPIO4 C 0-7 */
426ae044309SBrian Norris			  "AP_I2C_TS_SDA",
427ae044309SBrian Norris			  "AP_I2C_TS_SCL",
428ae044309SBrian Norris			  "GPU_DVS_PWM",
429ae044309SBrian Norris			  "UART_DBG_TX_AP_RX",
430ae044309SBrian Norris			  "UART_AP_TX_DBG_RX",
431ae044309SBrian Norris			  "",
432ae044309SBrian Norris			  "BIGCPU_DVS_PWM",
433ae044309SBrian Norris			  "EDP_HPD_3V0",
434ae044309SBrian Norris
435ae044309SBrian Norris			  /* GPIO4 D 0-5 */
436ae044309SBrian Norris			  "SD_CARD_DET_L",
437ae044309SBrian Norris			  "USB_DP_HPD",
438ae044309SBrian Norris			  "TOUCH_RESET_L",
439ae044309SBrian Norris			  "PP3300_DISP_EN",
440ae044309SBrian Norris			  "",
441ae044309SBrian Norris			  "SD_SLOT_PWR_EN";
442ae044309SBrian Norris};
443ae044309SBrian Norris
444a0aa6bfeSHeiko Stuebnerap_i2c_mic: &i2c1 {
445a0aa6bfeSHeiko Stuebner	status = "okay";
446a0aa6bfeSHeiko Stuebner
447a0aa6bfeSHeiko Stuebner	clock-frequency = <400000>;
448a0aa6bfeSHeiko Stuebner
449a0aa6bfeSHeiko Stuebner	/* These are relatively safe rise/fall times */
450a0aa6bfeSHeiko Stuebner	i2c-scl-falling-time-ns = <50>;
451a0aa6bfeSHeiko Stuebner	i2c-scl-rising-time-ns = <300>;
452a0aa6bfeSHeiko Stuebner
453a0aa6bfeSHeiko Stuebner	headsetcodec: rt5514@57 {
454a0aa6bfeSHeiko Stuebner		compatible = "realtek,rt5514";
455a0aa6bfeSHeiko Stuebner		reg = <0x57>;
456a0aa6bfeSHeiko Stuebner		realtek,dmic-init-delay-ms = <20>;
457a0aa6bfeSHeiko Stuebner	};
458a0aa6bfeSHeiko Stuebner};
459a0aa6bfeSHeiko Stuebner
460a0aa6bfeSHeiko Stuebnerap_i2c_tp: &i2c5 {
461a0aa6bfeSHeiko Stuebner	status = "okay";
462a0aa6bfeSHeiko Stuebner
463a0aa6bfeSHeiko Stuebner	clock-frequency = <400000>;
464a0aa6bfeSHeiko Stuebner
465a0aa6bfeSHeiko Stuebner	/* These are relatively safe rise/fall times */
466a0aa6bfeSHeiko Stuebner	i2c-scl-falling-time-ns = <50>;
467a0aa6bfeSHeiko Stuebner	i2c-scl-rising-time-ns = <300>;
468a0aa6bfeSHeiko Stuebner
469a0aa6bfeSHeiko Stuebner	/*
470a0aa6bfeSHeiko Stuebner	 * Note strange pullup enable.  Apparently this avoids leakage but
471a0aa6bfeSHeiko Stuebner	 * still allows us to get nice 4.7K pullups for high speed i2c
472a0aa6bfeSHeiko Stuebner	 * transfers.  Basically we want the pullup on whenever the ap is
473a0aa6bfeSHeiko Stuebner	 * alive, so the "en" pin just gets set to output high.
474a0aa6bfeSHeiko Stuebner	 */
475a0aa6bfeSHeiko Stuebner	pinctrl-0 = <&i2c5_xfer &ap_i2c_tp_pu_en>;
476a0aa6bfeSHeiko Stuebner};
477a0aa6bfeSHeiko Stuebner
478a0aa6bfeSHeiko Stuebner&cros_ec {
479a0024f55SKrzysztof Kozlowski	cros_ec_pwm: pwm {
480a0aa6bfeSHeiko Stuebner		compatible = "google,cros-ec-pwm";
481a0aa6bfeSHeiko Stuebner		#pwm-cells = <1>;
482a0aa6bfeSHeiko Stuebner	};
483a0aa6bfeSHeiko Stuebner
4846f7e1c19SEnric Balletbo i Serra	usbc_extcon1: extcon1 {
485a0aa6bfeSHeiko Stuebner		compatible = "google,extcon-usbc-cros-ec";
486a0aa6bfeSHeiko Stuebner		google,usb-port-id = <1>;
487a0aa6bfeSHeiko Stuebner	};
488a0aa6bfeSHeiko Stuebner};
489a0aa6bfeSHeiko Stuebner
490a0aa6bfeSHeiko Stuebner&sound {
491a0aa6bfeSHeiko Stuebner	rockchip,codec = <&max98357a &headsetcodec
492a0aa6bfeSHeiko Stuebner			  &codec &wacky_spi_audio &cdn_dp>;
493a0aa6bfeSHeiko Stuebner};
494a0aa6bfeSHeiko Stuebner
495a0aa6bfeSHeiko Stuebner&spi2 {
496a0aa6bfeSHeiko Stuebner	wacky_spi_audio: spi2@0 {
497a0aa6bfeSHeiko Stuebner		compatible = "realtek,rt5514";
498a0aa6bfeSHeiko Stuebner		reg = <0>;
499a0aa6bfeSHeiko Stuebner		interrupt-parent = <&gpio1>;
500a0aa6bfeSHeiko Stuebner		interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
501a0aa6bfeSHeiko Stuebner		pinctrl-names = "default";
502a0aa6bfeSHeiko Stuebner		pinctrl-0 = <&mic_int>;
503a0aa6bfeSHeiko Stuebner		/* May run faster once verified. */
504a0aa6bfeSHeiko Stuebner		spi-max-frequency = <10000000>;
505a0aa6bfeSHeiko Stuebner		wakeup-source;
506a0aa6bfeSHeiko Stuebner	};
507a0aa6bfeSHeiko Stuebner};
508a0aa6bfeSHeiko Stuebner
509a0aa6bfeSHeiko Stuebner&pci_rootport {
510a0aa6bfeSHeiko Stuebner	mvl_wifi: wifi@0,0 {
511a0aa6bfeSHeiko Stuebner		compatible = "pci1b4b,2b42";
512*a0827b91SRob Herring		reg = <0x0000 0x0 0x0 0x0 0x0>;
513a0aa6bfeSHeiko Stuebner		interrupt-parent = <&gpio0>;
514a0aa6bfeSHeiko Stuebner		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
515a0aa6bfeSHeiko Stuebner		pinctrl-names = "default";
516a0aa6bfeSHeiko Stuebner		pinctrl-0 = <&wlan_host_wake_l>;
517a0aa6bfeSHeiko Stuebner		wakeup-source;
518a0aa6bfeSHeiko Stuebner	};
519a0aa6bfeSHeiko Stuebner};
520a0aa6bfeSHeiko Stuebner
521a0aa6bfeSHeiko Stuebner&tcphy1 {
522a0aa6bfeSHeiko Stuebner	status = "okay";
523a0aa6bfeSHeiko Stuebner	extcon = <&usbc_extcon1>;
524a0aa6bfeSHeiko Stuebner};
525a0aa6bfeSHeiko Stuebner
526a0aa6bfeSHeiko Stuebner&u2phy1 {
527a0aa6bfeSHeiko Stuebner	status = "okay";
528a0aa6bfeSHeiko Stuebner};
529a0aa6bfeSHeiko Stuebner
530a0aa6bfeSHeiko Stuebner&usb_host0_ehci {
531a0aa6bfeSHeiko Stuebner	status = "okay";
532a0aa6bfeSHeiko Stuebner};
533a0aa6bfeSHeiko Stuebner
534a0aa6bfeSHeiko Stuebner&usb_host1_ehci {
535a0aa6bfeSHeiko Stuebner	status = "okay";
536a0aa6bfeSHeiko Stuebner};
537a0aa6bfeSHeiko Stuebner
538a0aa6bfeSHeiko Stuebner&usb_host1_ohci {
539a0aa6bfeSHeiko Stuebner	status = "okay";
540a0aa6bfeSHeiko Stuebner};
541a0aa6bfeSHeiko Stuebner
542a0aa6bfeSHeiko Stuebner&usbdrd3_1 {
543a0aa6bfeSHeiko Stuebner	status = "okay";
544a0aa6bfeSHeiko Stuebner	extcon = <&usbc_extcon1>;
545a0aa6bfeSHeiko Stuebner};
546a0aa6bfeSHeiko Stuebner
547a0aa6bfeSHeiko Stuebner&usbdrd_dwc3_1 {
548a0aa6bfeSHeiko Stuebner	status = "okay";
549a0aa6bfeSHeiko Stuebner	dr_mode = "host";
550a0aa6bfeSHeiko Stuebner};
551a0aa6bfeSHeiko Stuebner
552a0aa6bfeSHeiko Stuebner&pinctrl {
553a0aa6bfeSHeiko Stuebner	discrete-regulators {
554a0aa6bfeSHeiko Stuebner		pp1500_en: pp1500-en {
555d64420e8SHeiko Stuebner			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO
556a0aa6bfeSHeiko Stuebner					 &pcfg_pull_none>;
557a0aa6bfeSHeiko Stuebner		};
558a0aa6bfeSHeiko Stuebner
559a0aa6bfeSHeiko Stuebner		pp1800_audio_en: pp1800-audio-en {
560d64420e8SHeiko Stuebner			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO
561a0aa6bfeSHeiko Stuebner					 &pcfg_pull_down>;
562a0aa6bfeSHeiko Stuebner		};
563a0aa6bfeSHeiko Stuebner
564a0aa6bfeSHeiko Stuebner		pp3000_en: pp3000-en {
565d64420e8SHeiko Stuebner			rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO
566a0aa6bfeSHeiko Stuebner					 &pcfg_pull_none>;
567a0aa6bfeSHeiko Stuebner		};
568a0aa6bfeSHeiko Stuebner
569a0aa6bfeSHeiko Stuebner		pp3300_disp_en: pp3300-disp-en {
570d64420e8SHeiko Stuebner			rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO
571a0aa6bfeSHeiko Stuebner					 &pcfg_pull_none>;
572a0aa6bfeSHeiko Stuebner		};
573a0aa6bfeSHeiko Stuebner
574a0aa6bfeSHeiko Stuebner		wlan_module_pd_l: wlan-module-pd-l {
575d64420e8SHeiko Stuebner			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO
576a0aa6bfeSHeiko Stuebner					 &pcfg_pull_down>;
577a0aa6bfeSHeiko Stuebner		};
578a0aa6bfeSHeiko Stuebner	};
579a0aa6bfeSHeiko Stuebner};
580a0aa6bfeSHeiko Stuebner
581a0aa6bfeSHeiko Stuebner&wifi {
582a0aa6bfeSHeiko Stuebner	wifi_perst_l: wifi-perst-l {
583d64420e8SHeiko Stuebner		rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
584a0aa6bfeSHeiko Stuebner	};
585a0aa6bfeSHeiko Stuebner
586a0aa6bfeSHeiko Stuebner	wlan_host_wake_l: wlan-host-wake-l {
587e5467359SBrian Norris		/* Kevin has an external pull up, but Bob does not */
588d64420e8SHeiko Stuebner		rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
589a0aa6bfeSHeiko Stuebner	};
590a0aa6bfeSHeiko Stuebner};
591