Boot Linux faster!

Check our new training course

Boot Linux faster!

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

Bootlin logo

Elixir Cross Referencer

/*
 * Copyright (c) 2017 Justin Watson
 * Copyright (c) 2019 Gerson Fernando Budke
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <arm/armv7-m.dtsi>
#include <dt-bindings/i2c/i2c.h>
#include <dt-bindings/gpio/gpio.h>

#include "sam4s-pinctrl.dtsi"

/ {
	aliases {
		watchdog0 = &wdt;
	};

	chosen {
		zephyr,flash-controller = &eefc;
	};

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu0: cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-m4";
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <1>;

			mpu: mpu@e000ed90 {
				compatible = "arm,armv7m-mpu";
				reg = <0xe000ed90 0x40>;
				arm,num-mpu-regions = <8>;
			};
		};
	};

	soc {
		sram0: memory@20100000 {
			compatible = "mmio-sram";
		};

		/* Only used for HWINFO device ID */
		eefc: flash-controller@400e0a00 {
			compatible = "atmel,sam-flash-controller";
			label = "FLASH_CTRL";
			reg = <0x400e0a00 0x200>;
			peripheral-id = <6>;

			#address-cells = <1>;
			#size-cells = <1>;

			flash0: flash@400000 {
				compatible = "soc-nv-flash";
				label = "FLASH_0";
			};
		};

		wdt: watchdog@400e1450 {
			compatible = "atmel,sam-watchdog";
			reg = <0x400e1450 0xc>;
			interrupts = <4 0>;
			peripheral-id = <4>;
			label = "WATCHDOG_0";
			status = "disabled";
		};

		twi0: i2c@40018000 {
			compatible = "atmel,sam-i2c-twi";
			clock-frequency = <I2C_BITRATE_STANDARD>;
			reg = <0x40018000 0x128>;
			interrupts = <19 0>;
			peripheral-id = <19>;
			label = "I2C_0";
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
			pinctrl-0 = <&pa4a_twi0_twck0 &pa3a_twi0_twd0>;
		};

		twi1: i2c@4001c000 {
			compatible = "atmel,sam-i2c-twi";
			clock-frequency = <I2C_BITRATE_STANDARD>;
			reg = <0x4001c000 0x128>;
			interrupts = <20 0>;
			peripheral-id = <20>;
			label = "I2C_1";
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
			pinctrl-0 = <&pb5a_twi1_twck1 &pb4a_twi1_twd1>;
		};

		spi0: spi@40008000 {
			compatible = "atmel,sam-spi";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x40008000 0x4000>;
			interrupts = <21 0>;
			peripheral-id = <21>;
			label = "SPI_0";
			status = "disabled";
			pinctrl-0 = <&pa12a_spi_miso &pa13a_spi_mosi &pa14a_spi_spck>;
		};

		uart0: uart@400e0600 {
			compatible = "atmel,sam-uart";
			reg = <0x400e0600 0x200>;
			interrupts = <8 1>;
			peripheral-id = <8>;
			status = "disabled";
			label = "UART_0";
			pinctrl-0 = <&pa9a_uart0_urxd0 &pa10a_uart0_utxd0>;
		};

		uart1: uart@400e0800 {
			compatible = "atmel,sam-uart";
			reg = <0x400e0800 0x200>;
			interrupts = <9 1>;
			peripheral-id = <9>;
			status = "disabled";
			label = "UART_1";
			pinctrl-0 = <&pb2a_uart1_urxd1 &pb3a_uart1_utxd1>;
		};

		usart0: usart@40024000 {
			compatible = "atmel,sam-usart";
			reg = <0x40024000 0x130>;
			interrupts = <14 1>;
			peripheral-id = <14>;
			status = "disabled";
			label = "USART_0";
		};

		usart1: usart@40028000 {
			compatible = "atmel,sam-usart";
			reg = <0x40028000 0x130>;
			interrupts = <15 1>;
			peripheral-id = <15>;
			status = "disabled";
			label = "USART_1";
		};

		pinctrl@400e0e00 {
			compatible = "atmel,sam-pinctrl";
			#address-cells = <1>;
			#size-cells = <1>;
			ranges = <0x400e0e00 0x400e0e00 0x600>;

			pioa: gpio@400e0e00 {
				compatible = "atmel,sam-gpio";
				reg = <0x400e0e00 0x190>;
				interrupts = <11 1>;
				peripheral-id = <11>;
				label = "PORTA";
				gpio-controller;
				#gpio-cells = <2>;
				#atmel,pin-cells = <2>;
			};

			piob: gpio@400e1000 {
				compatible = "atmel,sam-gpio";
				reg = <0x400e1000 0x190>;
				interrupts = <12 1>;
				peripheral-id = <12>;
				label = "PORTB";
				gpio-controller;
				#gpio-cells = <2>;
				#atmel,pin-cells = <2>;
			};

			pioc: gpio@400e1200 {
				compatible = "atmel,sam-gpio";
				reg = <0x400e1200 0x190>;
				interrupts = <13 1>;
				peripheral-id = <13>;
				label = "PORTC";
				gpio-controller;
				#gpio-cells = <2>;
				#atmel,pin-cells = <2>;
			};
		};
	};
};

&nvic {
	arm,num-irq-priority-bits = <4>;
};