summaryrefslogtreecommitdiffstats
path: root/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
blob: 81e73103fa788605471679fd1b0868f50822c4f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Google Gru-Kevin Rev 6+ board device tree source
 *
 * Copyright 2016-2017 Google, Inc
 */

/dts-v1/;
#include "rk3399-gru-chromebook.dtsi"
#include <dt-bindings/input/linux-event-codes.h>

/*
 * Kevin-specific things
 *
 * Things in this section should use names from Kevin schematic since no
 * equivalent exists in Gru schematic.  If referring to signals that exist
 * in Gru we use the Gru names, though.  Confusing enough for you?
 */
/ {
	model = "Google Kevin";
	compatible = "google,kevin-rev15", "google,kevin-rev14",
		     "google,kevin-rev13", "google,kevin-rev12",
		     "google,kevin-rev11", "google,kevin-rev10",
		     "google,kevin-rev9", "google,kevin-rev8",
		     "google,kevin-rev7", "google,kevin-rev6",
		     "google,kevin", "google,gru", "rockchip,rk3399";

	/* Power tree */

	p3_3v_dig: p3-3v-dig {
		compatible = "regulator-fixed";
		regulator-name = "p3.3v_dig";
		pinctrl-names = "default";
		pinctrl-0 = <&cpu3_pen_pwr_en>;

		enable-active-high;
		gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
		vin-supply = <&pp3300>;
	};

	edp_panel: edp-panel {
		compatible = "sharp,lq123p1jx31", "simple-panel";
		backlight = <&backlight>;
		power-supply = <&pp3300_disp>;

		ports {
			panel_in_edp: endpoint {
				remote-endpoint = <&edp_out_panel>;
			};
		};
	};

	thermistor_ppvar_bigcpu: thermistor-ppvar-bigcpu {
		compatible = "murata,ncp15wb473";
		pullup-uv = <1800000>;
		pullup-ohm = <25500>;
		pulldown-ohm = <0>;
		io-channels = <&saradc 2>;
		#thermal-sensor-cells = <0>;
	};

	thermistor_ppvar_litcpu: thermistor-ppvar-litcpu {
		compatible = "murata,ncp15wb473";
		pullup-uv = <1800000>;
		pullup-ohm = <25500>;
		pulldown-ohm = <0>;
		io-channels = <&saradc 3>;
		#thermal-sensor-cells = <0>;
	};
};

&backlight {
	pwms = <&cros_ec_pwm 1>;
};

&gpio_keys {
	pinctrl-names = "default";
	pinctrl-0 = <&bt_host_wake_l>, <&cpu1_pen_eject>;

	pen-insert {
		label = "Pen Insert";
		/* Insert = low, eject = high */
		gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
		linux,code = <SW_PEN_INSERTED>;
		linux,input-type = <EV_SW>;
		wakeup-source;
	};
};

&thermal_zones {
	bigcpu_reg_thermal: bigcpu-reg-thermal {
		polling-delay-passive = <100>; /* milliseconds */
		polling-delay = <1000>; /* milliseconds */
		thermal-sensors = <&thermistor_ppvar_bigcpu 0>;
		sustainable-power = <4000>;

		ppvar_bigcpu_trips: trips {
			ppvar_bigcpu_on: ppvar-bigcpu-on {
				temperature = <40000>;	/* millicelsius */
				hysteresis = <2000>;	/* millicelsius */
				type = "passive";
			};

			ppvar_bigcpu_alert: ppvar-bigcpu-alert {
				temperature = <50000>;	/* millicelsius */
				hysteresis = <2000>;	/* millicelsius */
				type = "passive";
			};

			ppvar_bigcpu_crit: ppvar-bigcpu-crit {
				temperature = <90000>;	/* millicelsius */
				hysteresis = <0>;	/* millicelsius */
				type = "critical";
			};
		};

		cooling-maps {
			map0 {
				trip = <&ppvar_bigcpu_alert>;
				cooling-device =
					<&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					<&cpu_l1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					<&cpu_l2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					<&cpu_l3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
				contribution = <4096>;
			};
			map1 {
				trip = <&ppvar_bigcpu_alert>;
				cooling-device =
					<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
				contribution = <1024>;
			};
		};
	};

	litcpu_reg_thermal: litcpu-reg-thermal {
		polling-delay-passive = <100>; /* milliseconds */
		polling-delay = <1000>; /* milliseconds */
		thermal-sensors = <&thermistor_ppvar_litcpu 0>;
		sustainable-power = <4000>;

		ppvar_litcpu_trips: trips {
			ppvar_litcpu_on: ppvar-litcpu-on {
				temperature = <40000>;	/* millicelsius */
				hysteresis = <2000>;	/* millicelsius */
				type = "passive";
			};

			ppvar_litcpu_alert: ppvar-litcpu-alert {
				temperature = <50000>;	/* millicelsius */
				hysteresis = <2000>;	/* millicelsius */
				type = "passive";
			};

			ppvar_litcpu_crit: ppvar-litcpu-crit {
				temperature = <90000>;	/* millicelsius */
				hysteresis = <0>;	/* millicelsius */
				type = "critical";
			};
		};
	};
};

