108260782SDouglas Anderson// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
208260782SDouglas Anderson/*
308260782SDouglas Anderson * Google Pompom board device tree source
408260782SDouglas Anderson *
508260782SDouglas Anderson * Copyright 2020 Google LLC.
608260782SDouglas Anderson */
708260782SDouglas Anderson
808260782SDouglas Anderson#include "sc7180.dtsi"
908260782SDouglas Anderson
1008260782SDouglas Andersonap_ec_spi: &spi6 {};
1108260782SDouglas Andersonap_h1_spi: &spi0 {};
1208260782SDouglas Anderson
1308260782SDouglas Anderson#include "sc7180-trogdor.dtsi"
144537977aSPhilip Chen#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
1508260782SDouglas Anderson
1608260782SDouglas Anderson/ {
1708260782SDouglas Anderson	thermal-zones {
1808260782SDouglas Anderson		5v-choke-thermal {
1908260782SDouglas Anderson			polling-delay-passive = <0>;
2008260782SDouglas Anderson			polling-delay = <250>;
2108260782SDouglas Anderson
2208260782SDouglas Anderson			thermal-sensors = <&pm6150_adc_tm 1>;
2308260782SDouglas Anderson
2408260782SDouglas Anderson			trips {
2508260782SDouglas Anderson				5v-choke-crit {
2608260782SDouglas Anderson					temperature = <125000>;
2708260782SDouglas Anderson					hysteresis = <1000>;
2808260782SDouglas Anderson					type = "critical";
2908260782SDouglas Anderson				};
3008260782SDouglas Anderson			};
3108260782SDouglas Anderson		};
3208260782SDouglas Anderson	};
3308260782SDouglas Anderson};
3408260782SDouglas Anderson
3508260782SDouglas Anderson&alc5682 {
36*bc2fb47dSRob Herring	realtek,dmic-clk-driving-high;
3708260782SDouglas Anderson};
3808260782SDouglas Anderson
3908260782SDouglas Anderson&cpu6_alert0 {
4008260782SDouglas Anderson	temperature = <60000>;
4108260782SDouglas Anderson};
4208260782SDouglas Anderson
4308260782SDouglas Anderson&cpu6_alert1 {
4408260782SDouglas Anderson	temperature = <65000>;
4508260782SDouglas Anderson};
4608260782SDouglas Anderson
4708260782SDouglas Anderson&cpu6_thermal {
4882ea7d41SDouglas Anderson	sustainable-power = <1124>;
4908260782SDouglas Anderson};
5008260782SDouglas Anderson
5108260782SDouglas Anderson&cpu7_alert0 {
5208260782SDouglas Anderson	temperature = <60000>;
5308260782SDouglas Anderson};
5408260782SDouglas Anderson
5508260782SDouglas Anderson&cpu7_alert1 {
5608260782SDouglas Anderson	temperature = <65000>;
5708260782SDouglas Anderson};
5808260782SDouglas Anderson
5908260782SDouglas Anderson&cpu7_thermal {
6082ea7d41SDouglas Anderson	sustainable-power = <1124>;
6108260782SDouglas Anderson};
6208260782SDouglas Anderson
6308260782SDouglas Anderson&cpu8_alert0 {
6408260782SDouglas Anderson	temperature = <60000>;
6508260782SDouglas Anderson};
6608260782SDouglas Anderson
6708260782SDouglas Anderson&cpu8_alert1 {
6808260782SDouglas Anderson	temperature = <65000>;
6908260782SDouglas Anderson};
7008260782SDouglas Anderson
7108260782SDouglas Anderson&cpu8_thermal {
7282ea7d41SDouglas Anderson	sustainable-power = <1124>;
7308260782SDouglas Anderson};
7408260782SDouglas Anderson
7508260782SDouglas Anderson&cpu9_alert0 {
7608260782SDouglas Anderson	temperature = <60000>;
7708260782SDouglas Anderson};
7808260782SDouglas Anderson
7908260782SDouglas Anderson&cpu9_alert1 {
8008260782SDouglas Anderson	temperature = <65000>;
8108260782SDouglas Anderson};
8208260782SDouglas Anderson
8308260782SDouglas Anderson&cpu9_thermal {
8482ea7d41SDouglas Anderson	sustainable-power = <1124>;
8508260782SDouglas Anderson};
8608260782SDouglas Anderson
8708260782SDouglas Anderson&gpio_keys {
8808260782SDouglas Anderson	status = "okay";
8908260782SDouglas Anderson};
9008260782SDouglas Anderson
9108260782SDouglas Andersonap_ts_pen_1v8: &i2c4 {
9208260782SDouglas Anderson	status = "okay";
9308260782SDouglas Anderson	clock-frequency = <400000>;
9408260782SDouglas Anderson
9508260782SDouglas Anderson	ap_ts: touchscreen@10 {
9608260782SDouglas Anderson		compatible = "hid-over-i2c";
9708260782SDouglas Anderson		reg = <0x10>;
9808260782SDouglas Anderson		pinctrl-names = "default";
9908260782SDouglas Anderson		pinctrl-0 = <&ts_int_l>, <&ts_reset_l>;
10008260782SDouglas Anderson
10108260782SDouglas Anderson		interrupt-parent = <&tlmm>;
10208260782SDouglas Anderson		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
10308260782SDouglas Anderson
10408260782SDouglas Anderson		post-power-on-delay-ms = <20>;
10508260782SDouglas Anderson		hid-descr-addr = <0x0001>;
10608260782SDouglas Anderson
10708260782SDouglas Anderson		vdd-supply = <&pp3300_ts>;
10808260782SDouglas Anderson	};
10908260782SDouglas Anderson};
11008260782SDouglas Anderson
111ad6fc143SMatthias Kaehlcke&keyboard_controller {
112ad6fc143SMatthias Kaehlcke	function-row-physmap = <
113ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x00, 0x02, 0)	/* T1 */
114ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x03, 0x02, 0)	/* T2 */
115ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x02, 0x02, 0)	/* T3 */
116ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x01, 0x02, 0)	/* T4 */
117ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x03, 0x04, 0)	/* T5 */
118ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x02, 0x04, 0)	/* T6 */
119ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x01, 0x04, 0)	/* T7 */
120ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x02, 0x09, 0)	/* T8 */
121ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x01, 0x09, 0)	/* T9 */
122ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x00, 0x04, 0)	/* T10 */
123ad6fc143SMatthias Kaehlcke	>;
124ad6fc143SMatthias Kaehlcke	linux,keymap = <
125ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x00, 0x02, KEY_BACK)
126ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
127ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
128ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x01, 0x02, KEY_SCALE)
129ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
130ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
131ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
132ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x02, 0x09, KEY_MUTE)
133ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
134ad6fc143SMatthias Kaehlcke		MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
135ad6fc143SMatthias Kaehlcke
136ad6fc143SMatthias Kaehlcke		CROS_STD_MAIN_KEYMAP
137ad6fc143SMatthias Kaehlcke	>;
138ad6fc143SMatthias Kaehlcke};
139ad6fc143SMatthias Kaehlcke
14008260782SDouglas Anderson&panel {
14108260782SDouglas Anderson	compatible = "kingdisplay,kd116n21-30nv-a010";
14208260782SDouglas Anderson};
14308260782SDouglas Anderson
14408260782SDouglas Anderson&pen_insert {
14508260782SDouglas Anderson	/* Insert = high, eject = low */
14608260782SDouglas Anderson	gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
14708260782SDouglas Anderson};
14808260782SDouglas Anderson
14908260782SDouglas Anderson&pm6150_adc {
15008260782SDouglas Anderson	5v-choke-thermistor@4e {
15108260782SDouglas Anderson		reg = <ADC5_AMUX_THM2_100K_PU>;
15208260782SDouglas Anderson		qcom,ratiometric;
15308260782SDouglas Anderson		qcom,hw-settle-time = <200>;
15408260782SDouglas Anderson	};
15508260782SDouglas Anderson};
15608260782SDouglas Anderson
15708260782SDouglas Anderson&pm6150_adc_tm {
15808260782SDouglas Anderson	status = "okay";
15908260782SDouglas Anderson
16008260782SDouglas Anderson	5v-choke-thermistor@1 {
16108260782SDouglas Anderson		reg = <1>;
16208260782SDouglas Anderson		io-channels = <&pm6150_adc ADC5_AMUX_THM2_100K_PU>;
16308260782SDouglas Anderson		qcom,ratiometric;
16408260782SDouglas Anderson		qcom,hw-settle-time-us = <200>;
16508260782SDouglas Anderson	};
16608260782SDouglas Anderson};
16708260782SDouglas Anderson
16808260782SDouglas Anderson&sdhc_2 {
16908260782SDouglas Anderson	status = "okay";
17008260782SDouglas Anderson};
17108260782SDouglas Anderson
172108ec20bSDouglas Anderson&sound {
173108ec20bSDouglas Anderson	model = "sc7180-rt5682-max98357a-2mic";
174108ec20bSDouglas Anderson	pinctrl-names = "default";
175108ec20bSDouglas Anderson	pinctrl-0 = <&dmic_sel>;
176108ec20bSDouglas Anderson	dmic-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
177108ec20bSDouglas Anderson};
178108ec20bSDouglas Anderson
17908260782SDouglas Anderson&usb_c1 {
18008260782SDouglas Anderson	status = "disabled";
18108260782SDouglas Anderson};
18208260782SDouglas Anderson
18308260782SDouglas Anderson&wifi {
18408260782SDouglas Anderson	qcom,ath10k-calibration-variant = "GO_POMPOM";
18508260782SDouglas Anderson};
18608260782SDouglas Anderson
18708260782SDouglas Anderson/* PINCTRL - board-specific pinctrl */
18808260782SDouglas Anderson
18908260782SDouglas Anderson&tlmm {
19008260782SDouglas Anderson	gpio-line-names = "TP_INT_ODL",
19108260782SDouglas Anderson			  "AP_RAM_ID0",
19208260782SDouglas Anderson			  "AP_SKU_ID2",
19308260782SDouglas Anderson			  "AP_RAM_ID1",
19408260782SDouglas Anderson			  "",
19508260782SDouglas Anderson			  "AP_RAM_ID2",
19608260782SDouglas Anderson			  "AP_TP_I2C_SDA",
19708260782SDouglas Anderson			  "AP_TP_I2C_SCL",
19808260782SDouglas Anderson			  "TS_RESET_L",
19908260782SDouglas Anderson			  "TS_INT_L",
20008260782SDouglas Anderson			  "",
20108260782SDouglas Anderson			  "EDP_BRIJ_IRQ",
20208260782SDouglas Anderson			  "AP_EDP_BKLTEN",
20308260782SDouglas Anderson			  "",
20408260782SDouglas Anderson			  "",
20508260782SDouglas Anderson			  "EDP_BRIJ_I2C_SDA",
20608260782SDouglas Anderson			  "EDP_BRIJ_I2C_SCL",
20708260782SDouglas Anderson			  "HUB_RST_L",
20808260782SDouglas Anderson			  "",
20908260782SDouglas Anderson			  "",
21008260782SDouglas Anderson			  "",
21108260782SDouglas Anderson			  "",
21208260782SDouglas Anderson			  "",
21308260782SDouglas Anderson			  "AMP_EN",
21408260782SDouglas Anderson			  "P_SENSOR_INT_L",
21508260782SDouglas Anderson			  "AP_SAR_SENSOR_SDA",
21608260782SDouglas Anderson			  "AP_SAR_SENSOR_SCL",
21708260782SDouglas Anderson			  "",
21808260782SDouglas Anderson			  "HP_IRQ",
21908260782SDouglas Anderson			  "",
22008260782SDouglas Anderson			  "EN_PP3300_DX_EDP",
22108260782SDouglas Anderson			  "AP_BRD_ID2",
22208260782SDouglas Anderson			  "BRIJ_SUSPEND",
22308260782SDouglas Anderson			  "AP_BRD_ID0",
22408260782SDouglas Anderson			  "AP_H1_SPI_MISO",
22508260782SDouglas Anderson			  "AP_H1_SPI_MOSI",
22608260782SDouglas Anderson			  "AP_H1_SPI_CLK",
22708260782SDouglas Anderson			  "AP_H1_SPI_CS_L",
22808260782SDouglas Anderson			  "",
22908260782SDouglas Anderson			  "",
23008260782SDouglas Anderson			  "",
23108260782SDouglas Anderson			  "",
23208260782SDouglas Anderson			  "H1_AP_INT_ODL",
23308260782SDouglas Anderson			  "",
23408260782SDouglas Anderson			  "UART_AP_TX_DBG_RX",
23508260782SDouglas Anderson			  "UART_DBG_TX_AP_RX",
23608260782SDouglas Anderson			  "HP_I2C_SDA",
23708260782SDouglas Anderson			  "HP_I2C_SCL",
23808260782SDouglas Anderson			  "FORCED_USB_BOOT",
23908260782SDouglas Anderson			  "AMP_BCLK",
24008260782SDouglas Anderson			  "AMP_LRCLK",
24108260782SDouglas Anderson			  "AMP_DIN",
24208260782SDouglas Anderson			  "PEN_PDCT_L",
24308260782SDouglas Anderson			  "HP_BCLK",
24408260782SDouglas Anderson			  "HP_LRCLK",
24508260782SDouglas Anderson			  "HP_DOUT",
24608260782SDouglas Anderson			  "HP_DIN",
24708260782SDouglas Anderson			  "HP_MCLK",
24808260782SDouglas Anderson			  "AP_SKU_ID0",
24908260782SDouglas Anderson			  "AP_EC_SPI_MISO",
25008260782SDouglas Anderson			  "AP_EC_SPI_MOSI",
25108260782SDouglas Anderson			  "AP_EC_SPI_CLK",
25208260782SDouglas Anderson			  "AP_EC_SPI_CS_L",
25308260782SDouglas Anderson			  "AP_SPI_CLK",
25408260782SDouglas Anderson			  "AP_SPI_MOSI",
25508260782SDouglas Anderson			  "AP_SPI_MISO",
25608260782SDouglas Anderson			  /*
25708260782SDouglas Anderson			   * AP_FLASH_WP_L is crossystem ABI. Schematics
25808260782SDouglas Anderson			   * call it BIOS_FLASH_WP_L.
25908260782SDouglas Anderson			   */
26008260782SDouglas Anderson			  "AP_FLASH_WP_L",
26108260782SDouglas Anderson			  "",
26208260782SDouglas Anderson			  "AP_SPI_CS0_L",
26308260782SDouglas Anderson			  "SD_CD_ODL",
26408260782SDouglas Anderson			  "",
26508260782SDouglas Anderson			  "",
26608260782SDouglas Anderson			  "",
26708260782SDouglas Anderson			  "",
26808260782SDouglas Anderson			  "",
26908260782SDouglas Anderson			  "UIM2_DATA",
27008260782SDouglas Anderson			  "UIM2_CLK",
27108260782SDouglas Anderson			  "UIM2_RST",
27208260782SDouglas Anderson			  "UIM2_PRESENT",
27308260782SDouglas Anderson			  "UIM1_DATA",
27408260782SDouglas Anderson			  "UIM1_CLK",
27508260782SDouglas Anderson			  "UIM1_RST",
27608260782SDouglas Anderson			  "",
27708260782SDouglas Anderson			  "EN_PP3300_CODEC",
27808260782SDouglas Anderson			  "EN_PP3300_HUB",
27908260782SDouglas Anderson			  "",
28008260782SDouglas Anderson			  "DMIC_SEL",
28108260782SDouglas Anderson			  "",
28208260782SDouglas Anderson			  "",
28308260782SDouglas Anderson			  "",
28408260782SDouglas Anderson			  "AP_SKU_ID1",
28508260782SDouglas Anderson			  "AP_RST_REQ",
28608260782SDouglas Anderson			  "",
28708260782SDouglas Anderson			  "AP_BRD_ID1",
28808260782SDouglas Anderson			  "AP_EC_INT_R_L",
28908260782SDouglas Anderson			  "",
29008260782SDouglas Anderson			  "",
29108260782SDouglas Anderson			  "",
29208260782SDouglas Anderson			  "",
29308260782SDouglas Anderson			  "",
29408260782SDouglas Anderson			  "",
29508260782SDouglas Anderson			  "",
29608260782SDouglas Anderson			  "",
29708260782SDouglas Anderson			  "",
29808260782SDouglas Anderson			  "EDP_BRIJ_EN",
29908260782SDouglas Anderson			  "",
30008260782SDouglas Anderson			  "",
30108260782SDouglas Anderson			  "",
30208260782SDouglas Anderson			  "",
30308260782SDouglas Anderson			  "",
30408260782SDouglas Anderson			  "",
30508260782SDouglas Anderson			  "",
30608260782SDouglas Anderson			  "",
30708260782SDouglas Anderson			  "",
30808260782SDouglas Anderson			  "",
30908260782SDouglas Anderson			  "AP_TS_PEN_I2C_SDA",
31008260782SDouglas Anderson			  "AP_TS_PEN_I2C_SCL",
31108260782SDouglas Anderson			  "DP_HOT_PLUG_DET",
31208260782SDouglas Anderson			  "EC_IN_RW_ODL";
31308260782SDouglas Anderson
31408260782SDouglas Anderson	dmic_sel: dmic-sel {
31508260782SDouglas Anderson		pinmux {
31608260782SDouglas Anderson			pins = "gpio86";
31708260782SDouglas Anderson			function = "gpio";
31808260782SDouglas Anderson		};
31908260782SDouglas Anderson
32008260782SDouglas Anderson		pinconf {
32108260782SDouglas Anderson			pins = "gpio86";
32208260782SDouglas Anderson			bias-pull-down;
32308260782SDouglas Anderson		};
32408260782SDouglas Anderson	};
32508260782SDouglas Anderson};
326