1/*
2 * Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <atmel/samd21.dtsi>
9#include <atmel/samx2xx18.dtsi>
10#include "arduino_mkrzero-pinctrl.dtsi"
11#include "arduino_mkr_connector.dtsi"
12
13/ {
14	model = "Arduino MKR Zero";
15	compatible = "arduino,mkrzero";
16
17	chosen {
18		zephyr,console = &sercom5;
19		zephyr,shell-uart = &sercom5;
20		zephyr,sram = &sram0;
21		zephyr,flash = &flash0;
22		zephyr,code-partition = &code_partition;
23	};
24
25	leds {
26		compatible = "gpio-leds";
27		led0: led_0 {
28			gpios = <&portb 8 0>;
29			label = "LED";
30		};
31	};
32
33	aliases {
34		led0 = &led0;
35		sdhc0 = &sdhc0;
36	};
37};
38
39&cpu0 {
40	clock-frequency = <48000000>;
41};
42
43&sercom0 {
44	status = "okay";
45	compatible = "atmel,sam0-i2c";
46	clock-frequency = <I2C_BITRATE_FAST>;
47	#address-cells = <1>;
48	#size-cells = <0>;
49
50	pinctrl-0 = <&sercom0_i2c_default>;
51	pinctrl-names = "default";
52
53	atecc508a@c0 {
54		compatible = "atmel,atecc508";
55		reg = <0xc0>;
56	};
57
58};
59
60&sercom1 {
61	status = "okay";
62	compatible = "atmel,sam0-spi";
63	dipo = <3>;
64	dopo = <0>;
65	#address-cells = <1>;
66	#size-cells = <0>;
67
68	pinctrl-0 = <&sercom1_spi_default>;
69	pinctrl-names = "default";
70};
71
72&sercom2 {
73	status = "okay";
74	compatible = "atmel,sam0-spi";
75	dipo = <3>;
76	dopo = <0>;
77	#address-cells = <1>;
78	#size-cells = <0>;
79
80	pinctrl-0 = <&sercom2_spi_default>;
81	pinctrl-names = "default";
82
83	cs-gpios = <&porta 14 GPIO_ACTIVE_LOW>;
84
85	sdhc0: sdhc@0 {
86		compatible = "zephyr,sdhc-spi-slot";
87		reg = <0>;
88		status = "okay";
89		spi-max-frequency = <1000000>;
90		mmc {
91			compatible = "zephyr,sdmmc-disk";
92			status = "okay";
93		};
94	};
95};
96
97&sercom5 {
98	status = "okay";
99	compatible = "atmel,sam0-uart";
100	current-speed = <115200>;
101	rxpo = <3>;
102	txpo = <1>;
103
104	pinctrl-0 = <&sercom5_uart_default>;
105	pinctrl-names = "default";
106};
107
108&dac0 {
109	status = "okay";
110
111	pinctrl-0 = <&dac_default>;
112	pinctrl-names = "default";
113};
114
115&flash0 {
116	partitions {
117		compatible = "fixed-partitions";
118		#address-cells = <1>;
119		#size-cells = <1>;
120
121		boot_partition: partition@0 {
122			label = "bootloader";
123			reg = <0x00000000 0x2000>;
124			read-only;
125		};
126
127		code_partition: partition@2000 {
128			label = "code";
129			reg = <0x2000 0x3A000>;
130			read-only;
131		};
132
133		/*
134		 * The final 16 KiB is reserved for the application.
135		 * Storage partition will be used by FCB/LittleFS/NVS
136		 * if enabled.
137		 */
138		storage_partition: partition@3c000 {
139			label = "storage";
140			reg = <0x0003c000 0x00004000>;
141		};
142	};
143};
144
145zephyr_udc0: &usb0 {
146	status = "okay";
147
148	pinctrl-0 = <&usb_dc_default>;
149	pinctrl-names = "default";
150};
151