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 */ |
| 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 Walleij | 9c19cfa | 2013-09-26 15:34:02 +0200 | [diff] [blame] | 39 | soc { |
Linus Walleij | 7e0a51a | 2013-10-15 23:00:10 +0200 | [diff] [blame] | 40 | /* Add Synaptics touch screen, TC35893 keypad etc here */ |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 41 | i2c@80004000 { |
Linus Walleij | 7e0a51a | 2013-10-15 23:00:10 +0200 | [diff] [blame] | 42 | tc35893@44 { |
| 43 | compatible = "toshiba,tc35893"; |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 44 | reg = <0x44>; |
| 45 | interrupt-parent = <&gpio6>; |
| 46 | interrupts = <26 IRQ_TYPE_EDGE_RISING>; |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 47 | pinctrl-names = "default"; |
| 48 | pinctrl-0 = <&tc35893_tvk_mode>; |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 49 | |
| 50 | interrupt-controller; |
Linus Walleij | 7e0a51a | 2013-10-15 23:00:10 +0200 | [diff] [blame] | 51 | #interrupt-cells = <1>; |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 52 | |
| 53 | tc3589x_gpio { |
Linus Walleij | 7e0a51a | 2013-10-15 23:00:10 +0200 | [diff] [blame] | 54 | compatible = "toshiba,tc3589x-gpio"; |
| 55 | interrupts = <0>; |
Linus Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 56 | |
| 57 | interrupt-controller; |
| 58 | #interrupt-cells = <2>; |
| 59 | gpio-controller; |
| 60 | #gpio-cells = <2>; |
| 61 | }; |
Linus Walleij | 7e0a51a | 2013-10-15 23:00:10 +0200 | [diff] [blame] | 62 | 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; |
| 69 | linux,wakeup; |
| 70 | 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 Walleij | 84919b9 | 2013-10-03 10:18:36 +0200 | [diff] [blame] | 89 | }; |
| 90 | }; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 91 | /* 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>; |
| 102 | }; |
Linus Walleij | 93deea9 | 2015-04-29 14:08:38 +0200 | [diff] [blame^] | 103 | lsm303dlh@1e { |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 104 | /* Magnetometer */ |
Linus Walleij | 93deea9 | 2015-04-29 14:08:38 +0200 | [diff] [blame^] | 105 | compatible = "st,lsm303dlh-magn"; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 106 | reg = <0x1e>; |
| 107 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 108 | vddio-supply = <&db8500_vsmps2_reg>; |
| 109 | pinctrl-names = "default"; |
| 110 | pinctrl-0 = <&magneto_tvk_mode>; |
| 111 | }; |
| 112 | l3g4200d@68 { |
| 113 | /* Gyroscope */ |
| 114 | compatible = "st,l3g4200d-gyro"; |
| 115 | st,drdy-int-pin = <2>; |
| 116 | reg = <0x68>; |
| 117 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 118 | vddio-supply = <&db8500_vsmps2_reg>; |
| 119 | }; |
| 120 | lsp001wm@5c { |
| 121 | /* Barometer/pressure sensor */ |
| 122 | compatible = "st,lps001wp-press"; |
| 123 | reg = <0x5c>; |
| 124 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 125 | vddio-supply = <&db8500_vsmps2_reg>; |
| 126 | }; |
| 127 | }; |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 128 | pinctrl { |
| 129 | /* Pull up this GPIO pin */ |
| 130 | tc35893 { |
| 131 | tc35893_tvk_mode: tc35893_tvk { |
| 132 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 133 | pins = "GPIO218_AH11"; |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 134 | ste,config = <&gpio_in_pu>; |
| 135 | }; |
| 136 | }; |
| 137 | }; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 138 | prox { |
| 139 | prox_tvk_mode: prox_tvk { |
| 140 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 141 | pins = "GPIO217_AH12"; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 142 | ste,config = <&gpio_in_pu>; |
| 143 | }; |
| 144 | }; |
| 145 | }; |
| 146 | hall { |
| 147 | hall_tvk_mode: hall_tvk { |
| 148 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 149 | pins = "GPIO145_C13"; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 150 | ste,config = <&gpio_in_pu>; |
| 151 | }; |
| 152 | }; |
| 153 | }; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 154 | accelerometer { |
| 155 | accel_tvk_mode: accel_tvk { |
| 156 | /* Accelerometer interrupt lines 1 & 2 */ |
| 157 | tvk_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 158 | pins = "GPIO82_C1", "GPIO83_D3"; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 159 | ste,config = <&gpio_in_pu>; |
| 160 | }; |
| 161 | }; |
| 162 | }; |
| 163 | magnetometer { |
| 164 | magneto_tvk_mode: magneto_tvk { |
| 165 | /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */ |
| 166 | tvk_cfg1 { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 167 | pins = "GPIO31_V3"; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 168 | ste,config = <&gpio_in_pu>; |
| 169 | }; |
| 170 | tvk_cfg2 { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 171 | pins = "GPIO32_V2"; |
Linus Walleij | d0e3bc8 | 2014-04-12 17:13:23 +0200 | [diff] [blame] | 172 | ste,config = <&gpio_in_pd>; |
| 173 | }; |
| 174 | }; |
| 175 | }; |
Linus Walleij | a45cb69 | 2013-11-13 14:57:49 +0100 | [diff] [blame] | 176 | }; |
Linus Walleij | 9c19cfa | 2013-09-26 15:34:02 +0200 | [diff] [blame] | 177 | }; |
| 178 | }; |