138 lines
2.3 KiB
Plaintext
138 lines
2.3 KiB
Plaintext
/*
|
|
* Copyright (c) 2018 Google LLC.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/dts-v1/;
|
|
#include <atmel/samd21.dtsi>
|
|
#include "adafruit_trinket_m0-pinctrl.dtsi"
|
|
|
|
/ {
|
|
model = "Adafruit Trinket M0";
|
|
compatible = "adafruit,trinket-m0", "atmel,samd21e18a", "atmel,samd21";
|
|
|
|
chosen {
|
|
zephyr,console = &sercom0;
|
|
zephyr,shell-uart = &sercom0;
|
|
zephyr,sram = &sram0;
|
|
zephyr,flash = &flash0;
|
|
zephyr,code-partition = &code_partition;
|
|
};
|
|
|
|
/* These aliases are provided for compatibility with samples */
|
|
aliases {
|
|
led0 = &led0;
|
|
pwm-led0 = &pwm_led0;
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
led0: led_0 {
|
|
gpios = <&porta 10 0>;
|
|
label = "LED";
|
|
};
|
|
};
|
|
|
|
pwmleds {
|
|
compatible = "pwm-leds";
|
|
|
|
pwm_led0: pwm_led_0 {
|
|
pwms = <&tcc0 2 PWM_MSEC(20)>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&cpu0 {
|
|
clock-frequency = <48000000>;
|
|
};
|
|
|
|
&sercom0 {
|
|
status = "okay";
|
|
compatible = "atmel,sam0-uart";
|
|
current-speed = <115200>;
|
|
rxpo = <3>;
|
|
txpo = <1>;
|
|
|
|
pinctrl-0 = <&sercom0_uart_default>;
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
&sercom2 {
|
|
status = "okay";
|
|
compatible = "atmel,sam0-uart";
|
|
current-speed = <115200>;
|
|
rxpo = <1>;
|
|
txpo = <0>;
|
|
|
|
pinctrl-0 = <&sercom2_uart_default>;
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
/* Drives the on-board DotStar LED */
|
|
&sercom1 {
|
|
status = "okay";
|
|
compatible = "atmel,sam0-spi";
|
|
dipo = <2>;
|
|
dopo = <0>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
pinctrl-0 = <&sercom1_spi_default>;
|
|
pinctrl-names = "default";
|
|
|
|
led1: apa102@0 {
|
|
compatible = "apa,apa102";
|
|
reg = <0>;
|
|
spi-max-frequency = <24000000>;
|
|
};
|
|
};
|
|
|
|
&tcc0 {
|
|
status = "okay";
|
|
compatible = "atmel,sam0-tcc-pwm";
|
|
/* Gives a maximum period of 1.4 s */
|
|
prescaler = <4>;
|
|
#pwm-cells = <2>;
|
|
|
|
pinctrl-0 = <&pwm_default>;
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
&flash0 {
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
boot_partition: partition@0 {
|
|
label = "uf2";
|
|
reg = <0x00000000 0x2000>;
|
|
read-only;
|
|
};
|
|
|
|
code_partition: partition@2000 {
|
|
label = "code";
|
|
reg = <0x2000 0x3A000>;
|
|
read-only;
|
|
};
|
|
|
|
/*
|
|
* The final 16 KiB is reserved for the application.
|
|
* Storage partition will be used by FCB/LittleFS/NVS
|
|
* if enabled.
|
|
*/
|
|
storage_partition: partition@3c000 {
|
|
label = "storage";
|
|
reg = <0x0003c000 0x00004000>;
|
|
};
|
|
};
|
|
};
|
|
|
|
zephyr_udc0: &usb0 {
|
|
status = "okay";
|
|
|
|
pinctrl-0 = <&usb_dc_default>;
|
|
pinctrl-names = "default";
|
|
};
|