Linus Walleij | 9c19cfa | 2013-09-26 15:34:02 +0200 | [diff] [blame] | 1 | /* |
| 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 Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 17 | 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 */ |
Linus Walleij | 1b1e8e0 | 2016-03-24 15:29:30 +0100 | [diff] [blame] | 27 | gpios = <&gpio6 25 GPIO_ACTIVE_HIGH>; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 28 | linux,code = <11>; /* SW_FRONT_PROXIMITY */ |
| 29 | label = "SFH7741 Proximity Sensor"; |
| 30 | }; |
| 31 | button@145 { |
| 32 | /* Hall sensor */ |
Linus Walleij | 1b1e8e0 | 2016-03-24 15:29:30 +0100 | [diff] [blame] | 33 | gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 34 | linux,code = <0>; /* SW_LID */ |
| 35 | label = "HED54XXU11 Hall Effect Sensor"; |
| 36 | }; |
| 37 | }; |
| 38 | |
Linus Walleij | 9c19cfa | 2013-09-26 15:34:02 +0200 | [diff] [blame] | 39 | soc { |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 40 | i2c@80004000 { |
Linus Walleij | 7e0a51a | 2013-10-15 23:00:10 +0200 | [diff] [blame] | 41 | tc35893@44 { |
| 42 | compatible = "toshiba,tc35893"; |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 43 | reg = <0x44>; |
| 44 | interrupt-parent = <&gpio6>; |
| 45 | interrupts = <26 IRQ_TYPE_EDGE_RISING>; |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 46 | pinctrl-names = "default"; |
| 47 | pinctrl-0 = <&tc35893_tvk_mode>; |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 48 | |
| 49 | interrupt-controller; |
Linus Walleij | 7e0a51a | 2013-10-15 23:00:10 +0200 | [diff] [blame] | 50 | #interrupt-cells = <1>; |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 51 | |
| 52 | tc3589x_gpio { |
Linus Walleij | 7e0a51a | 2013-10-15 23:00:10 +0200 | [diff] [blame] | 53 | compatible = "toshiba,tc3589x-gpio"; |
| 54 | interrupts = <0>; |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 55 | |
| 56 | interrupt-controller; |
| 57 | #interrupt-cells = <2>; |
| 58 | gpio-controller; |
| 59 | #gpio-cells = <2>; |
| 60 | }; |
Linus Walleij | 7e0a51a | 2013-10-15 23:00:10 +0200 | [diff] [blame] | 61 | tc3589x_keypad { |
| 62 | compatible = "toshiba,tc3589x-keypad"; |
| 63 | interrupts = <6>; |
| 64 | debounce-delay-ms = <4>; |
| 65 | keypad,num-columns = <8>; |
| 66 | keypad,num-rows = <8>; |
| 67 | linux,no-autorepeat; |
Sudeep Holla | 506822e | 2015-10-21 11:10:15 +0100 | [diff] [blame] | 68 | wakeup-source; |
Linus Walleij | 7e0a51a | 2013-10-15 23:00:10 +0200 | [diff] [blame] | 69 | linux,keymap = <0x0301006b |
| 70 | 0x04010066 |
| 71 | 0x06040072 |
| 72 | 0x040200d7 |
| 73 | 0x0303006a |
| 74 | 0x0205000e |
| 75 | 0x0607008b |
| 76 | 0x0500001c |
| 77 | 0x0403000b |
| 78 | 0x03040034 |
| 79 | 0x05020067 |
| 80 | 0x0305006c |
| 81 | 0x040500e7 |
| 82 | 0x0005009e |
| 83 | 0x06020073 |
| 84 | 0x01030039 |
| 85 | 0x07060069 |
| 86 | 0x050500d9>; |
| 87 | }; |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 88 | }; |
| 89 | }; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 90 | /* Sensors mounted on this board variant */ |
| 91 | i2c@80128000 { |
| 92 | lsm303dlh@18 { |
| 93 | /* Accelerometer */ |
| 94 | compatible = "st,lsm303dlh-accel"; |
| 95 | st,drdy-int-pin = <1>; |
Linus Walleij | 7ba5dd5 | 2016-02-05 14:00:00 +0100 | [diff] [blame^] | 96 | drive-open-drain; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 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 Walleij | 22a9316 | 2015-04-27 11:28:33 +0200 | [diff] [blame] | 102 | interrupt-parent = <&gpio2>; |
Linus Walleij | 7ba5dd5 | 2016-02-05 14:00:00 +0100 | [diff] [blame^] | 103 | interrupts = <18 IRQ_TYPE_EDGE_FALLING>, |
| 104 | <19 IRQ_TYPE_EDGE_FALLING>; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 105 | }; |
Linus Walleij | 93deea9 | 2015-04-29 14:08:38 +0200 | [diff] [blame] | 106 | lsm303dlh@1e { |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 107 | /* |
| 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 Walleij | 93deea9 | 2015-04-29 14:08:38 +0200 | [diff] [blame] | 113 | compatible = "st,lsm303dlh-magn"; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 114 | reg = <0x1e>; |
| 115 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 116 | vddio-supply = <&db8500_vsmps2_reg>; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 117 | }; |
| 118 | lis331dl@1c { |
| 119 | /* Accelerometer */ |
| 120 | compatible = "st,lis331dl-accel"; |
| 121 | st,drdy-int-pin = <1>; |
Linus Walleij | 7ba5dd5 | 2016-02-05 14:00:00 +0100 | [diff] [blame^] | 122 | drive-open-drain; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 123 | reg = <0x1c>; |
| 124 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 125 | vddio-supply = <&db8500_vsmps2_reg>; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 126 | pinctrl-names = "default"; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 127 | pinctrl-0 = <&accel_tvk_mode>; |
| 128 | interrupt-parent = <&gpio2>; |
Linus Walleij | 7ba5dd5 | 2016-02-05 14:00:00 +0100 | [diff] [blame^] | 129 | interrupts = <18 IRQ_TYPE_EDGE_FALLING>, |
| 130 | <19 IRQ_TYPE_EDGE_FALLING>; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 131 | }; |
| 132 | ak8974@0f { |
| 133 | /* Magnetometer */ |
| 134 | compatible = "asahi-kasei,ak8974"; |
| 135 | reg = <0x0f>; |
| 136 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 137 | vddio-supply = <&db8500_vsmps2_reg>; |
| 138 | pinctrl-names = "default"; |
| 139 | pinctrl-0 = <&gyro_magn_tvk_mode>; |
| 140 | interrupt-parent = <&gpio1>; |
| 141 | interrupts = <0 IRQ_TYPE_EDGE_RISING>; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 142 | }; |
| 143 | l3g4200d@68 { |
| 144 | /* Gyroscope */ |
| 145 | compatible = "st,l3g4200d-gyro"; |
| 146 | st,drdy-int-pin = <2>; |
| 147 | reg = <0x68>; |
| 148 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 149 | vddio-supply = <&db8500_vsmps2_reg>; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 150 | pinctrl-names = "default"; |
| 151 | pinctrl-0 = <&gyro_magn_tvk_mode>; |
| 152 | interrupt-parent = <&gpio1>; |
| 153 | interrupts = <0 IRQ_TYPE_EDGE_RISING>; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 154 | }; |
| 155 | lsp001wm@5c { |
| 156 | /* Barometer/pressure sensor */ |
| 157 | compatible = "st,lps001wp-press"; |
| 158 | reg = <0x5c>; |
| 159 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 160 | vddio-supply = <&db8500_vsmps2_reg>; |
| 161 | }; |
| 162 | }; |
Linus Walleij | 7ad86d6 | 2016-02-22 09:33:26 +0100 | [diff] [blame] | 163 | |
| 164 | i2c@80110000 { |
| 165 | synaptics@4b { |
| 166 | /* Synaptics RMI4 TM1217 touchscreen */ |
| 167 | compatible = "syna,rmi4-i2c"; |
| 168 | #address-cells = <1>; |
| 169 | #size-cells = <0>; |
| 170 | reg = <0x4b>; |
| 171 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 172 | vddio-supply = <&db8500_vsmps2_reg>; |
| 173 | pinctrl-names = "default"; |
| 174 | pinctrl-0 = <&synaptics_tvk_mode>; |
| 175 | interrupt-parent = <&gpio2>; |
| 176 | interrupts = <20 IRQ_TYPE_EDGE_FALLING>; |
| 177 | |
| 178 | rmi-f01@1 { |
| 179 | reg = <0x1>; |
| 180 | syna,nosleep = <1>; |
| 181 | }; |
| 182 | rmi-f11@11 { |
| 183 | reg = <0x11>; |
| 184 | touchscreen-inverted-x; |
| 185 | syna,sensor-type = <1>; |
| 186 | }; |
| 187 | }; |
| 188 | }; |
| 189 | |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 190 | pinctrl { |
| 191 | /* Pull up this GPIO pin */ |
| 192 | tc35893 { |
| 193 | tc35893_tvk_mode: tc35893_tvk { |
| 194 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 195 | pins = "GPIO218_AH11"; |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 196 | ste,config = <&gpio_in_pu>; |
| 197 | }; |
| 198 | }; |
| 199 | }; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 200 | prox { |
| 201 | prox_tvk_mode: prox_tvk { |
| 202 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 203 | pins = "GPIO217_AH12"; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 204 | ste,config = <&gpio_in_pu>; |
| 205 | }; |
| 206 | }; |
| 207 | }; |
| 208 | hall { |
| 209 | hall_tvk_mode: hall_tvk { |
| 210 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 211 | pins = "GPIO145_C13"; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 212 | ste,config = <&gpio_in_pu>; |
| 213 | }; |
| 214 | }; |
| 215 | }; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 216 | accelerometer { |
| 217 | accel_tvk_mode: accel_tvk { |
| 218 | /* Accelerometer interrupt lines 1 & 2 */ |
| 219 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 220 | pins = "GPIO82_C1", "GPIO83_D3"; |
Linus Walleij | 7ba5dd5 | 2016-02-05 14:00:00 +0100 | [diff] [blame^] | 221 | ste,config = <&gpio_in_pu>; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 222 | }; |
| 223 | }; |
| 224 | }; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 225 | gyroscope { |
| 226 | /* |
| 227 | * These lines are shared between Gyroscope l3g400dh |
| 228 | * and AK8974 magnetometer. |
| 229 | */ |
| 230 | gyro_magn_tvk_mode: gyro_magn_tvk { |
| 231 | /* GPIO 31 used for INT pull down the line */ |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 232 | tvk_cfg1 { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 233 | pins = "GPIO31_V3"; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 234 | ste,config = <&gpio_in_pd>; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 235 | }; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 236 | /* GPIO 32 used for DRDY, pull this down */ |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 237 | tvk_cfg2 { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 238 | pins = "GPIO32_V2"; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 239 | ste,config = <&gpio_in_pd>; |
| 240 | }; |
| 241 | }; |
| 242 | }; |
Linus Walleij | 7ad86d6 | 2016-02-22 09:33:26 +0100 | [diff] [blame] | 243 | synaptics { |
| 244 | synaptics_tvk_mode: synaptics_tvk { |
| 245 | /* Touchscreen uses GPIO 84 */ |
| 246 | tvk_cfg1 { |
| 247 | pins = "GPIO84_C2"; |
| 248 | ste,config = <&gpio_in_pu>; |
| 249 | }; |
| 250 | }; |
| 251 | }; |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 252 | }; |
Linus Walleij | 9c19cfa | 2013-09-26 15:34:02 +0200 | [diff] [blame] | 253 | }; |
| 254 | }; |