blob: 6f720756057d62eec2e24dc7fc453aafa9edfc59 [file] [log] [blame]
Lee Jones6934e002012-09-28 14:06:29 +01001/*
2 * Copyright 2012 ST-Ericsson AB
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
Linus Walleij90c40252013-05-29 19:15:39 +020012#include <dt-bindings/interrupt-controller/irq.h>
13
Lee Jones6934e002012-09-28 14:06:29 +010014/ {
Linus Walleij1a780d42013-11-15 13:43:02 +010015 gpio_keys {
16 compatible = "gpio-keys";
17 #address-cells = <1>;
18 #size-cells = <0>;
19 vdd-supply = <&ab8500_ldo_aux1_reg>;
20 pinctrl-names = "default";
21 pinctrl-0 = <&prox_stuib_mode>, <&hall_stuib_mode>;
22
23 button@139 {
24 /* Proximity sensor */
Linus Walleij1b1e8e02016-03-24 15:29:30 +010025 gpios = <&gpio6 25 GPIO_ACTIVE_HIGH>;
Linus Walleij1a780d42013-11-15 13:43:02 +010026 linux,code = <11>; /* SW_FRONT_PROXIMITY */
27 label = "SFH7741 Proximity Sensor";
28 };
29 button@145 {
30 /* Hall sensor */
Linus Walleij1b1e8e02016-03-24 15:29:30 +010031 gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>;
Linus Walleij1a780d42013-11-15 13:43:02 +010032 linux,code = <0>; /* SW_LID */
33 label = "HED54XXU11 Hall Effect Sensor";
34 };
35 };
36
Gabriel Fernandezb1ba1432013-03-01 14:38:07 +010037 soc {
Lee Jonescb552702012-10-04 12:41:35 +010038 i2c@80004000 {
39 stmpe1601: stmpe1601@40 {
40 compatible = "st,stmpe1601";
41 reg = <0x40>;
Linus Walleij90c40252013-05-29 19:15:39 +020042 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
Lee Jonescb552702012-10-04 12:41:35 +010043 interrupt-parent = <&gpio6>;
44 interrupt-controller;
Linus Walleij4ada2122014-04-15 17:31:00 +020045 vcc-supply = <&db8500_vsmps2_reg>;
46 vio-supply = <&db8500_vsmps2_reg>;
Lee Jonescb552702012-10-04 12:41:35 +010047
48 wakeup-source;
49 st,autosleep-timeout = <1024>;
Lee Jones09277812012-10-04 14:21:35 +010050
51 stmpe_keypad {
52 compatible = "st,stmpe-keypad";
53
54 debounce-interval = <64>;
55 st,scan-count = <8>;
56 st,no-autorepeat;
57
58 linux,keymap = <0x205006b
59 0x4010074
60 0x3050072
61 0x1030004
62 0x502006a
63 0x500000a
64 0x5008b
65 0x706001c
66 0x405000b
67 0x6070003
68 0x3040067
69 0x303006c
70 0x60400e7
71 0x602009e
72 0x4020073
73 0x5050002
74 0x4030069
75 0x3020008>;
76 };
Lee Jonescb552702012-10-04 12:41:35 +010077 };
78 };
79
Linus Walleijdf44ad82014-04-23 10:40:10 +020080 /* Sensors mounted on this board variant */
81 i2c@80128000 {
82 lis331dl@1c {
83 /* Accelerometer */
84 compatible = "st,lis331dl-accel";
85 st,drdy-int-pin = <1>;
86 reg = <0x1c>;
87 vdd-supply = <&ab8500_ldo_aux1_reg>;
88 vddio-supply = <&db8500_vsmps2_reg>;
89 pinctrl-names = "default";
90 pinctrl-0 = <&accel_stuib_mode>;
91 interrupt-parent = <&gpio2>;
92 interrupts = <18 IRQ_TYPE_EDGE_RISING>,
93 <19 IRQ_TYPE_EDGE_RISING>;
94 };
95 ak8974@0f {
96 /* Magnetometer */
97 compatible = "asahi-kasei,ak8974";
98 reg = <0x0f>;
99 vdd-supply = <&ab8500_ldo_aux1_reg>;
100 vddio-supply = <&db8500_vsmps2_reg>;
101 pinctrl-names = "default";
102 pinctrl-0 = <&magneto_stuib_mode>;
103 interrupt-parent = <&gpio1>;
104 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
105 };
106 };
107
Lee Jonescbebba72012-09-28 14:41:06 +0100108 i2c@80110000 {
Linus Walleijd5942242013-06-04 11:50:32 +0200109 bu21013_tp@5c {
Linus Walleij28521362013-05-21 13:55:15 +0200110 compatible = "rohm,bu21013_tp";
Lee Jonescbebba72012-09-28 14:41:06 +0100111 reg = <0x5c>;
Lee Jonescbebba72012-09-28 14:41:06 +0100112 avdd-supply = <&ab8500_ldo_aux1_reg>;
113
Linus Walleij28521362013-05-21 13:55:15 +0200114 rohm,touch-max-x = <384>;
115 rohm,touch-max-y = <704>;
116 rohm,flip-y;
Linus Walleij250656b2015-11-03 15:20:31 +0100117 pinctrl-names = "default";
118 pinctrl-0 = <&touch_rohm_mode>;
Lee Jonescbebba72012-09-28 14:41:06 +0100119 };
120
Linus Walleijd5942242013-06-04 11:50:32 +0200121 bu21013_tp@5d {
Linus Walleij28521362013-05-21 13:55:15 +0200122 compatible = "rohm,bu21013_tp";
Lee Jonescbebba72012-09-28 14:41:06 +0100123 reg = <0x5d>;
Lee Jonescbebba72012-09-28 14:41:06 +0100124 avdd-supply = <&ab8500_ldo_aux1_reg>;
125
Linus Walleij28521362013-05-21 13:55:15 +0200126 rohm,touch-max-x = <384>;
127 rohm,touch-max-y = <704>;
128 rohm,flip-y;
Linus Walleij250656b2015-11-03 15:20:31 +0100129 pinctrl-names = "default";
130 pinctrl-0 = <&touch_rohm_mode>;
Lee Jonescbebba72012-09-28 14:41:06 +0100131 };
132 };
Linus Walleij1a780d42013-11-15 13:43:02 +0100133
134 pinctrl {
135 prox {
136 prox_stuib_mode: prox_stuib {
137 stuib_cfg {
Linus Walleij1637d482014-09-30 12:16:25 +0200138 pins = "GPIO217_AH12";
Linus Walleij1a780d42013-11-15 13:43:02 +0100139 ste,config = <&gpio_in_pu>;
140 };
141 };
142 };
143 hall {
144 hall_stuib_mode: stuib_tvk {
145 stuib_cfg {
Linus Walleij1637d482014-09-30 12:16:25 +0200146 pins = "GPIO145_C13";
Linus Walleij1a780d42013-11-15 13:43:02 +0100147 ste,config = <&gpio_in_pu>;
148 };
149 };
150 };
Linus Walleijdf44ad82014-04-23 10:40:10 +0200151 accelerometer {
152 accel_stuib_mode: accel_stuib {
153 /* Accelerometer interrupt lines 1 & 2 */
154 stuib_cfg {
155 pins = "GPIO82_C1", "GPIO83_D3";
156 ste,config = <&gpio_in_pu>;
157 };
158 };
159 };
160 magnetometer {
161 magneto_stuib_mode: magneto_stuib {
162 /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */
163 stuib_cfg1 {
164 pins = "GPIO31_V3";
165 ste,config = <&gpio_in_pu>;
166 };
167 stuib_cfg2 {
168 pins = "GPIO32_V2";
169 ste,config = <&gpio_in_pd>;
170 };
171 };
172 };
Linus Walleij250656b2015-11-03 15:20:31 +0100173 touch {
174 touch_rohm_mode: touch_rohm {
175 /*
176 * ROHM touch screen uses GPIO 143 for
177 * RST1, GPIO 146 for RST2 and
178 * GPIO 67 for interrupts. Pull-up
179 * the IRQ line and drive both
180 * reset signals low.
181 */
182 stuib_cfg1 {
183 pins = "GPIO143_D12", "GPIO146_D13";
184 ste,config = <&gpio_out_lo>;
185 };
186 stuib_cfg2 {
187 pins = "GPIO67_G2";
188 ste,config = <&gpio_in_pu>;
189 };
190 };
191 };
Linus Walleij1a780d42013-11-15 13:43:02 +0100192 };
Lee Jones6934e002012-09-28 14:06:29 +0100193 };
194};