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