Lee Jones | 6934e00 | 2012-09-28 14:06:29 +0100 | [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 | |
Linus Walleij | 90c4025 | 2013-05-29 19:15:39 +0200 | [diff] [blame] | 12 | #include <dt-bindings/interrupt-controller/irq.h> |
| 13 | |
Lee Jones | 6934e00 | 2012-09-28 14:06:29 +0100 | [diff] [blame] | 14 | / { |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 15 | 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 */ |
| 25 | gpios = <&gpio6 25 0x4>; |
| 26 | linux,code = <11>; /* SW_FRONT_PROXIMITY */ |
| 27 | label = "SFH7741 Proximity Sensor"; |
| 28 | }; |
| 29 | button@145 { |
| 30 | /* Hall sensor */ |
| 31 | gpios = <&gpio4 17 0x4>; |
| 32 | linux,code = <0>; /* SW_LID */ |
| 33 | label = "HED54XXU11 Hall Effect Sensor"; |
| 34 | }; |
| 35 | }; |
| 36 | |
Gabriel Fernandez | b1ba143 | 2013-03-01 14:38:07 +0100 | [diff] [blame] | 37 | soc { |
Lee Jones | cb55270 | 2012-10-04 12:41:35 +0100 | [diff] [blame] | 38 | i2c@80004000 { |
| 39 | stmpe1601: stmpe1601@40 { |
| 40 | compatible = "st,stmpe1601"; |
| 41 | reg = <0x40>; |
Linus Walleij | 90c4025 | 2013-05-29 19:15:39 +0200 | [diff] [blame] | 42 | interrupts = <26 IRQ_TYPE_EDGE_FALLING>; |
Lee Jones | cb55270 | 2012-10-04 12:41:35 +0100 | [diff] [blame] | 43 | interrupt-parent = <&gpio6>; |
| 44 | interrupt-controller; |
Linus Walleij | 4ada212 | 2014-04-15 17:31:00 +0200 | [diff] [blame] | 45 | vcc-supply = <&db8500_vsmps2_reg>; |
| 46 | vio-supply = <&db8500_vsmps2_reg>; |
Lee Jones | cb55270 | 2012-10-04 12:41:35 +0100 | [diff] [blame] | 47 | |
| 48 | wakeup-source; |
| 49 | st,autosleep-timeout = <1024>; |
Lee Jones | 0927781 | 2012-10-04 14:21:35 +0100 | [diff] [blame] | 50 | |
| 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 Jones | cb55270 | 2012-10-04 12:41:35 +0100 | [diff] [blame] | 77 | }; |
| 78 | }; |
| 79 | |
Linus Walleij | df44ad8 | 2014-04-23 10:40:10 +0200 | [diff] [blame] | 80 | /* 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 Jones | cbebba7 | 2012-09-28 14:41:06 +0100 | [diff] [blame] | 108 | i2c@80110000 { |
Linus Walleij | d594224 | 2013-06-04 11:50:32 +0200 | [diff] [blame] | 109 | bu21013_tp@5c { |
Linus Walleij | 2852136 | 2013-05-21 13:55:15 +0200 | [diff] [blame] | 110 | compatible = "rohm,bu21013_tp"; |
Lee Jones | cbebba7 | 2012-09-28 14:41:06 +0100 | [diff] [blame] | 111 | reg = <0x5c>; |
Lee Jones | cbebba7 | 2012-09-28 14:41:06 +0100 | [diff] [blame] | 112 | avdd-supply = <&ab8500_ldo_aux1_reg>; |
| 113 | |
Linus Walleij | 2852136 | 2013-05-21 13:55:15 +0200 | [diff] [blame] | 114 | rohm,touch-max-x = <384>; |
| 115 | rohm,touch-max-y = <704>; |
| 116 | rohm,flip-y; |
Lee Jones | cbebba7 | 2012-09-28 14:41:06 +0100 | [diff] [blame] | 117 | }; |
| 118 | |
Linus Walleij | d594224 | 2013-06-04 11:50:32 +0200 | [diff] [blame] | 119 | bu21013_tp@5d { |
Linus Walleij | 2852136 | 2013-05-21 13:55:15 +0200 | [diff] [blame] | 120 | compatible = "rohm,bu21013_tp"; |
Lee Jones | cbebba7 | 2012-09-28 14:41:06 +0100 | [diff] [blame] | 121 | reg = <0x5d>; |
Lee Jones | cbebba7 | 2012-09-28 14:41:06 +0100 | [diff] [blame] | 122 | avdd-supply = <&ab8500_ldo_aux1_reg>; |
| 123 | |
Linus Walleij | 2852136 | 2013-05-21 13:55:15 +0200 | [diff] [blame] | 124 | rohm,touch-max-x = <384>; |
| 125 | rohm,touch-max-y = <704>; |
| 126 | rohm,flip-y; |
Lee Jones | cbebba7 | 2012-09-28 14:41:06 +0100 | [diff] [blame] | 127 | }; |
| 128 | }; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 129 | |
| 130 | pinctrl { |
| 131 | prox { |
| 132 | prox_stuib_mode: prox_stuib { |
| 133 | stuib_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 134 | pins = "GPIO217_AH12"; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 135 | ste,config = <&gpio_in_pu>; |
| 136 | }; |
| 137 | }; |
| 138 | }; |
| 139 | hall { |
| 140 | hall_stuib_mode: stuib_tvk { |
| 141 | stuib_cfg { |
Linus Walleij | 1637d48 | 2014-09-30 12:16:25 +0200 | [diff] [blame] | 142 | pins = "GPIO145_C13"; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 143 | ste,config = <&gpio_in_pu>; |
| 144 | }; |
| 145 | }; |
| 146 | }; |
Linus Walleij | df44ad8 | 2014-04-23 10:40:10 +0200 | [diff] [blame] | 147 | accelerometer { |
| 148 | accel_stuib_mode: accel_stuib { |
| 149 | /* Accelerometer interrupt lines 1 & 2 */ |
| 150 | stuib_cfg { |
| 151 | pins = "GPIO82_C1", "GPIO83_D3"; |
| 152 | ste,config = <&gpio_in_pu>; |
| 153 | }; |
| 154 | }; |
| 155 | }; |
| 156 | magnetometer { |
| 157 | magneto_stuib_mode: magneto_stuib { |
| 158 | /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */ |
| 159 | stuib_cfg1 { |
| 160 | pins = "GPIO31_V3"; |
| 161 | ste,config = <&gpio_in_pu>; |
| 162 | }; |
| 163 | stuib_cfg2 { |
| 164 | pins = "GPIO32_V2"; |
| 165 | ste,config = <&gpio_in_pd>; |
| 166 | }; |
| 167 | }; |
| 168 | }; |
Linus Walleij | 1a780d4 | 2013-11-15 13:43:02 +0100 | [diff] [blame] | 169 | }; |
Lee Jones | 6934e00 | 2012-09-28 14:06:29 +0100 | [diff] [blame] | 170 | }; |
| 171 | }; |