xref: /openbmc/linux/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts (revision 6f07176fc36c0ad51877a07c99bb04f29d96aced)
148f4d979SBrian Norris/*
248f4d979SBrian Norris * Google Gru-Kevin Rev 6+ board device tree source
348f4d979SBrian Norris *
448f4d979SBrian Norris * Copyright 2016-2017 Google, Inc
548f4d979SBrian Norris *
648f4d979SBrian Norris * This file is dual-licensed: you can use it either under the terms
748f4d979SBrian Norris * of the GPL or the X11 license, at your option. Note that this dual
848f4d979SBrian Norris * licensing only applies to this file, and not this project as a
948f4d979SBrian Norris * whole.
1048f4d979SBrian Norris *
1148f4d979SBrian Norris *  a) This file is free software; you can redistribute it and/or
1248f4d979SBrian Norris *     modify it under the terms of the GNU General Public License as
1348f4d979SBrian Norris *     published by the Free Software Foundation; either version 2 of the
1448f4d979SBrian Norris *     License, or (at your option) any later version.
1548f4d979SBrian Norris *
1648f4d979SBrian Norris *     This file is distributed in the hope that it will be useful,
1748f4d979SBrian Norris *     but WITHOUT ANY WARRANTY; without even the implied warranty of
1848f4d979SBrian Norris *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1948f4d979SBrian Norris *     GNU General Public License for more details.
2048f4d979SBrian Norris *
2148f4d979SBrian Norris *  Or, alternatively,
2248f4d979SBrian Norris *
2348f4d979SBrian Norris *  b) Permission is hereby granted, free of charge, to any person
2448f4d979SBrian Norris *     obtaining a copy of this software and associated documentation
2548f4d979SBrian Norris *     files (the "Software"), to deal in the Software without
2648f4d979SBrian Norris *     restriction, including without limitation the rights to use,
2748f4d979SBrian Norris *     copy, modify, merge, publish, distribute, sublicense, and/or
2848f4d979SBrian Norris *     sell copies of the Software, and to permit persons to whom the
2948f4d979SBrian Norris *     Software is furnished to do so, subject to the following
3048f4d979SBrian Norris *     conditions:
3148f4d979SBrian Norris *
3248f4d979SBrian Norris *     The above copyright notice and this permission notice shall be
3348f4d979SBrian Norris *     included in all copies or substantial portions of the Software.
3448f4d979SBrian Norris *
3548f4d979SBrian Norris *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3648f4d979SBrian Norris *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3748f4d979SBrian Norris *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3848f4d979SBrian Norris *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3948f4d979SBrian Norris *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4048f4d979SBrian Norris *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4148f4d979SBrian Norris *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4248f4d979SBrian Norris *     OTHER DEALINGS IN THE SOFTWARE.
4348f4d979SBrian Norris */
4448f4d979SBrian Norris
4548f4d979SBrian Norris/dts-v1/;
4648f4d979SBrian Norris#include "rk3399-gru.dtsi"
476bf1c2d2SArnd Bergmann#include <dt-bindings/input/linux-event-codes.h>
4848f4d979SBrian Norris
4948f4d979SBrian Norris/*
5048f4d979SBrian Norris * Kevin-specific things
5148f4d979SBrian Norris *
5248f4d979SBrian Norris * Things in this section should use names from Kevin schematic since no
5348f4d979SBrian Norris * equivalent exists in Gru schematic.  If referring to signals that exist
5448f4d979SBrian Norris * in Gru we use the Gru names, though.  Confusing enough for you?
5548f4d979SBrian Norris */
5648f4d979SBrian Norris/ {
5748f4d979SBrian Norris	model = "Google Kevin";
5848f4d979SBrian Norris	compatible = "google,kevin-rev15", "google,kevin-rev14",
5948f4d979SBrian Norris		     "google,kevin-rev13", "google,kevin-rev12",
6048f4d979SBrian Norris		     "google,kevin-rev11", "google,kevin-rev10",
6148f4d979SBrian Norris		     "google,kevin-rev9", "google,kevin-rev8",
6248f4d979SBrian Norris		     "google,kevin-rev7", "google,kevin-rev6",
6348f4d979SBrian Norris		     "google,kevin", "google,gru", "rockchip,rk3399";
6448f4d979SBrian Norris
6548f4d979SBrian Norris	/* Power tree */
6648f4d979SBrian Norris
6748f4d979SBrian Norris	p3_3v_dig: p3-3v-dig {
6848f4d979SBrian Norris		compatible = "regulator-fixed";
6948f4d979SBrian Norris		regulator-name = "p3.3v_dig";
7048f4d979SBrian Norris		pinctrl-names = "default";
7148f4d979SBrian Norris		pinctrl-0 = <&cpu3_pen_pwr_en>;
7248f4d979SBrian Norris
7348f4d979SBrian Norris		enable-active-high;
7448f4d979SBrian Norris		gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
7548f4d979SBrian Norris		vin-supply = <&pp3300>;
7648f4d979SBrian Norris	};
7748f4d979SBrian Norris
7848f4d979SBrian Norris	backlight: backlight {
7948f4d979SBrian Norris		compatible = "pwm-backlight";
8048f4d979SBrian Norris		pwms = <&cros_ec_pwm 1>;
8148f4d979SBrian Norris		brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
8248f4d979SBrian Norris				     17 18 19 20 21 22 23 24 25 26 27 28 29 30
8348f4d979SBrian Norris				     31 32 33 34 35 36 37 38 39 40 41 42 43 44
8448f4d979SBrian Norris				     45 46 47 48 49 50 51 52 53 54 55 56 57 58
8548f4d979SBrian Norris				     59 60 61 62 63 64 65 66 67 68 69 70 71 72
8648f4d979SBrian Norris				     73 74 75 76 77 78 79 80 81 82 83 84 85 86
8748f4d979SBrian Norris				     87 88 89 90 91 92 93 94 95 96 97 98 99 100>;
8848f4d979SBrian Norris		default-brightness-level = <51>;
8948f4d979SBrian Norris		enable-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
9048f4d979SBrian Norris		power-supply = <&pp3300_disp>;
9148f4d979SBrian Norris		pinctrl-names = "default";
9248f4d979SBrian Norris		pinctrl-0 = <&bl_en>;
9348f4d979SBrian Norris		pwm-delay-us = <10000>;
9448f4d979SBrian Norris	};
9548f4d979SBrian Norris
9648f4d979SBrian Norris	thermistor_ppvar_bigcpu: thermistor-ppvar-bigcpu {
9748f4d979SBrian Norris		compatible = "murata,ncp15wb473";
9848f4d979SBrian Norris		pullup-uv = <1800000>;
9948f4d979SBrian Norris		pullup-ohm = <25500>;
10048f4d979SBrian Norris		pulldown-ohm = <0>;
10148f4d979SBrian Norris		io-channels = <&saradc 2>;
10248f4d979SBrian Norris		#thermal-sensor-cells = <0>;
10348f4d979SBrian Norris	};
10448f4d979SBrian Norris
10548f4d979SBrian Norris	thermistor_ppvar_litcpu: thermistor-ppvar-litcpu {
10648f4d979SBrian Norris		compatible = "murata,ncp15wb473";
10748f4d979SBrian Norris		pullup-uv = <1800000>;
10848f4d979SBrian Norris		pullup-ohm = <25500>;
10948f4d979SBrian Norris		pulldown-ohm = <0>;
11048f4d979SBrian Norris		io-channels = <&saradc 3>;
11148f4d979SBrian Norris		#thermal-sensor-cells = <0>;
11248f4d979SBrian Norris	};
11348f4d979SBrian Norris};
11448f4d979SBrian Norris
11548f4d979SBrian Norris&gpio_keys {
11648f4d979SBrian Norris	pinctrl-names = "default";
11748f4d979SBrian Norris	pinctrl-0 = <&bt_host_wake_l>, <&cpu1_pen_eject>;
11848f4d979SBrian Norris
11948f4d979SBrian Norris	pen-insert {
12048f4d979SBrian Norris		label = "Pen Insert";
12148f4d979SBrian Norris		/* Insert = low, eject = high */
12248f4d979SBrian Norris		gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
12348f4d979SBrian Norris		linux,code = <SW_PEN_INSERTED>;
12448f4d979SBrian Norris		linux,input-type = <EV_SW>;
12548f4d979SBrian Norris		wakeup-source;
12648f4d979SBrian Norris	};
12748f4d979SBrian Norris};
12848f4d979SBrian Norris
12948f4d979SBrian Norris&thermal_zones {
13048f4d979SBrian Norris	bigcpu_reg_thermal: bigcpu-reg-thermal {
13148f4d979SBrian Norris		polling-delay-passive = <100>; /* milliseconds */
13248f4d979SBrian Norris		polling-delay = <1000>; /* milliseconds */
13348f4d979SBrian Norris		thermal-sensors = <&thermistor_ppvar_bigcpu 0>;
13448f4d979SBrian Norris		sustainable-power = <4000>;
13548f4d979SBrian Norris
13648f4d979SBrian Norris		ppvar_bigcpu_trips: trips {
13748f4d979SBrian Norris			ppvar_bigcpu_on: ppvar-bigcpu-on {
13848f4d979SBrian Norris				temperature = <40000>;	/* millicelsius */
13948f4d979SBrian Norris				hysteresis = <2000>;	/* millicelsius */
14048f4d979SBrian Norris				type = "passive";
14148f4d979SBrian Norris			};
14248f4d979SBrian Norris
14348f4d979SBrian Norris			ppvar_bigcpu_alert: ppvar-bigcpu-alert {
14448f4d979SBrian Norris				temperature = <50000>;	/* millicelsius */
14548f4d979SBrian Norris				hysteresis = <2000>;	/* millicelsius */
14648f4d979SBrian Norris				type = "passive";
14748f4d979SBrian Norris			};
14848f4d979SBrian Norris
14948f4d979SBrian Norris			ppvar_bigcpu_crit: ppvar-bigcpu-crit {
15048f4d979SBrian Norris				temperature = <90000>;	/* millicelsius */
15148f4d979SBrian Norris				hysteresis = <0>;	/* millicelsius */
15248f4d979SBrian Norris				type = "critical";
15348f4d979SBrian Norris			};
15448f4d979SBrian Norris		};
15548f4d979SBrian Norris
15648f4d979SBrian Norris		cooling-maps {
15748f4d979SBrian Norris			map0 {
15848f4d979SBrian Norris				trip = <&ppvar_bigcpu_alert>;
15948f4d979SBrian Norris				cooling-device =
16048f4d979SBrian Norris					<&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
16148f4d979SBrian Norris				contribution = <4096>;
16248f4d979SBrian Norris			};
16348f4d979SBrian Norris			map1 {
16448f4d979SBrian Norris				trip = <&ppvar_bigcpu_alert>;
16548f4d979SBrian Norris				cooling-device =
16648f4d979SBrian Norris					<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
16748f4d979SBrian Norris				contribution = <1024>;
16848f4d979SBrian Norris			};
16948f4d979SBrian Norris		};
17048f4d979SBrian Norris	};
17148f4d979SBrian Norris
17248f4d979SBrian Norris	litcpu_reg_thermal: litcpu-reg-thermal {
17348f4d979SBrian Norris		polling-delay-passive = <100>; /* milliseconds */
17448f4d979SBrian Norris		polling-delay = <1000>; /* milliseconds */
17548f4d979SBrian Norris		thermal-sensors = <&thermistor_ppvar_litcpu 0>;
17648f4d979SBrian Norris		sustainable-power = <4000>;
17748f4d979SBrian Norris
17848f4d979SBrian Norris		ppvar_litcpu_trips: trips {
17948f4d979SBrian Norris			ppvar_litcpu_on: ppvar-litcpu-on {
18048f4d979SBrian Norris				temperature = <40000>;	/* millicelsius */
18148f4d979SBrian Norris				hysteresis = <2000>;	/* millicelsius */
18248f4d979SBrian Norris				type = "passive";
18348f4d979SBrian Norris			};
18448f4d979SBrian Norris
18548f4d979SBrian Norris			ppvar_litcpu_alert: ppvar-litcpu-alert {
18648f4d979SBrian Norris				temperature = <50000>;	/* millicelsius */
18748f4d979SBrian Norris				hysteresis = <2000>;	/* millicelsius */
18848f4d979SBrian Norris				type = "passive";
18948f4d979SBrian Norris			};
19048f4d979SBrian Norris
19148f4d979SBrian Norris			ppvar_litcpu_crit: ppvar-litcpu-crit {
19248f4d979SBrian Norris				temperature = <90000>;	/* millicelsius */
19348f4d979SBrian Norris				hysteresis = <0>;	/* millicelsius */
19448f4d979SBrian Norris				type = "critical";
19548f4d979SBrian Norris			};
19648f4d979SBrian Norris		};
19748f4d979SBrian Norris	};
19848f4d979SBrian Norris};
19948f4d979SBrian Norris
20048f4d979SBrian Norrisap_i2c_tpm: &i2c0 {
20148f4d979SBrian Norris	status = "okay";
20248f4d979SBrian Norris
20348f4d979SBrian Norris	clock-frequency = <400000>;
20448f4d979SBrian Norris
20548f4d979SBrian Norris	/* These are relatively safe rise/fall times. */
20648f4d979SBrian Norris	i2c-scl-falling-time-ns = <50>;
20748f4d979SBrian Norris	i2c-scl-rising-time-ns = <300>;
20848f4d979SBrian Norris
20948f4d979SBrian Norris	tpm: tpm@20 {
21048f4d979SBrian Norris		compatible = "infineon,slb9645tt";
21148f4d979SBrian Norris		reg = <0x20>;
21248f4d979SBrian Norris		powered-while-suspended;
21348f4d979SBrian Norris	};
21448f4d979SBrian Norris};
21548f4d979SBrian Norris
21648f4d979SBrian Norrisap_i2c_dig: &i2c2 {
21748f4d979SBrian Norris	status = "okay";
21848f4d979SBrian Norris
21948f4d979SBrian Norris	clock-frequency = <400000>;
22048f4d979SBrian Norris
22148f4d979SBrian Norris	/* These are relatively safe rise/fall times. */
22248f4d979SBrian Norris	i2c-scl-falling-time-ns = <50>;
22348f4d979SBrian Norris	i2c-scl-rising-time-ns = <300>;
22448f4d979SBrian Norris
22548f4d979SBrian Norris	digitizer: digitizer@9 {
226b9ed79faSBrian Norris		/* wacom,w9013 */
22748f4d979SBrian Norris		compatible = "hid-over-i2c";
22848f4d979SBrian Norris		reg = <0x9>;
22948f4d979SBrian Norris		pinctrl-names = "default";
23048f4d979SBrian Norris		pinctrl-0 = <&cpu1_dig_irq_l &cpu1_dig_pdct_l>;
23148f4d979SBrian Norris
232b9ed79faSBrian Norris		vdd-supply = <&p3_3v_dig>;
233b9ed79faSBrian Norris		post-power-on-delay-ms = <100>;
234b9ed79faSBrian Norris
23548f4d979SBrian Norris		interrupt-parent = <&gpio2>;
23648f4d979SBrian Norris		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
23748f4d979SBrian Norris
23848f4d979SBrian Norris		hid-descr-addr = <0x1>;
23948f4d979SBrian Norris	};
24048f4d979SBrian Norris};
24148f4d979SBrian Norris
24248f4d979SBrian Norris/* Adjustments to things in the gru baseboard */
24348f4d979SBrian Norris
24448f4d979SBrian Norris&ap_i2c_tp {
24548f4d979SBrian Norris	trackpad@4a {
24648f4d979SBrian Norris		compatible = "atmel,atmel_mxt_tp";
24748f4d979SBrian Norris		reg = <0x4a>;
24848f4d979SBrian Norris		pinctrl-names = "default";
24948f4d979SBrian Norris		pinctrl-0 = <&trackpad_int_l>;
25048f4d979SBrian Norris		interrupt-parent = <&gpio1>;
25148f4d979SBrian Norris		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
25248f4d979SBrian Norris		wakeup-source;
25348f4d979SBrian Norris	};
25448f4d979SBrian Norris};
25548f4d979SBrian Norris
25648f4d979SBrian Norris&ap_i2c_ts {
25748f4d979SBrian Norris	touchscreen@4b {
25848f4d979SBrian Norris		compatible = "atmel,atmel_mxt_ts";
25948f4d979SBrian Norris		reg = <0x4b>;
26048f4d979SBrian Norris		pinctrl-names = "default";
26148f4d979SBrian Norris		pinctrl-0 = <&touch_int_l>;
26248f4d979SBrian Norris		interrupt-parent = <&gpio3>;
26348f4d979SBrian Norris		interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
26448f4d979SBrian Norris	};
26548f4d979SBrian Norris};
26648f4d979SBrian Norris
267*6f07176fSMatthias Kaehlcke&ppvar_bigcpu_pwm {
268*6f07176fSMatthias Kaehlcke	regulator-min-microvolt = <798674>;
269*6f07176fSMatthias Kaehlcke	regulator-max-microvolt = <1302172>;
270*6f07176fSMatthias Kaehlcke};
271*6f07176fSMatthias Kaehlcke
2722fb634deSMatthias Kaehlcke&ppvar_bigcpu {
2732fb634deSMatthias Kaehlcke	regulator-min-microvolt = <798674>;
2742fb634deSMatthias Kaehlcke	regulator-max-microvolt = <1302172>;
275*6f07176fSMatthias Kaehlcke	ctrl-voltage-range = <798674 1302172>;
276*6f07176fSMatthias Kaehlcke};
277*6f07176fSMatthias Kaehlcke
278*6f07176fSMatthias Kaehlcke&ppvar_litcpu_pwm {
279*6f07176fSMatthias Kaehlcke	regulator-min-microvolt = <799065>;
280*6f07176fSMatthias Kaehlcke	regulator-max-microvolt = <1303738>;
2812fb634deSMatthias Kaehlcke};
2822fb634deSMatthias Kaehlcke
2832fb634deSMatthias Kaehlcke&ppvar_litcpu {
2842fb634deSMatthias Kaehlcke	regulator-min-microvolt = <799065>;
2852fb634deSMatthias Kaehlcke	regulator-max-microvolt = <1303738>;
286*6f07176fSMatthias Kaehlcke	ctrl-voltage-range = <799065 1303738>;
287*6f07176fSMatthias Kaehlcke};
288*6f07176fSMatthias Kaehlcke
289*6f07176fSMatthias Kaehlcke&ppvar_gpu_pwm {
290*6f07176fSMatthias Kaehlcke	regulator-min-microvolt = <785782>;
291*6f07176fSMatthias Kaehlcke	regulator-max-microvolt = <1217729>;
2922fb634deSMatthias Kaehlcke};
2932fb634deSMatthias Kaehlcke
2942fb634deSMatthias Kaehlcke&ppvar_gpu {
2952fb634deSMatthias Kaehlcke	regulator-min-microvolt = <785782>;
2962fb634deSMatthias Kaehlcke	regulator-max-microvolt = <1217729>;
297*6f07176fSMatthias Kaehlcke	ctrl-voltage-range = <785782 1217729>;
298*6f07176fSMatthias Kaehlcke};
299*6f07176fSMatthias Kaehlcke
300*6f07176fSMatthias Kaehlcke&ppvar_centerlogic_pwm {
301*6f07176fSMatthias Kaehlcke	regulator-min-microvolt = <800069>;
302*6f07176fSMatthias Kaehlcke	regulator-max-microvolt = <1049692>;
3032fb634deSMatthias Kaehlcke};
3042fb634deSMatthias Kaehlcke
3052fb634deSMatthias Kaehlcke&ppvar_centerlogic {
3062fb634deSMatthias Kaehlcke	regulator-min-microvolt = <800069>;
3072fb634deSMatthias Kaehlcke	regulator-max-microvolt = <1049692>;
308*6f07176fSMatthias Kaehlcke	ctrl-voltage-range = <800069 1049692>;
3092fb634deSMatthias Kaehlcke};
3102fb634deSMatthias Kaehlcke
31148f4d979SBrian Norris&saradc {
31248f4d979SBrian Norris	status = "okay";
31348f4d979SBrian Norris	vref-supply = <&pp1800_ap_io>;
31448f4d979SBrian Norris};
31548f4d979SBrian Norris
31648f4d979SBrian Norris&mvl_wifi {
31748f4d979SBrian Norris	marvell,wakeup-pin = <14>; /* GPIO_14 on Marvell */
31848f4d979SBrian Norris};
31948f4d979SBrian Norris
32048f4d979SBrian Norris&pinctrl {
32148f4d979SBrian Norris	digitizer {
32248f4d979SBrian Norris		/* Has external pullup */
32348f4d979SBrian Norris		cpu1_dig_irq_l: cpu1-dig-irq-l {
32448f4d979SBrian Norris			rockchip,pins = <2 4 RK_FUNC_GPIO &pcfg_pull_none>;
32548f4d979SBrian Norris		};
32648f4d979SBrian Norris
32748f4d979SBrian Norris		/* Has external pullup */
32848f4d979SBrian Norris		cpu1_dig_pdct_l: cpu1-dig-pdct-l {
32948f4d979SBrian Norris			rockchip,pins = <2 5 RK_FUNC_GPIO &pcfg_pull_none>;
33048f4d979SBrian Norris		};
33148f4d979SBrian Norris	};
33248f4d979SBrian Norris
33348f4d979SBrian Norris	discrete-regulators {
33448f4d979SBrian Norris		cpu3_pen_pwr_en: cpu3-pen-pwr-en {
33548f4d979SBrian Norris			rockchip,pins = <4 30 RK_FUNC_GPIO &pcfg_pull_none>;
33648f4d979SBrian Norris		};
33748f4d979SBrian Norris	};
33848f4d979SBrian Norris
33948f4d979SBrian Norris	pen {
34048f4d979SBrian Norris		cpu1_pen_eject: cpu1-pen-eject {
34148f4d979SBrian Norris			rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_up>;
34248f4d979SBrian Norris		};
34348f4d979SBrian Norris	};
34448f4d979SBrian Norris
34548f4d979SBrian Norris	wifi {
34648f4d979SBrian Norris		wlan_host_wake_l: wlan-host-wake-l {
34748f4d979SBrian Norris			rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_none>;
34848f4d979SBrian Norris		};
34948f4d979SBrian Norris	};
35048f4d979SBrian Norris};
351