1/* 2 * Copyright (c) 2023, Meta Platforms, Inc. and its affiliates. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <freq.h> 9#include <mem.h> 10#include <atmel/samd20.dtsi> 11#include <atmel/samx2xx16.dtsi> 12#include "ev11l78a-pinctrl.dtsi" 13 14/ { 15 model = "Microchip EV11L78A"; 16 compatible = "atmel,samd20e16", "atmel,samd20"; 17 18 aliases { 19 led0 = &cap_mis_led; 20 spi0 = &sercom0; 21 i2c0 = &sercom3; 22 }; 23 24 chosen { 25 zephyr,console = &sercom1; 26 zephyr,shell-uart = &sercom1; 27 zephyr,sram = &sram0; 28 zephyr,flash = &flash0; 29 }; 30 31 leds { 32 compatible = "gpio-leds"; 33 cap_mis_led: led_0 { 34 gpios = <&porta 23 GPIO_ACTIVE_HIGH>; 35 label = "CAP_MIS"; 36 }; 37 }; 38 39 csa_i_sense: i_sense { 40 compatible = "current-sense-amplifier"; 41 io-channels = <&adc 5>; 42 sense-resistor-micro-ohms = <4000>; 43 sense-gain-mult = <100>; 44 }; 45 46}; 47 48&cpu0 { 49 clock-frequency = <DT_FREQ_M(48)>; 50}; 51 52&sercom0 { 53 status = "okay"; 54 compatible = "atmel,sam0-spi"; 55 dipo = <0>; 56 dopo = <2>; 57 #address-cells = <1>; 58 #size-cells = <0>; 59 cs-gpios = <&porta 10 GPIO_ACTIVE_LOW>; 60 61 pinctrl-0 = <&sercom0_spi_default>; 62 pinctrl-names = "default"; 63}; 64 65&sercom1 { 66 status = "okay"; 67 compatible = "atmel,sam0-uart"; 68 current-speed = <115200>; 69 rxpo = <3>; 70 txpo = <1>; 71 72 pinctrl-0 = <&sercom1_uart_default>; 73 pinctrl-names = "default"; 74}; 75 76&sercom3 { 77 status = "okay"; 78 compatible = "atmel,sam0-i2c"; 79 clock-frequency = <I2C_BITRATE_HIGH>; 80 81 #address-cells = <1>; 82 #size-cells = <0>; 83 84 pinctrl-0 = <&sercom3_i2c_default>; 85 pinctrl-names = "default"; 86}; 87 88&flash0 { 89 partitions { 90 compatible = "fixed-partitions"; 91 #address-cells = <1>; 92 #size-cells = <1>; 93 94 /* 95 * The final 16 KiB is reserved for the application. 96 * Storage partition will be used by FCB/LittleFS/NVS 97 * if enabled. 98 */ 99 storage_partition: partition@c000 { 100 label = "storage"; 101 reg = <DT_SIZE_K(64-16) DT_SIZE_K(16)>; 102 }; 103 }; 104}; 105 106&adc { 107 status = "okay"; 108 prescaler = <32>; 109 #address-cells = <1>; 110 #size-cells = <0>; 111 112 channel@4 { 113 reg = <4>; 114 zephyr,gain = "ADC_GAIN_1_2"; 115 zephyr,reference = "ADC_REF_VDD_1_2"; 116 zephyr,vref-mv = <1650>; 117 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 118 zephyr,resolution = <12>; 119 zephyr,input-positive = <4>; 120 }; 121 122 pinctrl-0 = <&adc_default>; 123 pinctrl-names = "default"; 124}; 125