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