Linux preempt-rt

Check our new training course

Real-Time Linux with PREEMPT_RT

Check our new training course
with Creative Commons CC-BY-SA
lecture and lab materials

Bootlin logo

Elixir Cross Referencer

/*
 * Copyright (c) 2018 Bryan O'Donoghue
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/dts-v1/;
#include <atmel/samd21.dtsi>

/ {
	model = "SAM D21 Xplained Pro";
	compatible = "atsamd21,xpro", "atmel,samd21j18a", "atmel,samd21";

	chosen {
		zephyr,console = &sercom3;
		zephyr,shell-uart = &sercom3;
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
	};

	/* These aliases are provided for compatibility with samples */
	aliases {
		led0 = &led0;
		pwm-led0 = &pwm_led0;
		sw0 = &user_button;
		i2c-0 = &sercom2;
	};

	leds {
		compatible = "gpio-leds";
		led0: led_0 {
			gpios = <&portb 30 GPIO_ACTIVE_LOW>;
			label = "Yellow LED";
		};
	};

	pwmleds {
		compatible = "pwm-leds";
		pwm_led0: pwm_led_0 {
			pwms = <&tcc0 0>;
		};
	};

	buttons {
		compatible = "gpio-keys";
		user_button: button_0 {
			gpios = <&porta 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
			label = "SW0";
		};
	};
};

&cpu0 {
	clock-frequency = <48000000>;
};

&tcc0 {
	status = "okay";
	compatible = "atmel,sam0-tcc-pwm";
	/* Gives a maximum period of 1.4s */
	prescaler = <4>;
	#pwm-cells = <1>;
};

&sercom0 {
	status = "okay";
	compatible = "atmel,sam0-uart";
	current-speed = <9600>;
	rxpo = <3>;
	txpo = <2>;

	pinctrl-0 = <&pa11c_sercom0_pad3 &pa10c_sercom0_pad2>;
};

&sercom1 {
	status = "okay";
	compatible = "atmel,sam0-uart";
	current-speed = <115200>;
	rxpo = <3>;
	txpo = <0>;

	pinctrl-0 = <&pa19c_sercom1_pad3 &pa16c_sercom1_pad0>;
};

&sercom2 {
	status = "okay";
	compatible = "atmel,sam0-i2c";
	clock-frequency = <I2C_BITRATE_FAST>;
	#address-cells = <1>;
	#size-cells = <0>;
};

&sercom3 {
	status = "okay";
	compatible = "atmel,sam0-uart";
	current-speed = <115200>;
	rxpo = <1>;
	txpo = <0>;

	pinctrl-0 = <&pa23c_sercom3_pad1 &pa22c_sercom3_pad0>;
};

&sercom5 {
	status = "okay";
	compatible = "atmel,sam0-spi";
	dipo = <0>;
	dopo = <2>;
	#address-cells = <1>;
	#size-cells = <0>;
};

zephyr_udc0: &usb0 {
	status = "okay";
};