// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Google Pazquel board device tree source
 *
 * Copyright 2021 Google LLC.
 */

/* This file must be included after sc7180-trogdor.dtsi */
#include "sc7180-trogdor-pazquel.dtsi"
#include "sc7180-trogdor-rt5682s-sku.dtsi"

ap_ts_pen_1v8: &i2c4 {
	clock-frequency = <400000>;
	status = "okay";

	ap_ts: touchscreen@10 {
		compatible = "elan,ekth3915", "elan,ekth3500";
		reg = <0x10>;
		pinctrl-names = "default";
		pinctrl-0 = <&ts_int_l>, <&ts_reset_l>;

		interrupt-parent = <&tlmm>;
		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;

		vcc33-supply = <&pp3300_ts>;
		vccio-supply = <&pp1800_l10a>;
		reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
	};
};

&keyboard_controller {
	function-row-physmap = <
		MATRIX_KEY(0x00, 0x02, 0)	/* T1 */
		MATRIX_KEY(0x03, 0x02, 0)	/* T2 */
		MATRIX_KEY(0x02, 0x02, 0)	/* T3 */
		MATRIX_KEY(0x01, 0x02, 0)	/* T4 */
		MATRIX_KEY(0x03, 0x04, 0)	/* T5 */
		MATRIX_KEY(0x02, 0x04, 0)	/* T6 */
		MATRIX_KEY(0x01, 0x04, 0)	/* T7 */
		MATRIX_KEY(0x02, 0x09, 0)	/* T8 */
		MATRIX_KEY(0x01, 0x09, 0)	/* T9 */
		MATRIX_KEY(0x00, 0x04, 0)	/* T10 */
		MATRIX_KEY(0x03, 0x09, 0)       /* T11 */
	>;
	linux,keymap = <
		MATRIX_KEY(0x00, 0x02, KEY_BACK)
		MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
		MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
		MATRIX_KEY(0x01, 0x02, KEY_SCALE)
		MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
		MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
		MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
		MATRIX_KEY(0x02, 0x09, KEY_MUTE)
		MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
		MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
		MATRIX_KEY(0x03, 0x09, KEY_SLEEP)
		CROS_STD_MAIN_KEYMAP
	>;
};

&wifi {
	qcom,ath10k-calibration-variant = "GO_PAZQUEL360";
};
