.. | .. |
---|
11 | 11 | #include "sama5d2-pinfunc.h" |
---|
12 | 12 | #include <dt-bindings/mfd/atmel-flexcom.h> |
---|
13 | 13 | #include <dt-bindings/gpio/gpio.h> |
---|
| 14 | +#include <dt-bindings/input/input.h> |
---|
14 | 15 | #include <dt-bindings/pinctrl/at91.h> |
---|
15 | 16 | |
---|
16 | 17 | / { |
---|
.. | .. |
---|
18 | 19 | compatible = "atmel,sama5d2-ptc_ek", "atmel,sama5d2", "atmel,sama5"; |
---|
19 | 20 | |
---|
20 | 21 | aliases { |
---|
21 | | - serial0 = &uart0; |
---|
22 | | - i2c0 = &i2c0; |
---|
23 | | - i2c1 = &i2c1; |
---|
| 22 | + serial0 = &uart0; /* DBGU */ |
---|
| 23 | + i2c0 = &i2c0; /* mikroBUS 1 */ |
---|
| 24 | + i2c1 = &i2c1; /* XPRO EXT1 */ |
---|
24 | 25 | i2c2 = &i2c2; |
---|
25 | 26 | }; |
---|
26 | 27 | |
---|
.. | .. |
---|
178 | 179 | |
---|
179 | 180 | i2c0: i2c@f8028000 { |
---|
180 | 181 | dmas = <0>, <0>; |
---|
181 | | - pinctrl-names = "default"; |
---|
| 182 | + pinctrl-names = "default", "gpio"; |
---|
182 | 183 | pinctrl-0 = <&pinctrl_i2c0_default>; |
---|
| 184 | + pinctrl-1 = <&pinctrl_i2c0_gpio>; |
---|
| 185 | + sda-gpios = <&pioA PIN_PD21 GPIO_ACTIVE_HIGH>; |
---|
| 186 | + scl-gpios = <&pioA PIN_PD22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
---|
183 | 187 | status = "okay"; |
---|
184 | 188 | }; |
---|
185 | 189 | |
---|
.. | .. |
---|
188 | 192 | status = "okay"; |
---|
189 | 193 | |
---|
190 | 194 | i2c2: i2c@600 { |
---|
191 | | - compatible = "atmel,sama5d2-i2c"; |
---|
192 | | - reg = <0x600 0x200>; |
---|
193 | | - interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>; |
---|
194 | 195 | dmas = <0>, <0>; |
---|
195 | | - dma-names = "tx", "rx"; |
---|
196 | | - #address-cells = <1>; |
---|
197 | | - #size-cells = <0>; |
---|
198 | | - clocks = <&flx0_clk>; |
---|
199 | | - pinctrl-names = "default"; |
---|
| 196 | + pinctrl-names = "default", "gpio"; |
---|
200 | 197 | pinctrl-0 = <&pinctrl_flx0_default>; |
---|
201 | | - atmel,fifo-size = <16>; |
---|
| 198 | + pinctrl-1 = <&pinctrl_flx0_gpio>; |
---|
| 199 | + sda-gpios = <&pioA PIN_PB28 GPIO_ACTIVE_HIGH>; |
---|
| 200 | + scl-gpios = <&pioA PIN_PB29 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
---|
202 | 201 | status = "okay"; |
---|
203 | 202 | }; |
---|
204 | 203 | }; |
---|
205 | 204 | |
---|
206 | 205 | shdwc@f8048010 { |
---|
207 | | - atmel,shdwc-debouncer = <976>; |
---|
| 206 | + debounce-delay-us = <976>; |
---|
208 | 207 | |
---|
209 | 208 | input@0 { |
---|
210 | 209 | reg = <0>; |
---|
.. | .. |
---|
224 | 223 | |
---|
225 | 224 | i2c1: i2c@fc028000 { |
---|
226 | 225 | dmas = <0>, <0>; |
---|
227 | | - pinctrl-names = "default"; |
---|
| 226 | + pinctrl-names = "default", "gpio"; |
---|
228 | 227 | pinctrl-0 = <&pinctrl_i2c1_default>; |
---|
| 228 | + pinctrl-1 = <&pinctrl_i2c1_gpio>; |
---|
| 229 | + sda-gpios = <&pioA PIN_PC6 GPIO_ACTIVE_HIGH>; |
---|
| 230 | + scl-gpios = <&pioA PIN_PC7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
---|
229 | 231 | status = "okay"; |
---|
230 | 232 | |
---|
231 | 233 | at24@50 { |
---|
.. | .. |
---|
242 | 244 | bias-disable; |
---|
243 | 245 | }; |
---|
244 | 246 | |
---|
| 247 | + pinctrl_flx0_gpio: flx0_gpio { |
---|
| 248 | + pinmux = <PIN_PB28__GPIO>, |
---|
| 249 | + <PIN_PB29__GPIO>; |
---|
| 250 | + bias-disable; |
---|
| 251 | + }; |
---|
| 252 | + |
---|
245 | 253 | pinctrl_i2c0_default: i2c0_default { |
---|
246 | 254 | pinmux = <PIN_PD21__TWD0>, |
---|
247 | 255 | <PIN_PD22__TWCK0>; |
---|
248 | 256 | bias-disable; |
---|
249 | 257 | }; |
---|
250 | 258 | |
---|
| 259 | + pinctrl_i2c0_gpio: i2c0_gpio { |
---|
| 260 | + pinmux = <PIN_PD21__GPIO>, |
---|
| 261 | + <PIN_PD22__GPIO>; |
---|
| 262 | + bias-disable; |
---|
| 263 | + }; |
---|
| 264 | + |
---|
251 | 265 | pinctrl_i2c1_default: i2c1_default { |
---|
252 | 266 | pinmux = <PIN_PC6__TWD1>, |
---|
253 | 267 | <PIN_PC7__TWCK1>; |
---|
| 268 | + bias-disable; |
---|
| 269 | + }; |
---|
| 270 | + |
---|
| 271 | + pinctrl_i2c1_gpio: i2c1_gpio { |
---|
| 272 | + pinmux = <PIN_PC6__GPIO>, |
---|
| 273 | + <PIN_PC7__GPIO>; |
---|
254 | 274 | bias-disable; |
---|
255 | 275 | }; |
---|
256 | 276 | |
---|
.. | .. |
---|
384 | 404 | bp1 { |
---|
385 | 405 | label = "PB_USER"; |
---|
386 | 406 | gpios = <&pioA PIN_PA10 GPIO_ACTIVE_LOW>; |
---|
387 | | - linux,code = <0x104>; |
---|
| 407 | + linux,code = <KEY_PROG1>; |
---|
| 408 | + wakeup-source; |
---|
388 | 409 | }; |
---|
389 | 410 | }; |
---|
390 | 411 | |
---|