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