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 | 83919ef | 2016-07-04 15:10:57 +0200 | [diff] [blame] | 102 | /* |
| 103 | * These interrupts cannot be used: the other component |
| 104 | * ST-Micro L3D4200D gyro that is connected to the same lines |
| 105 | * cannot set its DRDY line to open drain, so it cannot be |
| 106 | * shared with other peripherals. The should be defined for |
| 107 | * the falling edge if they could be wired together. |
| 108 | * |
| 109 | * interrupts-extended = |
| 110 | * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>, |
| 111 | * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>; |
| 112 | */ |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 113 | }; |
Linus Walleij | 93deea9 | 2015-04-29 14:08:38 +0200 | [diff] [blame] | 114 | lsm303dlh@1e { |
Linus Walleij | 83919ef | 2016-07-04 15:10:57 +0200 | [diff] [blame] | 115 | /* Magnetometer */ |
Linus Walleij | 93deea9 | 2015-04-29 14:08:38 +0200 | [diff] [blame] | 116 | compatible = "st,lsm303dlh-magn"; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 117 | reg = <0x1e>; |
| 118 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 119 | vddio-supply = <&db8500_vsmps2_reg>; |
Linus Walleij | 83919ef | 2016-07-04 15:10:57 +0200 | [diff] [blame] | 120 | /* |
| 121 | * These interrupts cannot be used: the other component |
| 122 | * ST-Micro L3D4200D gyro that is connected to the same lines |
| 123 | * cannot set its DRDY line to open drain, so it cannot be |
| 124 | * shared with other peripherals. The should be defined for |
| 125 | * the falling edge if they could be wired together. |
| 126 | * |
| 127 | * interrupts-extended = |
| 128 | * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>, |
| 129 | * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>; |
| 130 | */ |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 131 | }; |
| 132 | lis331dl@1c { |
| 133 | /* Accelerometer */ |
| 134 | compatible = "st,lis331dl-accel"; |
| 135 | st,drdy-int-pin = <1>; |
| 136 | reg = <0x1c>; |
| 137 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 138 | vddio-supply = <&db8500_vsmps2_reg>; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 139 | pinctrl-names = "default"; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 140 | pinctrl-0 = <&accel_tvk_mode>; |
| 141 | interrupt-parent = <&gpio2>; |
Linus Walleij | 83919ef | 2016-07-04 15:10:57 +0200 | [diff] [blame] | 142 | /* INT2 would need to be open drain */ |
| 143 | interrupts = <18 IRQ_TYPE_EDGE_RISING>, |
| 144 | <19 IRQ_TYPE_EDGE_RISING>; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 145 | }; |
| 146 | ak8974@0f { |
| 147 | /* Magnetometer */ |
| 148 | compatible = "asahi-kasei,ak8974"; |
| 149 | reg = <0x0f>; |
Linus Walleij | 83919ef | 2016-07-04 15:10:57 +0200 | [diff] [blame] | 150 | avdd-supply = <&ab8500_ldo_aux1_reg>; |
| 151 | dvdd-supply = <&db8500_vsmps2_reg>; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 152 | pinctrl-names = "default"; |
| 153 | pinctrl-0 = <&gyro_magn_tvk_mode>; |
Linus Walleij | 83919ef | 2016-07-04 15:10:57 +0200 | [diff] [blame] | 154 | /* |
| 155 | * These interrupts cannot be used: the other component |
| 156 | * ST-Micro L3D4200D gyro that is connected to the same lines |
| 157 | * cannot set its DRDY line to open drain, so it cannot be |
| 158 | * shared with other peripherals. The should be defined for |
| 159 | * the falling edge if they could be wired together. |
| 160 | * |
| 161 | * interrupts-extended = |
| 162 | * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>, |
| 163 | * <&gpio0 31 IRQ_TYPE_EDGE_FALLING>; |
| 164 | */ |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 165 | }; |
| 166 | l3g4200d@68 { |
| 167 | /* Gyroscope */ |
| 168 | compatible = "st,l3g4200d-gyro"; |
| 169 | st,drdy-int-pin = <2>; |
| 170 | reg = <0x68>; |
| 171 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 172 | vddio-supply = <&db8500_vsmps2_reg>; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 173 | pinctrl-names = "default"; |
| 174 | pinctrl-0 = <&gyro_magn_tvk_mode>; |
Linus Walleij | 83919ef | 2016-07-04 15:10:57 +0200 | [diff] [blame] | 175 | interrupts-extended = |
| 176 | <&gpio1 0 IRQ_TYPE_EDGE_RISING>, |
| 177 | <&gpio0 31 IRQ_TYPE_EDGE_RISING>; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 178 | }; |
| 179 | lsp001wm@5c { |
| 180 | /* Barometer/pressure sensor */ |
| 181 | compatible = "st,lps001wp-press"; |
| 182 | reg = <0x5c>; |
| 183 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 184 | vddio-supply = <&db8500_vsmps2_reg>; |
| 185 | }; |
| 186 | }; |
Linus Walleij | 7ad86d6 | 2016-02-22 09:33:26 +0100 | [diff] [blame] | 187 | |
| 188 | i2c@80110000 { |
| 189 | synaptics@4b { |
| 190 | /* Synaptics RMI4 TM1217 touchscreen */ |
| 191 | compatible = "syna,rmi4-i2c"; |
| 192 | #address-cells = <1>; |
| 193 | #size-cells = <0>; |
| 194 | reg = <0x4b>; |
| 195 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 196 | vddio-supply = <&db8500_vsmps2_reg>; |
| 197 | pinctrl-names = "default"; |
| 198 | pinctrl-0 = <&synaptics_tvk_mode>; |
| 199 | interrupt-parent = <&gpio2>; |
| 200 | interrupts = <20 IRQ_TYPE_EDGE_FALLING>; |
| 201 | |
| 202 | rmi-f01@1 { |
| 203 | reg = <0x1>; |
| 204 | syna,nosleep = <1>; |
| 205 | }; |
| 206 | rmi-f11@11 { |
| 207 | reg = <0x11>; |
| 208 | touchscreen-inverted-x; |
| 209 | syna,sensor-type = <1>; |
| 210 | }; |
| 211 | }; |
| 212 | }; |
| 213 | |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 214 | pinctrl { |
| 215 | /* Pull up this GPIO pin */ |
| 216 | tc35893 { |
| 217 | tc35893_tvk_mode: tc35893_tvk { |
| 218 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 219 | pins = "GPIO218_AH11"; |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 220 | ste,config = <&gpio_in_pu>; |
| 221 | }; |
| 222 | }; |
| 223 | }; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 224 | prox { |
| 225 | prox_tvk_mode: prox_tvk { |
| 226 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 227 | pins = "GPIO217_AH12"; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 228 | ste,config = <&gpio_in_pu>; |
| 229 | }; |
| 230 | }; |
| 231 | }; |
| 232 | hall { |
| 233 | hall_tvk_mode: hall_tvk { |
| 234 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 235 | pins = "GPIO145_C13"; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 236 | ste,config = <&gpio_in_pu>; |
| 237 | }; |
| 238 | }; |
| 239 | }; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 240 | accelerometer { |
| 241 | accel_tvk_mode: accel_tvk { |
| 242 | /* Accelerometer interrupt lines 1 & 2 */ |
| 243 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 244 | pins = "GPIO82_C1", "GPIO83_D3"; |
Linus Walleij | 83919ef | 2016-07-04 15:10:57 +0200 | [diff] [blame] | 245 | ste,config = <&gpio_in_pd>; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 246 | }; |
| 247 | }; |
| 248 | }; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 249 | gyroscope { |
| 250 | /* |
| 251 | * These lines are shared between Gyroscope l3g400dh |
| 252 | * and AK8974 magnetometer. |
| 253 | */ |
| 254 | gyro_magn_tvk_mode: gyro_magn_tvk { |
| 255 | /* GPIO 31 used for INT pull down the line */ |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 256 | tvk_cfg1 { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 257 | pins = "GPIO31_V3"; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 258 | ste,config = <&gpio_in_pd>; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 259 | }; |
Linus Walleij | 2f23cda | 2015-11-13 15:00:03 +0100 | [diff] [blame] | 260 | /* GPIO 32 used for DRDY, pull this down */ |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 261 | tvk_cfg2 { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 262 | pins = "GPIO32_V2"; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 263 | ste,config = <&gpio_in_pd>; |
| 264 | }; |
| 265 | }; |
| 266 | }; |
Linus Walleij | 7ad86d6 | 2016-02-22 09:33:26 +0100 | [diff] [blame] | 267 | synaptics { |
| 268 | synaptics_tvk_mode: synaptics_tvk { |
| 269 | /* Touchscreen uses GPIO 84 */ |
| 270 | tvk_cfg1 { |
| 271 | pins = "GPIO84_C2"; |
| 272 | ste,config = <&gpio_in_pu>; |
| 273 | }; |
| 274 | }; |
| 275 | }; |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 276 | }; |
Linus Walleij | 9c19cfa | 2013-09-26 15:34:02 +0200 | [diff] [blame] | 277 | }; |
| 278 | }; |