xref: /freebsd/sys/contrib/device-tree/src/arm/st/ste-href-stuib.dtsi (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-or-later
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Copyright 2012 ST-Ericsson AB
4*f126890aSEmmanuel Vadot */
5*f126890aSEmmanuel Vadot
6*f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
7*f126890aSEmmanuel Vadot
8*f126890aSEmmanuel Vadot/ {
9*f126890aSEmmanuel Vadot	gpio_keys {
10*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
11*f126890aSEmmanuel Vadot		#address-cells = <1>;
12*f126890aSEmmanuel Vadot		#size-cells = <0>;
13*f126890aSEmmanuel Vadot		vdd-supply = <&ab8500_ldo_aux1_reg>;
14*f126890aSEmmanuel Vadot		pinctrl-names = "default";
15*f126890aSEmmanuel Vadot		pinctrl-0 = <&prox_stuib_mode>, <&hall_stuib_mode>;
16*f126890aSEmmanuel Vadot
17*f126890aSEmmanuel Vadot		button@139 {
18*f126890aSEmmanuel Vadot			/* Proximity sensor */
19*f126890aSEmmanuel Vadot			gpios = <&gpio6 25 GPIO_ACTIVE_HIGH>;
20*f126890aSEmmanuel Vadot			linux,code = <11>; /* SW_FRONT_PROXIMITY */
21*f126890aSEmmanuel Vadot			label = "SFH7741 Proximity Sensor";
22*f126890aSEmmanuel Vadot		};
23*f126890aSEmmanuel Vadot		button@145 {
24*f126890aSEmmanuel Vadot			/* Hall sensor */
25*f126890aSEmmanuel Vadot			gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>;
26*f126890aSEmmanuel Vadot			linux,code = <0>; /* SW_LID */
27*f126890aSEmmanuel Vadot			label = "HED54XXU11 Hall Effect Sensor";
28*f126890aSEmmanuel Vadot		};
29*f126890aSEmmanuel Vadot	};
30*f126890aSEmmanuel Vadot
31*f126890aSEmmanuel Vadot	soc {
32*f126890aSEmmanuel Vadot		i2c@80004000 {
33*f126890aSEmmanuel Vadot			stmpe1601: port-expander@40 {
34*f126890aSEmmanuel Vadot				compatible = "st,stmpe1601";
35*f126890aSEmmanuel Vadot				reg = <0x40>;
36*f126890aSEmmanuel Vadot				interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
37*f126890aSEmmanuel Vadot				interrupt-parent = <&gpio6>;
38*f126890aSEmmanuel Vadot				vcc-supply = <&db8500_vsmps2_reg>;
39*f126890aSEmmanuel Vadot				vio-supply = <&db8500_vsmps2_reg>;
40*f126890aSEmmanuel Vadot				pinctrl-names = "default";
41*f126890aSEmmanuel Vadot				pinctrl-0 = <&stmpe_stuib_mode>;
42*f126890aSEmmanuel Vadot
43*f126890aSEmmanuel Vadot				wakeup-source;
44*f126890aSEmmanuel Vadot				st,autosleep-timeout = <1024>;
45*f126890aSEmmanuel Vadot
46*f126890aSEmmanuel Vadot				keyboard-controller {
47*f126890aSEmmanuel Vadot					compatible = "st,stmpe-keypad";
48*f126890aSEmmanuel Vadot
49*f126890aSEmmanuel Vadot					debounce-interval = <64>;
50*f126890aSEmmanuel Vadot					st,scan-count = <8>;
51*f126890aSEmmanuel Vadot					st,no-autorepeat;
52*f126890aSEmmanuel Vadot
53*f126890aSEmmanuel Vadot					linux,keymap = <0x205006b
54*f126890aSEmmanuel Vadot							0x4010074
55*f126890aSEmmanuel Vadot							0x3050072
56*f126890aSEmmanuel Vadot							0x1030004
57*f126890aSEmmanuel Vadot							0x502006a
58*f126890aSEmmanuel Vadot							0x500000a
59*f126890aSEmmanuel Vadot							0x5008b
60*f126890aSEmmanuel Vadot							0x706001c
61*f126890aSEmmanuel Vadot							0x405000b
62*f126890aSEmmanuel Vadot							0x6070003
63*f126890aSEmmanuel Vadot							0x3040067
64*f126890aSEmmanuel Vadot							0x303006c
65*f126890aSEmmanuel Vadot							0x60400e7
66*f126890aSEmmanuel Vadot							0x602009e
67*f126890aSEmmanuel Vadot							0x4020073
68*f126890aSEmmanuel Vadot							0x5050002
69*f126890aSEmmanuel Vadot							0x4030069
70*f126890aSEmmanuel Vadot							0x3020008>;
71*f126890aSEmmanuel Vadot				};
72*f126890aSEmmanuel Vadot			};
73*f126890aSEmmanuel Vadot		};
74*f126890aSEmmanuel Vadot
75*f126890aSEmmanuel Vadot		/* Sensors mounted on this board variant */
76*f126890aSEmmanuel Vadot		i2c@80128000 {
77*f126890aSEmmanuel Vadot			lis331dl@1c {
78*f126890aSEmmanuel Vadot				/* Accelerometer */
79*f126890aSEmmanuel Vadot				compatible = "st,lis331dl-accel";
80*f126890aSEmmanuel Vadot				st,drdy-int-pin = <1>;
81*f126890aSEmmanuel Vadot				reg = <0x1c>;
82*f126890aSEmmanuel Vadot				vdd-supply = <&ab8500_ldo_aux1_reg>;
83*f126890aSEmmanuel Vadot				vddio-supply = <&db8500_vsmps2_reg>;
84*f126890aSEmmanuel Vadot				pinctrl-names = "default";
85*f126890aSEmmanuel Vadot				pinctrl-0 = <&accel_stuib_mode>;
86*f126890aSEmmanuel Vadot				interrupt-parent = <&gpio2>;
87*f126890aSEmmanuel Vadot				interrupts = <18 IRQ_TYPE_EDGE_RISING>,
88*f126890aSEmmanuel Vadot					     <19 IRQ_TYPE_EDGE_RISING>;
89*f126890aSEmmanuel Vadot			};
90*f126890aSEmmanuel Vadot			ak8974@f {
91*f126890aSEmmanuel Vadot				/* Magnetometer */
92*f126890aSEmmanuel Vadot				compatible = "asahi-kasei,ak8974";
93*f126890aSEmmanuel Vadot				reg = <0x0f>;
94*f126890aSEmmanuel Vadot				vdd-supply = <&ab8500_ldo_aux1_reg>;
95*f126890aSEmmanuel Vadot				vddio-supply = <&db8500_vsmps2_reg>;
96*f126890aSEmmanuel Vadot				pinctrl-names = "default";
97*f126890aSEmmanuel Vadot				pinctrl-0 = <&magneto_stuib_mode>;
98*f126890aSEmmanuel Vadot				interrupt-parent = <&gpio1>;
99*f126890aSEmmanuel Vadot				interrupts = <0 IRQ_TYPE_EDGE_RISING>;
100*f126890aSEmmanuel Vadot			};
101*f126890aSEmmanuel Vadot		};
102*f126890aSEmmanuel Vadot
103*f126890aSEmmanuel Vadot		i2c@80110000 {
104*f126890aSEmmanuel Vadot			bu21013_tp@5c {
105*f126890aSEmmanuel Vadot				compatible = "rohm,bu21013_tp";
106*f126890aSEmmanuel Vadot				reg = <0x5c>;
107*f126890aSEmmanuel Vadot				avdd-supply = <&ab8500_ldo_aux1_reg>;
108*f126890aSEmmanuel Vadot
109*f126890aSEmmanuel Vadot				rohm,touch-max-x = <384>;
110*f126890aSEmmanuel Vadot				rohm,touch-max-y = <704>;
111*f126890aSEmmanuel Vadot				rohm,flip-y;
112*f126890aSEmmanuel Vadot				pinctrl-names = "default";
113*f126890aSEmmanuel Vadot				pinctrl-0 = <&touch_rohm_mode>;
114*f126890aSEmmanuel Vadot			};
115*f126890aSEmmanuel Vadot
116*f126890aSEmmanuel Vadot			bu21013_tp@5d {
117*f126890aSEmmanuel Vadot				compatible = "rohm,bu21013_tp";
118*f126890aSEmmanuel Vadot				reg = <0x5d>;
119*f126890aSEmmanuel Vadot				avdd-supply = <&ab8500_ldo_aux1_reg>;
120*f126890aSEmmanuel Vadot
121*f126890aSEmmanuel Vadot				rohm,touch-max-x = <384>;
122*f126890aSEmmanuel Vadot				rohm,touch-max-y = <704>;
123*f126890aSEmmanuel Vadot				rohm,flip-y;
124*f126890aSEmmanuel Vadot				pinctrl-names = "default";
125*f126890aSEmmanuel Vadot				pinctrl-0 = <&touch_rohm_mode>;
126*f126890aSEmmanuel Vadot			};
127*f126890aSEmmanuel Vadot		};
128*f126890aSEmmanuel Vadot
129*f126890aSEmmanuel Vadot		pinctrl {
130*f126890aSEmmanuel Vadot			/* Pull up this GPIO pin */
131*f126890aSEmmanuel Vadot			stmpe {
132*f126890aSEmmanuel Vadot				stmpe_stuib_mode: stmpe_stuib {
133*f126890aSEmmanuel Vadot					stuib_cfg {
134*f126890aSEmmanuel Vadot						ste,pins = "GPIO218_AH11";
135*f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pu>;
136*f126890aSEmmanuel Vadot					};
137*f126890aSEmmanuel Vadot				};
138*f126890aSEmmanuel Vadot			};
139*f126890aSEmmanuel Vadot			prox {
140*f126890aSEmmanuel Vadot				prox_stuib_mode: prox_stuib {
141*f126890aSEmmanuel Vadot					stuib_cfg {
142*f126890aSEmmanuel Vadot						pins = "GPIO217_AH12";
143*f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pu>;
144*f126890aSEmmanuel Vadot					};
145*f126890aSEmmanuel Vadot				};
146*f126890aSEmmanuel Vadot			};
147*f126890aSEmmanuel Vadot			hall {
148*f126890aSEmmanuel Vadot				hall_stuib_mode: stuib_tvk {
149*f126890aSEmmanuel Vadot					stuib_cfg {
150*f126890aSEmmanuel Vadot						pins = "GPIO145_C13";
151*f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pu>;
152*f126890aSEmmanuel Vadot					};
153*f126890aSEmmanuel Vadot				};
154*f126890aSEmmanuel Vadot			};
155*f126890aSEmmanuel Vadot			accelerometer {
156*f126890aSEmmanuel Vadot				accel_stuib_mode: accel_stuib {
157*f126890aSEmmanuel Vadot					/* Accelerometer interrupt lines 1 & 2 */
158*f126890aSEmmanuel Vadot					stuib_cfg {
159*f126890aSEmmanuel Vadot						pins = "GPIO82_C1", "GPIO83_D3";
160*f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pu>;
161*f126890aSEmmanuel Vadot					};
162*f126890aSEmmanuel Vadot				};
163*f126890aSEmmanuel Vadot			};
164*f126890aSEmmanuel Vadot			magnetometer {
165*f126890aSEmmanuel Vadot				magneto_stuib_mode: magneto_stuib {
166*f126890aSEmmanuel Vadot					/* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */
167*f126890aSEmmanuel Vadot					stuib_cfg1 {
168*f126890aSEmmanuel Vadot						pins = "GPIO31_V3";
169*f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pu>;
170*f126890aSEmmanuel Vadot					};
171*f126890aSEmmanuel Vadot					stuib_cfg2 {
172*f126890aSEmmanuel Vadot						pins = "GPIO32_V2";
173*f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pd>;
174*f126890aSEmmanuel Vadot					};
175*f126890aSEmmanuel Vadot				};
176*f126890aSEmmanuel Vadot			};
177*f126890aSEmmanuel Vadot			touch {
178*f126890aSEmmanuel Vadot				touch_rohm_mode: touch_rohm {
179*f126890aSEmmanuel Vadot					/*
180*f126890aSEmmanuel Vadot					 * ROHM touch screen uses GPIO 143 for
181*f126890aSEmmanuel Vadot					 * RST1, GPIO 146 for RST2 and
182*f126890aSEmmanuel Vadot					 * GPIO 67 for interrupts. Pull-up
183*f126890aSEmmanuel Vadot					 * the IRQ line and drive both
184*f126890aSEmmanuel Vadot					 * reset signals low.
185*f126890aSEmmanuel Vadot					 */
186*f126890aSEmmanuel Vadot					stuib_cfg1 {
187*f126890aSEmmanuel Vadot						pins = "GPIO143_D12", "GPIO146_D13";
188*f126890aSEmmanuel Vadot						ste,config = <&gpio_out_lo>;
189*f126890aSEmmanuel Vadot					};
190*f126890aSEmmanuel Vadot					stuib_cfg2 {
191*f126890aSEmmanuel Vadot						pins = "GPIO67_G2";
192*f126890aSEmmanuel Vadot						ste,config = <&gpio_in_pu>;
193*f126890aSEmmanuel Vadot					};
194*f126890aSEmmanuel Vadot				};
195*f126890aSEmmanuel Vadot			};
196*f126890aSEmmanuel Vadot		};
197*f126890aSEmmanuel Vadot
198*f126890aSEmmanuel Vadot		mcde@a0350000 {
199*f126890aSEmmanuel Vadot			status = "okay";
200*f126890aSEmmanuel Vadot
201*f126890aSEmmanuel Vadot			dsi@a0351000 {
202*f126890aSEmmanuel Vadot				panel {
203*f126890aSEmmanuel Vadot					compatible = "samsung,s6d16d0";
204*f126890aSEmmanuel Vadot					reg = <0>;
205*f126890aSEmmanuel Vadot					vdd1-supply = <&ab8500_ldo_aux1_reg>;
206*f126890aSEmmanuel Vadot					reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
207*f126890aSEmmanuel Vadot				};
208*f126890aSEmmanuel Vadot			};
209*f126890aSEmmanuel Vadot		};
210*f126890aSEmmanuel Vadot	};
211*f126890aSEmmanuel Vadot};
212