summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi
blob: 3cfeb118d379b3ea60ea41f4e0ec3b14815959e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// SPDX-License-Identifier: BSD-3-Clause
/*
 * sc7280 EC/H1 over SPI (common between IDP2 and CRD)
 *
 * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
 */

ap_ec_spi: &spi10 {
	status = "okay";

	pinctrl-0 = <&qup_spi10_data_clk>, <&qup_spi10_cs_gpio_init_high>, <&qup_spi10_cs_gpio>;
	cs-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;

	cros_ec: ec@0 {
		compatible = "google,cros-ec-spi";
		reg = <0>;
		interrupt-parent = <&tlmm>;
		interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
		pinctrl-names = "default";
		pinctrl-0 = <&ap_ec_int_l>;
		spi-max-frequency = <3000000>;

		cros_ec_pwm: pwm {
			compatible = "google,cros-ec-pwm";
			#pwm-cells = <1>;
		};

		i2c_tunnel: i2c-tunnel {
			compatible = "google,cros-ec-i2c-tunnel";
			google,remote-bus = <0>;
			#address-cells = <1>;
			#size-cells = <0>;
		};

		typec {
			compatible = "google,cros-ec-typec";
			#address-cells = <1>;
			#size-cells = <0>;

			usb_c0: connector@0 {
				compatible = "usb-c-connector";
				reg = <0>;
				label = "left";
				power-role = "dual";
				data-role = "host";
				try-power-role = "source";
			};

			usb_c1: connector@1 {
				compatible = "usb-c-connector";
				reg = <1>;
				label = "right";
				power-role = "dual";
				data-role = "host";
				try-power-role = "source";
			};
		};
	};
};

#include <arm/cros-ec-keyboard.dtsi>
#include <arm/cros-ec-sbs.dtsi>

ap_h1_spi: &spi14 {
	status = "okay";

	pinctrl-0 = <&qup_spi14_data_clk>, <&qup_spi14_cs_gpio_init_high>, <&qup_spi14_cs_gpio>;
	cs-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;

	cr50: tpm@0 {
		compatible = "google,cr50";
		reg = <0>;
		pinctrl-names = "default";
		pinctrl-0 = <&h1_ap_int_odl>;
		spi-max-frequency = <800000>;
		interrupt-parent = <&tlmm>;
		interrupts = <104 IRQ_TYPE_EDGE_RISING>;
	};
};

&tlmm {
	ap_ec_int_l: ap-ec-int-l-state {
		pins = "gpio18";
		function = "gpio";
		input-enable;
		bias-pull-up;
	};

	h1_ap_int_odl: h1-ap-int-odl-state {
		pins = "gpio104";
		function = "gpio";
		input-enable;
		bias-pull-up;
	};

	qup_spi10_cs_gpio_init_high: qup-spi10-cs-gpio-init-high-state {
		pins = "gpio43";
		function = "gpio";
		output-high;
	};

	qup_spi14_cs_gpio_init_high: qup-spi14-cs-gpio-init-high-state {
		pins = "gpio59";
		function = "gpio";
		output-high;
	};
};