Merge tag 'media/v5.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[linux-2.6-microblaze.git] / arch / arm / boot / dts / ste-href-tvk1281618.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright 2012 ST-Ericsson AB
4  *
5  * Device Tree for the TVK1281618 family of UIBs
6  */
7
8 #include <dt-bindings/interrupt-controller/irq.h>
9
10 / {
11         gpio_keys {
12                 compatible = "gpio-keys";
13                 #address-cells = <1>;
14                 #size-cells = <0>;
15                 vdd-supply = <&ab8500_ldo_aux1_reg>;
16                 pinctrl-names = "default";
17                 pinctrl-0 = <&prox_tvk_mode>, <&hall_tvk_mode>;
18
19                 button@139 {
20                         /* Proximity sensor */
21                         gpios = <&gpio6 25 GPIO_ACTIVE_HIGH>;
22                         linux,code = <11>; /* SW_FRONT_PROXIMITY */
23                         label = "SFH7741 Proximity Sensor";
24                 };
25                 button@145 {
26                         /* Hall sensor */
27                         gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>;
28                         linux,code = <0>; /* SW_LID */
29                         label = "HED54XXU11 Hall Effect Sensor";
30                 };
31         };
32
33         soc {
34                 i2c@80004000 {
35                         tc35893@44 {
36                                 compatible = "toshiba,tc35893";
37                                 reg = <0x44>;
38                                 interrupt-parent = <&gpio6>;
39                                 interrupts = <26 IRQ_TYPE_EDGE_RISING>;
40                                 pinctrl-names = "default";
41                                 pinctrl-0 = <&tc35893_tvk_mode>;
42
43                                 interrupt-controller;
44                                 #interrupt-cells = <1>;
45
46                                 tc3589x_gpio {
47                                         compatible = "toshiba,tc3589x-gpio";
48                                         interrupts = <0>;
49
50                                         interrupt-controller;
51                                         #interrupt-cells = <2>;
52                                         gpio-controller;
53                                         #gpio-cells = <2>;
54                                 };
55                                 tc3589x_keypad {
56                                         compatible = "toshiba,tc3589x-keypad";
57                                         interrupts = <6>;
58                                         debounce-delay-ms = <4>;
59                                         keypad,num-columns = <8>;
60                                         keypad,num-rows = <8>;
61                                         linux,no-autorepeat;
62                                         wakeup-source;
63                                         linux,keymap = <0x0301006b
64                                                         0x04010066
65                                                         0x06040072
66                                                         0x040200d7
67                                                         0x0303006a
68                                                         0x0205000e
69                                                         0x0607008b
70                                                         0x0500001c
71                                                         0x0403000b
72                                                         0x03040034
73                                                         0x05020067
74                                                         0x0305006c
75                                                         0x040500e7
76                                                         0x0005009e
77                                                         0x06020073
78                                                         0x01030039
79                                                         0x07060069
80                                                         0x050500d9>;
81                                 };
82                         };
83                 };
84                 /* Sensors mounted on all board variants */
85                 i2c@80128000 {
86                         ak8974@f {
87                                 /* Magnetometer */
88                                 compatible = "asahi-kasei,ak8974";
89                                 reg = <0x0f>;
90                                 avdd-supply = <&ab8500_ldo_aux1_reg>;
91                                 dvdd-supply = <&db8500_vsmps2_reg>;
92                                 pinctrl-names = "default";
93                                 pinctrl-0 = <&gyro_magn_tvk_mode>;
94                                 /*
95                                  * These interrupts cannot be used: the other component
96                                  * ST-Micro L3D4200D gyro that is connected to the same lines
97                                  * cannot set its DRDY line to open drain, so it cannot be
98                                  * shared with other peripherals. The should be defined for
99                                  * the falling edge if they could be wired together.
100                                  *
101                                  * interrupts-extended =
102                                  * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
103                                  * <&gpio0 31 IRQ_TYPE_EDGE_FALLING>;
104                                  */
105                         };
106                         l3g4200d@68 {
107                                 /* Gyroscope */
108                                 compatible = "st,l3g4200d-gyro";
109                                 st,drdy-int-pin = <2>;
110                                 reg = <0x68>;
111                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
112                                 vddio-supply = <&db8500_vsmps2_reg>;
113                                 pinctrl-names = "default";
114                                 pinctrl-0 = <&gyro_magn_tvk_mode>;
115                                 interrupts-extended =
116                                 <&gpio1 0 IRQ_TYPE_EDGE_RISING>,
117                                 <&gpio0 31 IRQ_TYPE_EDGE_RISING>;
118                         };
119                         lsp001wm@5c {
120                                 /* Barometer/pressure sensor */
121                                 compatible = "st,lps001wp-press";
122                                 reg = <0x5c>;
123                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
124                                 vddio-supply = <&db8500_vsmps2_reg>;
125                         };
126                 };
127
128                 i2c@80110000 {
129                         synaptics@4b {
130                                 /* Synaptics RMI4 TM1217 touchscreen */
131                                 compatible = "syna,rmi4-i2c";
132                                 #address-cells = <1>;
133                                 #size-cells = <0>;
134                                 reg = <0x4b>;
135                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
136                                 vddio-supply = <&db8500_vsmps2_reg>;
137                                 pinctrl-names = "default";
138                                 pinctrl-0 = <&synaptics_tvk_mode>;
139                                 interrupt-parent = <&gpio2>;
140                                 interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
141
142                                 rmi-f01@1 {
143                                         reg = <0x1>;
144                                         syna,nosleep = <1>;
145                                 };
146                                 rmi-f11@11 {
147                                         reg = <0x11>;
148                                         touchscreen-inverted-x;
149                                         syna,sensor-type = <1>;
150                                 };
151                         };
152                 };
153
154                 pinctrl {
155                         /* Pull up this GPIO pin */
156                         tc35893 {
157                                 tc35893_tvk_mode: tc35893_tvk {
158                                         tvk_cfg {
159                                                 pins = "GPIO218_AH11";
160                                                 ste,config = <&gpio_in_pu>;
161                                         };
162                                 };
163                         };
164                         prox {
165                                 prox_tvk_mode: prox_tvk {
166                                         tvk_cfg {
167                                                 pins = "GPIO217_AH12";
168                                                 ste,config = <&gpio_in_pu>;
169                                         };
170                                 };
171                         };
172                         hall {
173                                 hall_tvk_mode: hall_tvk {
174                                         tvk_cfg {
175                                                 pins = "GPIO145_C13";
176                                                 ste,config = <&gpio_in_pu>;
177                                         };
178                                 };
179                         };
180                         accelerometer {
181                                 accel_tvk_mode: accel_tvk {
182                                         /* Accelerometer interrupt lines 1 & 2 */
183                                         tvk_cfg {
184                                                 pins = "GPIO82_C1", "GPIO83_D3";
185                                                 ste,config = <&gpio_in_pd>;
186                                         };
187                                 };
188                         };
189                         gyroscope {
190                                 /*
191                                  * These lines are shared between Gyroscope l3g400dh
192                                  * and AK8974 magnetometer.
193                                  */
194                                 gyro_magn_tvk_mode: gyro_magn_tvk {
195                                          /* GPIO 31 used for INT pull down the line */
196                                         tvk_cfg1 {
197                                                 pins = "GPIO31_V3";
198                                                 ste,config = <&gpio_in_pd>;
199                                         };
200                                         /* GPIO 32 used for DRDY, pull this down */
201                                         tvk_cfg2 {
202                                                 pins = "GPIO32_V2";
203                                                 ste,config = <&gpio_in_pd>;
204                                         };
205                                 };
206                         };
207                         synaptics {
208                                 synaptics_tvk_mode: synaptics_tvk {
209                                         /* Touchscreen uses GPIO 84 */
210                                         tvk_cfg1 {
211                                                 pins = "GPIO84_C2";
212                                                 ste,config = <&gpio_in_pu>;
213                                         };
214                                 };
215                         };
216                 };
217         };
218 };