ap_i2c_tpm: &i2c0 {
	status = "okay";

	clock-frequency = <400000>;

	/* These are relatively safe rise/fall times. */
	i2c-scl-falling-time-ns = <50>;
	i2c-scl-rising-time-ns = <300>;

	tpm: tpm@20 {
		compatible = "infineon,slb9645tt";
		reg = <0x20>;
		powered-while-suspended;
	};
};

ap_i2c_dig: &i2c2 {
	status = "okay";

	clock-frequency = <400000>;

	/* These are relatively safe rise/fall times. */
	i2c-scl-falling-time-ns = <50>;
	i2c-scl-rising-time-ns = <300>;

	digitizer: digitizer@9 {
		/* wacom,w9013 */
		compatible = "hid-over-i2c";
		reg = <0x9>;
		pinctrl-names = "default";
		pinctrl-0 = <&cpu1_dig_irq_l &cpu1_dig_pdct_l>;

		vdd-supply = <&p3_3v_dig>;
		post-power-on-delay-ms = <100>;

		interrupt-parent = <&gpio2>;
		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;

		hid-descr-addr = <0x1>;
	};
};

/* Adjustments to things in the gru baseboard */

&ap_i2c_tp {
	trackpad@4a {
		compatible = "atmel,maxtouch";
		reg = <0x4a>;
		pinctrl-names = "default";
		pinctrl-0 = <&trackpad_int_l>;
		interrupt-parent = <&gpio1>;
		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
		linux,gpio-keymap = <KEY_RESERVED
				     KEY_RESERVED
				     KEY_RESERVED
				     BTN_LEFT>;
		wakeup-source;
	};
};

&ap_i2c_ts {
	touchscreen@4b {
		compatible = "atmel,maxtouch";
		reg = <0x4b>;
		pinctrl-names = "default";
		pinctrl-0 = <&touch_int_l>;
		interrupt-parent = <&gpio3>;
		interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
	};
};

&ppvar_bigcpu_pwm {
	regulator-min-microvolt = <798674>;
	regulator-max-microvolt = <1302172>;
};

&ppvar_bigcpu {
	regulator-min-microvolt = <798674>;
	regulator-max-microvolt = <1302172>;
	ctrl-voltage-range = <798674 1302172>;
};

&ppvar_litcpu_pwm {
	regulator-min-microvolt = <799065>;
	regulator-max-microvolt = <1303738>;
};

&ppvar_litcpu {
	regulator-min-microvolt = <799065>;
	regulator-max-microvolt = <1303738>;
	ctrl-voltage-range = <799065 1303738>;
};

&ppvar_gpu_pwm {
	regulator-min-microvolt = <785782>;
	regulator-max-microvolt = <1217729>;
};

&ppvar_gpu {
	regulator-min-microvolt = <785782>;
	regulator-max-microvolt = <1217729>;
	ctrl-voltage-range = <785782 1217729>;
};

&ppvar_centerlogic_pwm {
	regulator-min-microvolt = <800069>;
	regulator-max-microvolt = <1049692>;
};

&ppvar_centerlogic {
	regulator-min-microvolt = <800069>;
	regulator-max-microvolt = <1049692>;
	ctrl-voltage-range = <800069 1049692>;
};

&saradc {
	status = "okay";
	vref-supply = <&pp1800_ap_io>;
};

&mvl_wifi {
	marvell,wakeup-pin = <14>; /* GPIO_14 on Marvell */
};

&pinctrl {
	digitizer {
		/* Has external pullup */
		cpu1_dig_irq_l: cpu1-dig-irq-l {
			rockchip,pins = <2 4 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		/* Has external pullup */
		cpu1_dig_pdct_l: cpu1-dig-pdct-l {
			rockchip,pins = <2 5 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	discrete-regulators {
		cpu3_pen_pwr_en: cpu3-pen-pwr-en {
			rockchip,pins = <4 30 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	pen {
		cpu1_pen_eject: cpu1-pen-eject {
			rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_up>;
		};
	};
};