1/*
2 * Copyright (c) 2020 Gerson Fernando Budke <nandojve@gmail.com>
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6/dts-v1/;
7
8#include <atmel/sam4lx4.dtsi>
9#include "sam4l_ek-pinctrl.dtsi"
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11
12/ {
13	model = "Atmel SAM4L-EK Board with an Atmel SAM4LC4C SoC";
14	compatible = "atmel,sam4l_ek";
15
16	aliases {
17		i2c-0 = &twim0;
18		led0 = &user_led;
19		sw0 = &sw0_dfu;
20	};
21
22	chosen {
23		zephyr,console = &usart2;
24		zephyr,shell-uart = &usart2;
25		zephyr,sram = &sram0;
26		zephyr,flash = &flash0;
27	};
28
29	leds {
30		compatible = "gpio-leds";
31		user_led: led_0 {
32			gpios = <&gpioc 10 GPIO_ACTIVE_HIGH>;
33			label = "LED_0";
34		};
35	};
36
37	gpio_keys {
38		compatible = "gpio-keys";
39
40		sw0_dfu: button_1 {
41			label = "SW0_DFU";
42			gpios = <&gpioc 3 GPIO_ACTIVE_LOW>;
43			zephyr,code = <INPUT_KEY_0>;
44		};
45	};
46};
47
48&cpu0 {
49	clock-frequency = <48000000>;
50};
51
52&usart2 {
53	status = "okay";
54	current-speed = <115200>;
55
56	pinctrl-0 = <&usart2_default>;
57	pinctrl-names = "default";
58};
59
60&spi0 {
61	status = "okay";
62
63	pinctrl-0 = <&spi0_default>;
64	pinctrl-names = "default";
65
66	cs-gpios = <&gpioa 2 GPIO_ACTIVE_LOW>,
67		   <&gpioc 0 GPIO_ACTIVE_LOW>;
68};
69
70&tc0 {
71	clk = <4>;
72	status = "okay";
73};
74
75&twim0 {
76	status = "okay";
77
78	pinctrl-0 = <&twi0_default>;
79	pinctrl-names = "default";
80
81	std-clk-slew-lim = <0>;
82	std-clk-strength-low = "0.5";
83	std-data-slew-lim = <0>;
84	std-data-strength-low = "0.5";
85
86	hs-clk-slew-lim = <0>;
87	hs-clk-strength-high = "0.5";
88	hs-clk-strength-low = "0.5";
89	hs-data-slew-lim = <0>;
90	hs-data-strength-low = "0.5";
91
92	hs-master-code = <0>;
93};
94
95zephyr_udc0: &usbc {
96	status = "okay";
97
98	pinctrl-0 = <&usbc_default>;
99	pinctrl-names = "default";
100};
101