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		pwm-delay-us = <10000>;
202d67a38c5SHeiko Stuebner	};
2035364a0b4SBrian Norris
2045364a0b4SBrian Norris	gpio_keys: gpio-keys {
2055364a0b4SBrian Norris		compatible = "gpio-keys";
2065364a0b4SBrian Norris		pinctrl-names = "default";
2075364a0b4SBrian Norris		pinctrl-0 = <&bt_host_wake_l>;
2085364a0b4SBrian Norris
209517ed0ffSKrzysztof Kozlowski		wake_on_bt: key-wake-on-bt {
2105364a0b4SBrian Norris			label = "Wake-on-Bluetooth";
2115364a0b4SBrian Norris			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
2125364a0b4SBrian Norris			linux,code = <KEY_WAKEUP>;
2135364a0b4SBrian Norris			wakeup-source;
2145364a0b4SBrian Norris		};
2155364a0b4SBrian Norris	};
216a0aa6bfeSHeiko Stuebner};
217a0aa6bfeSHeiko Stuebner
218a0aa6bfeSHeiko Stuebner&ppvar_bigcpu {
219a0aa6bfeSHeiko Stuebner	min-slew-down-rate = <225>;
220a0aa6bfeSHeiko Stuebner	ovp-threshold-percent = <16>;
221a0aa6bfeSHeiko Stuebner};
222a0aa6bfeSHeiko Stuebner
223a0aa6bfeSHeiko Stuebner&ppvar_litcpu {
224a0aa6bfeSHeiko Stuebner	min-slew-down-rate = <225>;
225a0aa6bfeSHeiko Stuebner	ovp-threshold-percent = <16>;
226a0aa6bfeSHeiko Stuebner};
227a0aa6bfeSHeiko Stuebner
228a0aa6bfeSHeiko Stuebner&ppvar_gpu {
229a0aa6bfeSHeiko Stuebner	min-slew-down-rate = <225>;
230a0aa6bfeSHeiko Stuebner	ovp-threshold-percent = <16>;
231a0aa6bfeSHeiko Stuebner};
232a0aa6bfeSHeiko Stuebner
233a0aa6bfeSHeiko Stuebner&cdn_dp {
234a0aa6bfeSHeiko Stuebner	extcon = <&usbc_extcon0>, <&usbc_extcon1>;
235a0aa6bfeSHeiko Stuebner};
236a0aa6bfeSHeiko Stuebner
23780bc6f34SLin Huang&dmc {
23880bc6f34SLin Huang	center-supply = <&ppvar_centerlogic>;
23980bc6f34SLin Huang	rockchip,pd-idle-dis-freq-hz = <800000000>;
24080bc6f34SLin Huang	rockchip,sr-idle-dis-freq-hz = <800000000>;
24180bc6f34SLin Huang	rockchip,sr-mc-gate-idle-dis-freq-hz = <800000000>;
24280bc6f34SLin Huang};
24380bc6f34SLin Huang
244d67a38c5SHeiko Stuebner&edp {
245d67a38c5SHeiko Stuebner	status = "okay";
246d67a38c5SHeiko Stuebner
247*8123437cSzain wang	/*
248*8123437cSzain wang	 * eDP PHY/clk don't sync reliably at anything other than 24 MHz. Only
249*8123437cSzain wang	 * set this here, because rk3399-gru.dtsi ensures we can generate this
250*8123437cSzain wang	 * off GPLL=600MHz, whereas some other RK3399 boards may not.
251*8123437cSzain wang	 */
252*8123437cSzain wang	assigned-clocks = <&cru PCLK_EDP>;
253*8123437cSzain wang	assigned-clock-rates = <24000000>;
254*8123437cSzain wang
255d67a38c5SHeiko Stuebner	ports {
256d67a38c5SHeiko Stuebner		edp_out: port@1 {
257d67a38c5SHeiko Stuebner			reg = <1>;
258d67a38c5SHeiko Stuebner			#address-cells = <1>;
259d67a38c5SHeiko Stuebner			#size-cells = <0>;
260d67a38c5SHeiko Stuebner
261d67a38c5SHeiko Stuebner			edp_out_panel: endpoint@0 {
262d67a38c5SHeiko Stuebner				reg = <0>;
263d67a38c5SHeiko Stuebner				remote-endpoint = <&panel_in_edp>;
264d67a38c5SHeiko Stuebner			};
265d67a38c5SHeiko Stuebner		};
266d67a38c5SHeiko Stuebner	};
267d67a38c5SHeiko Stuebner};
268d67a38c5SHeiko Stuebner
269ae044309SBrian Norris&gpio0 {
270ae044309SBrian Norris	gpio-line-names = /* GPIO0 A 0-7 */
271ae044309SBrian Norris			  "AP_RTC_CLK_IN",
272ae044309SBrian Norris			  "EC_AP_INT_L",
273ae044309SBrian Norris			  "PP1800_AUDIO_EN",
274ae044309SBrian Norris			  "BT_HOST_WAKE_L",
275ae044309SBrian Norris			  "WLAN_MODULE_PD_L",
276ae044309SBrian Norris			  "H1_INT_OD_L",
277ae044309SBrian Norris			  "CENTERLOGIC_DVS_PWM",
278ae044309SBrian Norris			  "",
279ae044309SBrian Norris
280ae044309SBrian Norris			  /* GPIO0 B 0-4 */
281ae044309SBrian Norris			  "WIFI_HOST_WAKE_L",
282ae044309SBrian Norris			  "PMUIO2_33_18_L",
283ae044309SBrian Norris			  "PP1500_EN",
284ae044309SBrian Norris			  "AP_EC_WARM_RESET_REQ",
285ae044309SBrian Norris			  "PP3000_EN";
286ae044309SBrian Norris};
287ae044309SBrian Norris
288ae044309SBrian Norris&gpio1 {
289ae044309SBrian Norris	gpio-line-names = /* GPIO1 A 0-7 */
290ae044309SBrian Norris			  "",
291ae044309SBrian Norris			  "",
292ae044309SBrian Norris			  "SPK_PA_EN",
293ae044309SBrian Norris			  "",
294ae044309SBrian Norris			  "TRACKPAD_INT_L",
295ae044309SBrian Norris			  "AP_EC_S3_S0_L",
296ae044309SBrian Norris			  "AP_EC_OVERTEMP",
297ae044309SBrian Norris			  "AP_SPI_FLASH_MISO",
298ae044309SBrian Norris
299ae044309SBrian Norris			  /* GPIO1 B 0-7 */
300ae044309SBrian Norris			  "AP_SPI_FLASH_MOSI_R",
301ae044309SBrian Norris			  "AP_SPI_FLASH_CLK_R",
302ae044309SBrian Norris			  "AP_SPI_FLASH_CS_L_R",
303ae044309SBrian Norris			  "WLAN_MODULE_RESET_L",
304ae044309SBrian Norris			  "WIFI_DISABLE_L",
305ae044309SBrian Norris			  "MIC_INT",
306ae044309SBrian Norris			  "",
307ae044309SBrian Norris			  "AP_I2C_DVS_SDA",
308ae044309SBrian Norris
309ae044309SBrian Norris			  /* GPIO1 C 0-7 */
310ae044309SBrian Norris			  "AP_I2C_DVS_SCL",
311ae044309SBrian Norris			  "AP_BL_EN",
312ae044309SBrian Norris			  /*
313ae044309SBrian Norris			   * AP_FLASH_WP is crossystem ABI. Schematics call it
314ae044309SBrian Norris			   * AP_FW_WP or CPU1_FW_WP, depending on the variant.
315ae044309SBrian Norris			   */
316ae044309SBrian Norris			  "AP_FLASH_WP",
317ae044309SBrian Norris			  "LITCPU_DVS_PWM",
318ae044309SBrian Norris			  "AP_I2C_AUDIO_SDA",
319ae044309SBrian Norris			  "AP_I2C_AUDIO_SCL",
320ae044309SBrian Norris			  "",
321ae044309SBrian Norris			  "HEADSET_INT_L";
322ae044309SBrian Norris};
323ae044309SBrian Norris
324ae044309SBrian Norris&gpio2 {
325ae044309SBrian Norris	gpio-line-names = /* GPIO2 A 0-7 */
326ae044309SBrian Norris			  "",
327ae044309SBrian Norris			  "",
328ae044309SBrian Norris			  "SD_IO_PWR_EN",
329ae044309SBrian Norris			  "",
330ae044309SBrian Norris			  "",
331ae044309SBrian Norris			  "",
332ae044309SBrian Norris			  "",
333ae044309SBrian Norris			  "",
334ae044309SBrian Norris
335ae044309SBrian Norris			  /* GPIO2 B 0-7 */
336ae044309SBrian Norris			  "",
337ae044309SBrian Norris			  "",
338ae044309SBrian Norris			  "",
339ae044309SBrian Norris			  "",
340ae044309SBrian Norris			  "",
341ae044309SBrian Norris			  "",
342ae044309SBrian Norris			  "",
343ae044309SBrian Norris			  "",
344ae044309SBrian Norris
345ae044309SBrian Norris			  /* GPIO2 C 0-7 */
346ae044309SBrian Norris			  "",
347ae044309SBrian Norris			  "",
348ae044309SBrian Norris			  "",
349ae044309SBrian Norris			  "",
350ae044309SBrian Norris			  "AP_SPI_EC_MISO",
351ae044309SBrian Norris			  "AP_SPI_EC_MOSI",
352ae044309SBrian Norris			  "AP_SPI_EC_CLK",
353ae044309SBrian Norris			  "AP_SPI_EC_CS_L",
354ae044309SBrian Norris
355ae044309SBrian Norris			  /* GPIO2 D 0-4 */
356ae044309SBrian Norris			  "BT_DEV_WAKE_L",
357ae044309SBrian Norris			  "",
358ae044309SBrian Norris			  "WIFI_PCIE_CLKREQ_L",
359ae044309SBrian Norris			  "WIFI_PERST_L",
360ae044309SBrian Norris			  "SD_PWR_3000_1800_L";
361ae044309SBrian Norris};
362ae044309SBrian Norris
363ae044309SBrian Norris&gpio3 {
364ae044309SBrian Norris	gpio-line-names = /* GPIO3 A 0-7 */
365ae044309SBrian Norris			  "",
366ae044309SBrian Norris			  "",
367ae044309SBrian Norris			  "",
368ae044309SBrian Norris			  "",
369ae044309SBrian Norris			  "AP_SPI_TPM_MISO",
370ae044309SBrian Norris			  "AP_SPI_TPM_MOSI_R",
371ae044309SBrian Norris			  "AP_SPI_TPM_CLK_R",
372ae044309SBrian Norris			  "AP_SPI_TPM_CS_L_R",
373ae044309SBrian Norris
374ae044309SBrian Norris			  /* GPIO3 B 0-7 */
375ae044309SBrian Norris			  "EC_IN_RW",
376ae044309SBrian Norris			  "",
377ae044309SBrian Norris			  "AP_I2C_TP_SDA",
378ae044309SBrian Norris			  "AP_I2C_TP_SCL",
379ae044309SBrian Norris			  "AP_I2C_TP_PU_EN",
380ae044309SBrian Norris			  "TOUCH_INT_L",
381ae044309SBrian Norris			  "",
382ae044309SBrian Norris			  "",
383ae044309SBrian Norris
384ae044309SBrian Norris			  /* GPIO3 C 0-7 */
385ae044309SBrian Norris			  "",
386ae044309SBrian Norris			  "",
387ae044309SBrian Norris			  "",
388ae044309SBrian Norris			  "",
389ae044309SBrian Norris			  "",
390ae044309SBrian Norris			  "",
391ae044309SBrian Norris			  "",
392ae044309SBrian Norris			  "",
393ae044309SBrian Norris
394ae044309SBrian Norris			  /* GPIO3 D 0-7 */
395ae044309SBrian Norris			  "I2S0_SCLK",
396ae044309SBrian Norris			  "I2S0_LRCK_RX",
397ae044309SBrian Norris			  "I2S0_LRCK_TX",
398ae044309SBrian Norris			  "I2S0_SDI_0",
399ae044309SBrian Norris			  "I2S0_SDI_1",
400ae044309SBrian Norris			  "",
401ae044309SBrian Norris			  "I2S0_SDO_1",
402ae044309SBrian Norris			  "I2S0_SDO_0";
403ae044309SBrian Norris};
404ae044309SBrian Norris
405ae044309SBrian Norris&gpio4 {
406ae044309SBrian Norris	gpio-line-names = /* GPIO4 A 0-7 */
407ae044309SBrian Norris			  "I2S_MCLK",
408ae044309SBrian Norris			  "AP_I2C_MIC_SDA",
409ae044309SBrian Norris			  "AP_I2C_MIC_SCL",
410ae044309SBrian Norris			  "",
411ae044309SBrian Norris			  "",
412ae044309SBrian Norris			  "",
413ae044309SBrian Norris			  "",
414ae044309SBrian Norris			  "",
415ae044309SBrian Norris
416ae044309SBrian Norris			  /* GPIO4 B 0-7 */
417ae044309SBrian Norris			  "",
418ae044309SBrian Norris			  "",
419ae044309SBrian Norris			  "",
420ae044309SBrian Norris			  "",
421ae044309SBrian Norris			  "",
422ae044309SBrian Norris			  "",
423ae044309SBrian Norris			  "",
424ae044309SBrian Norris			  "",
425ae044309SBrian Norris
426ae044309SBrian Norris			  /* GPIO4 C 0-7 */
427ae044309SBrian Norris			  "AP_I2C_TS_SDA",
428ae044309SBrian Norris			  "AP_I2C_TS_SCL",
429ae044309SBrian Norris			  "GPU_DVS_PWM",
430ae044309SBrian Norris			  "UART_DBG_TX_AP_RX",
431ae044309SBrian Norris			  "UART_AP_TX_DBG_RX",
432ae044309SBrian Norris			  "",
433ae044309SBrian Norris			  "BIGCPU_DVS_PWM",
434ae044309SBrian Norris			  "EDP_HPD_3V0",
435ae044309SBrian Norris
436ae044309SBrian Norris			  /* GPIO4 D 0-5 */
437ae044309SBrian Norris			  "SD_CARD_DET_L",
438ae044309SBrian Norris			  "USB_DP_HPD",
439ae044309SBrian Norris			  "TOUCH_RESET_L",
440ae044309SBrian Norris			  "PP3300_DISP_EN",
441ae044309SBrian Norris			  "",
442ae044309SBrian Norris			  "SD_SLOT_PWR_EN";
443ae044309SBrian Norris};
444ae044309SBrian Norris
445a0aa6bfeSHeiko Stuebnerap_i2c_mic: &i2c1 {
446a0aa6bfeSHeiko Stuebner	status = "okay";
447a0aa6bfeSHeiko Stuebner
448a0aa6bfeSHeiko Stuebner	clock-frequency = <400000>;
449a0aa6bfeSHeiko Stuebner
450a0aa6bfeSHeiko Stuebner	/* These are relatively safe rise/fall times */
451a0aa6bfeSHeiko Stuebner	i2c-scl-falling-time-ns = <50>;
452a0aa6bfeSHeiko Stuebner	i2c-scl-rising-time-ns = <300>;
453a0aa6bfeSHeiko Stuebner
454a0aa6bfeSHeiko Stuebner	headsetcodec: rt5514@57 {
455a0aa6bfeSHeiko Stuebner		compatible = "realtek,rt5514";
456a0aa6bfeSHeiko Stuebner		reg = <0x57>;
457a0aa6bfeSHeiko Stuebner		realtek,dmic-init-delay-ms = <20>;
458a0aa6bfeSHeiko Stuebner	};
459a0aa6bfeSHeiko Stuebner};
460a0aa6bfeSHeiko Stuebner
461a0aa6bfeSHeiko Stuebnerap_i2c_tp: &i2c5 {
462a0aa6bfeSHeiko Stuebner	status = "okay";
463a0aa6bfeSHeiko Stuebner
464a0aa6bfeSHeiko Stuebner	clock-frequency = <400000>;
465a0aa6bfeSHeiko Stuebner
466a0aa6bfeSHeiko Stuebner	/* These are relatively safe rise/fall times */
467a0aa6bfeSHeiko Stuebner	i2c-scl-falling-time-ns = <50>;
468a0aa6bfeSHeiko Stuebner	i2c-scl-rising-time-ns = <300>;
469a0aa6bfeSHeiko Stuebner
470a0aa6bfeSHeiko Stuebner	/*
471a0aa6bfeSHeiko Stuebner	 * Note strange pullup enable.  Apparently this avoids leakage but
472a0aa6bfeSHeiko Stuebner	 * still allows us to get nice 4.7K pullups for high speed i2c
473a0aa6bfeSHeiko Stuebner	 * transfers.  Basically we want the pullup on whenever the ap is
474a0aa6bfeSHeiko Stuebner	 * alive, so the "en" pin just gets set to output high.
475a0aa6bfeSHeiko Stuebner	 */
476a0aa6bfeSHeiko Stuebner	pinctrl-0 = <&i2c5_xfer &ap_i2c_tp_pu_en>;
477a0aa6bfeSHeiko Stuebner};
478a0aa6bfeSHeiko Stuebner
479a0aa6bfeSHeiko Stuebner&cros_ec {
480a0024f55SKrzysztof Kozlowski	cros_ec_pwm: pwm {
481a0aa6bfeSHeiko Stuebner		compatible = "google,cros-ec-pwm";
482a0aa6bfeSHeiko Stuebner		#pwm-cells = <1>;
483a0aa6bfeSHeiko Stuebner	};
484a0aa6bfeSHeiko Stuebner
4856f7e1c19SEnric Balletbo i Serra	usbc_extcon1: extcon1 {
486a0aa6bfeSHeiko Stuebner		compatible = "google,extcon-usbc-cros-ec";
487a0aa6bfeSHeiko Stuebner		google,usb-port-id = <1>;
488a0aa6bfeSHeiko Stuebner	};
489a0aa6bfeSHeiko Stuebner};
490a0aa6bfeSHeiko Stuebner
491a0aa6bfeSHeiko Stuebner&sound {
492a0aa6bfeSHeiko Stuebner	rockchip,codec = <&max98357a &headsetcodec
493a0aa6bfeSHeiko Stuebner			  &codec &wacky_spi_audio &cdn_dp>;
494a0aa6bfeSHeiko Stuebner};
495a0aa6bfeSHeiko Stuebner
496a0aa6bfeSHeiko Stuebner&spi2 {
497a0aa6bfeSHeiko Stuebner	wacky_spi_audio: spi2@0 {
498a0aa6bfeSHeiko Stuebner		compatible = "realtek,rt5514";
499a0aa6bfeSHeiko Stuebner		reg = <0>;
500a0aa6bfeSHeiko Stuebner		interrupt-parent = <&gpio1>;
501a0aa6bfeSHeiko Stuebner		interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
502a0aa6bfeSHeiko Stuebner		pinctrl-names = "default";
503a0aa6bfeSHeiko Stuebner		pinctrl-0 = <&mic_int>;
504a0aa6bfeSHeiko Stuebner		/* May run faster once verified. */
505a0aa6bfeSHeiko Stuebner		spi-max-frequency = <10000000>;
506a0aa6bfeSHeiko Stuebner		wakeup-source;
507a0aa6bfeSHeiko Stuebner	};
508a0aa6bfeSHeiko Stuebner};
509a0aa6bfeSHeiko Stuebner
510a0aa6bfeSHeiko Stuebner&pci_rootport {
511a0aa6bfeSHeiko Stuebner	mvl_wifi: wifi@0,0 {
512a0aa6bfeSHeiko Stuebner		compatible = "pci1b4b,2b42";
513a0aa6bfeSHeiko Stuebner		reg = <0x83010000 0x0 0x00000000 0x0 0x00100000
514a0aa6bfeSHeiko Stuebner		       0x83010000 0x0 0x00100000 0x0 0x00100000>;
515a0aa6bfeSHeiko Stuebner		interrupt-parent = <&gpio0>;
516a0aa6bfeSHeiko Stuebner		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
517a0aa6bfeSHeiko Stuebner		pinctrl-names = "default";
518a0aa6bfeSHeiko Stuebner		pinctrl-0 = <&wlan_host_wake_l>;
519a0aa6bfeSHeiko Stuebner		wakeup-source;
520a0aa6bfeSHeiko Stuebner	};
521a0aa6bfeSHeiko Stuebner};
522a0aa6bfeSHeiko Stuebner
523a0aa6bfeSHeiko Stuebner&tcphy1 {
524a0aa6bfeSHeiko Stuebner	status = "okay";
525a0aa6bfeSHeiko Stuebner	extcon = <&usbc_extcon1>;
526a0aa6bfeSHeiko Stuebner};
527a0aa6bfeSHeiko Stuebner
528a0aa6bfeSHeiko Stuebner&u2phy1 {
529a0aa6bfeSHeiko Stuebner	status = "okay";
530a0aa6bfeSHeiko Stuebner};
531a0aa6bfeSHeiko Stuebner
532a0aa6bfeSHeiko Stuebner&usb_host0_ehci {
533a0aa6bfeSHeiko Stuebner	status = "okay";
534a0aa6bfeSHeiko Stuebner};
535a0aa6bfeSHeiko Stuebner
536a0aa6bfeSHeiko Stuebner&usb_host1_ehci {
537a0aa6bfeSHeiko Stuebner	status = "okay";
538a0aa6bfeSHeiko Stuebner};
539a0aa6bfeSHeiko Stuebner
540a0aa6bfeSHeiko Stuebner&usb_host1_ohci {
541a0aa6bfeSHeiko Stuebner	status = "okay";
542a0aa6bfeSHeiko Stuebner};
543a0aa6bfeSHeiko Stuebner
544a0aa6bfeSHeiko Stuebner&usbdrd3_1 {
545a0aa6bfeSHeiko Stuebner	status = "okay";
546a0aa6bfeSHeiko Stuebner	extcon = <&usbc_extcon1>;
547a0aa6bfeSHeiko Stuebner};
548a0aa6bfeSHeiko Stuebner
549a0aa6bfeSHeiko Stuebner&usbdrd_dwc3_1 {
550a0aa6bfeSHeiko Stuebner	status = "okay";
551a0aa6bfeSHeiko Stuebner	dr_mode = "host";
552a0aa6bfeSHeiko Stuebner};
553a0aa6bfeSHeiko Stuebner
554a0aa6bfeSHeiko Stuebner&pinctrl {
555a0aa6bfeSHeiko Stuebner	discrete-regulators {
556a0aa6bfeSHeiko Stuebner		pp1500_en: pp1500-en {
557d64420e8SHeiko Stuebner			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO
558a0aa6bfeSHeiko Stuebner					 &pcfg_pull_none>;
559a0aa6bfeSHeiko Stuebner		};
560a0aa6bfeSHeiko Stuebner
561a0aa6bfeSHeiko Stuebner		pp1800_audio_en: pp1800-audio-en {
562d64420e8SHeiko Stuebner			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO
563a0aa6bfeSHeiko Stuebner					 &pcfg_pull_down>;
564a0aa6bfeSHeiko Stuebner		};
565a0aa6bfeSHeiko Stuebner
566a0aa6bfeSHeiko Stuebner		pp3000_en: pp3000-en {
567d64420e8SHeiko Stuebner			rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO
568a0aa6bfeSHeiko Stuebner					 &pcfg_pull_none>;
569a0aa6bfeSHeiko Stuebner		};
570a0aa6bfeSHeiko Stuebner
571a0aa6bfeSHeiko Stuebner		pp3300_disp_en: pp3300-disp-en {
572d64420e8SHeiko Stuebner			rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO
573a0aa6bfeSHeiko Stuebner					 &pcfg_pull_none>;
574a0aa6bfeSHeiko Stuebner		};
575a0aa6bfeSHeiko Stuebner
576a0aa6bfeSHeiko Stuebner		wlan_module_pd_l: wlan-module-pd-l {
577d64420e8SHeiko Stuebner			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO
578a0aa6bfeSHeiko Stuebner					 &pcfg_pull_down>;
579a0aa6bfeSHeiko Stuebner		};
580a0aa6bfeSHeiko Stuebner	};
581a0aa6bfeSHeiko Stuebner};
582a0aa6bfeSHeiko Stuebner
583a0aa6bfeSHeiko Stuebner&wifi {
584a0aa6bfeSHeiko Stuebner	wifi_perst_l: wifi-perst-l {
585d64420e8SHeiko Stuebner		rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
586a0aa6bfeSHeiko Stuebner	};
587a0aa6bfeSHeiko Stuebner
588a0aa6bfeSHeiko Stuebner	wlan_host_wake_l: wlan-host-wake-l {
589e5467359SBrian Norris		/* Kevin has an external pull up, but Bob does not */
590d64420e8SHeiko Stuebner		rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
591a0aa6bfeSHeiko Stuebner	};
592a0aa6bfeSHeiko Stuebner};
593