at91: Add SAMA5D27 SOM1 EK board
[openwrt/staging/mkresin.git] / target / linux / at91 / patches-4.9 / 104-ARM-at91-build-dtb-for-sama5d27-SOM1-Ek.patch
1 diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
2 index 61ac757..9820227 100644
3 --- a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
4 +++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
5 @@ -35,7 +35,12 @@ right representation of the pin.
6 Optional properties:
7 - GENERIC_PINCONFIG: generic pinconfig options to use, bias-disable,
8 bias-pull-down, bias-pull-up, drive-open-drain, input-schmitt-enable,
9 -input-debounce, output-low, output-high.
10 +input-debounce, output-low, output-high, drive-strength.
11 +
12 +Concerning the drive-strength property, the values accepted are
13 +ATMEL_PIO_DRVSTR_LO, ATMEL_PIO_DRVSTR_ME, ATMEL_PIO_DRVSTR_HI. The current
14 +depends on VDDIOP. You can find the details in the DC Characteristics table
15 +from the datasheet.
16
17 Example:
18
19 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
20 index 1218005..c88e426 100644
21 --- a/arch/arm/boot/dts/Makefile
22 +++ b/arch/arm/boot/dts/Makefile
23 @@ -49,6 +49,7 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \
24 wb45n.dtb
25 dtb-$(CONFIG_SOC_SAM_V7) += \
26 at91-kizbox2.dtb \
27 + at91-sama5d27_som1_ek.dtb \
28 at91-sama5d2_xplained.dtb \
29 at91-sama5d3_xplained.dtb \
30 sama5d31ek.dtb \
31 diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
32 new file mode 100644
33 index 0000000..7d7575f
34 --- /dev/null
35 +++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
36 @@ -0,0 +1,175 @@
37 +/*
38 + * at91-sama5d27_som1.dtsi - Device Tree file for SAMA5D27 SoM1 board
39 + *
40 + * Copyright (c) 2017, Microchip Technology Inc.
41 + * 2017 Cristian Birsan <cristian.birsan@microchip.com>
42 + * 2017 Claudiu Beznea <claudiu.beznea@microchip.com>
43 + *
44 + * This file is dual-licensed: you can use it either under the terms
45 + * of the GPL or the X11 license, at your option. Note that this dual
46 + * licensing only applies to this file, and not this project as a
47 + * whole.
48 + *
49 + * a) This file is free software; you can redistribute it and/or
50 + * modify it under the terms of the GNU General Public License as
51 + * published by the Free Software Foundation; either version 2 of the
52 + * License, or (at your option) any later version.
53 + *
54 + * This file is distributed in the hope that it will be useful,
55 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
56 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 + * GNU General Public License for more details.
58 + *
59 + * Or, alternatively,
60 + *
61 + * b) Permission is hereby granted, free of charge, to any person
62 + * obtaining a copy of this software and associated documentation
63 + * files (the "Software"), to deal in the Software without
64 + * restriction, including without limitation the rights to use,
65 + * copy, modify, merge, publish, distribute, sublicense, and/or
66 + * sell copies of the Software, and to permit persons to whom the
67 + * Software is furnished to do so, subject to the following
68 + * conditions:
69 + *
70 + * The above copyright notice and this permission notice shall be
71 + * included in all copies or substantial portions of the Software.
72 + *
73 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
74 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
75 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
76 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
77 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
78 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
79 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
80 + * OTHER DEALINGS IN THE SOFTWARE.
81 + */
82 +#include "sama5d2.dtsi"
83 +#include "sama5d2-pinfunc.h"
84 +
85 +/ {
86 + model = "Atmel SAMA5D27 SoM1";
87 + compatible = "atmel,sama5d27-som1", "atmel,sama5d27", "atmel,sama5d2", "atmel,sama5";
88 +
89 + clocks {
90 + slow_xtal {
91 + clock-frequency = <32768>;
92 + };
93 +
94 + main_xtal {
95 + clock-frequency = <24000000>;
96 + };
97 + };
98 +
99 + ahb {
100 + apb {
101 + qspi1: spi@f0024000 {
102 + pinctrl-names = "default";
103 + pinctrl-0 = <&pinctrl_qspi1_default>;
104 +
105 + flash@0 {
106 + #address-cells = <1>;
107 + #size-cells = <1>;
108 + compatible = "jedec,spi-nor";
109 + reg = <0>;
110 + spi-max-frequency = <80000000>;
111 + m25p,fast-read;
112 +
113 + at91bootstrap@00000000 {
114 + label = "at91bootstrap";
115 + reg = <0x00000000 0x00010000>;
116 + };
117 +
118 + bootloader@00010000 {
119 + label = "bootloader";
120 + reg = <0x00010000 0x000a0000>;
121 + };
122 +
123 + bootloaderenv@000b0000 {
124 + label = "bootloader env";
125 + reg = <0x000b0000 0x00010000>;
126 + };
127 +
128 + dtb@000c0000 {
129 + label = "device tree";
130 + reg = <0x000c0000 0x0020000>;
131 + };
132 +
133 + kernel@000e0000 {
134 + label = "kernel";
135 + reg = <0x000e0000 0x0400000>;
136 + };
137 + };
138 + };
139 +
140 + macb0: ethernet@f8008000 {
141 + pinctrl-names = "default";
142 + pinctrl-0 = <&pinctrl_macb0_default>;
143 + phy-mode = "rmii";
144 +
145 + ethernet-phy@0 {
146 + reg = <0x0>;
147 + interrupt-parent = <&pioA>;
148 + interrupts = <PIN_PD31 IRQ_TYPE_LEVEL_LOW>;
149 + pinctrl-names = "default";
150 + pinctrl-0 = <&pinctrl_macb0_phy_irq>;
151 + };
152 + };
153 +
154 + i2c0: i2c@f8028000 {
155 + dmas = <0>, <0>;
156 + pinctrl-names = "default";
157 + pinctrl-0 = <&pinctrl_i2c0_default>;
158 + status = "okay";
159 +
160 + at24@50 {
161 + compatible = "24c02";
162 + reg = <0x50>;
163 + pagesize = <8>;
164 + };
165 + };
166 +
167 + pinctrl@fc038000 {
168 + pinctrl_i2c0_default: i2c0_default {
169 + pinmux = <PIN_PD21__TWD0>,
170 + <PIN_PD22__TWCK0>;
171 + bias-disable;
172 + };
173 +
174 + pinctrl_qspi1_default: qspi1_default {
175 + sck_cs {
176 + pinmux = <PIN_PB5__QSPI1_SCK>,
177 + <PIN_PB6__QSPI1_CS>;
178 + bias-disable;
179 + };
180 +
181 + data {
182 + pinmux = <PIN_PB7__QSPI1_IO0>,
183 + <PIN_PB8__QSPI1_IO1>,
184 + <PIN_PB9__QSPI1_IO2>,
185 + <PIN_PB10__QSPI1_IO3>;
186 + bias-pull-up;
187 + };
188 + };
189 +
190 + pinctrl_macb0_default: macb0_default {
191 + pinmux = <PIN_PD9__GTXCK>,
192 + <PIN_PD10__GTXEN>,
193 + <PIN_PD11__GRXDV>,
194 + <PIN_PD12__GRXER>,
195 + <PIN_PD13__GRX0>,
196 + <PIN_PD14__GRX1>,
197 + <PIN_PD15__GTX0>,
198 + <PIN_PD16__GTX1>,
199 + <PIN_PD17__GMDC>,
200 + <PIN_PD18__GMDIO>;
201 + bias-disable;
202 + };
203 +
204 + pinctrl_macb0_phy_irq: macb0_phy_irq {
205 + pinmux = <PIN_PD31__GPIO>;
206 + bias-disable;
207 + };
208 + };
209 + };
210 + };
211 +};
212 diff --git a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
213 new file mode 100644
214 index 0000000..fd12b68
215 --- /dev/null
216 +++ b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
217 @@ -0,0 +1,53 @@
218 +/*
219 + * at91-sama5d27_som1_ek.dts - Device Tree file for SAMA5D27-SOM1-EK board
220 + *
221 + * Copyright (c) 2017, Microchip Technology Inc.
222 + * 2016 Nicolas Ferre <nicolas.ferre@atmel.com>
223 + * 2017 Cristian Birsan <cristian.birsan@microchip.com>
224 + * 2017 Claudiu Beznea <claudiu.beznea@microchip.com>
225 + *
226 + * This file is dual-licensed: you can use it either under the terms
227 + * of the GPL or the X11 license, at your option. Note that this dual
228 + * licensing only applies to this file, and not this project as a
229 + * whole.
230 + *
231 + * a) This file is free software; you can redistribute it and/or
232 + * modify it under the terms of the GNU General Public License as
233 + * published by the Free Software Foundation; either version 2 of the
234 + * License, or (at your option) any later version.
235 + *
236 + * This file is distributed in the hope that it will be useful,
237 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
238 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
239 + * GNU General Public License for more details.
240 + *
241 + * Or, alternatively,
242 + *
243 + * b) Permission is hereby granted, free of charge, to any person
244 + * obtaining a copy of this software and associated documentation
245 + * files (the "Software"), to deal in the Software without
246 + * restriction, including without limitation the rights to use,
247 + * copy, modify, merge, publish, distribute, sublicense, and/or
248 + * sell copies of the Software, and to permit persons to whom the
249 + * Software is furnished to do so, subject to the following
250 + * conditions:
251 + *
252 + * The above copyright notice and this permission notice shall be
253 + * included in all copies or substantial portions of the Software.
254 + *
255 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
256 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
257 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
258 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
259 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
260 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
261 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
262 + * OTHER DEALINGS IN THE SOFTWARE.
263 + */
264 +/dts-v1/;
265 +#include "at91-sama5d27_som1_ek_common.dtsi"
266 +
267 +/ {
268 + model = "Atmel SAMA5D27 SOM1 EK";
269 + compatible = "atmel,sama5d27-som1-ek", "atmel,sama5d27-som1", "atmel,sama5d27", "atmel,sama5d2", "atmel,sama5";
270 +};
271 diff --git a/arch/arm/boot/dts/at91-sama5d27_som1_ek_common.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1_ek_common.dtsi
272 new file mode 100644
273 index 0000000..7201a8e
274 --- /dev/null
275 +++ b/arch/arm/boot/dts/at91-sama5d27_som1_ek_common.dtsi
276 @@ -0,0 +1,619 @@
277 +/*
278 + * at91-sama5d27_som1_ek_common.dtsi - Device Tree file for SAMA5D27-SOM1-EK board
279 + *
280 + * Copyright (c) 2017, Microchip Technology Inc.
281 + * 2016 Nicolas Ferre <nicolas.ferre@atmel.com>
282 + * 2017 Cristian Birsan <cristian.birsan@microchip.com>
283 + * 2017 Claudiu Beznea <claudiu.beznea@microchip.com>
284 + *
285 + * This file is dual-licensed: you can use it either under the terms
286 + * of the GPL or the X11 license, at your option. Note that this dual
287 + * licensing only applies to this file, and not this project as a
288 + * whole.
289 + *
290 + * a) This file is free software; you can redistribute it and/or
291 + * modify it under the terms of the GNU General Public License as
292 + * published by the Free Software Foundation; either version 2 of the
293 + * License, or (at your option) any later version.
294 + *
295 + * This file is distributed in the hope that it will be useful,
296 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
297 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
298 + * GNU General Public License for more details.
299 + *
300 + * Or, alternatively,
301 + *
302 + * b) Permission is hereby granted, free of charge, to any person
303 + * obtaining a copy of this software and associated documentation
304 + * files (the "Software"), to deal in the Software without
305 + * restriction, including without limitation the rights to use,
306 + * copy, modify, merge, publish, distribute, sublicense, and/or
307 + * sell copies of the Software, and to permit persons to whom the
308 + * Software is furnished to do so, subject to the following
309 + * conditions:
310 + *
311 + * The above copyright notice and this permission notice shall be
312 + * included in all copies or substantial portions of the Software.
313 + *
314 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
315 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
316 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
317 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
318 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
319 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
320 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
321 + * OTHER DEALINGS IN THE SOFTWARE.
322 + */
323 +#include "at91-sama5d27_som1.dtsi"
324 +#include <dt-bindings/mfd/atmel-flexcom.h>
325 +#include <dt-bindings/gpio/gpio.h>
326 +#include <dt-bindings/pinctrl/at91.h>
327 +
328 +/ {
329 + model = "Atmel SAMA5D27 SOM1 EK";
330 + compatible = "atmel,sama5d27-som1-ek", "atmel,sama5d27-som1", "atmel,sama5d27", "atmel,sama5d2", "atmel,sama5";
331 +
332 + aliases {
333 + serial0 = &uart1; /* DBGU */
334 + serial1 = &uart4; /* mikro BUS 1 */
335 + serial2 = &uart2; /* mikro BUS 2 */
336 + i2c1 = &i2c1;
337 + i2c2 = &i2c2;
338 + };
339 +
340 + chosen {
341 + stdout-path = "serial0:115200n8";
342 + };
343 +
344 + ahb {
345 + usb0: gadget@00300000 {
346 + atmel,vbus-gpio = <&pioA PIN_PD20 GPIO_ACTIVE_HIGH>;
347 + pinctrl-names = "default";
348 + pinctrl-0 = <&pinctrl_usba_vbus>;
349 + status = "okay";
350 + };
351 +
352 + usb1: ohci@00400000 {
353 + num-ports = <3>;
354 + atmel,vbus-gpio = <0 /* &pioA PIN_PD20 GPIO_ACTIVE_HIGH */
355 + &pioA PIN_PA27 GPIO_ACTIVE_HIGH
356 + 0
357 + >;
358 + pinctrl-names = "default";
359 + pinctrl-0 = <&pinctrl_usb_default>;
360 + status = "okay";
361 + };
362 +
363 + usb2: ehci@00500000 {
364 + status = "okay";
365 + };
366 +
367 + sdmmc0: sdio-host@a0000000 {
368 + bus-width = <8>;
369 + pinctrl-names = "default";
370 + pinctrl-0 = <&pinctrl_sdmmc0_default>;
371 + status = "okay";
372 + };
373 +
374 + sdmmc1: sdio-host@b0000000 {
375 + bus-width = <4>;
376 + pinctrl-names = "default";
377 + pinctrl-0 = <&pinctrl_sdmmc1_default>;
378 + status = "okay";
379 + };
380 +
381 + apb {
382 + hlcdc: hlcdc@f0000000 {
383 + status = "disabled";
384 +
385 + hlcdc-display-controller {
386 + pinctrl-names = "default";
387 + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb>;
388 + };
389 +
390 + hlcdc_pwm: hlcdc-pwm {
391 + pinctrl-names = "default";
392 + pinctrl-0 = <&pinctrl_lcd_pwm>;
393 + };
394 + };
395 +
396 + pmc: pmc@f0014000 {
397 + pmc_fast_restart {
398 + compatible = "atmel,sama5d2-pmc-fast-startup";
399 + #address-cells = <1>;
400 + #size-cells = <0>;
401 +
402 + atmel,wakeup-rtc-timer;
403 +
404 + wkpin: input@0 {
405 + reg = <0>;
406 + };
407 +
408 + gmac_wol: input@10 {
409 + reg = <10>;
410 + atmel,wakeup-active-high;
411 + };
412 + };
413 + };
414 +
415 + isc: isc@f0008000 {
416 + pinctrl-names = "default";
417 + pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>;
418 + status = "okay";
419 + };
420 +
421 + qspi1: spi@f0024000 {
422 + status = "okay";
423 + };
424 +
425 + spi0: spi@f8000000 {
426 + pinctrl-names = "default";
427 + pinctrl-0 = <&pinctrl_spi0_default>;
428 + status = "okay";
429 + };
430 +
431 + macb0: ethernet@f8008000 {
432 + status = "okay";
433 + };
434 +
435 + uart1: serial@f8020000 {
436 + pinctrl-names = "default";
437 + pinctrl-0 = <&pinctrl_uart1_default>;
438 + atmel,use-dma-rx;
439 + atmel,use-dma-tx;
440 + status = "okay";
441 + };
442 +
443 + uart2: serial@f8024000 {
444 + pinctrl-names = "default";
445 + pinctrl-0 = <&pinctrl_mikrobus2_uart>;
446 + atmel,use-dma-rx;
447 + atmel,use-dma-tx;
448 + status = "okay";
449 + };
450 +
451 + pwm0: pwm@f802c000 {
452 + pinctrl-names = "default";
453 + pinctrl-0 = <&pinctrl_mikrobus1_pwm &pinctrl_mikrobus2_pwm>;
454 + status = "disabled"; /* Conflict with leds. */
455 + };
456 +
457 + flx1: flexcom@f8038000 {
458 + atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
459 + status = "okay";
460 +
461 + i2c2: i2c@600 {
462 + compatible = "atmel,sama5d2-i2c";
463 + reg = <0x600 0x200>;
464 + interrupts = <20 IRQ_TYPE_LEVEL_HIGH 7>;
465 + dmas = <0>, <0>;
466 + dma-names = "tx", "rx";
467 + #address-cells = <1>;
468 + #size-cells = <0>;
469 + clocks = <&flx1_clk>;
470 + pinctrl-names = "default";
471 + pinctrl-0 = <&pinctrl_mikrobus_i2c>;
472 + atmel,fifo-size = <16>;
473 + status = "okay";
474 + };
475 + };
476 +
477 + shdwc@f8048010 {
478 + atmel,shdwc-debouncer = <976>;
479 + atmel,wakeup-rtc-timer;
480 +
481 + input@0 {
482 + reg = <0>;
483 + atmel,wakeup-type = "low";
484 + };
485 + };
486 +
487 + watchdog@f8048040 {
488 + status = "okay";
489 + };
490 +
491 + uart3: serial@fc008000 {
492 + atmel,use-dma-rx;
493 + atmel,use-dma-tx;
494 + pinctrl-names = "default";
495 + pinctrl-0 = <&pinctrl_uart3_default>;
496 + status = "disabled"; /* Conflict with isc. */
497 + };
498 +
499 + uart4: serial@fc00c000 {
500 + atmel,use-dma-rx;
501 + atmel,use-dma-tx;
502 + pinctrl-names = "default";
503 + pinctrl-0 = <&pinctrl_mikrobus1_uart>;
504 + status = "okay";
505 + };
506 +
507 + flx3: flexcom@fc014000 {
508 + atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
509 + status = "disabled";
510 +
511 + uart7: serial@200 {
512 + compatible = "atmel,at91sam9260-usart";
513 + reg = <0x200 0x200>;
514 + interrupts = <22 IRQ_TYPE_LEVEL_HIGH 7>;
515 + clocks = <&flx3_clk>;
516 + clock-names = "usart";
517 + pinctrl-names = "default";
518 + pinctrl-0 = <&pinctrl_flx3_default>;
519 + atmel,fifo-size = <32>;
520 + status = "disabled"; /* Conflict with isc. */
521 + };
522 +
523 + spi2: spi@400 {
524 + compatible = "atmel,at91rm9200-spi";
525 + reg = <0x400 0x200>;
526 + interrupts = <22 IRQ_TYPE_LEVEL_HIGH 7>;
527 + clocks = <&flx3_clk>;
528 + clock-names = "spi_clk";
529 + pinctrl-names = "default";
530 + pinctrl-0 = <&pinctrl_flx3_default>;
531 + atmel,fifo-size = <16>;
532 + status = "disabled"; /* Conflict with isc. */
533 + };
534 + };
535 +
536 + flx4: flexcom@fc018000 {
537 + atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
538 + status = "okay";
539 +
540 + uart6: serial@200 {
541 + compatible = "atmel,at91sam9260-usart";
542 + reg = <0x200 0x200>;
543 + interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
544 + clocks = <&flx4_clk>;
545 + clock-names = "usart";
546 + pinctrl-names = "default";
547 + pinctrl-0 = <&pinctrl_flx4_default>;
548 + atmel,fifo-size = <32>;
549 + status = "disabled"; /* Conflict with spi3 and i2c3. */
550 + };
551 +
552 + spi3: spi@400 {
553 + compatible = "atmel,at91rm9200-spi";
554 + reg = <0x400 0x200>;
555 + interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
556 + clocks = <&flx4_clk>;
557 + clock-names = "spi_clk";
558 + pinctrl-names = "default";
559 + pinctrl-0 = <&pinctrl_mikrobus_spi &pinctrl_mikrobus1_spi_cs &pinctrl_mikrobus2_spi_cs>;
560 + atmel,fifo-size = <16>;
561 + status = "okay";
562 + };
563 +
564 + i2c3: i2c@600 {
565 + compatible = "atmel,sama5d2-i2c";
566 + reg = <0x600 0x200>;
567 + interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
568 + dmas = <0>, <0>;
569 + dma-names = "tx", "rx";
570 + #address-cells = <1>;
571 + #size-cells = <0>;
572 + clocks = <&flx4_clk>;
573 + pinctrl-names = "default";
574 + pinctrl-0 = <&pinctrl_flx4_default>;
575 + atmel,fifo-size = <16>;
576 + status = "disabled"; /* Conflict with uart6 and spi3. */
577 + };
578 + };
579 +
580 + i2c1: i2c@fc028000 {
581 + dmas = <0>, <0>;
582 + pinctrl-names = "default";
583 + pinctrl-0 = <&pinctrl_i2c1_default>;
584 + status = "okay";
585 + };
586 +
587 + pinctrl@fc038000 {
588 +
589 + pinctrl_lcd_base: pinctrl_lcd_base {
590 + pinmux = <PIN_PC5__LCDVSYNC>,
591 + <PIN_PC6__LCDHSYNC>,
592 + <PIN_PC8__LCDDEN>,
593 + <PIN_PC7__LCDPCK>;
594 + bias-disable;
595 + drive-strength = <ATMEL_PIO_DRVSTR_ME>;
596 + };
597 +
598 + pinctrl_lcd_rgb: pinctrl_lcd_rgb {
599 + pinmux = <PIN_PB11__LCDDAT0>,
600 + <PIN_PB12__LCDDAT1>,
601 + <PIN_PB13__LCDDAT2>,
602 + <PIN_PB14__LCDDAT3>,
603 + <PIN_PB15__LCDDAT4>,
604 + <PIN_PB16__LCDDAT5>,
605 + <PIN_PB17__LCDDAT6>,
606 + <PIN_PB18__LCDDAT7>,
607 + <PIN_PB19__LCDDAT8>,
608 + <PIN_PB20__LCDDAT9>,
609 + <PIN_PB21__LCDDAT10>,
610 + <PIN_PB22__LCDDAT11>,
611 + <PIN_PB23__LCDDAT12>,
612 + <PIN_PB24__LCDDAT13>,
613 + <PIN_PB25__LCDDAT14>,
614 + <PIN_PB26__LCDDAT15>,
615 + <PIN_PB27__LCDDAT16>,
616 + <PIN_PB28__LCDDAT17>,
617 + <PIN_PB29__LCDDAT18>,
618 + <PIN_PB30__LCDDAT19>,
619 + <PIN_PB31__LCDDAT20>,
620 + <PIN_PC0__LCDDAT21>,
621 + <PIN_PC1__LCDDAT22>,
622 + <PIN_PC2__LCDDAT23>;
623 + bias-disable;
624 + };
625 +
626 + pinctrl_lcd_pwm: pinctrl_lcd_pwm {
627 + pinmux = <PIN_PC3__LCDPWM>;
628 + bias-disable;
629 + };
630 +
631 + pinctrl_can1_default: can1_default {
632 + pinmux = <PIN_PC26__CANTX1>,
633 + <PIN_PC27__CANRX1>;
634 + bias-disable;
635 + };
636 +
637 + pinctrl_flx3_default: flx3_default {
638 + pinmux = <PIN_PC20__FLEXCOM3_IO0>,
639 + <PIN_PC19__FLEXCOM3_IO1>,
640 + <PIN_PC18__FLEXCOM3_IO2>,
641 + <PIN_PC21__FLEXCOM3_IO3>,
642 + <PIN_PC22__FLEXCOM3_IO4>;
643 + bias-disable;
644 + };
645 +
646 + pinctrl_i2c1_default: i2c1_default {
647 + pinmux = <PIN_PD4__TWD1>,
648 + <PIN_PD5__TWCK1>;
649 + bias-disable;
650 + };
651 +
652 + pinctrl_isc_base: isc_base {
653 + pinmux = <PIN_PC21__ISC_PCK>,
654 + <PIN_PC22__ISC_VSYNC>,
655 + <PIN_PC23__ISC_HSYNC>,
656 + <PIN_PC24__ISC_MCK>;
657 + bias-disable;
658 + };
659 +
660 + pinctrl_isc_data_8bit: isc_data_8bit {
661 + pinmux = <PIN_PC20__ISC_D11>,
662 + <PIN_PC19__ISC_D10>,
663 + <PIN_PC18__ISC_D9>,
664 + <PIN_PC17__ISC_D8>,
665 + <PIN_PC16__ISC_D7>,
666 + <PIN_PC15__ISC_D6>,
667 + <PIN_PC14__ISC_D5>,
668 + <PIN_PC13__ISC_D4>;
669 + bias-disable;
670 + };
671 +
672 + pinctrl_isc_data_9_10: isc_data_9_10 {
673 + pinmux = <PIN_PC12__ISC_D3>,
674 + <PIN_PC11__ISC_D2>;
675 + bias-disable;
676 + };
677 +
678 + pinctrl_isc_data_11_12: isc_data_11_12 {
679 + pinmux = <PIN_PC10__ISC_D1>,
680 + <PIN_PC9__ISC_D0>;
681 + bias-disable;
682 + };
683 +
684 + pinctrl_key_gpio_default: key_gpio_default {
685 + pinmux = <PIN_PA29__GPIO>;
686 + bias-pull-up;
687 + };
688 +
689 + pinctrl_led_gpio_default: led_gpio_default {
690 + pinmux = <PIN_PA10__GPIO>,
691 + <PIN_PB1__GPIO>,
692 + <PIN_PA31__GPIO>;
693 + bias-pull-up;
694 + };
695 +
696 + pinctrl_sdmmc0_default: sdmmc0_default {
697 + cmd_data {
698 + pinmux = <PIN_PA1__SDMMC0_CMD>,
699 + <PIN_PA2__SDMMC0_DAT0>,
700 + <PIN_PA3__SDMMC0_DAT1>,
701 + <PIN_PA4__SDMMC0_DAT2>,
702 + <PIN_PA5__SDMMC0_DAT3>,
703 + <PIN_PA6__SDMMC0_DAT4>,
704 + <PIN_PA7__SDMMC0_DAT5>,
705 + <PIN_PA8__SDMMC0_DAT6>,
706 + <PIN_PA9__SDMMC0_DAT7>;
707 + bias-disable;
708 + };
709 +
710 + ck_cd_vddsel {
711 + pinmux = <PIN_PA0__SDMMC0_CK>,
712 + <PIN_PA11__SDMMC0_VDDSEL>,
713 + <PIN_PA13__SDMMC0_CD>;
714 + bias-disable;
715 + };
716 + };
717 +
718 + pinctrl_sdmmc1_default: sdmmc1_default {
719 + cmd_data {
720 + pinmux = <PIN_PA28__SDMMC1_CMD>,
721 + <PIN_PA18__SDMMC1_DAT0>,
722 + <PIN_PA19__SDMMC1_DAT1>,
723 + <PIN_PA20__SDMMC1_DAT2>,
724 + <PIN_PA21__SDMMC1_DAT3>;
725 + bias-disable;
726 + };
727 +
728 + conf-ck_cd {
729 + pinmux = <PIN_PA22__SDMMC1_CK>,
730 + <PIN_PA30__SDMMC1_CD>;
731 + bias-disable;
732 + };
733 + };
734 +
735 + pinctrl_spi0_default: spi0_default {
736 + pinmux = <PIN_PA14__SPI0_SPCK>,
737 + <PIN_PA15__SPI0_MOSI>,
738 + <PIN_PA16__SPI0_MISO>,
739 + <PIN_PA17__SPI0_NPCS0>;
740 + bias-disable;
741 + };
742 +
743 + pinctrl_uart1_default: uart1_default {
744 + pinmux = <PIN_PD2__URXD1>,
745 + <PIN_PD3__UTXD1>;
746 + bias-disable;
747 + };
748 +
749 + pinctrl_uart3_default: uart3_default {
750 + pinmux = <PIN_PC12__URXD3>,
751 + <PIN_PC13__UTXD3>;
752 + bias-disable;
753 + };
754 +
755 + pinctrl_usb_default: usb_default {
756 + pinmux = <PIN_PA27__GPIO>,
757 + <PIN_PD19__GPIO>;
758 + bias-disable;
759 + };
760 +
761 + pinctrl_usba_vbus: usba_vbus {
762 + pinmux = <PIN_PD20__GPIO>;
763 + bias-disable;
764 + };
765 +
766 + pinctrl_mikrobus1_an: mikrobus1_an {
767 + pinmux = <PIN_PD25__GPIO>;
768 + bias-disable;
769 + };
770 +
771 + pinctrl_mikrobus2_an: mikrobus2_an {
772 + pinmux = <PIN_PD26__GPIO>;
773 + bias-disable;
774 + };
775 +
776 + pinctrl_mikrobus1_rst: mikrobus1_rst {
777 + pinmux = <PIN_PB2__GPIO>;
778 + bias-disable;
779 + };
780 +
781 + pinctrl_mikrobus2_rst: mikrobus2_rst {
782 + pinmux = <PIN_PA26__GPIO>;
783 + bias-disable;
784 + };
785 +
786 + pinctrl_mikrobus1_spi_cs: mikrobus1_spi_cs {
787 + pinmux = <PIN_PD0__FLEXCOM4_IO4>;
788 + bias-disable;
789 + };
790 +
791 + pinctrl_mikrobus2_spi_cs: mikrobus2_spi_cs {
792 + pinmux = <PIN_PC31__FLEXCOM4_IO3>;
793 + bias-disable;
794 + };
795 +
796 + pinctrl_mikrobus_spi: mikrobus_spi {
797 + pinmux = <PIN_PC28__FLEXCOM4_IO0>,
798 + <PIN_PC29__FLEXCOM4_IO1>,
799 + <PIN_PC30__FLEXCOM4_IO2>;
800 + bias-disable;
801 + };
802 +
803 + pinctrl_mikrobus1_pwm: mikrobus1_pwm {
804 + pinmux = <PIN_PB1__PWML1>;
805 + bias-disable;
806 + };
807 +
808 + pinctrl_mikrobus2_pwm: mikrobus2_pwm {
809 + pinmux = <PIN_PA31__PWML0>;
810 + bias-disable;
811 + };
812 +
813 + pinctrl_mikrobus1_int: mikrobus1_int {
814 + pinmux = <PIN_PB0__GPIO>;
815 + bias-disable;
816 + };
817 +
818 + pinctrl_mikrobus2_int: mikrobus2_int {
819 + pinmux = <PIN_PA25__GPIO>;
820 + bias-disable;
821 + };
822 +
823 + pinctrl_mikrobus1_uart: mikrobus1_uart {
824 + pinmux = <PIN_PB3__URXD4>,
825 + <PIN_PB4__UTXD4>;
826 + bias-disable;
827 + };
828 +
829 + pinctrl_mikrobus2_uart: mikrobus2_uart {
830 + pinmux = <PIN_PD23__URXD2>,
831 + <PIN_PD24__UTXD2>;
832 + bias-disable;
833 + };
834 +
835 + pinctrl_mikrobus_i2c: mikrobus1_i2c {
836 + pinmux = <PIN_PA24__FLEXCOM1_IO0>,
837 + <PIN_PA23__FLEXCOM1_IO1>;
838 + bias-disable;
839 + };
840 +
841 + pinctrl_flx4_default: flx4_uart_default {
842 + pinmux = <PIN_PC28__FLEXCOM4_IO0>,
843 + <PIN_PC29__FLEXCOM4_IO1>,
844 + <PIN_PC30__FLEXCOM4_IO2>,
845 + <PIN_PC31__FLEXCOM4_IO3>,
846 + <PIN_PD0__FLEXCOM4_IO4>;
847 + bias-disable;
848 + };
849 + };
850 +
851 + can1: can@fc050000 {
852 + pinctrl-names = "default";
853 + pinctrl-0 = <&pinctrl_can1_default>;
854 + status = "okay";
855 + };
856 + };
857 + };
858 +
859 + gpio_keys {
860 + compatible = "gpio-keys";
861 +
862 + pinctrl-names = "default";
863 + pinctrl-0 = <&pinctrl_key_gpio_default>;
864 +
865 + pb4 {
866 + label = "USER";
867 + gpios = <&pioA PIN_PA29 GPIO_ACTIVE_LOW>;
868 + linux,code = <0x104>;
869 + wakeup-source;
870 + };
871 + };
872 +
873 + leds {
874 + compatible = "gpio-leds";
875 + pinctrl-names = "default";
876 + pinctrl-0 = <&pinctrl_led_gpio_default>;
877 + status = "okay"; /* Conflict with pwm0. */
878 +
879 + red {
880 + label = "red";
881 + gpios = <&pioA PIN_PA10 GPIO_ACTIVE_HIGH>;
882 + };
883 +
884 + green {
885 + label = "green";
886 + gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>;
887 + };
888 +
889 + blue {
890 + label = "blue";
891 + gpios = <&pioA PIN_PA31 GPIO_ACTIVE_HIGH>;
892 + linux,default-trigger = "heartbeat";
893 + };
894 + };
895 +};
896 diff --git a/include/dt-bindings/pinctrl/at91.h b/include/dt-bindings/pinctrl/at91.h
897 index bbca3d0..88eb7d0 100644
898 --- a/include/dt-bindings/pinctrl/at91.h
899 +++ b/include/dt-bindings/pinctrl/at91.h
900 @@ -37,4 +37,8 @@
901 #define AT91_PERIPH_C 3
902 #define AT91_PERIPH_D 4
903
904 +#define ATMEL_PIO_DRVSTR_LO 1
905 +#define ATMEL_PIO_DRVSTR_ME 2
906 +#define ATMEL_PIO_DRVSTR_HI 3
907 +
908 #endif /* __DT_BINDINGS_AT91_PINCTRL_H__ */