Merge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5514' into asoc...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / at91-sama5d27_som1_ek.dts
1 /*
2  * at91-sama5d27_som1_ek.dts - Device Tree file for SAMA5D27-SOM1-EK board
3  *
4  *  Copyright (c) 2017, Microchip Technology Inc.
5  *                2016 Nicolas Ferre <nicolas.ferre@atmel.com>
6  *                2017 Cristian Birsan <cristian.birsan@microchip.com>
7  *                2017 Claudiu Beznea <claudiu.beznea@microchip.com>
8  *
9  * This file is dual-licensed: you can use it either under the terms
10  * of the GPL or the X11 license, at your option. Note that this dual
11  * licensing only applies to this file, and not this project as a
12  * whole.
13  *
14  *  a) This file is free software; you can redistribute it and/or
15  *     modify it under the terms of the GNU General Public License as
16  *     published by the Free Software Foundation; either version 2 of the
17  *     License, or (at your option) any later version.
18  *
19  *     This file is distributed in the hope that it will be useful,
20  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
21  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  *     GNU General Public License for more details.
23  *
24  * Or, alternatively,
25  *
26  *  b) Permission is hereby granted, free of charge, to any person
27  *     obtaining a copy of this software and associated documentation
28  *     files (the "Software"), to deal in the Software without
29  *     restriction, including without limitation the rights to use,
30  *     copy, modify, merge, publish, distribute, sublicense, and/or
31  *     sell copies of the Software, and to permit persons to whom the
32  *     Software is furnished to do so, subject to the following
33  *     conditions:
34  *
35  *     The above copyright notice and this permission notice shall be
36  *     included in all copies or substantial portions of the Software.
37  *
38  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
41  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
42  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
43  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
44  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
45  *     OTHER DEALINGS IN THE SOFTWARE.
46  */
47 /dts-v1/;
48 #include "at91-sama5d27_som1.dtsi"
49 #include <dt-bindings/mfd/atmel-flexcom.h>
50 #include <dt-bindings/gpio/gpio.h>
51
52 / {
53         model = "Atmel SAMA5D27 SOM1 EK";
54         compatible = "atmel,sama5d27-som1-ek", "atmel,sama5d27-som1", "atmel,sama5d27", "atmel,sama5d2", "atmel,sama5";
55
56         chosen {
57                 stdout-path = "serial0:115200n8";
58         };
59
60         ahb {
61                 usb0: gadget@00300000 {
62                         atmel,vbus-gpio = <&pioA PIN_PD20 GPIO_ACTIVE_HIGH>;
63                         pinctrl-names = "default";
64                         pinctrl-0 = <&pinctrl_usba_vbus>;
65                         status = "okay";
66                 };
67
68                 usb1: ohci@00400000 {
69                         num-ports = <3>;
70                         atmel,vbus-gpio = <0 /* &pioA PIN_PD20 GPIO_ACTIVE_HIGH */
71                                            &pioA PIN_PA27 GPIO_ACTIVE_HIGH
72                                            0
73                                           >;
74                         pinctrl-names = "default";
75                         pinctrl-0 = <&pinctrl_usb_default>;
76                         status = "okay";
77                 };
78
79                 usb2: ehci@00500000 {
80                         status = "okay";
81                 };
82
83                 sdmmc0: sdio-host@a0000000 {
84                         bus-width = <8>;
85                         pinctrl-names = "default";
86                         pinctrl-0 = <&pinctrl_sdmmc0_default>;
87                         status = "okay";
88                 };
89
90                 sdmmc1: sdio-host@b0000000 {
91                         bus-width = <4>;
92                         pinctrl-names = "default";
93                         pinctrl-0 = <&pinctrl_sdmmc1_default>;
94                         status = "okay";
95                 };
96
97                 apb {
98                         isc: isc@f0008000 {
99                                 pinctrl-names = "default";
100                                 pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>;
101                                 status = "okay";
102                         };
103
104                         spi0: spi@f8000000 {
105                                 pinctrl-names = "default";
106                                 pinctrl-0 = <&pinctrl_spi0_default>;
107                                 status = "okay";
108                         };
109
110                         macb0: ethernet@f8008000 {
111                                 status = "okay";
112                         };
113
114                         uart1: serial@f8020000 {
115                                 pinctrl-names = "default";
116                                 pinctrl-0 = <&pinctrl_uart1_default>;
117                                 atmel,use-dma-rx;
118                                 atmel,use-dma-tx;
119                                 status = "okay";
120                         };
121
122                         uart2: serial@f8024000 {
123                                 pinctrl-names = "default";
124                                 pinctrl-0 = <&pinctrl_mikrobus2_uart>;
125                                 atmel,use-dma-rx;
126                                 atmel,use-dma-tx;
127                                 status = "okay";
128                         };
129
130                         pwm0: pwm@f802c000 {
131                                 status = "okay";
132                         };
133
134                         flx1: flexcom@f8038000 {
135                                 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
136                                 status = "disabled";
137
138                                 i2c2: i2c@600 {
139                                         compatible = "atmel,sama5d2-i2c";
140                                         reg = <0x600 0x200>;
141                                         interrupts = <20 IRQ_TYPE_LEVEL_HIGH 7>;
142                                         dmas = <0>, <0>;
143                                         dma-names = "tx", "rx";
144                                         #address-cells = <1>;
145                                         #size-cells = <0>;
146                                         clocks = <&flx1_clk>;
147                                         pinctrl-names = "default";
148                                         pinctrl-0 = <&pinctrl_mikrobus_i2c>;
149                                         atmel,fifo-size = <16>;
150                                         status = "disabled";
151                                 };
152                         };
153
154                         shdwc@f8048010 {
155                                 atmel,shdwc-debouncer = <976>;
156                                 atmel,wakeup-rtc-timer;
157
158                                 input@0 {
159                                         reg = <0>;
160                                         atmel,wakeup-type = "low";
161                                 };
162                         };
163
164                         watchdog@f8048040 {
165                                 status = "okay";
166                         };
167
168                         can0: can@f8054000 {
169                                 pinctrl-names = "default";
170                                 pinctrl-0 = <&pinctrl_can0_default>;
171                         };
172
173                         uart3: serial@fc008000 {
174                                 atmel,use-dma-rx;
175                                 atmel,use-dma-tx;
176                                 pinctrl-names = "default";
177                                 pinctrl-0 = <&pinctrl_uart3_default>;
178                                 status = "disabled";
179                         };
180
181                         uart4: serial@fc00c000 {
182                                 atmel,use-dma-rx;
183                                 atmel,use-dma-tx;
184                                 pinctrl-names = "default";
185                                 pinctrl-0 = <&pinctrl_mikrobus1_uart>;
186                                 status = "okay";
187                         };
188
189                         flx3: flexcom@fc014000 {
190                                 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
191                                 status = "disabled";
192
193                                 uart7: serial@200 {
194                                         compatible = "atmel,at91sam9260-usart";
195                                         reg = <0x200 0x200>;
196                                         interrupts = <22 IRQ_TYPE_LEVEL_HIGH 7>;
197                                         clocks = <&flx3_clk>;
198                                         clock-names = "usart";
199                                         pinctrl-names = "default";
200                                         pinctrl-0 = <&pinctrl_flx3_default>;
201                                         atmel,fifo-size = <32>;
202                                         status = "disabled";
203                                 };
204
205                                 spi2: spi@400 {
206                                         compatible = "atmel,at91rm9200-spi";
207                                         reg = <0x400 0x200>;
208                                         interrupts = <22 IRQ_TYPE_LEVEL_HIGH 7>;
209                                         clocks = <&flx3_clk>;
210                                         clock-names = "spi_clk";
211                                         pinctrl-names = "default";
212                                         pinctrl-0 = <&pinctrl_flx3_default>;
213                                         atmel,fifo-size = <16>;
214                                         status = "disabled";
215                                 };
216                         };
217
218                         flx4: flexcom@fc018000 {
219                                 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
220                                 status = "okay";
221
222                                 uart6: serial@200 {
223                                         compatible = "atmel,at91sam9260-usart";
224                                         reg = <0x200 0x200>;
225                                         interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
226                                         clocks = <&flx4_clk>;
227                                         clock-names = "usart";
228                                         pinctrl-names = "default";
229                                         pinctrl-0 = <&pinctrl_flx4_default>;
230                                         atmel,fifo-size = <32>;
231                                         status = "disabled";
232                                 };
233
234                                 spi3: spi@400 {
235                                         compatible = "atmel,at91rm9200-spi";
236                                         reg = <0x400 0x200>;
237                                         interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
238                                         clocks = <&flx4_clk>;
239                                         clock-names = "spi_clk";
240                                         pinctrl-names = "default";
241                                         pinctrl-0 = <&pinctrl_mikrobus_spi &pinctrl_mikrobus1_spi_cs &pinctrl_mikrobus2_spi_cs>;
242                                         atmel,fifo-size = <16>;
243                                         status = "okay";
244                                 };
245
246                                 i2c3: i2c@600 {
247                                         compatible = "atmel,sama5d2-i2c";
248                                         reg = <0x600 0x200>;
249                                         interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
250                                         dmas = <0>, <0>;
251                                         dma-names = "tx", "rx";
252                                         #address-cells = <1>;
253                                         #size-cells = <0>;
254                                         clocks = <&flx4_clk>;
255                                         pinctrl-names = "default";
256                                         pinctrl-0 = <&pinctrl_flx4_default>;
257                                         atmel,fifo-size = <16>;
258                                         status = "disabled";
259                                 };
260                         };
261
262                         i2c1: i2c@fc028000 {
263                                 dmas = <0>, <0>;
264                                 pinctrl-names = "default";
265                                 pinctrl-0 = <&pinctrl_i2c1_default>;
266                                 status = "okay";
267                         };
268
269                         pinctrl@fc038000 {
270
271                                 pinctrl_can0_default: can0_default {
272                                         pinmux = <PIN_PC10__CANTX0>,
273                                                  <PIN_PC11__CANRX0>;
274                                         bias-disable;
275                                 };
276
277                                 pinctrl_can1_default: can1_default {
278                                         pinmux = <PIN_PC26__CANTX1>,
279                                                  <PIN_PC27__CANRX1>;
280                                         bias-disable;
281                                 };
282
283                                 pinctrl_flx3_default: flx3_default {
284                                         pinmux = <PIN_PC20__FLEXCOM3_IO0>,
285                                                  <PIN_PC19__FLEXCOM3_IO1>,
286                                                  <PIN_PC18__FLEXCOM3_IO2>,
287                                                  <PIN_PC21__FLEXCOM3_IO3>,
288                                                  <PIN_PC22__FLEXCOM3_IO4>;
289                                         bias-disable;
290                                 };
291
292                                 pinctrl_i2c1_default: i2c1_default {
293                                         pinmux = <PIN_PD4__TWD1>,
294                                                  <PIN_PD5__TWCK1>;
295                                         bias-disable;
296                                 };
297
298                                 pinctrl_isc_base: isc_base {
299                                         pinmux = <PIN_PC21__ISC_PCK>,
300                                                  <PIN_PC22__ISC_VSYNC>,
301                                                  <PIN_PC23__ISC_HSYNC>,
302                                                  <PIN_PC24__ISC_MCK>;
303                                         bias-disable;
304                                 };
305
306                                 pinctrl_isc_data_8bit: isc_data_8bit {
307                                         pinmux = <PIN_PC20__ISC_D11>,
308                                                  <PIN_PC19__ISC_D10>,
309                                                  <PIN_PC18__ISC_D9>,
310                                                  <PIN_PC17__ISC_D8>,
311                                                  <PIN_PC16__ISC_D7>,
312                                                  <PIN_PC15__ISC_D6>,
313                                                  <PIN_PC14__ISC_D5>,
314                                                  <PIN_PC13__ISC_D4>;
315                                         bias-disable;
316                                 };
317
318                                 pinctrl_isc_data_9_10: isc_data_9_10 {
319                                         pinmux = <PIN_PC12__ISC_D3>,
320                                                  <PIN_PC11__ISC_D2>;
321                                         bias-disable;
322                                 };
323
324                                 pinctrl_isc_data_11_12: isc_data_11_12 {
325                                         pinmux = <PIN_PC10__ISC_D1>,
326                                                  <PIN_PC9__ISC_D0>;
327                                         bias-disable;
328                                 };
329
330                                 pinctrl_key_gpio_default: key_gpio_default {
331                                         pinmux = <PIN_PA29__GPIO>;
332                                         bias-pull-up;
333                                 };
334
335                                 pinctrl_led_gpio_default: led_gpio_default {
336                                         pinmux = <PIN_PA10__GPIO>,
337                                                  <PIN_PB1__GPIO>,
338                                                  <PIN_PA31__GPIO>;
339                                         bias-pull-up;
340                                 };
341
342                                 pinctrl_sdmmc0_default: sdmmc0_default {
343                                         cmd_data {
344                                                 pinmux = <PIN_PA1__SDMMC0_CMD>,
345                                                          <PIN_PA2__SDMMC0_DAT0>,
346                                                          <PIN_PA3__SDMMC0_DAT1>,
347                                                          <PIN_PA4__SDMMC0_DAT2>,
348                                                          <PIN_PA5__SDMMC0_DAT3>,
349                                                          <PIN_PA6__SDMMC0_DAT4>,
350                                                          <PIN_PA7__SDMMC0_DAT5>,
351                                                          <PIN_PA8__SDMMC0_DAT6>,
352                                                          <PIN_PA9__SDMMC0_DAT7>;
353                                                 bias-pull-up;
354                                         };
355
356                                         ck_cd_vddsel {
357                                                 pinmux = <PIN_PA0__SDMMC0_CK>,
358                                                          <PIN_PA11__SDMMC0_VDDSEL>,
359                                                          <PIN_PA13__SDMMC0_CD>;
360                                                 bias-disable;
361                                         };
362                                 };
363
364                                 pinctrl_sdmmc1_default: sdmmc1_default {
365                                         cmd_data {
366                                                 pinmux = <PIN_PA28__SDMMC1_CMD>,
367                                                          <PIN_PA18__SDMMC1_DAT0>,
368                                                          <PIN_PA19__SDMMC1_DAT1>,
369                                                          <PIN_PA20__SDMMC1_DAT2>,
370                                                          <PIN_PA21__SDMMC1_DAT3>;
371                                                 bias-pull-up;
372                                         };
373
374                                         conf-ck_cd {
375                                                 pinmux = <PIN_PA22__SDMMC1_CK>,
376                                                          <PIN_PA30__SDMMC1_CD>;
377                                                 bias-disable;
378                                         };
379                                 };
380
381                                 pinctrl_spi0_default: spi0_default {
382                                         pinmux = <PIN_PA14__SPI0_SPCK>,
383                                                  <PIN_PA15__SPI0_MOSI>,
384                                                  <PIN_PA16__SPI0_MISO>,
385                                                  <PIN_PA17__SPI0_NPCS0>;
386                                         bias-disable;
387                                 };
388
389                                 pinctrl_uart1_default: uart1_default {
390                                         pinmux = <PIN_PD2__URXD1>,
391                                                  <PIN_PD3__UTXD1>;
392                                         bias-disable;
393                                 };
394
395                                 pinctrl_uart3_default: uart3_default {
396                                         pinmux = <PIN_PC12__URXD3>,
397                                                  <PIN_PC13__UTXD3>;
398                                         bias-disable;
399                                 };
400
401                                 pinctrl_usb_default: usb_default {
402                                         pinmux = <PIN_PA27__GPIO>,
403                                                  <PIN_PD19__GPIO>;
404                                         bias-disable;
405                                 };
406
407                                 pinctrl_usba_vbus: usba_vbus {
408                                         pinmux = <PIN_PD20__GPIO>;
409                                         bias-disable;
410                                 };
411
412                                 pinctrl_mikrobus1_an: mikrobus1_an {
413                                         pinmux = <PIN_PD25__GPIO>;
414                                         bias-disable;
415                                 };
416
417                                 pinctrl_mikrobus2_an: mikrobus2_an {
418                                         pinmux = <PIN_PD26__GPIO>;
419                                         bias-disable;
420                                 };
421
422                                 pinctrl_mikrobus1_rst: mikrobus1_rst {
423                                         pinmux = <PIN_PB2__GPIO>;
424                                         bias-disable;
425                                 };
426
427                                 pinctrl_mikrobus2_rst: mikrobus2_rst {
428                                         pinmux = <PIN_PA26__GPIO>;
429                                         bias-disable;
430                                 };
431
432                                 pinctrl_mikrobus1_spi_cs: mikrobus1_spi_cs {
433                                         pinmux = <PIN_PD0__FLEXCOM4_IO4>;
434                                         bias-disable;
435                                 };
436
437                                 pinctrl_mikrobus2_spi_cs: mikrobus2_spi_cs {
438                                         pinmux = <PIN_PC31__FLEXCOM4_IO3>;
439                                         bias-disable;
440                                 };
441
442                                 pinctrl_mikrobus_spi: mikrobus_spi {
443                                         pinmux = <PIN_PC28__FLEXCOM4_IO0>,
444                                                  <PIN_PC29__FLEXCOM4_IO1>,
445                                                  <PIN_PC30__FLEXCOM4_IO2>;
446                                         bias-disable;
447                                 };
448
449                                 pinctrl_mikrobus1_pwm: mikrobus1_pwm {
450                                         pinmux = <PIN_PB1__PWML1>;
451                                         bias-disable;
452                                 };
453
454                                 pinctrl_mikrobus2_pwm: mikrobus2_pwm {
455                                         pinmux = <PIN_PA31__PWML0>;
456                                         bias-disable;
457                                 };
458
459                                 pinctrl_mikrobus1_int: mikrobus1_int {
460                                         pinmux = <PIN_PB0__GPIO>;
461                                         bias-disable;
462                                 };
463
464                                 pinctrl_mikrobus2_int: mikrobus2_int {
465                                         pinmux = <PIN_PA25__GPIO>;
466                                         bias-disable;
467                                 };
468
469                                 pinctrl_mikrobus1_uart: mikrobus1_uart {
470                                         pinmux = <PIN_PB3__URXD4>,
471                                                  <PIN_PB4__UTXD4>;
472                                         bias-disable;
473                                 };
474
475                                 pinctrl_mikrobus2_uart: mikrobus2_uart {
476                                         pinmux = <PIN_PD23__URXD2>,
477                                                  <PIN_PD24__UTXD2>;
478                                         bias-disable;
479                                 };
480
481                                 pinctrl_mikrobus_i2c: mikrobus1_i2c {
482                                         pinmux = <PIN_PA24__FLEXCOM1_IO0>,
483                                                  <PIN_PA23__FLEXCOM1_IO1>;
484                                         bias-disable;
485                                 };
486
487                                 pinctrl_flx4_default: flx4_uart_default {
488                                         pinmux = <PIN_PC28__FLEXCOM4_IO0>,
489                                                  <PIN_PC29__FLEXCOM4_IO1>,
490                                                  <PIN_PC30__FLEXCOM4_IO2>,
491                                                  <PIN_PC31__FLEXCOM4_IO3>,
492                                                  <PIN_PD0__FLEXCOM4_IO4>;
493                                         bias-disable;
494                                 };
495                         };
496
497                         can1: can@fc050000 {
498                                 pinctrl-names = "default";
499                                 pinctrl-0 = <&pinctrl_can1_default>;
500                                 status = "okay";
501                         };
502                 };
503         };
504
505         gpio_keys {
506                 compatible = "gpio-keys";
507
508                 pinctrl-names = "default";
509                 pinctrl-0 = <&pinctrl_key_gpio_default>;
510
511                 pb4 {
512                         label = "USER";
513                         gpios = <&pioA PIN_PA29 GPIO_ACTIVE_LOW>;
514                         linux,code = <0x104>;
515                 };
516         };
517
518         leds {
519                 compatible = "gpio-leds";
520                 pinctrl-names = "default";
521                 pinctrl-0 = <&pinctrl_led_gpio_default>;
522                 status = "okay";
523
524                 red {
525                         label = "red";
526                         gpios = <&pioA PIN_PA10 GPIO_ACTIVE_HIGH>;
527                 };
528
529                 green {
530                         label = "green";
531                         gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>;
532                 };
533
534                 blue {
535                         label = "blue";
536                         gpios = <&pioA PIN_PA31 GPIO_ACTIVE_HIGH>;
537                         linux,default-trigger = "heartbeat";
538                 };
539         };
540 };