blob: b7b4211c5353ea9102e7742fc4c80afe274d8d26 [file] [log] [blame]
Linus Walleij9c19cfa2013-09-26 15:34:02 +02001/*
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 * Device Tree for the TVK1281618 UIB
12 */
13
14#include <dt-bindings/interrupt-controller/irq.h>
15
16/ {
Linus Walleij1a780d42013-11-15 13:43:02 +010017 gpio_keys {
18 compatible = "gpio-keys";
19 #address-cells = <1>;
20 #size-cells = <0>;
21 vdd-supply = <&ab8500_ldo_aux1_reg>;
22 pinctrl-names = "default";
23 pinctrl-0 = <&prox_tvk_mode>, <&hall_tvk_mode>;
24
25 button@139 {
26 /* Proximity sensor */
27 gpios = <&gpio6 25 0x4>;
28 linux,code = <11>; /* SW_FRONT_PROXIMITY */
29 label = "SFH7741 Proximity Sensor";
30 };
31 button@145 {
32 /* Hall sensor */
33 gpios = <&gpio4 17 0x4>;
34 linux,code = <0>; /* SW_LID */
35 label = "HED54XXU11 Hall Effect Sensor";
36 };
37 };
38
Linus Walleij9c19cfa2013-09-26 15:34:02 +020039 soc {
Linus Walleij7e0a51a2013-10-15 23:00:10 +020040 /* Add Synaptics touch screen, TC35893 keypad etc here */
Linus Walleij84919b92013-10-03 10:18:36 +020041 i2c@80004000 {
Linus Walleij7e0a51a2013-10-15 23:00:10 +020042 tc35893@44 {
43 compatible = "toshiba,tc35893";
Linus Walleij84919b92013-10-03 10:18:36 +020044 reg = <0x44>;
45 interrupt-parent = <&gpio6>;
46 interrupts = <26 IRQ_TYPE_EDGE_RISING>;
Linus Walleija45cb692013-11-13 14:57:49 +010047 pinctrl-names = "default";
48 pinctrl-0 = <&tc35893_tvk_mode>;
Linus Walleij84919b92013-10-03 10:18:36 +020049
50 interrupt-controller;
Linus Walleij7e0a51a2013-10-15 23:00:10 +020051 #interrupt-cells = <1>;
Linus Walleij84919b92013-10-03 10:18:36 +020052
53 tc3589x_gpio {
Linus Walleij7e0a51a2013-10-15 23:00:10 +020054 compatible = "toshiba,tc3589x-gpio";
55 interrupts = <0>;
Linus Walleij84919b92013-10-03 10:18:36 +020056
57 interrupt-controller;
58 #interrupt-cells = <2>;
59 gpio-controller;
60 #gpio-cells = <2>;
61 };
Linus Walleij7e0a51a2013-10-15 23:00:10 +020062 tc3589x_keypad {
63 compatible = "toshiba,tc3589x-keypad";
64 interrupts = <6>;
65 debounce-delay-ms = <4>;
66 keypad,num-columns = <8>;
67 keypad,num-rows = <8>;
68 linux,no-autorepeat;
Sudeep Holla506822e2015-10-21 11:10:15 +010069 wakeup-source;
Linus Walleij7e0a51a2013-10-15 23:00:10 +020070 linux,keymap = <0x0301006b
71 0x04010066
72 0x06040072
73 0x040200d7
74 0x0303006a
75 0x0205000e
76 0x0607008b
77 0x0500001c
78 0x0403000b
79 0x03040034
80 0x05020067
81 0x0305006c
82 0x040500e7
83 0x0005009e
84 0x06020073
85 0x01030039
86 0x07060069
87 0x050500d9>;
88 };
Linus Walleij84919b92013-10-03 10:18:36 +020089 };
90 };
Linus Walleijd0e3bc82014-04-12 17:13:23 +020091 /* Sensors mounted on this board variant */
92 i2c@80128000 {
93 lsm303dlh@18 {
94 /* Accelerometer */
95 compatible = "st,lsm303dlh-accel";
96 st,drdy-int-pin = <1>;
97 reg = <0x18>;
98 vdd-supply = <&ab8500_ldo_aux1_reg>;
99 vddio-supply = <&db8500_vsmps2_reg>;
100 pinctrl-names = "default";
101 pinctrl-0 = <&accel_tvk_mode>;
Linus Walleij22a93162015-04-27 11:28:33 +0200102 interrupt-parent = <&gpio2>;
103 interrupts = <18 IRQ_TYPE_EDGE_RISING>,
104 <19 IRQ_TYPE_EDGE_RISING>;
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200105 };
Linus Walleij93deea92015-04-29 14:08:38 +0200106 lsm303dlh@1e {
Linus Walleij2f23cda2015-11-13 15:00:03 +0100107 /*
108 * This magnetometer is packaged with
109 * the accelerometer, and has a DRDY line,
110 * however it is not connected on this
111 * board so it can not generate interrupts.
112 */
Linus Walleij93deea92015-04-29 14:08:38 +0200113 compatible = "st,lsm303dlh-magn";
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200114 reg = <0x1e>;
115 vdd-supply = <&ab8500_ldo_aux1_reg>;
116 vddio-supply = <&db8500_vsmps2_reg>;
Linus Walleij2f23cda2015-11-13 15:00:03 +0100117 };
118 lis331dl@1c {
119 /* Accelerometer */
120 compatible = "st,lis331dl-accel";
121 st,drdy-int-pin = <1>;
122 reg = <0x1c>;
123 vdd-supply = <&ab8500_ldo_aux1_reg>;
124 vddio-supply = <&db8500_vsmps2_reg>;
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200125 pinctrl-names = "default";
Linus Walleij2f23cda2015-11-13 15:00:03 +0100126 pinctrl-0 = <&accel_tvk_mode>;
127 interrupt-parent = <&gpio2>;
128 interrupts = <18 IRQ_TYPE_EDGE_RISING>,
129 <19 IRQ_TYPE_EDGE_RISING>;
130 };
131 ak8974@0f {
132 /* Magnetometer */
133 compatible = "asahi-kasei,ak8974";
134 reg = <0x0f>;
135 vdd-supply = <&ab8500_ldo_aux1_reg>;
136 vddio-supply = <&db8500_vsmps2_reg>;
137 pinctrl-names = "default";
138 pinctrl-0 = <&gyro_magn_tvk_mode>;
139 interrupt-parent = <&gpio1>;
140 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200141 };
142 l3g4200d@68 {
143 /* Gyroscope */
144 compatible = "st,l3g4200d-gyro";
145 st,drdy-int-pin = <2>;
146 reg = <0x68>;
147 vdd-supply = <&ab8500_ldo_aux1_reg>;
148 vddio-supply = <&db8500_vsmps2_reg>;
Linus Walleij2f23cda2015-11-13 15:00:03 +0100149 pinctrl-names = "default";
150 pinctrl-0 = <&gyro_magn_tvk_mode>;
151 interrupt-parent = <&gpio1>;
152 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200153 };
154 lsp001wm@5c {
155 /* Barometer/pressure sensor */
156 compatible = "st,lps001wp-press";
157 reg = <0x5c>;
158 vdd-supply = <&ab8500_ldo_aux1_reg>;
159 vddio-supply = <&db8500_vsmps2_reg>;
160 };
161 };
Linus Walleija45cb692013-11-13 14:57:49 +0100162 pinctrl {
163 /* Pull up this GPIO pin */
164 tc35893 {
165 tc35893_tvk_mode: tc35893_tvk {
166 tvk_cfg {
Linus Walleij1637d482014-09-30 12:16:25 +0200167 pins = "GPIO218_AH11";
Linus Walleija45cb692013-11-13 14:57:49 +0100168 ste,config = <&gpio_in_pu>;
169 };
170 };
171 };
Linus Walleij1a780d42013-11-15 13:43:02 +0100172 prox {
173 prox_tvk_mode: prox_tvk {
174 tvk_cfg {
Linus Walleij1637d482014-09-30 12:16:25 +0200175 pins = "GPIO217_AH12";
Linus Walleij1a780d42013-11-15 13:43:02 +0100176 ste,config = <&gpio_in_pu>;
177 };
178 };
179 };
180 hall {
181 hall_tvk_mode: hall_tvk {
182 tvk_cfg {
Linus Walleij1637d482014-09-30 12:16:25 +0200183 pins = "GPIO145_C13";
Linus Walleij1a780d42013-11-15 13:43:02 +0100184 ste,config = <&gpio_in_pu>;
185 };
186 };
187 };
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200188 accelerometer {
189 accel_tvk_mode: accel_tvk {
190 /* Accelerometer interrupt lines 1 & 2 */
191 tvk_cfg {
Linus Walleij1637d482014-09-30 12:16:25 +0200192 pins = "GPIO82_C1", "GPIO83_D3";
Linus Walleij2f23cda2015-11-13 15:00:03 +0100193 ste,config = <&gpio_in_pd>;
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200194 };
195 };
196 };
Linus Walleij2f23cda2015-11-13 15:00:03 +0100197 gyroscope {
198 /*
199 * These lines are shared between Gyroscope l3g400dh
200 * and AK8974 magnetometer.
201 */
202 gyro_magn_tvk_mode: gyro_magn_tvk {
203 /* GPIO 31 used for INT pull down the line */
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200204 tvk_cfg1 {
Linus Walleij1637d482014-09-30 12:16:25 +0200205 pins = "GPIO31_V3";
Linus Walleij2f23cda2015-11-13 15:00:03 +0100206 ste,config = <&gpio_in_pd>;
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200207 };
Linus Walleij2f23cda2015-11-13 15:00:03 +0100208 /* GPIO 32 used for DRDY, pull this down */
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200209 tvk_cfg2 {
Linus Walleij1637d482014-09-30 12:16:25 +0200210 pins = "GPIO32_V2";
Linus Walleijd0e3bc82014-04-12 17:13:23 +0200211 ste,config = <&gpio_in_pd>;
212 };
213 };
214 };
Linus Walleija45cb692013-11-13 14:57:49 +0100215 };
Linus Walleij9c19cfa2013-09-26 15:34:02 +0200216 };
217};