xref: /openbmc/linux/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts (revision 62b5efc919b12c0effc6fd5720b6d5ddc1d1ee5f)
14ee99cebSKlaus Goger// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
248f4d979SBrian Norris/*
348f4d979SBrian Norris * Google Gru-Kevin Rev 6+ board device tree source
448f4d979SBrian Norris *
548f4d979SBrian Norris * Copyright 2016-2017 Google, Inc
648f4d979SBrian Norris */
748f4d979SBrian Norris
848f4d979SBrian Norris/dts-v1/;
9a0aa6bfeSHeiko Stuebner#include "rk3399-gru-chromebook.dtsi"
106bf1c2d2SArnd Bergmann#include <dt-bindings/input/linux-event-codes.h>
1148f4d979SBrian Norris
1248f4d979SBrian Norris/*
1348f4d979SBrian Norris * Kevin-specific things
1448f4d979SBrian Norris *
1548f4d979SBrian Norris * Things in this section should use names from Kevin schematic since no
1648f4d979SBrian Norris * equivalent exists in Gru schematic.  If referring to signals that exist
1748f4d979SBrian Norris * in Gru we use the Gru names, though.  Confusing enough for you?
1848f4d979SBrian Norris */
1948f4d979SBrian Norris/ {
2048f4d979SBrian Norris	model = "Google Kevin";
2148f4d979SBrian Norris	compatible = "google,kevin-rev15", "google,kevin-rev14",
2248f4d979SBrian Norris		     "google,kevin-rev13", "google,kevin-rev12",
2348f4d979SBrian Norris		     "google,kevin-rev11", "google,kevin-rev10",
2448f4d979SBrian Norris		     "google,kevin-rev9", "google,kevin-rev8",
2548f4d979SBrian Norris		     "google,kevin-rev7", "google,kevin-rev6",
2648f4d979SBrian Norris		     "google,kevin", "google,gru", "rockchip,rk3399";
2748f4d979SBrian Norris
2848f4d979SBrian Norris	/* Power tree */
2948f4d979SBrian Norris
3048f4d979SBrian Norris	p3_3v_dig: p3-3v-dig {
3148f4d979SBrian Norris		compatible = "regulator-fixed";
3248f4d979SBrian Norris		regulator-name = "p3.3v_dig";
3348f4d979SBrian Norris		pinctrl-names = "default";
3448f4d979SBrian Norris		pinctrl-0 = <&cpu3_pen_pwr_en>;
3548f4d979SBrian Norris
3648f4d979SBrian Norris		enable-active-high;
3748f4d979SBrian Norris		gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
3848f4d979SBrian Norris		vin-supply = <&pp3300>;
3948f4d979SBrian Norris	};
4048f4d979SBrian Norris
41926be875SJeffy Chen	edp_panel: edp-panel {
42*62b5efc9SRob Herring		compatible = "sharp,lq123p1jx31";
43926be875SJeffy Chen		backlight = <&backlight>;
44926be875SJeffy Chen		power-supply = <&pp3300_disp>;
45926be875SJeffy Chen
4684ebd2daSSean Paul		panel-timing {
47a9082575SDouglas Anderson			clock-frequency = <266666667>;
4884ebd2daSSean Paul			hactive = <2400>;
4984ebd2daSSean Paul			hfront-porch = <48>;
5084ebd2daSSean Paul			hback-porch = <84>;
5184ebd2daSSean Paul			hsync-len = <32>;
5284ebd2daSSean Paul			hsync-active = <0>;
5384ebd2daSSean Paul			vactive = <1600>;
5484ebd2daSSean Paul			vfront-porch = <3>;
5584ebd2daSSean Paul			vback-porch = <120>;
5684ebd2daSSean Paul			vsync-len = <10>;
5784ebd2daSSean Paul			vsync-active = <0>;
5884ebd2daSSean Paul		};
5984ebd2daSSean Paul
6026cd8657SEnric Balletbo i Serra		port {
61926be875SJeffy Chen			panel_in_edp: endpoint {
62926be875SJeffy Chen				remote-endpoint = <&edp_out_panel>;
63926be875SJeffy Chen			};
64926be875SJeffy Chen		};
65926be875SJeffy Chen	};
66926be875SJeffy Chen
6748f4d979SBrian Norris	thermistor_ppvar_bigcpu: thermistor-ppvar-bigcpu {
6848f4d979SBrian Norris		compatible = "murata,ncp15wb473";
6948f4d979SBrian Norris		pullup-uv = <1800000>;
7048f4d979SBrian Norris		pullup-ohm = <25500>;
7148f4d979SBrian Norris		pulldown-ohm = <0>;
7248f4d979SBrian Norris		io-channels = <&saradc 2>;
7348f4d979SBrian Norris		#thermal-sensor-cells = <0>;
7448f4d979SBrian Norris	};
7548f4d979SBrian Norris
7648f4d979SBrian Norris	thermistor_ppvar_litcpu: thermistor-ppvar-litcpu {
7748f4d979SBrian Norris		compatible = "murata,ncp15wb473";
7848f4d979SBrian Norris		pullup-uv = <1800000>;
7948f4d979SBrian Norris		pullup-ohm = <25500>;
8048f4d979SBrian Norris		pulldown-ohm = <0>;
8148f4d979SBrian Norris		io-channels = <&saradc 3>;
8248f4d979SBrian Norris		#thermal-sensor-cells = <0>;
8348f4d979SBrian Norris	};
8448f4d979SBrian Norris};
8548f4d979SBrian Norris
86d67a38c5SHeiko Stuebner&backlight {
87d67a38c5SHeiko Stuebner	pwms = <&cros_ec_pwm 1>;
88d67a38c5SHeiko Stuebner};
89d67a38c5SHeiko Stuebner
9048f4d979SBrian Norris&gpio_keys {
9148f4d979SBrian Norris	pinctrl-names = "default";
9248f4d979SBrian Norris	pinctrl-0 = <&bt_host_wake_l>, <&cpu1_pen_eject>;
9348f4d979SBrian Norris
9448f4d979SBrian Norris	pen-insert {
9548f4d979SBrian Norris		label = "Pen Insert";
9648f4d979SBrian Norris		/* Insert = low, eject = high */
9748f4d979SBrian Norris		gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
9848f4d979SBrian Norris		linux,code = <SW_PEN_INSERTED>;
9948f4d979SBrian Norris		linux,input-type = <EV_SW>;
10048f4d979SBrian Norris		wakeup-source;
10148f4d979SBrian Norris	};
10248f4d979SBrian Norris};
10348f4d979SBrian Norris
10448f4d979SBrian Norris&thermal_zones {
10548f4d979SBrian Norris	bigcpu_reg_thermal: bigcpu-reg-thermal {
10648f4d979SBrian Norris		polling-delay-passive = <100>; /* milliseconds */
10748f4d979SBrian Norris		polling-delay = <1000>; /* milliseconds */
10848f4d979SBrian Norris		thermal-sensors = <&thermistor_ppvar_bigcpu 0>;
10948f4d979SBrian Norris		sustainable-power = <4000>;
11048f4d979SBrian Norris
11148f4d979SBrian Norris		ppvar_bigcpu_trips: trips {
11248f4d979SBrian Norris			ppvar_bigcpu_on: ppvar-bigcpu-on {
11348f4d979SBrian Norris				temperature = <40000>;	/* millicelsius */
11448f4d979SBrian Norris				hysteresis = <2000>;	/* millicelsius */
11548f4d979SBrian Norris				type = "passive";
11648f4d979SBrian Norris			};
11748f4d979SBrian Norris
11848f4d979SBrian Norris			ppvar_bigcpu_alert: ppvar-bigcpu-alert {
11948f4d979SBrian Norris				temperature = <50000>;	/* millicelsius */
12048f4d979SBrian Norris				hysteresis = <2000>;	/* millicelsius */
12148f4d979SBrian Norris				type = "passive";
12248f4d979SBrian Norris			};
12348f4d979SBrian Norris
12448f4d979SBrian Norris			ppvar_bigcpu_crit: ppvar-bigcpu-crit {
12548f4d979SBrian Norris				temperature = <90000>;	/* millicelsius */
12648f4d979SBrian Norris				hysteresis = <0>;	/* millicelsius */
12748f4d979SBrian Norris				type = "critical";
12848f4d979SBrian Norris			};
12948f4d979SBrian Norris		};
13048f4d979SBrian Norris
13148f4d979SBrian Norris		cooling-maps {
13248f4d979SBrian Norris			map0 {
13348f4d979SBrian Norris				trip = <&ppvar_bigcpu_alert>;
13448f4d979SBrian Norris				cooling-device =
135cdd46460SViresh Kumar					<&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
136cdd46460SViresh Kumar					<&cpu_l1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
137cdd46460SViresh Kumar					<&cpu_l2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
138cdd46460SViresh Kumar					<&cpu_l3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
13948f4d979SBrian Norris				contribution = <4096>;
14048f4d979SBrian Norris			};
14148f4d979SBrian Norris			map1 {
14248f4d979SBrian Norris				trip = <&ppvar_bigcpu_alert>;
14348f4d979SBrian Norris				cooling-device =
144cdd46460SViresh Kumar					<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
145cdd46460SViresh Kumar					<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
14648f4d979SBrian Norris				contribution = <1024>;
14748f4d979SBrian Norris			};
14848f4d979SBrian Norris		};
14948f4d979SBrian Norris	};
15048f4d979SBrian Norris
15148f4d979SBrian Norris	litcpu_reg_thermal: litcpu-reg-thermal {
15248f4d979SBrian Norris		polling-delay-passive = <100>; /* milliseconds */
15348f4d979SBrian Norris		polling-delay = <1000>; /* milliseconds */
15448f4d979SBrian Norris		thermal-sensors = <&thermistor_ppvar_litcpu 0>;
15548f4d979SBrian Norris		sustainable-power = <4000>;
15648f4d979SBrian Norris
15748f4d979SBrian Norris		ppvar_litcpu_trips: trips {
15848f4d979SBrian Norris			ppvar_litcpu_on: ppvar-litcpu-on {
15948f4d979SBrian Norris				temperature = <40000>;	/* millicelsius */
16048f4d979SBrian Norris				hysteresis = <2000>;	/* millicelsius */
16148f4d979SBrian Norris				type = "passive";
16248f4d979SBrian Norris			};
16348f4d979SBrian Norris
16448f4d979SBrian Norris			ppvar_litcpu_alert: ppvar-litcpu-alert {
16548f4d979SBrian Norris				temperature = <50000>;	/* millicelsius */
16648f4d979SBrian Norris				hysteresis = <2000>;	/* millicelsius */
16748f4d979SBrian Norris				type = "passive";
16848f4d979SBrian Norris			};
16948f4d979SBrian Norris
17048f4d979SBrian Norris			ppvar_litcpu_crit: ppvar-litcpu-crit {
17148f4d979SBrian Norris				temperature = <90000>;	/* millicelsius */
17248f4d979SBrian Norris				hysteresis = <0>;	/* millicelsius */
17348f4d979SBrian Norris				type = "critical";
17448f4d979SBrian Norris			};
17548f4d979SBrian Norris		};
17648f4d979SBrian Norris	};
17748f4d979SBrian Norris};
17848f4d979SBrian Norris
17948f4d979SBrian Norrisap_i2c_tpm: &i2c0 {
18048f4d979SBrian Norris	status = "okay";
18148f4d979SBrian Norris
18248f4d979SBrian Norris	clock-frequency = <400000>;
18348f4d979SBrian Norris
18448f4d979SBrian Norris	/* These are relatively safe rise/fall times. */
18548f4d979SBrian Norris	i2c-scl-falling-time-ns = <50>;
18648f4d979SBrian Norris	i2c-scl-rising-time-ns = <300>;
18748f4d979SBrian Norris
18848f4d979SBrian Norris	tpm: tpm@20 {
18948f4d979SBrian Norris		compatible = "infineon,slb9645tt";
19048f4d979SBrian Norris		reg = <0x20>;
19148f4d979SBrian Norris		powered-while-suspended;
19248f4d979SBrian Norris	};
19348f4d979SBrian Norris};
19448f4d979SBrian Norris
19548f4d979SBrian Norrisap_i2c_dig: &i2c2 {
19648f4d979SBrian Norris	status = "okay";
19748f4d979SBrian Norris
19848f4d979SBrian Norris	clock-frequency = <400000>;
19948f4d979SBrian Norris
20048f4d979SBrian Norris	/* These are relatively safe rise/fall times. */
20148f4d979SBrian Norris	i2c-scl-falling-time-ns = <50>;
20248f4d979SBrian Norris	i2c-scl-rising-time-ns = <300>;
20348f4d979SBrian Norris
20448f4d979SBrian Norris	digitizer: digitizer@9 {
205b9ed79faSBrian Norris		/* wacom,w9013 */
20648f4d979SBrian Norris		compatible = "hid-over-i2c";
20748f4d979SBrian Norris		reg = <0x9>;
20848f4d979SBrian Norris		pinctrl-names = "default";
20948f4d979SBrian Norris		pinctrl-0 = <&cpu1_dig_irq_l &cpu1_dig_pdct_l>;
21048f4d979SBrian Norris
211b9ed79faSBrian Norris		vdd-supply = <&p3_3v_dig>;
212b9ed79faSBrian Norris		post-power-on-delay-ms = <100>;
213b9ed79faSBrian Norris
21448f4d979SBrian Norris		interrupt-parent = <&gpio2>;
21548f4d979SBrian Norris		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
21648f4d979SBrian Norris
21748f4d979SBrian Norris		hid-descr-addr = <0x1>;
21848f4d979SBrian Norris	};
21948f4d979SBrian Norris};
22048f4d979SBrian Norris
22148f4d979SBrian Norris/* Adjustments to things in the gru baseboard */
22248f4d979SBrian Norris
22348f4d979SBrian Norris&ap_i2c_tp {
22448f4d979SBrian Norris	trackpad@4a {
2255041bb82SDmitry Torokhov		compatible = "atmel,maxtouch";
22648f4d979SBrian Norris		reg = <0x4a>;
22748f4d979SBrian Norris		pinctrl-names = "default";
22848f4d979SBrian Norris		pinctrl-0 = <&trackpad_int_l>;
22948f4d979SBrian Norris		interrupt-parent = <&gpio1>;
23048f4d979SBrian Norris		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
231aef56580SEmil Renner Berthing		linux,gpio-keymap = <KEY_RESERVED
232aef56580SEmil Renner Berthing				     KEY_RESERVED
233aef56580SEmil Renner Berthing				     KEY_RESERVED
234aef56580SEmil Renner Berthing				     BTN_LEFT>;
23548f4d979SBrian Norris		wakeup-source;
23648f4d979SBrian Norris	};
23748f4d979SBrian Norris};
23848f4d979SBrian Norris
23948f4d979SBrian Norris&ap_i2c_ts {
24048f4d979SBrian Norris	touchscreen@4b {
2415041bb82SDmitry Torokhov		compatible = "atmel,maxtouch";
24248f4d979SBrian Norris		reg = <0x4b>;
24348f4d979SBrian Norris		pinctrl-names = "default";
24448f4d979SBrian Norris		pinctrl-0 = <&touch_int_l>;
24548f4d979SBrian Norris		interrupt-parent = <&gpio3>;
24648f4d979SBrian Norris		interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
24748f4d979SBrian Norris	};
24848f4d979SBrian Norris};
24948f4d979SBrian Norris
2506f07176fSMatthias Kaehlcke&ppvar_bigcpu_pwm {
2516f07176fSMatthias Kaehlcke	regulator-min-microvolt = <798674>;
2526f07176fSMatthias Kaehlcke	regulator-max-microvolt = <1302172>;
2536f07176fSMatthias Kaehlcke};
2546f07176fSMatthias Kaehlcke
2552fb634deSMatthias Kaehlcke&ppvar_bigcpu {
2562fb634deSMatthias Kaehlcke	regulator-min-microvolt = <798674>;
2572fb634deSMatthias Kaehlcke	regulator-max-microvolt = <1302172>;
2586f07176fSMatthias Kaehlcke	ctrl-voltage-range = <798674 1302172>;
2596f07176fSMatthias Kaehlcke};
2606f07176fSMatthias Kaehlcke
2616f07176fSMatthias Kaehlcke&ppvar_litcpu_pwm {
2626f07176fSMatthias Kaehlcke	regulator-min-microvolt = <799065>;
2636f07176fSMatthias Kaehlcke	regulator-max-microvolt = <1303738>;
2642fb634deSMatthias Kaehlcke};
2652fb634deSMatthias Kaehlcke
2662fb634deSMatthias Kaehlcke&ppvar_litcpu {
2672fb634deSMatthias Kaehlcke	regulator-min-microvolt = <799065>;
2682fb634deSMatthias Kaehlcke	regulator-max-microvolt = <1303738>;
2696f07176fSMatthias Kaehlcke	ctrl-voltage-range = <799065 1303738>;
2706f07176fSMatthias Kaehlcke};
2716f07176fSMatthias Kaehlcke
2726f07176fSMatthias Kaehlcke&ppvar_gpu_pwm {
2736f07176fSMatthias Kaehlcke	regulator-min-microvolt = <785782>;
2746f07176fSMatthias Kaehlcke	regulator-max-microvolt = <1217729>;
2752fb634deSMatthias Kaehlcke};
2762fb634deSMatthias Kaehlcke
2772fb634deSMatthias Kaehlcke&ppvar_gpu {
2782fb634deSMatthias Kaehlcke	regulator-min-microvolt = <785782>;
2792fb634deSMatthias Kaehlcke	regulator-max-microvolt = <1217729>;
2806f07176fSMatthias Kaehlcke	ctrl-voltage-range = <785782 1217729>;
2816f07176fSMatthias Kaehlcke};
2826f07176fSMatthias Kaehlcke
2836f07176fSMatthias Kaehlcke&ppvar_centerlogic_pwm {
2846f07176fSMatthias Kaehlcke	regulator-min-microvolt = <800069>;
2856f07176fSMatthias Kaehlcke	regulator-max-microvolt = <1049692>;
2862fb634deSMatthias Kaehlcke};
2872fb634deSMatthias Kaehlcke
2882fb634deSMatthias Kaehlcke&ppvar_centerlogic {
2892fb634deSMatthias Kaehlcke	regulator-min-microvolt = <800069>;
2902fb634deSMatthias Kaehlcke	regulator-max-microvolt = <1049692>;
2916f07176fSMatthias Kaehlcke	ctrl-voltage-range = <800069 1049692>;
2922fb634deSMatthias Kaehlcke};
2932fb634deSMatthias Kaehlcke
29448f4d979SBrian Norris&saradc {
29548f4d979SBrian Norris	status = "okay";
29648f4d979SBrian Norris	vref-supply = <&pp1800_ap_io>;
29748f4d979SBrian Norris};
29848f4d979SBrian Norris
29948f4d979SBrian Norris&mvl_wifi {
30048f4d979SBrian Norris	marvell,wakeup-pin = <14>; /* GPIO_14 on Marvell */
30148f4d979SBrian Norris};
30248f4d979SBrian Norris
30348f4d979SBrian Norris&pinctrl {
30448f4d979SBrian Norris	digitizer {
30548f4d979SBrian Norris		/* Has external pullup */
30648f4d979SBrian Norris		cpu1_dig_irq_l: cpu1-dig-irq-l {
307d64420e8SHeiko Stuebner			rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
30848f4d979SBrian Norris		};
30948f4d979SBrian Norris
31048f4d979SBrian Norris		/* Has external pullup */
31148f4d979SBrian Norris		cpu1_dig_pdct_l: cpu1-dig-pdct-l {
312d64420e8SHeiko Stuebner			rockchip,pins = <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
31348f4d979SBrian Norris		};
31448f4d979SBrian Norris	};
31548f4d979SBrian Norris
31648f4d979SBrian Norris	discrete-regulators {
31748f4d979SBrian Norris		cpu3_pen_pwr_en: cpu3-pen-pwr-en {
318d64420e8SHeiko Stuebner			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
31948f4d979SBrian Norris		};
32048f4d979SBrian Norris	};
32148f4d979SBrian Norris
32248f4d979SBrian Norris	pen {
32348f4d979SBrian Norris		cpu1_pen_eject: cpu1-pen-eject {
324d64420e8SHeiko Stuebner			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
32548f4d979SBrian Norris		};
32648f4d979SBrian Norris	};
32748f4d979SBrian Norris};
328