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"; 27263b39bcSArnaud Ferraris chassis-type = "convertible"; 2848f4d979SBrian Norris 2948f4d979SBrian Norris /* Power tree */ 3048f4d979SBrian Norris 3148f4d979SBrian Norris p3_3v_dig: p3-3v-dig { 3248f4d979SBrian Norris compatible = "regulator-fixed"; 3348f4d979SBrian Norris regulator-name = "p3.3v_dig"; 3448f4d979SBrian Norris pinctrl-names = "default"; 3548f4d979SBrian Norris pinctrl-0 = <&cpu3_pen_pwr_en>; 3648f4d979SBrian Norris 3748f4d979SBrian Norris enable-active-high; 3848f4d979SBrian Norris gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>; 3948f4d979SBrian Norris vin-supply = <&pp3300>; 4048f4d979SBrian Norris }; 4148f4d979SBrian Norris 42926be875SJeffy Chen edp_panel: edp-panel { 4362b5efc9SRob Herring compatible = "sharp,lq123p1jx31"; 44926be875SJeffy Chen backlight = <&backlight>; 45926be875SJeffy Chen power-supply = <&pp3300_disp>; 46926be875SJeffy Chen 4784ebd2daSSean Paul panel-timing { 48a9082575SDouglas Anderson clock-frequency = <266666667>; 4984ebd2daSSean Paul hactive = <2400>; 5084ebd2daSSean Paul hfront-porch = <48>; 5184ebd2daSSean Paul hback-porch = <84>; 5284ebd2daSSean Paul hsync-len = <32>; 5384ebd2daSSean Paul hsync-active = <0>; 5484ebd2daSSean Paul vactive = <1600>; 5584ebd2daSSean Paul vfront-porch = <3>; 5684ebd2daSSean Paul vback-porch = <120>; 5784ebd2daSSean Paul vsync-len = <10>; 5884ebd2daSSean Paul vsync-active = <0>; 5984ebd2daSSean Paul }; 6084ebd2daSSean Paul 6126cd8657SEnric Balletbo i Serra port { 62926be875SJeffy Chen panel_in_edp: endpoint { 63926be875SJeffy Chen remote-endpoint = <&edp_out_panel>; 64926be875SJeffy Chen }; 65926be875SJeffy Chen }; 66926be875SJeffy Chen }; 67926be875SJeffy Chen 6848f4d979SBrian Norris thermistor_ppvar_bigcpu: thermistor-ppvar-bigcpu { 6948f4d979SBrian Norris compatible = "murata,ncp15wb473"; 7048f4d979SBrian Norris pullup-uv = <1800000>; 7148f4d979SBrian Norris pullup-ohm = <25500>; 7248f4d979SBrian Norris pulldown-ohm = <0>; 7348f4d979SBrian Norris io-channels = <&saradc 2>; 7448f4d979SBrian Norris #thermal-sensor-cells = <0>; 7548f4d979SBrian Norris }; 7648f4d979SBrian Norris 7748f4d979SBrian Norris thermistor_ppvar_litcpu: thermistor-ppvar-litcpu { 7848f4d979SBrian Norris compatible = "murata,ncp15wb473"; 7948f4d979SBrian Norris pullup-uv = <1800000>; 8048f4d979SBrian Norris pullup-ohm = <25500>; 8148f4d979SBrian Norris pulldown-ohm = <0>; 8248f4d979SBrian Norris io-channels = <&saradc 3>; 8348f4d979SBrian Norris #thermal-sensor-cells = <0>; 8448f4d979SBrian Norris }; 8548f4d979SBrian Norris}; 8648f4d979SBrian Norris 87d67a38c5SHeiko Stuebner&backlight { 88d67a38c5SHeiko Stuebner pwms = <&cros_ec_pwm 1>; 89d67a38c5SHeiko Stuebner}; 90d67a38c5SHeiko Stuebner 9148f4d979SBrian Norris&gpio_keys { 9248f4d979SBrian Norris pinctrl-names = "default"; 9348f4d979SBrian Norris pinctrl-0 = <&bt_host_wake_l>, <&cpu1_pen_eject>; 9448f4d979SBrian Norris 95*517ed0ffSKrzysztof Kozlowski switch-pen-insert { 9648f4d979SBrian Norris label = "Pen Insert"; 9748f4d979SBrian Norris /* Insert = low, eject = high */ 9848f4d979SBrian Norris gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; 9948f4d979SBrian Norris linux,code = <SW_PEN_INSERTED>; 10048f4d979SBrian Norris linux,input-type = <EV_SW>; 10148f4d979SBrian Norris wakeup-source; 10248f4d979SBrian Norris }; 10348f4d979SBrian Norris}; 10448f4d979SBrian Norris 10548f4d979SBrian Norris&thermal_zones { 10648f4d979SBrian Norris bigcpu_reg_thermal: bigcpu-reg-thermal { 10748f4d979SBrian Norris polling-delay-passive = <100>; /* milliseconds */ 10848f4d979SBrian Norris polling-delay = <1000>; /* milliseconds */ 10948f4d979SBrian Norris thermal-sensors = <&thermistor_ppvar_bigcpu 0>; 11048f4d979SBrian Norris sustainable-power = <4000>; 11148f4d979SBrian Norris 11248f4d979SBrian Norris ppvar_bigcpu_trips: trips { 11348f4d979SBrian Norris ppvar_bigcpu_on: ppvar-bigcpu-on { 11448f4d979SBrian Norris temperature = <40000>; /* millicelsius */ 11548f4d979SBrian Norris hysteresis = <2000>; /* millicelsius */ 11648f4d979SBrian Norris type = "passive"; 11748f4d979SBrian Norris }; 11848f4d979SBrian Norris 11948f4d979SBrian Norris ppvar_bigcpu_alert: ppvar-bigcpu-alert { 12048f4d979SBrian Norris temperature = <50000>; /* millicelsius */ 12148f4d979SBrian Norris hysteresis = <2000>; /* millicelsius */ 12248f4d979SBrian Norris type = "passive"; 12348f4d979SBrian Norris }; 12448f4d979SBrian Norris 12548f4d979SBrian Norris ppvar_bigcpu_crit: ppvar-bigcpu-crit { 12648f4d979SBrian Norris temperature = <90000>; /* millicelsius */ 12748f4d979SBrian Norris hysteresis = <0>; /* millicelsius */ 12848f4d979SBrian Norris type = "critical"; 12948f4d979SBrian Norris }; 13048f4d979SBrian Norris }; 13148f4d979SBrian Norris 13248f4d979SBrian Norris cooling-maps { 13348f4d979SBrian Norris map0 { 13448f4d979SBrian Norris trip = <&ppvar_bigcpu_alert>; 13548f4d979SBrian Norris cooling-device = 136cdd46460SViresh Kumar <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 137cdd46460SViresh Kumar <&cpu_l1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 138cdd46460SViresh Kumar <&cpu_l2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 139cdd46460SViresh Kumar <&cpu_l3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 14048f4d979SBrian Norris contribution = <4096>; 14148f4d979SBrian Norris }; 14248f4d979SBrian Norris map1 { 14348f4d979SBrian Norris trip = <&ppvar_bigcpu_alert>; 14448f4d979SBrian Norris cooling-device = 145cdd46460SViresh Kumar <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 146cdd46460SViresh Kumar <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 14748f4d979SBrian Norris contribution = <1024>; 14848f4d979SBrian Norris }; 14948f4d979SBrian Norris }; 15048f4d979SBrian Norris }; 15148f4d979SBrian Norris 15248f4d979SBrian Norris litcpu_reg_thermal: litcpu-reg-thermal { 15348f4d979SBrian Norris polling-delay-passive = <100>; /* milliseconds */ 15448f4d979SBrian Norris polling-delay = <1000>; /* milliseconds */ 15548f4d979SBrian Norris thermal-sensors = <&thermistor_ppvar_litcpu 0>; 15648f4d979SBrian Norris sustainable-power = <4000>; 15748f4d979SBrian Norris 15848f4d979SBrian Norris ppvar_litcpu_trips: trips { 15948f4d979SBrian Norris ppvar_litcpu_on: ppvar-litcpu-on { 16048f4d979SBrian Norris temperature = <40000>; /* millicelsius */ 16148f4d979SBrian Norris hysteresis = <2000>; /* millicelsius */ 16248f4d979SBrian Norris type = "passive"; 16348f4d979SBrian Norris }; 16448f4d979SBrian Norris 16548f4d979SBrian Norris ppvar_litcpu_alert: ppvar-litcpu-alert { 16648f4d979SBrian Norris temperature = <50000>; /* millicelsius */ 16748f4d979SBrian Norris hysteresis = <2000>; /* millicelsius */ 16848f4d979SBrian Norris type = "passive"; 16948f4d979SBrian Norris }; 17048f4d979SBrian Norris 17148f4d979SBrian Norris ppvar_litcpu_crit: ppvar-litcpu-crit { 17248f4d979SBrian Norris temperature = <90000>; /* millicelsius */ 17348f4d979SBrian Norris hysteresis = <0>; /* millicelsius */ 17448f4d979SBrian Norris type = "critical"; 17548f4d979SBrian Norris }; 17648f4d979SBrian Norris }; 17748f4d979SBrian Norris }; 17848f4d979SBrian Norris}; 17948f4d979SBrian Norris 18048f4d979SBrian Norrisap_i2c_tpm: &i2c0 { 18148f4d979SBrian Norris status = "okay"; 18248f4d979SBrian Norris 18348f4d979SBrian Norris clock-frequency = <400000>; 18448f4d979SBrian Norris 18548f4d979SBrian Norris /* These are relatively safe rise/fall times. */ 18648f4d979SBrian Norris i2c-scl-falling-time-ns = <50>; 18748f4d979SBrian Norris i2c-scl-rising-time-ns = <300>; 18848f4d979SBrian Norris 18948f4d979SBrian Norris tpm: tpm@20 { 19048f4d979SBrian Norris compatible = "infineon,slb9645tt"; 19148f4d979SBrian Norris reg = <0x20>; 19248f4d979SBrian Norris powered-while-suspended; 19348f4d979SBrian Norris }; 19448f4d979SBrian Norris}; 19548f4d979SBrian Norris 19648f4d979SBrian Norrisap_i2c_dig: &i2c2 { 19748f4d979SBrian Norris status = "okay"; 19848f4d979SBrian Norris 19948f4d979SBrian Norris clock-frequency = <400000>; 20048f4d979SBrian Norris 20148f4d979SBrian Norris /* These are relatively safe rise/fall times. */ 20248f4d979SBrian Norris i2c-scl-falling-time-ns = <50>; 20348f4d979SBrian Norris i2c-scl-rising-time-ns = <300>; 20448f4d979SBrian Norris 20548f4d979SBrian Norris digitizer: digitizer@9 { 206b9ed79faSBrian Norris /* wacom,w9013 */ 20748f4d979SBrian Norris compatible = "hid-over-i2c"; 20848f4d979SBrian Norris reg = <0x9>; 20948f4d979SBrian Norris pinctrl-names = "default"; 21048f4d979SBrian Norris pinctrl-0 = <&cpu1_dig_irq_l &cpu1_dig_pdct_l>; 21148f4d979SBrian Norris 212b9ed79faSBrian Norris vdd-supply = <&p3_3v_dig>; 213b9ed79faSBrian Norris post-power-on-delay-ms = <100>; 214b9ed79faSBrian Norris 21548f4d979SBrian Norris interrupt-parent = <&gpio2>; 21648f4d979SBrian Norris interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 21748f4d979SBrian Norris 21848f4d979SBrian Norris hid-descr-addr = <0x1>; 21948f4d979SBrian Norris }; 22048f4d979SBrian Norris}; 22148f4d979SBrian Norris 22248f4d979SBrian Norris/* Adjustments to things in the gru baseboard */ 22348f4d979SBrian Norris 22448f4d979SBrian Norris&ap_i2c_tp { 22548f4d979SBrian Norris trackpad@4a { 2265041bb82SDmitry Torokhov compatible = "atmel,maxtouch"; 22748f4d979SBrian Norris reg = <0x4a>; 22848f4d979SBrian Norris pinctrl-names = "default"; 22948f4d979SBrian Norris pinctrl-0 = <&trackpad_int_l>; 23048f4d979SBrian Norris interrupt-parent = <&gpio1>; 23148f4d979SBrian Norris interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 232aef56580SEmil Renner Berthing linux,gpio-keymap = <KEY_RESERVED 233aef56580SEmil Renner Berthing KEY_RESERVED 234aef56580SEmil Renner Berthing KEY_RESERVED 235aef56580SEmil Renner Berthing BTN_LEFT>; 23648f4d979SBrian Norris wakeup-source; 23748f4d979SBrian Norris }; 23848f4d979SBrian Norris}; 23948f4d979SBrian Norris 24048f4d979SBrian Norris&ap_i2c_ts { 24148f4d979SBrian Norris touchscreen@4b { 2425041bb82SDmitry Torokhov compatible = "atmel,maxtouch"; 24348f4d979SBrian Norris reg = <0x4b>; 24448f4d979SBrian Norris pinctrl-names = "default"; 24548f4d979SBrian Norris pinctrl-0 = <&touch_int_l>; 24648f4d979SBrian Norris interrupt-parent = <&gpio3>; 24748f4d979SBrian Norris interrupts = <13 IRQ_TYPE_LEVEL_LOW>; 24848f4d979SBrian Norris }; 24948f4d979SBrian Norris}; 25048f4d979SBrian Norris 2516f07176fSMatthias Kaehlcke&ppvar_bigcpu_pwm { 2526f07176fSMatthias Kaehlcke regulator-min-microvolt = <798674>; 2536f07176fSMatthias Kaehlcke regulator-max-microvolt = <1302172>; 2546f07176fSMatthias Kaehlcke}; 2556f07176fSMatthias Kaehlcke 2562fb634deSMatthias Kaehlcke&ppvar_bigcpu { 2572fb634deSMatthias Kaehlcke regulator-min-microvolt = <798674>; 2582fb634deSMatthias Kaehlcke regulator-max-microvolt = <1302172>; 2596f07176fSMatthias Kaehlcke ctrl-voltage-range = <798674 1302172>; 2606f07176fSMatthias Kaehlcke}; 2616f07176fSMatthias Kaehlcke 2626f07176fSMatthias Kaehlcke&ppvar_litcpu_pwm { 2636f07176fSMatthias Kaehlcke regulator-min-microvolt = <799065>; 2646f07176fSMatthias Kaehlcke regulator-max-microvolt = <1303738>; 2652fb634deSMatthias Kaehlcke}; 2662fb634deSMatthias Kaehlcke 2672fb634deSMatthias Kaehlcke&ppvar_litcpu { 2682fb634deSMatthias Kaehlcke regulator-min-microvolt = <799065>; 2692fb634deSMatthias Kaehlcke regulator-max-microvolt = <1303738>; 2706f07176fSMatthias Kaehlcke ctrl-voltage-range = <799065 1303738>; 2716f07176fSMatthias Kaehlcke}; 2726f07176fSMatthias Kaehlcke 2736f07176fSMatthias Kaehlcke&ppvar_gpu_pwm { 2746f07176fSMatthias Kaehlcke regulator-min-microvolt = <785782>; 2756f07176fSMatthias Kaehlcke regulator-max-microvolt = <1217729>; 2762fb634deSMatthias Kaehlcke}; 2772fb634deSMatthias Kaehlcke 2782fb634deSMatthias Kaehlcke&ppvar_gpu { 2792fb634deSMatthias Kaehlcke regulator-min-microvolt = <785782>; 2802fb634deSMatthias Kaehlcke regulator-max-microvolt = <1217729>; 2816f07176fSMatthias Kaehlcke ctrl-voltage-range = <785782 1217729>; 2826f07176fSMatthias Kaehlcke}; 2836f07176fSMatthias Kaehlcke 2846f07176fSMatthias Kaehlcke&ppvar_centerlogic_pwm { 2856f07176fSMatthias Kaehlcke regulator-min-microvolt = <800069>; 2866f07176fSMatthias Kaehlcke regulator-max-microvolt = <1049692>; 2872fb634deSMatthias Kaehlcke}; 2882fb634deSMatthias Kaehlcke 2892fb634deSMatthias Kaehlcke&ppvar_centerlogic { 2902fb634deSMatthias Kaehlcke regulator-min-microvolt = <800069>; 2912fb634deSMatthias Kaehlcke regulator-max-microvolt = <1049692>; 2926f07176fSMatthias Kaehlcke ctrl-voltage-range = <800069 1049692>; 2932fb634deSMatthias Kaehlcke}; 2942fb634deSMatthias Kaehlcke 29548f4d979SBrian Norris&saradc { 29648f4d979SBrian Norris status = "okay"; 29748f4d979SBrian Norris vref-supply = <&pp1800_ap_io>; 29848f4d979SBrian Norris}; 29948f4d979SBrian Norris 30048f4d979SBrian Norris&mvl_wifi { 30148f4d979SBrian Norris marvell,wakeup-pin = <14>; /* GPIO_14 on Marvell */ 30248f4d979SBrian Norris}; 30348f4d979SBrian Norris 30448f4d979SBrian Norris&pinctrl { 30548f4d979SBrian Norris digitizer { 30648f4d979SBrian Norris /* Has external pullup */ 30748f4d979SBrian Norris cpu1_dig_irq_l: cpu1-dig-irq-l { 308d64420e8SHeiko Stuebner rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; 30948f4d979SBrian Norris }; 31048f4d979SBrian Norris 31148f4d979SBrian Norris /* Has external pullup */ 31248f4d979SBrian Norris cpu1_dig_pdct_l: cpu1-dig-pdct-l { 313d64420e8SHeiko Stuebner rockchip,pins = <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; 31448f4d979SBrian Norris }; 31548f4d979SBrian Norris }; 31648f4d979SBrian Norris 31748f4d979SBrian Norris discrete-regulators { 31848f4d979SBrian Norris cpu3_pen_pwr_en: cpu3-pen-pwr-en { 319d64420e8SHeiko Stuebner rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; 32048f4d979SBrian Norris }; 32148f4d979SBrian Norris }; 32248f4d979SBrian Norris 32348f4d979SBrian Norris pen { 32448f4d979SBrian Norris cpu1_pen_eject: cpu1-pen-eject { 325d64420e8SHeiko Stuebner rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>; 32648f4d979SBrian Norris }; 32748f4d979SBrian Norris }; 32848f4d979SBrian Norris}; 329