xref: /freebsd/sys/contrib/device-tree/src/arm/st/ste-href-tvk1281618-r2.dtsi (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-or-later
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Device Tree for the TVK1281618 R2 user interface board (UIB)
4f126890aSEmmanuel Vadot */
5f126890aSEmmanuel Vadot
6f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
7f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
8f126890aSEmmanuel Vadot
9f126890aSEmmanuel Vadot/ {
10f126890aSEmmanuel Vadot	gpio_keys {
11f126890aSEmmanuel Vadot		compatible = "gpio-keys";
12f126890aSEmmanuel Vadot		#address-cells = <1>;
13f126890aSEmmanuel Vadot		#size-cells = <0>;
14f126890aSEmmanuel Vadot		vdd-supply = <&ab8500_ldo_aux1_reg>;
15f126890aSEmmanuel Vadot		pinctrl-names = "default";
16f126890aSEmmanuel Vadot		pinctrl-0 = <&prox_tvk_mode>, <&hall_tvk_mode>;
17f126890aSEmmanuel Vadot
18f126890aSEmmanuel Vadot		button@139 {
19f126890aSEmmanuel Vadot			/* Proximity sensor */
20f126890aSEmmanuel Vadot			gpios = <&gpio6 25 GPIO_ACTIVE_HIGH>;
21f126890aSEmmanuel Vadot			linux,code = <11>; /* SW_FRONT_PROXIMITY */
22f126890aSEmmanuel Vadot			label = "SFH7741 Proximity Sensor";
23f126890aSEmmanuel Vadot		};
24f126890aSEmmanuel Vadot		button@145 {
25f126890aSEmmanuel Vadot			/* Hall sensor */
26f126890aSEmmanuel Vadot			gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>;
27f126890aSEmmanuel Vadot			linux,code = <0>; /* SW_LID */
28f126890aSEmmanuel Vadot			label = "HED54XXU11 Hall Effect Sensor";
29f126890aSEmmanuel Vadot		};
30f126890aSEmmanuel Vadot	};
31f126890aSEmmanuel Vadot
32f126890aSEmmanuel Vadot	soc {
33f126890aSEmmanuel Vadot		i2c@80004000 {
34f126890aSEmmanuel Vadot			tc35893@44 {
35f126890aSEmmanuel Vadot				compatible = "toshiba,tc35893";
36f126890aSEmmanuel Vadot				reg = <0x44>;
37f126890aSEmmanuel Vadot				interrupt-parent = <&gpio6>;
38f126890aSEmmanuel Vadot				interrupts = <26 IRQ_TYPE_EDGE_RISING>;
39f126890aSEmmanuel Vadot				pinctrl-names = "default";
40f126890aSEmmanuel Vadot				pinctrl-0 = <&tc35893_tvk_mode>;
41f126890aSEmmanuel Vadot
42f126890aSEmmanuel Vadot				interrupt-controller;
43f126890aSEmmanuel Vadot				#interrupt-cells = <1>;
44f126890aSEmmanuel Vadot				status = "disabled";
45f126890aSEmmanuel Vadot
46f126890aSEmmanuel Vadot				tc3589x_gpio {
47f126890aSEmmanuel Vadot					compatible = "toshiba,tc3589x-gpio";
48f126890aSEmmanuel Vadot					interrupts = <0>;
49f126890aSEmmanuel Vadot
50f126890aSEmmanuel Vadot					interrupt-controller;
51f126890aSEmmanuel Vadot					#interrupt-cells = <2>;
52f126890aSEmmanuel Vadot					gpio-controller;
53f126890aSEmmanuel Vadot					#gpio-cells = <2>;
54f126890aSEmmanuel Vadot				};
55f126890aSEmmanuel Vadot				tc3589x_keypad {
56f126890aSEmmanuel Vadot					compatible = "toshiba,tc3589x-keypad";
57f126890aSEmmanuel Vadot					interrupts = <6>;
58f126890aSEmmanuel Vadot					debounce-delay-ms = <4>;
59f126890aSEmmanuel Vadot					keypad,num-columns = <8>;
60f126890aSEmmanuel Vadot					keypad,num-rows = <8>;
61f126890aSEmmanuel Vadot					linux,no-autorepeat;
62f126890aSEmmanuel Vadot					wakeup-source;
63f126890aSEmmanuel Vadot					linux,keymap = <MATRIX_KEY(3, 1, KEY_END)>,
64f126890aSEmmanuel Vadot						       <MATRIX_KEY(4, 1, KEY_HOME)>,
65f126890aSEmmanuel Vadot						       <MATRIX_KEY(6, 4, KEY_VOLUMEDOWN)>,
66f126890aSEmmanuel Vadot						       <MATRIX_KEY(4, 2, KEY_EMAIL)>,
67f126890aSEmmanuel Vadot						       <MATRIX_KEY(3, 3, KEY_RIGHT)>,
68f126890aSEmmanuel Vadot						       <MATRIX_KEY(2, 5, KEY_BACKSPACE)>,
69f126890aSEmmanuel Vadot						       <MATRIX_KEY(6, 7, KEY_MENU)>,
70f126890aSEmmanuel Vadot						       <MATRIX_KEY(5, 0, KEY_ENTER)>,
71f126890aSEmmanuel Vadot						       <MATRIX_KEY(4, 3, KEY_0)>,
72f126890aSEmmanuel Vadot						       <MATRIX_KEY(3, 4, KEY_DOT)>,
73f126890aSEmmanuel Vadot						       <MATRIX_KEY(5, 2, KEY_UP)>,
74f126890aSEmmanuel Vadot						       <MATRIX_KEY(3, 5, KEY_DOWN)>,
75f126890aSEmmanuel Vadot						       <MATRIX_KEY(4, 5, KEY_SEND)>,
76f126890aSEmmanuel Vadot						       <MATRIX_KEY(0, 5, KEY_BACK)>,
77f126890aSEmmanuel Vadot						       <MATRIX_KEY(6, 2, KEY_VOLUMEUP)>,
78f126890aSEmmanuel Vadot						       <MATRIX_KEY(1, 3, KEY_SPACE)>,
79f126890aSEmmanuel Vadot						       <MATRIX_KEY(7, 6, KEY_LEFT)>,
80f126890aSEmmanuel Vadot						       <MATRIX_KEY(5, 5, KEY_SEARCH)>;
81f126890aSEmmanuel Vadot				};
82f126890aSEmmanuel Vadot			};
83f126890aSEmmanuel Vadot		};
84f126890aSEmmanuel Vadot
85f126890aSEmmanuel Vadot		i2c@80128000 {
86f126890aSEmmanuel Vadot			accelerometer@18 {
87f126890aSEmmanuel Vadot				/* Accelerometer */
88f126890aSEmmanuel Vadot				compatible = "st,lsm303dlh-accel";
89f126890aSEmmanuel Vadot				st,drdy-int-pin = <1>;
90f126890aSEmmanuel Vadot				drive-open-drain;
91f126890aSEmmanuel Vadot				reg = <0x18>;
92f126890aSEmmanuel Vadot				vdd-supply = <&ab8500_ldo_aux1_reg>;
93f126890aSEmmanuel Vadot				vddio-supply = <&db8500_vsmps2_reg>;
94f126890aSEmmanuel Vadot				pinctrl-names = "default";
95f126890aSEmmanuel Vadot				pinctrl-0 = <&accel_tvk_mode>;
96f126890aSEmmanuel Vadot				/*
97f126890aSEmmanuel Vadot				 * These interrupts cannot be used: the other component
98f126890aSEmmanuel Vadot				 * ST-Micro L3D4200D gyro that is connected to the same lines
99f126890aSEmmanuel Vadot				 * cannot set its DRDY line to open drain, so it cannot be
100f126890aSEmmanuel Vadot				 * shared with other peripherals. The should be defined for
101f126890aSEmmanuel Vadot				 * the falling edge if they could be wired together.
102f126890aSEmmanuel Vadot				 *
103f126890aSEmmanuel Vadot				 * interrupts-extended =
104f126890aSEmmanuel Vadot				 * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
105f126890aSEmmanuel Vadot				 * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>;
106f126890aSEmmanuel Vadot				 */
107f126890aSEmmanuel Vadot				mount-matrix = "0", "1", "0",
108f126890aSEmmanuel Vadot					       "1", "0", "0",
109f126890aSEmmanuel Vadot					       "0", "0", "-1";
110f126890aSEmmanuel Vadot			};
111f126890aSEmmanuel Vadot			magnetometer@1e {
112f126890aSEmmanuel Vadot				/* Magnetometer */
113f126890aSEmmanuel Vadot				compatible = "st,lsm303dlh-magn";
114f126890aSEmmanuel Vadot				reg = <0x1e>;
115f126890aSEmmanuel Vadot				vdd-supply = <&ab8500_ldo_aux1_reg>;
116f126890aSEmmanuel Vadot				vddio-supply = <&db8500_vsmps2_reg>;
117f126890aSEmmanuel Vadot				/*
118f126890aSEmmanuel Vadot				 * These interrupts cannot be used: the other component
119f126890aSEmmanuel Vadot				 * ST-Micro L3D4200D gyro that is connected to the same lines
120f126890aSEmmanuel Vadot				 * cannot set its DRDY line to open drain, so it cannot be
121f126890aSEmmanuel Vadot				 * shared with other peripherals. The should be defined for
122f126890aSEmmanuel Vadot				 * the falling edge if they could be wired together.
123f126890aSEmmanuel Vadot				 *
124f126890aSEmmanuel Vadot				 * interrupts-extended =
125f126890aSEmmanuel Vadot				 * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
126f126890aSEmmanuel Vadot				 * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>;
127f126890aSEmmanuel Vadot				 */
128f126890aSEmmanuel Vadot			};
129f126890aSEmmanuel Vadot			accelerometer@1c {
130f126890aSEmmanuel Vadot				/* Accelerometer */
131f126890aSEmmanuel Vadot				compatible = "st,lis331dl-accel";
132f126890aSEmmanuel Vadot				st,drdy-int-pin = <1>;
133f126890aSEmmanuel Vadot				reg = <0x1c>;
134f126890aSEmmanuel Vadot				vdd-supply = <&ab8500_ldo_aux1_reg>;
135f126890aSEmmanuel Vadot				vddio-supply = <&db8500_vsmps2_reg>;
136f126890aSEmmanuel Vadot				pinctrl-names = "default";
137f126890aSEmmanuel Vadot				pinctrl-0 = <&accel_tvk_mode>;
138f126890aSEmmanuel Vadot				interrupt-parent = <&gpio2>;
139f126890aSEmmanuel Vadot				/* INT2 would need to be open drain */
140f126890aSEmmanuel Vadot				interrupts = <18 IRQ_TYPE_EDGE_RISING>,
141f126890aSEmmanuel Vadot					     <19 IRQ_TYPE_EDGE_RISING>;
142f126890aSEmmanuel Vadot				mount-matrix = "0", "-1", "0",
143f126890aSEmmanuel Vadot					       "-1", "0", "0",
144f126890aSEmmanuel Vadot					       "0", "0", "-1";
145f126890aSEmmanuel Vadot			};
146f126890aSEmmanuel Vadot			magnetometer@f {
147f126890aSEmmanuel Vadot				/* Magnetometer */
148f126890aSEmmanuel Vadot				compatible = "asahi-kasei,ak8974";
149f126890aSEmmanuel Vadot				reg = <0x0f>;
150f126890aSEmmanuel Vadot				avdd-supply = <&ab8500_ldo_aux1_reg>;
151f126890aSEmmanuel Vadot				dvdd-supply = <&db8500_vsmps2_reg>;
152f126890aSEmmanuel Vadot				pinctrl-names = "default";
153f126890aSEmmanuel Vadot				pinctrl-0 = <&gyro_magn_tvk_mode>;
154f126890aSEmmanuel Vadot				/*
155f126890aSEmmanuel Vadot				 * These interrupts cannot be used: the other component
156f126890aSEmmanuel Vadot				 * ST-Micro L3D4200D gyro that is connected to the same lines
157f126890aSEmmanuel Vadot				 * cannot set its DRDY line to open drain, so it cannot be
158f126890aSEmmanuel Vadot				 * shared with other peripherals. The should be defined for
159f126890aSEmmanuel Vadot				 * the falling edge if they could be wired together.
160f126890aSEmmanuel Vadot				 *
161f126890aSEmmanuel Vadot				 * interrupts-extended =
162f126890aSEmmanuel Vadot				 * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
163f126890aSEmmanuel Vadot				 * <&gpio0 31 IRQ_TYPE_EDGE_FALLING>;
164f126890aSEmmanuel Vadot				 */
165f126890aSEmmanuel Vadot			};
166f126890aSEmmanuel Vadot			gyroscope@68 {
167f126890aSEmmanuel Vadot				/* Gyroscope */
168f126890aSEmmanuel Vadot				compatible = "st,l3g4200d-gyro";
169f126890aSEmmanuel Vadot				st,drdy-int-pin = <2>;
170f126890aSEmmanuel Vadot				reg = <0x68>;
171f126890aSEmmanuel Vadot				vdd-supply = <&ab8500_ldo_aux1_reg>;
172f126890aSEmmanuel Vadot				vddio-supply = <&db8500_vsmps2_reg>;
173f126890aSEmmanuel Vadot				pinctrl-names = "default";
174f126890aSEmmanuel Vadot				pinctrl-0 = <&gyro_magn_tvk_mode>;
175f126890aSEmmanuel Vadot				interrupts-extended =
176f126890aSEmmanuel Vadot				<&gpio1 0 IRQ_TYPE_EDGE_RISING>,
177f126890aSEmmanuel Vadot				<&gpio0 31 IRQ_TYPE_EDGE_RISING>;
178f126890aSEmmanuel Vadot			};
179f126890aSEmmanuel Vadot			pressure@5c {
180f126890aSEmmanuel Vadot				/* Barometer/pressure sensor */
181f126890aSEmmanuel Vadot				compatible = "st,lps001wp-press";
182f126890aSEmmanuel Vadot				reg = <0x5c>;
183f126890aSEmmanuel Vadot				vdd-supply = <&ab8500_ldo_aux1_reg>;
184f126890aSEmmanuel Vadot				vddio-supply = <&db8500_vsmps2_reg>;
185f126890aSEmmanuel Vadot			};
186f126890aSEmmanuel Vadot		};
187f126890aSEmmanuel Vadot		i2c@80110000 {
188f126890aSEmmanuel Vadot			synaptics@4b {
189f126890aSEmmanuel Vadot				/* Synaptics RMI4 TM1217 touchscreen */
190f126890aSEmmanuel Vadot				compatible = "syna,rmi4-i2c";
191f126890aSEmmanuel Vadot				#address-cells = <1>;
192f126890aSEmmanuel Vadot				#size-cells = <0>;
193f126890aSEmmanuel Vadot				reg = <0x4b>;
194f126890aSEmmanuel Vadot				vdd-supply = <&ab8500_ldo_aux1_reg>;
195*84943d6fSEmmanuel Vadot				vio-supply = <&db8500_vsmps2_reg>;
196f126890aSEmmanuel Vadot				pinctrl-names = "default";
197f126890aSEmmanuel Vadot				pinctrl-0 = <&synaptics_tvk_mode>;
198f126890aSEmmanuel Vadot				interrupt-parent = <&gpio2>;
199f126890aSEmmanuel Vadot				interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
200f126890aSEmmanuel Vadot
201f126890aSEmmanuel Vadot				rmi4-f01@1 {
202f126890aSEmmanuel Vadot					reg = <0x1>;
203*84943d6fSEmmanuel Vadot					syna,nosleep-mode = <1>;
204f126890aSEmmanuel Vadot				};
205f126890aSEmmanuel Vadot				rmi4-f11@11 {
206f126890aSEmmanuel Vadot					reg = <0x11>;
207f126890aSEmmanuel Vadot					syna,sensor-type = <1>;
208f126890aSEmmanuel Vadot					/* This is a landscape display */
209f126890aSEmmanuel Vadot					touchscreen-swapped-x-y;
210f126890aSEmmanuel Vadot				};
211f126890aSEmmanuel Vadot			};
212f126890aSEmmanuel Vadot		};
213f126890aSEmmanuel Vadot		mcde@a0350000 {
214f126890aSEmmanuel Vadot			status = "okay";
215f126890aSEmmanuel Vadot
216f126890aSEmmanuel Vadot			dsi@a0351000 {
217f126890aSEmmanuel Vadot				panel {
218f126890aSEmmanuel Vadot					compatible = "samsung,s6d16d0";
219f126890aSEmmanuel Vadot					reg = <0>;
220f126890aSEmmanuel Vadot					vdd1-supply = <&ab8500_ldo_aux1_reg>;
221f126890aSEmmanuel Vadot					reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
222f126890aSEmmanuel Vadot				};
223f126890aSEmmanuel Vadot			};
224f126890aSEmmanuel Vadot		};
225f126890aSEmmanuel Vadot		pinctrl {
226f126890aSEmmanuel Vadot			prox {
227f126890aSEmmanuel Vadot				prox_tvk_mode: prox_tvk {
228f126890aSEmmanuel Vadot					tvk_cfg {
229f126890aSEmmanuel Vadot						pins = "GPIO217_AH12";
230f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pu>;
231f126890aSEmmanuel Vadot					};
232f126890aSEmmanuel Vadot				};
233f126890aSEmmanuel Vadot			};
234f126890aSEmmanuel Vadot			hall {
235f126890aSEmmanuel Vadot				hall_tvk_mode: hall_tvk {
236f126890aSEmmanuel Vadot					tvk_cfg {
237f126890aSEmmanuel Vadot						pins = "GPIO145_C13";
238f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pu>;
239f126890aSEmmanuel Vadot					};
240f126890aSEmmanuel Vadot				};
241f126890aSEmmanuel Vadot			};
242f126890aSEmmanuel Vadot			tc35893 {
243f126890aSEmmanuel Vadot				/* IRQ from the TC35893 */
244f126890aSEmmanuel Vadot				tc35893_tvk_mode: tc35893_tvk {
245f126890aSEmmanuel Vadot					tvk_cfg {
246f126890aSEmmanuel Vadot						pins = "GPIO218_AH11";
247f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pu>;
248f126890aSEmmanuel Vadot					};
249f126890aSEmmanuel Vadot				};
250f126890aSEmmanuel Vadot			};
251f126890aSEmmanuel Vadot			accelerometer {
252f126890aSEmmanuel Vadot				accel_tvk_mode: accel_tvk {
253f126890aSEmmanuel Vadot					/* Accelerometer interrupt lines 1 & 2 */
254f126890aSEmmanuel Vadot					tvk_cfg {
255f126890aSEmmanuel Vadot						pins = "GPIO82_C1", "GPIO83_D3";
256f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pd>;
257f126890aSEmmanuel Vadot					};
258f126890aSEmmanuel Vadot				};
259f126890aSEmmanuel Vadot			};
260f126890aSEmmanuel Vadot			gyroscope {
261f126890aSEmmanuel Vadot				/*
262f126890aSEmmanuel Vadot				 * These lines are shared between Gyroscope l3g400dh
263f126890aSEmmanuel Vadot				 * and AK8974 magnetometer.
264f126890aSEmmanuel Vadot				 */
265f126890aSEmmanuel Vadot				gyro_magn_tvk_mode: gyro_magn_tvk {
266f126890aSEmmanuel Vadot					 /* GPIO 31 used for INT pull down the line */
267f126890aSEmmanuel Vadot					tvk_cfg1 {
268f126890aSEmmanuel Vadot						pins = "GPIO31_V3";
269f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pd>;
270f126890aSEmmanuel Vadot					};
271f126890aSEmmanuel Vadot					/* GPIO 32 used for DRDY, pull this down */
272f126890aSEmmanuel Vadot					tvk_cfg2 {
273f126890aSEmmanuel Vadot						pins = "GPIO32_V2";
274f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pd>;
275f126890aSEmmanuel Vadot					};
276f126890aSEmmanuel Vadot				};
277f126890aSEmmanuel Vadot			};
278f126890aSEmmanuel Vadot			synaptics {
279f126890aSEmmanuel Vadot				synaptics_tvk_mode: synaptics_tvk {
280f126890aSEmmanuel Vadot					/* Touchscreen uses GPIO 84 */
281f126890aSEmmanuel Vadot					tvk_cfg1 {
282f126890aSEmmanuel Vadot						pins = "GPIO84_C2";
283f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pu>;
284f126890aSEmmanuel Vadot					};
285f126890aSEmmanuel Vadot				};
286f126890aSEmmanuel Vadot			};
287f126890aSEmmanuel Vadot		};
288f126890aSEmmanuel Vadot	};
289f126890aSEmmanuel Vadot};
290