1/* 2 * Copyright (c) 2018 Sean Nyekjaer 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <freq.h> 9#include <atmel/samd20.dtsi> 10#include <atmel/samx2xx18.dtsi> 11#include "atsamd20_xpro-pinctrl.dtsi" 12#include <zephyr/dt-bindings/input/input-event-codes.h> 13 14/ { 15 model = "SAM D20 Xplained Pro"; 16 compatible = "atsamd20,xpro", "atmel,samd20j18", "atmel,samd20"; 17 18 chosen { 19 zephyr,console = &sercom3; 20 zephyr,shell-uart = &sercom3; 21 zephyr,sram = &sram0; 22 zephyr,flash = &flash0; 23 }; 24 25 /* These aliases are provided for compatibility with samples */ 26 aliases { 27 led0 = &yellow_led; 28 sw0 = &user_button; 29 i2c-0 = &sercom2; 30 }; 31 32 leds { 33 compatible = "gpio-leds"; 34 yellow_led: led_0 { 35 gpios = <&porta 14 GPIO_ACTIVE_LOW>; 36 label = "LED0"; 37 }; 38 }; 39 40 buttons { 41 compatible = "gpio-keys"; 42 user_button: button_0 { 43 gpios = <&porta 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 44 label = "SW0"; 45 zephyr,code = <INPUT_KEY_0>; 46 }; 47 }; 48}; 49 50&cpu0 { 51 clock-frequency = <DT_FREQ_M(48)>; 52}; 53 54&sercom0 { 55 status = "okay"; 56 compatible = "atmel,sam0-spi"; 57 dipo = <0>; 58 dopo = <1>; 59 #address-cells = <1>; 60 #size-cells = <0>; 61 cs-gpios = <&porta 5 GPIO_ACTIVE_LOW>; 62 63 pinctrl-0 = <&sercom0_spi_default>; 64 pinctrl-names = "default"; 65}; 66 67&sercom2 { 68 status = "okay"; 69 compatible = "atmel,sam0-i2c"; 70 clock-frequency = <I2C_BITRATE_FAST>; 71 #address-cells = <1>; 72 #size-cells = <0>; 73 74 pinctrl-0 = <&sercom2_i2c_default>; 75 pinctrl-names = "default"; 76}; 77 78&sercom3 { 79 status = "okay"; 80 compatible = "atmel,sam0-uart"; 81 current-speed = <115200>; 82 rxpo = <3>; 83 txpo = <1>; 84 85 pinctrl-0 = <&sercom3_uart_default>; 86 pinctrl-names = "default"; 87}; 88 89&sercom4 { 90 status = "okay"; 91 compatible = "atmel,sam0-uart"; 92 current-speed = <115200>; 93 rxpo = <1>; 94 txpo = <0>; 95 96 pinctrl-0 = <&sercom4_uart_default>; 97 pinctrl-names = "default"; 98}; 99 100&flash0 { 101 partitions { 102 compatible = "fixed-partitions"; 103 #address-cells = <1>; 104 #size-cells = <1>; 105 106 /* 107 * The final 16 KiB is reserved for the application. 108 * Storage partition will be used by FCB/LittleFS/NVS 109 * if enabled. 110 */ 111 storage_partition: partition@3c000 { 112 label = "storage"; 113 reg = <0x0003c000 0x00004000>; 114 }; 115 }; 116}; 117