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