]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/gnu/dts/arm/at91-sama5d2_ptc_ek.dts
Update opencsd to 0.14.2
[FreeBSD/FreeBSD.git] / sys / gnu / dts / arm / at91-sama5d2_ptc_ek.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR X11)
2 /*
3  * at91-sama5d2_ptc_ek.dts - Device Tree file for SAMA5D2 PTC EK board
4  *
5  *  Copyright (C) 2017 Microchip/Atmel,
6  *                2017 Wenyou Yang <wenyou.yang@microchip.com>
7  *                2017 Ludovic Desroches <ludovic.desroches@microchip.com>
8  */
9 /dts-v1/;
10 #include "sama5d2.dtsi"
11 #include "sama5d2-pinfunc.h"
12 #include <dt-bindings/mfd/atmel-flexcom.h>
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/pinctrl/at91.h>
15
16 / {
17         model = "Atmel SAMA5D2 PTC EK";
18         compatible = "atmel,sama5d2-ptc_ek", "atmel,sama5d2", "atmel,sama5";
19
20         aliases {
21                 serial0 = &uart0;
22                 i2c0    = &i2c0;
23                 i2c1    = &i2c1;
24                 i2c2    = &i2c2;
25         };
26
27         chosen {
28                 stdout-path = "serial0:115200n8";
29         };
30
31         clocks {
32                 slow_xtal {
33                         clock-frequency = <32768>;
34                 };
35
36                 main_xtal {
37                         clock-frequency = <24000000>;
38                 };
39         };
40
41         ahb {
42                 usb0: gadget@300000 {
43                         atmel,vbus-gpio = <&pioA PIN_PA27 GPIO_ACTIVE_HIGH>;
44                         pinctrl-names = "default";
45                         pinctrl-0 = <&pinctrl_usba_vbus>;
46                         status = "okay";
47                 };
48
49                 usb1: ohci@400000 {
50                         num-ports = <3>;
51                         atmel,vbus-gpio = <0
52                                            &pioA PIN_PB12 GPIO_ACTIVE_HIGH
53                                            0
54                                           >;
55                         pinctrl-names = "default";
56                         pinctrl-0 = <&pinctrl_usb_default>;
57                         status = "okay";
58                 };
59
60                 usb2: ehci@500000 {
61                         status = "okay";
62                 };
63
64                 ebi: ebi@10000000 {
65                         pinctrl-names = "default";
66                         pinctrl-0 = <&pinctrl_nand_default>;
67                         status = "okay"; /* conflicts with sdmmc1 and qspi0 */
68
69                         nand_controller: nand-controller {
70                                 status = "okay";
71
72                                 nand@3 {
73                                         reg = <0x3 0x0 0x2>;
74                                         atmel,rb = <0>;
75                                         nand-bus-width = <8>;
76                                         nand-ecc-mode = "hw";
77                                         nand-on-flash-bbt;
78                                         label = "atmel_nand";
79
80                                         partitions {
81                                                 compatible = "fixed-partitions";
82                                                 #address-cells = <1>;
83                                                 #size-cells = <1>;
84
85                                                 at91bootstrap@0 {
86                                                         label = "bootstrap";
87                                                         reg = <0x0 0x40000>;
88                                                 };
89
90                                                 bootloader@40000 {
91                                                         label = "bootloader";
92                                                         reg = <0x40000 0xc0000>;
93                                                 };
94
95                                                 bootloaderenvred@0x100000 {
96                                                         label = "bootloader env redundant";
97                                                         reg = <0x100000 0x40000>;
98                                                 };
99
100                                                 bootloaderenv@0x140000 {
101                                                         label = "bootloader env";
102                                                         reg = <0x140000 0x40000>;
103                                                 };
104
105                                                 dtb@180000 {
106                                                         label = "device tree";
107                                                         reg = <0x180000 0x80000>;
108                                                 };
109
110                                                 kernel@200000 {
111                                                         label = "kernel";
112                                                         reg = <0x200000 0x600000>;
113                                                 };
114
115                                                 rootfs@800000 {
116                                                         label = "rootfs";
117                                                         reg = <0x800000 0x1f800000>;
118                                                 };
119                                         };
120                                 };
121                         };
122                 };
123
124                 sdmmc0: sdio-host@a0000000 {
125                         bus-width = <8>;
126                         pinctrl-names = "default";
127                         pinctrl-0 = <&pinctrl_sdmmc0_default>;
128                         non-removable;
129                         mmc-ddr-1_8v;
130                         status = "okay";
131                 };
132
133                 apb {
134                         spi0: spi@f8000000 {
135                                 pinctrl-names = "default";
136                                 pinctrl-0 = <&pinctrl_spi0_default>;
137                                 status = "okay";
138                         };
139
140                         macb0: ethernet@f8008000 {
141                                 pinctrl-names = "default";
142                                 pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq>;
143                                 phy-mode = "rmii";
144                                 status = "okay";
145
146                                 ethernet-phy@1 {
147                                         reg = <0x1>;
148                                         interrupt-parent = <&pioA>;
149                                         interrupts = <56 IRQ_TYPE_LEVEL_LOW>;
150                                 };
151                         };
152
153                         tcb0: timer@f800c000 {
154                                 timer0: timer@0 {
155                                         compatible = "atmel,tcb-timer";
156                                         reg = <0>;
157                                 };
158
159                                 timer1: timer@1 {
160                                         compatible = "atmel,tcb-timer";
161                                         reg = <1>;
162                                 };
163                         };
164
165                         uart0: serial@f801c000 {
166                                 pinctrl-names = "default";
167                                 pinctrl-0 = <&pinctrl_uart0_default>;
168                                 atmel,use-dma-rx;
169                                 atmel,use-dma-tx;
170                                 status = "okay";
171                         };
172
173                         uart2: serial@f8024000 {
174                                 pinctrl-names = "default";
175                                 pinctrl-0 = <&pinctrl_uart2_default>;
176                                 atmel,use-dma-rx;
177                                 atmel,use-dma-tx;
178                                 status = "okay";
179                         };
180
181                         i2c0: i2c@f8028000 {
182                                 dmas = <0>, <0>;
183                                 pinctrl-names = "default", "gpio";
184                                 pinctrl-0 = <&pinctrl_i2c0_default>;
185                                 pinctrl-1 = <&pinctrl_i2c0_gpio>;
186                                 sda-gpios = <&pioA PIN_PD21 GPIO_ACTIVE_HIGH>;
187                                 scl-gpios = <&pioA PIN_PD22 GPIO_ACTIVE_HIGH>;
188                                 status = "okay";
189                         };
190
191                         flx0: flexcom@f8034000 {
192                                 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
193                                 status = "okay";
194
195                                 i2c2: i2c@600 {
196                                         compatible = "atmel,sama5d2-i2c";
197                                         reg = <0x600 0x200>;
198                                         interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
199                                         dmas = <0>, <0>;
200                                         dma-names = "tx", "rx";
201                                         #address-cells = <1>;
202                                         #size-cells = <0>;
203                                         clocks = <&pmc PMC_TYPE_PERIPHERAL 19>;
204                                         pinctrl-names = "default", "gpio";
205                                         pinctrl-0 = <&pinctrl_flx0_default>;
206                                         pinctrl-1 = <&pinctrl_flx0_gpio>;
207                                         sda-gpios = <&pioA PIN_PB28 GPIO_ACTIVE_HIGH>;
208                                         scl-gpios = <&pioA PIN_PB29 GPIO_ACTIVE_HIGH>;
209                                         atmel,fifo-size = <16>;
210                                         status = "okay";
211                                 };
212                         };
213
214                         shdwc@f8048010 {
215                                 atmel,shdwc-debouncer = <976>;
216
217                                 input@0 {
218                                         reg = <0>;
219                                         atmel,wakeup-type = "low";
220                                 };
221                         };
222
223                         watchdog@f8048040 {
224                                 status = "okay";
225                         };
226
227                         spi1: spi@fc000000 {
228                                 pinctrl-names = "default";
229                                 pinctrl-0 = <&pinctrl_spi1_default>;
230                                 status = "okay";
231                         };
232
233                         i2c1: i2c@fc028000 {
234                                 dmas = <0>, <0>;
235                                 pinctrl-names = "default", "gpio";
236                                 pinctrl-0 = <&pinctrl_i2c1_default>;
237                                 pinctrl-1 = <&pinctrl_i2c1_gpio>;
238                                 sda-gpios = <&pioA PIN_PC6 GPIO_ACTIVE_HIGH>;
239                                 scl-gpios = <&pioA PIN_PC7 GPIO_ACTIVE_HIGH>;
240                                 status = "okay";
241
242                                 at24@50 {
243                                         compatible = "atmel,24c02";
244                                         reg = <0x50>;
245                                         pagesize = <8>;
246                                 };
247                         };
248
249                         pinctrl@fc038000 {
250                                 pinctrl_flx0_default: flx0_default {
251                                         pinmux = <PIN_PB28__FLEXCOM0_IO0>,
252                                                  <PIN_PB29__FLEXCOM0_IO1>;
253                                         bias-disable;
254                                 };
255
256                                 pinctrl_flx0_gpio: flx0_gpio {
257                                         pinmux = <PIN_PB28__GPIO>,
258                                                  <PIN_PB29__GPIO>;
259                                         bias-disable;
260                                 };
261
262                                 pinctrl_i2c0_default: i2c0_default {
263                                         pinmux = <PIN_PD21__TWD0>,
264                                                  <PIN_PD22__TWCK0>;
265                                         bias-disable;
266                                 };
267
268                                 pinctrl_i2c0_gpio: i2c0_gpio {
269                                         pinmux = <PIN_PD21__GPIO>,
270                                                  <PIN_PD22__GPIO>;
271                                         bias-disable;
272                                 };
273
274                                 pinctrl_i2c1_default: i2c1_default {
275                                         pinmux = <PIN_PC6__TWD1>,
276                                                  <PIN_PC7__TWCK1>;
277                                         bias-disable;
278                                 };
279
280                                 pinctrl_i2c1_gpio: i2c1_gpio {
281                                         pinmux = <PIN_PC6__GPIO>,
282                                                  <PIN_PC7__GPIO>;
283                                         bias-disable;
284                                 };
285
286                                 pinctrl_key_gpio_default: key_gpio_default {
287                                         pinmux = <PIN_PA10__GPIO>;
288                                         bias-pull-up;
289                                 };
290
291                                 pinctrl_led_gpio_default: led_gpio_default {
292                                         pinmux = <PIN_PB6__GPIO>,
293                                                  <PIN_PB8__GPIO>,
294                                                  <PIN_PB10__GPIO>;
295                                         bias-pull-up;
296                                 };
297
298                                 pinctrl_macb0_default: macb0_default {
299                                         pinmux = <PIN_PB14__GTXCK>,
300                                                  <PIN_PB15__GTXEN>,
301                                                  <PIN_PB16__GRXDV>,
302                                                  <PIN_PB17__GRXER>,
303                                                  <PIN_PB18__GRX0>,
304                                                  <PIN_PB19__GRX1>,
305                                                  <PIN_PB20__GTX0>,
306                                                  <PIN_PB21__GTX1>,
307                                                  <PIN_PB22__GMDC>,
308                                                  <PIN_PB23__GMDIO>;
309                                         bias-disable;
310                                 };
311
312                                 pinctrl_macb0_phy_irq: macb0_phy_irq {
313                                         pinmux = <PIN_PB24__GPIO>;
314                                         bias-disable;
315                                 };
316
317                                 pinctrl_nand_default: nand_default {
318                                         re_we_data {
319                                                 pinmux = <PIN_PA22__D0>,
320                                                          <PIN_PA23__D1>,
321                                                          <PIN_PA24__D2>,
322                                                          <PIN_PA25__D3>,
323                                                          <PIN_PA26__D4>,
324                                                          <PIN_PA27__D5>,
325                                                          <PIN_PA28__D6>,
326                                                          <PIN_PA29__D7>,
327                                                          <PIN_PA30__NWE_NANDWE>,
328                                                          <PIN_PB2__NRD_NANDOE>;
329                                                 bias-pull-up;
330                                                 atmel,drive-strength = <ATMEL_PIO_DRVSTR_ME>;
331                                         };
332
333                                         ale_cle_rdy_cs {
334                                                 pinmux = <PIN_PB0__A21_NANDALE>,
335                                                          <PIN_PB1__A22_NANDCLE>,
336                                                          <PIN_PC8__NANDRDY>,
337                                                          <PIN_PA31__NCS3>;
338                                                 bias-pull-up;
339                                         };
340                                 };
341
342                                 pinctrl_sdmmc0_default: sdmmc0_default {
343                                         cmd_data {
344                                                 pinmux = <PIN_PA1__SDMMC0_CMD>,
345                                                          <PIN_PA2__SDMMC0_DAT0>,
346                                                          <PIN_PA3__SDMMC0_DAT1>,
347                                                          <PIN_PA4__SDMMC0_DAT2>,
348                                                          <PIN_PA5__SDMMC0_DAT3>,
349                                                          <PIN_PA6__SDMMC0_DAT4>,
350                                                          <PIN_PA7__SDMMC0_DAT5>,
351                                                          <PIN_PA8__SDMMC0_DAT6>,
352                                                          <PIN_PA9__SDMMC0_DAT7>;
353                                                 bias-pull-up;
354                                         };
355
356                                         ck_cd_vddsel {
357                                                 pinmux = <PIN_PA0__SDMMC0_CK>,
358                                                          <PIN_PA11__SDMMC0_VDDSEL>,
359                                                          <PIN_PA13__SDMMC0_CD>;
360                                                 bias-disable;
361                                         };
362                                 };
363
364                                 pinctrl_spi0_default: spi0_default {
365                                         pinmux = <PIN_PA14__SPI0_SPCK>,
366                                                  <PIN_PA15__SPI0_MOSI>,
367                                                  <PIN_PA16__SPI0_MISO>,
368                                                  <PIN_PA17__SPI0_NPCS0>;
369                                         bias-disable;
370                                 };
371
372                                 pinctrl_spi1_default: spi1_default {
373                                         pinmux = <PIN_PC1__SPI1_SPCK>,
374                                                  <PIN_PC2__SPI1_MOSI>,
375                                                  <PIN_PC3__SPI1_MISO>,
376                                                  <PIN_PC4__SPI1_NPCS0>;
377                                         bias-disable;
378                                 };
379
380                                 pinctrl_uart0_default: uart0_default {
381                                         pinmux = <PIN_PB26__URXD0>,
382                                                  <PIN_PB27__UTXD0>;
383                                         bias-disable;
384                                 };
385
386                                 pinctrl_uart2_default: uart2_default {
387                                         pinmux = <PIN_PD23__URXD2>,
388                                                  <PIN_PD24__UTXD2>;
389                                         bias-disable;
390                                 };
391
392                                 pinctrl_usb_default: usb_default {
393                                         pinmux = <PIN_PB12__GPIO>;
394                                         bias-disable;
395                                 };
396
397                                 pinctrl_usba_vbus: usba_vbus {
398                                         pinmux = <PIN_PB11__GPIO>;
399                                         bias-disable;
400                                 };
401
402                         };
403
404                 };
405         };
406
407         gpio_keys {
408                 compatible = "gpio-keys";
409
410                 pinctrl-names = "default";
411                 pinctrl-0 = <&pinctrl_key_gpio_default>;
412
413                 bp1 {
414                         label = "PB_USER";
415                         gpios = <&pioA PIN_PA10 GPIO_ACTIVE_LOW>;
416                         linux,code = <0x104>;
417                 };
418         };
419
420         leds {
421                 compatible = "gpio-leds";
422                 pinctrl-names = "default";
423                 pinctrl-0 = <&pinctrl_led_gpio_default>;
424                 status = "okay";
425
426                 red {
427                         label = "red";
428                         gpios = <&pioA PIN_PB10 GPIO_ACTIVE_HIGH>;
429                 };
430
431                 green {
432                         label = "green";
433                         gpios = <&pioA PIN_PB8 GPIO_ACTIVE_HIGH>;
434                 };
435
436                 blue {
437                         label = "blue";
438                         gpios = <&pioA PIN_PB6 GPIO_ACTIVE_HIGH>;
439                         linux,default-trigger = "heartbeat";
440                 };
441         };
442 };