GNU Linux-libre 4.19.264-gnu1
[releases.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         aliases {
57                 serial0 = &uart1;       /* DBGU */
58                 serial1 = &uart4;       /* mikro BUS 1 */
59                 serial2 = &uart2;       /* mikro BUS 2 */
60                 i2c1    = &i2c1;
61                 i2c2    = &i2c2;
62         };
63
64         chosen {
65                 stdout-path = "serial0:115200n8";
66         };
67
68         ahb {
69                 usb0: gadget@300000 {
70                         atmel,vbus-gpio = <&pioA PIN_PD20 GPIO_ACTIVE_HIGH>;
71                         pinctrl-names = "default";
72                         pinctrl-0 = <&pinctrl_usba_vbus>;
73                         status = "okay";
74                 };
75
76                 usb1: ohci@400000 {
77                         num-ports = <3>;
78                         atmel,vbus-gpio = <0 /* &pioA PIN_PD20 GPIO_ACTIVE_HIGH */
79                                            &pioA PIN_PA27 GPIO_ACTIVE_HIGH
80                                            0
81                                           >;
82                         pinctrl-names = "default";
83                         pinctrl-0 = <&pinctrl_usb_default>;
84                         status = "okay";
85                 };
86
87                 usb2: ehci@500000 {
88                         status = "okay";
89                 };
90
91                 sdmmc0: sdio-host@a0000000 {
92                         bus-width = <8>;
93                         pinctrl-names = "default";
94                         pinctrl-0 = <&pinctrl_sdmmc0_default>;
95                         status = "okay";
96                 };
97
98                 sdmmc1: sdio-host@b0000000 {
99                         bus-width = <4>;
100                         pinctrl-names = "default";
101                         pinctrl-0 = <&pinctrl_sdmmc1_default>;
102                         status = "okay";
103                 };
104
105                 apb {
106                         isc: isc@f0008000 {
107                                 pinctrl-names = "default";
108                                 pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>;
109                         };
110
111                         spi0: spi@f8000000 {
112                                 pinctrl-names = "default";
113                                 pinctrl-0 = <&pinctrl_spi0_default>;
114                                 status = "okay";
115                         };
116
117                         macb0: ethernet@f8008000 {
118                                 status = "okay";
119                         };
120
121                         tcb0: timer@f800c000 {
122                                 timer0: timer@0 {
123                                         compatible = "atmel,tcb-timer";
124                                         reg = <0>;
125                                 };
126
127                                 timer1: timer@1 {
128                                         compatible = "atmel,tcb-timer";
129                                         reg = <1>;
130                                 };
131                         };
132
133                         uart1: serial@f8020000 {
134                                 pinctrl-names = "default";
135                                 pinctrl-0 = <&pinctrl_uart1_default>;
136                                 atmel,use-dma-rx;
137                                 atmel,use-dma-tx;
138                                 status = "okay";
139                         };
140
141                         uart2: serial@f8024000 {
142                                 pinctrl-names = "default";
143                                 pinctrl-0 = <&pinctrl_mikrobus2_uart>;
144                                 atmel,use-dma-rx;
145                                 atmel,use-dma-tx;
146                                 status = "okay";
147                         };
148
149                         pwm0: pwm@f802c000 {
150                                 pinctrl-names = "default";
151                                 pinctrl-0 = <&pinctrl_mikrobus1_pwm &pinctrl_mikrobus2_pwm>;
152                                 status = "disabled"; /* Conflict with leds. */
153                         };
154
155                         flx1: flexcom@f8038000 {
156                                 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
157                                 status = "okay";
158
159                                 i2c2: i2c@600 {
160                                         compatible = "atmel,sama5d2-i2c";
161                                         reg = <0x600 0x200>;
162                                         interrupts = <20 IRQ_TYPE_LEVEL_HIGH 7>;
163                                         dmas = <0>, <0>;
164                                         dma-names = "tx", "rx";
165                                         #address-cells = <1>;
166                                         #size-cells = <0>;
167                                         clocks = <&flx1_clk>;
168                                         pinctrl-names = "default";
169                                         pinctrl-0 = <&pinctrl_mikrobus_i2c>;
170                                         atmel,fifo-size = <16>;
171                                         status = "okay";
172                                 };
173                         };
174
175                         shdwc@f8048010 {
176                                 atmel,shdwc-debouncer = <976>;
177                                 atmel,wakeup-rtc-timer;
178
179                                 input@0 {
180                                         reg = <0>;
181                                         atmel,wakeup-type = "low";
182                                 };
183                         };
184
185                         watchdog@f8048040 {
186                                 status = "okay";
187                         };
188
189                         uart3: serial@fc008000 {
190                                 atmel,use-dma-rx;
191                                 atmel,use-dma-tx;
192                                 pinctrl-names = "default";
193                                 pinctrl-0 = <&pinctrl_uart3_default>;
194                                 status = "disabled"; /* Conflict with isc. */
195                         };
196
197                         uart4: serial@fc00c000 {
198                                 atmel,use-dma-rx;
199                                 atmel,use-dma-tx;
200                                 pinctrl-names = "default";
201                                 pinctrl-0 = <&pinctrl_mikrobus1_uart>;
202                                 status = "okay";
203                         };
204
205                         flx3: flexcom@fc014000 {
206                                 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
207                                 status = "disabled";
208
209                                 uart7: serial@200 {
210                                         compatible = "atmel,at91sam9260-usart";
211                                         reg = <0x200 0x200>;
212                                         interrupts = <22 IRQ_TYPE_LEVEL_HIGH 7>;
213                                         clocks = <&flx3_clk>;
214                                         clock-names = "usart";
215                                         pinctrl-names = "default";
216                                         pinctrl-0 = <&pinctrl_flx3_default>;
217                                         atmel,fifo-size = <32>;
218                                         status = "disabled"; /* Conflict with isc. */
219                                 };
220
221                                 spi2: spi@400 {
222                                         compatible = "atmel,at91rm9200-spi";
223                                         reg = <0x400 0x200>;
224                                         interrupts = <22 IRQ_TYPE_LEVEL_HIGH 7>;
225                                         clocks = <&flx3_clk>;
226                                         clock-names = "spi_clk";
227                                         pinctrl-names = "default";
228                                         pinctrl-0 = <&pinctrl_flx3_default>;
229                                         atmel,fifo-size = <16>;
230                                         status = "disabled"; /* Conflict with isc. */
231                                 };
232                         };
233
234                         flx4: flexcom@fc018000 {
235                                 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
236                                 status = "okay";
237
238                                 uart6: serial@200 {
239                                         compatible = "atmel,at91sam9260-usart";
240                                         reg = <0x200 0x200>;
241                                         interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
242                                         clocks = <&flx4_clk>;
243                                         clock-names = "usart";
244                                         pinctrl-names = "default";
245                                         pinctrl-0 = <&pinctrl_flx4_default>;
246                                         atmel,fifo-size = <32>;
247                                         status = "disabled"; /* Conflict with spi3 and i2c3. */
248                                 };
249
250                                 spi3: spi@400 {
251                                         compatible = "atmel,at91rm9200-spi";
252                                         reg = <0x400 0x200>;
253                                         interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
254                                         clocks = <&flx4_clk>;
255                                         clock-names = "spi_clk";
256                                         pinctrl-names = "default";
257                                         pinctrl-0 = <&pinctrl_mikrobus_spi &pinctrl_mikrobus1_spi_cs &pinctrl_mikrobus2_spi_cs>;
258                                         atmel,fifo-size = <16>;
259                                         status = "okay"; /* Conflict with uart6 and i2c3. */
260                                 };
261
262                                 i2c3: i2c@600 {
263                                         compatible = "atmel,sama5d2-i2c";
264                                         reg = <0x600 0x200>;
265                                         interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
266                                         dmas = <0>, <0>;
267                                         dma-names = "tx", "rx";
268                                         #address-cells = <1>;
269                                         #size-cells = <0>;
270                                         clocks = <&flx4_clk>;
271                                         pinctrl-names = "default";
272                                         pinctrl-0 = <&pinctrl_flx4_default>;
273                                         atmel,fifo-size = <16>;
274                                         status = "disabled"; /* Conflict with uart6 and spi3. */
275                                 };
276                         };
277
278                         i2c1: i2c@fc028000 {
279                                 dmas = <0>, <0>;
280                                 pinctrl-names = "default";
281                                 pinctrl-0 = <&pinctrl_i2c1_default>;
282                                 status = "okay";
283                         };
284
285                         pinctrl@fc038000 {
286
287                                 pinctrl_can1_default: can1_default {
288                                         pinmux = <PIN_PC26__CANTX1>,
289                                                  <PIN_PC27__CANRX1>;
290                                         bias-disable;
291                                 };
292
293                                 pinctrl_flx3_default: flx3_default {
294                                         pinmux = <PIN_PC20__FLEXCOM3_IO0>,
295                                                  <PIN_PC19__FLEXCOM3_IO1>,
296                                                  <PIN_PC18__FLEXCOM3_IO2>,
297                                                  <PIN_PC21__FLEXCOM3_IO3>,
298                                                  <PIN_PC22__FLEXCOM3_IO4>;
299                                         bias-disable;
300                                 };
301
302                                 pinctrl_i2c1_default: i2c1_default {
303                                         pinmux = <PIN_PD4__TWD1>,
304                                                  <PIN_PD5__TWCK1>;
305                                         bias-disable;
306                                 };
307
308                                 pinctrl_isc_base: isc_base {
309                                         pinmux = <PIN_PC21__ISC_PCK>,
310                                                  <PIN_PC22__ISC_VSYNC>,
311                                                  <PIN_PC23__ISC_HSYNC>,
312                                                  <PIN_PC24__ISC_MCK>;
313                                         bias-disable;
314                                 };
315
316                                 pinctrl_isc_data_8bit: isc_data_8bit {
317                                         pinmux = <PIN_PC20__ISC_D11>,
318                                                  <PIN_PC19__ISC_D10>,
319                                                  <PIN_PC18__ISC_D9>,
320                                                  <PIN_PC17__ISC_D8>,
321                                                  <PIN_PC16__ISC_D7>,
322                                                  <PIN_PC15__ISC_D6>,
323                                                  <PIN_PC14__ISC_D5>,
324                                                  <PIN_PC13__ISC_D4>;
325                                         bias-disable;
326                                 };
327
328                                 pinctrl_isc_data_9_10: isc_data_9_10 {
329                                         pinmux = <PIN_PC12__ISC_D3>,
330                                                  <PIN_PC11__ISC_D2>;
331                                         bias-disable;
332                                 };
333
334                                 pinctrl_isc_data_11_12: isc_data_11_12 {
335                                         pinmux = <PIN_PC10__ISC_D1>,
336                                                  <PIN_PC9__ISC_D0>;
337                                         bias-disable;
338                                 };
339
340                                 pinctrl_key_gpio_default: key_gpio_default {
341                                         pinmux = <PIN_PA29__GPIO>;
342                                         bias-pull-up;
343                                 };
344
345                                 pinctrl_led_gpio_default: led_gpio_default {
346                                         pinmux = <PIN_PA10__GPIO>,
347                                                  <PIN_PB1__GPIO>,
348                                                  <PIN_PA31__GPIO>;
349                                         bias-pull-up;
350                                 };
351
352                                 pinctrl_sdmmc0_default: sdmmc0_default {
353                                         cmd_data {
354                                                 pinmux = <PIN_PA1__SDMMC0_CMD>,
355                                                          <PIN_PA2__SDMMC0_DAT0>,
356                                                          <PIN_PA3__SDMMC0_DAT1>,
357                                                          <PIN_PA4__SDMMC0_DAT2>,
358                                                          <PIN_PA5__SDMMC0_DAT3>,
359                                                          <PIN_PA6__SDMMC0_DAT4>,
360                                                          <PIN_PA7__SDMMC0_DAT5>,
361                                                          <PIN_PA8__SDMMC0_DAT6>,
362                                                          <PIN_PA9__SDMMC0_DAT7>;
363                                                 bias-disable;
364                                         };
365
366                                         ck_cd_vddsel {
367                                                 pinmux = <PIN_PA0__SDMMC0_CK>,
368                                                          <PIN_PA11__SDMMC0_VDDSEL>,
369                                                          <PIN_PA13__SDMMC0_CD>;
370                                                 bias-disable;
371                                         };
372                                 };
373
374                                 pinctrl_sdmmc1_default: sdmmc1_default {
375                                         cmd_data {
376                                                 pinmux = <PIN_PA28__SDMMC1_CMD>,
377                                                          <PIN_PA18__SDMMC1_DAT0>,
378                                                          <PIN_PA19__SDMMC1_DAT1>,
379                                                          <PIN_PA20__SDMMC1_DAT2>,
380                                                          <PIN_PA21__SDMMC1_DAT3>;
381                                                 bias-disable;
382                                         };
383
384                                         conf-ck_cd {
385                                                 pinmux = <PIN_PA22__SDMMC1_CK>,
386                                                          <PIN_PA30__SDMMC1_CD>;
387                                                 bias-disable;
388                                         };
389                                 };
390
391                                 pinctrl_spi0_default: spi0_default {
392                                         pinmux = <PIN_PA14__SPI0_SPCK>,
393                                                  <PIN_PA15__SPI0_MOSI>,
394                                                  <PIN_PA16__SPI0_MISO>,
395                                                  <PIN_PA17__SPI0_NPCS0>;
396                                         bias-disable;
397                                 };
398
399                                 pinctrl_uart1_default: uart1_default {
400                                         pinmux = <PIN_PD2__URXD1>,
401                                                  <PIN_PD3__UTXD1>;
402                                         bias-disable;
403                                 };
404
405                                 pinctrl_uart3_default: uart3_default {
406                                         pinmux = <PIN_PC12__URXD3>,
407                                                  <PIN_PC13__UTXD3>;
408                                         bias-disable;
409                                 };
410
411                                 pinctrl_usb_default: usb_default {
412                                         pinmux = <PIN_PA27__GPIO>,
413                                                  <PIN_PD19__GPIO>;
414                                         bias-disable;
415                                 };
416
417                                 pinctrl_usba_vbus: usba_vbus {
418                                         pinmux = <PIN_PD20__GPIO>;
419                                         bias-disable;
420                                 };
421
422                                 pinctrl_mikrobus1_an: mikrobus1_an {
423                                         pinmux = <PIN_PD25__GPIO>;
424                                         bias-disable;
425                                 };
426
427                                 pinctrl_mikrobus2_an: mikrobus2_an {
428                                         pinmux = <PIN_PD26__GPIO>;
429                                         bias-disable;
430                                 };
431
432                                 pinctrl_mikrobus1_rst: mikrobus1_rst {
433                                         pinmux = <PIN_PB2__GPIO>;
434                                         bias-disable;
435                                 };
436
437                                 pinctrl_mikrobus2_rst: mikrobus2_rst {
438                                         pinmux = <PIN_PA26__GPIO>;
439                                         bias-disable;
440                                 };
441
442                                 pinctrl_mikrobus1_spi_cs: mikrobus1_spi_cs {
443                                         pinmux = <PIN_PD0__FLEXCOM4_IO4>;
444                                         bias-disable;
445                                 };
446
447                                 pinctrl_mikrobus2_spi_cs: mikrobus2_spi_cs {
448                                         pinmux = <PIN_PC31__FLEXCOM4_IO3>;
449                                         bias-disable;
450                                 };
451
452                                 pinctrl_mikrobus_spi: mikrobus_spi {
453                                         pinmux = <PIN_PC28__FLEXCOM4_IO0>,
454                                                  <PIN_PC29__FLEXCOM4_IO1>,
455                                                  <PIN_PC30__FLEXCOM4_IO2>;
456                                         bias-disable;
457                                 };
458
459                                 pinctrl_mikrobus1_pwm: mikrobus1_pwm {
460                                         pinmux = <PIN_PB1__PWML1>;
461                                         bias-disable;
462                                 };
463
464                                 pinctrl_mikrobus2_pwm: mikrobus2_pwm {
465                                         pinmux = <PIN_PA31__PWML0>;
466                                         bias-disable;
467                                 };
468
469                                 pinctrl_mikrobus1_int: mikrobus1_int {
470                                         pinmux = <PIN_PB0__GPIO>;
471                                         bias-disable;
472                                 };
473
474                                 pinctrl_mikrobus2_int: mikrobus2_int {
475                                         pinmux = <PIN_PA25__GPIO>;
476                                         bias-disable;
477                                 };
478
479                                 pinctrl_mikrobus1_uart: mikrobus1_uart {
480                                         pinmux = <PIN_PB3__URXD4>,
481                                                  <PIN_PB4__UTXD4>;
482                                         bias-disable;
483                                 };
484
485                                 pinctrl_mikrobus2_uart: mikrobus2_uart {
486                                         pinmux = <PIN_PD23__URXD2>,
487                                                  <PIN_PD24__UTXD2>;
488                                         bias-disable;
489                                 };
490
491                                 pinctrl_mikrobus_i2c: mikrobus1_i2c {
492                                         pinmux = <PIN_PA24__FLEXCOM1_IO0>,
493                                                  <PIN_PA23__FLEXCOM1_IO1>;
494                                         bias-disable;
495                                 };
496
497                                 pinctrl_flx4_default: flx4_uart_default {
498                                         pinmux = <PIN_PC28__FLEXCOM4_IO0>,
499                                                  <PIN_PC29__FLEXCOM4_IO1>,
500                                                  <PIN_PC30__FLEXCOM4_IO2>,
501                                                  <PIN_PC31__FLEXCOM4_IO3>,
502                                                  <PIN_PD0__FLEXCOM4_IO4>;
503                                         bias-disable;
504                                 };
505                         };
506
507                         can1: can@fc050000 {
508                                 pinctrl-names = "default";
509                                 pinctrl-0 = <&pinctrl_can1_default>;
510                                 status = "okay";
511                         };
512                 };
513         };
514
515         gpio_keys {
516                 compatible = "gpio-keys";
517
518                 pinctrl-names = "default";
519                 pinctrl-0 = <&pinctrl_key_gpio_default>;
520
521                 pb4 {
522                         label = "USER";
523                         gpios = <&pioA PIN_PA29 GPIO_ACTIVE_LOW>;
524                         linux,code = <0x104>;
525                         wakeup-source;
526                 };
527         };
528
529         leds {
530                 compatible = "gpio-leds";
531                 pinctrl-names = "default";
532                 pinctrl-0 = <&pinctrl_led_gpio_default>;
533                 status = "okay"; /* Conflict with pwm0. */
534
535                 red {
536                         label = "red";
537                         gpios = <&pioA PIN_PA10 GPIO_ACTIVE_HIGH>;
538                 };
539
540                 green {
541                         label = "green";
542                         gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>;
543                 };
544
545                 blue {
546                         label = "blue";
547                         gpios = <&pioA PIN_PA31 GPIO_ACTIVE_HIGH>;
548                         linux,default-trigger = "heartbeat";
549                 };
550         };
551 };