From 527ebe131d50fbac6f499ea136eaadf34fc7e931 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Thu, 24 Oct 2019 20:42:29 -0300 Subject: [PATCH] dts: arm: atmel: Add sam4e device tree Add device tree for Atmel sam4e SoC Signed-off-by: Gerson Fernando Budke --- dts/arm/atmel/sam4e.dtsi | 171 ++++++++++++++++++++++++++++++++++++ dts/arm/atmel/sam4e16c.dtsi | 18 ++++ dts/arm/atmel/sam4e16e.dtsi | 18 ++++ dts/arm/atmel/sam4e8c.dtsi | 18 ++++ dts/arm/atmel/sam4e8e.dtsi | 18 ++++ 5 files changed, 243 insertions(+) create mode 100644 dts/arm/atmel/sam4e.dtsi create mode 100644 dts/arm/atmel/sam4e16c.dtsi create mode 100644 dts/arm/atmel/sam4e16e.dtsi create mode 100644 dts/arm/atmel/sam4e8c.dtsi create mode 100644 dts/arm/atmel/sam4e8e.dtsi diff --git a/dts/arm/atmel/sam4e.dtsi b/dts/arm/atmel/sam4e.dtsi new file mode 100644 index 00000000000..89ab189d17e --- /dev/null +++ b/dts/arm/atmel/sam4e.dtsi @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2019 Gerson Fernando Budke + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include + +/ { + aliases { + watchdog0 = &wdog; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-m4f"; + reg = <0>; + }; + }; + + sram0: memory@20000000 { + compatible = "mmio-sram"; + }; + + flash0: flash@400000 { + compatible = "soc-nv-flash"; + label = "FLASH_0"; + }; + + soc { + wdog: watchdog@400e1850 { + compatible = "atmel,sam-watchdog"; + reg = <0x400e1850 0x10>; + interrupts = <4 0>; + peripheral-id = <4>; + label = "WATCHDOG_0"; + status = "disabled"; + }; + + i2c0: i2c@400a8000 { + compatible = "atmel,sam-i2c-twi"; + clock-frequency = ; + reg = <0x400a8000 0x4000>; + interrupts = <17 0>; + peripheral-id = <17>; + label = "I2C_0"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c1: i2c@400ac000 { + compatible = "atmel,sam-i2c-twi"; + clock-frequency = ; + reg = <0x400ac000 0x4000>; + interrupts = <18 0>; + peripheral-id = <18>; + label = "I2C_1"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + spi0: spi@40088000 { + compatible = "atmel,sam-spi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x40088000 0x4000>; + interrupts = <19 0>; + peripheral-id = <19>; + label = "SPI_0"; + status = "disabled"; + }; + + uart0: uart@400e0600 { + compatible = "atmel,sam-uart"; + reg = <0x400e0600 0x140>; + interrupts = <7 1>; + peripheral-id = <7>; + status = "disabled"; + label = "UART_0"; + }; + + uart1: uart@40060600 { + compatible = "atmel,sam-uart"; + reg = <0x40060600 0x200>; + interrupts = <45 1>; + peripheral-id = <45>; + status = "disabled"; + label = "UART_1"; + }; + + usart0: usart@400a0000 { + compatible = "atmel,sam-usart"; + reg = <0x400a0000 0x4000>; + interrupts = <14 1>; + peripheral-id = <14>; + status = "disabled"; + label = "USART_0"; + }; + + usart1: usart@400a4000 { + compatible = "atmel,sam-usart"; + reg = <0x400a4000 0x4000>; + interrupts = <15 1>; + peripheral-id = <15>; + status = "disabled"; + label = "USART_1"; + }; + + porta: gpio@400e0e00 { + compatible = "atmel,sam-gpio"; + reg = <0x400e0e00 0x200>; + interrupts = <9 1>; + peripheral-id = <9>; + label = "PORTA"; + gpio-controller; + #gpio-cells = <2>; + }; + + portb: gpio@400e1000 { + compatible = "atmel,sam-gpio"; + reg = <0x400e1000 0x200>; + interrupts = <10 1>; + peripheral-id = <10>; + label = "PORTB"; + gpio-controller; + #gpio-cells = <2>; + }; + + portc: gpio@400e1200 { + compatible = "atmel,sam-gpio"; + reg = <0x400e1200 0x200>; + interrupts = <11 1>; + peripheral-id = <11>; + label = "PORTC"; + gpio-controller; + #gpio-cells = <2>; + }; + + portd: gpio@400e1400 { + compatible = "atmel,sam-gpio"; + reg = <0x400e1400 0x200>; + interrupts = <12 1>; + peripheral-id = <12>; + label = "PORTD"; + gpio-controller; + #gpio-cells = <2>; + }; + + porte: gpio@400e1600 { + compatible = "atmel,sam-gpio"; + reg = <0x400e1600 0x200>; + interrupts = <13 1>; + peripheral-id = <13>; + label = "PORTE"; + gpio-controller; + #gpio-cells = <2>; + }; + }; +}; + +&nvic { + arm,num-irq-priority-bits = <4>; +}; diff --git a/dts/arm/atmel/sam4e16c.dtsi b/dts/arm/atmel/sam4e16c.dtsi new file mode 100644 index 00000000000..6df2c978ee3 --- /dev/null +++ b/dts/arm/atmel/sam4e16c.dtsi @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2019 Gerson Fernando Budke + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/ { + flash0: flash@400000 { + reg = <0x00400000 DT_SIZE_K(1024)>; + }; + + sram0: memory@20000000 { + reg = <0x20000000 DT_SIZE_K(128)>; + }; +}; diff --git a/dts/arm/atmel/sam4e16e.dtsi b/dts/arm/atmel/sam4e16e.dtsi new file mode 100644 index 00000000000..6df2c978ee3 --- /dev/null +++ b/dts/arm/atmel/sam4e16e.dtsi @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2019 Gerson Fernando Budke + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/ { + flash0: flash@400000 { + reg = <0x00400000 DT_SIZE_K(1024)>; + }; + + sram0: memory@20000000 { + reg = <0x20000000 DT_SIZE_K(128)>; + }; +}; diff --git a/dts/arm/atmel/sam4e8c.dtsi b/dts/arm/atmel/sam4e8c.dtsi new file mode 100644 index 00000000000..777d464598c --- /dev/null +++ b/dts/arm/atmel/sam4e8c.dtsi @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2019 Gerson Fernando Budke + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/ { + flash0: flash@400000 { + reg = <0x00400000 DT_SIZE_K(512)>; + }; + + sram0: memory@20000000 { + reg = <0x20000000 DT_SIZE_K(128)>; + }; +}; diff --git a/dts/arm/atmel/sam4e8e.dtsi b/dts/arm/atmel/sam4e8e.dtsi new file mode 100644 index 00000000000..777d464598c --- /dev/null +++ b/dts/arm/atmel/sam4e8e.dtsi @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2019 Gerson Fernando Budke + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/ { + flash0: flash@400000 { + reg = <0x00400000 DT_SIZE_K(512)>; + }; + + sram0: memory@20000000 { + reg = <0x20000000 DT_SIZE_K(128)>; + }; +};