boards: arduino_due: Added DTS to the Arduino Due.
Change-Id: I006f9d4080a1351534ede5cc601e43526c39aa83 Origin: Original Signed-off-by: Justin Watson <jwatson5@gmail.com>
This commit is contained in:
parent
6821df1ef0
commit
44c421b4a3
7 changed files with 100 additions and 29 deletions
|
@ -16,10 +16,6 @@ config SOC_PART_NUMBER
|
||||||
string
|
string
|
||||||
default sam3x8e if SOC_PART_NUMBER_SAM3X8E
|
default sam3x8e if SOC_PART_NUMBER_SAM3X8E
|
||||||
|
|
||||||
config NUM_IRQ_PRIO_BITS
|
|
||||||
int
|
|
||||||
default 3
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# SAM3 family has total 45 peripherals capable of
|
# SAM3 family has total 45 peripherals capable of
|
||||||
# generating interrupts.
|
# generating interrupts.
|
||||||
|
@ -32,29 +28,4 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||||
int
|
int
|
||||||
default 84000000
|
default 84000000
|
||||||
|
|
||||||
#
|
|
||||||
# SRAM address depends on the processor.
|
|
||||||
#
|
|
||||||
# SAM3X8E has two SRAM banks:
|
|
||||||
# 64K @ 0x20000000
|
|
||||||
# 32K @ 0x20080000
|
|
||||||
# The first 64K is mirrored at 0x20070000
|
|
||||||
# to provide one continuous 96K block.
|
|
||||||
#
|
|
||||||
config SRAM_SIZE
|
|
||||||
default 96 if SOC_PART_NUMBER_SAM3X8E
|
|
||||||
|
|
||||||
config SRAM_BASE_ADDRESS
|
|
||||||
default 0x20000000 if !SOC_PART_NUMBER_SAM3X8E
|
|
||||||
default 0x20070000 if SOC_PART_NUMBER_SAM3X8E
|
|
||||||
|
|
||||||
#
|
|
||||||
# Atmel SAM3X family has flash starting @ 0x00080000.
|
|
||||||
#
|
|
||||||
config FLASH_SIZE
|
|
||||||
default 512 if SOC_PART_NUMBER_SAM3X8E
|
|
||||||
|
|
||||||
config FLASH_BASE_ADDRESS
|
|
||||||
default 0x00080000
|
|
||||||
|
|
||||||
endif # SOC_SERIES_SAM3X
|
endif # SOC_SERIES_SAM3X
|
||||||
|
|
|
@ -11,3 +11,4 @@ CONFIG_UART_ATMEL_SAM3=y
|
||||||
CONFIG_SOC_ATMEL_SAM3X_EXT_MAINCK=y
|
CONFIG_SOC_ATMEL_SAM3X_EXT_MAINCK=y
|
||||||
CONFIG_PINMUX=y
|
CONFIG_PINMUX=y
|
||||||
CONFIG_WATCHDOG=n
|
CONFIG_WATCHDOG=n
|
||||||
|
CONFIG_HAS_DTS=y
|
||||||
|
|
|
@ -30,6 +30,7 @@ dtb-$(CONFIG_BOARD_NRF51_PCA10028) = nrf51_pca10028.dts_compiled
|
||||||
dtb-$(CONFIG_BOARD_QUARK_SE_C1000_BLE) = quark_se_c1000_ble.dts_compiled
|
dtb-$(CONFIG_BOARD_QUARK_SE_C1000_BLE) = quark_se_c1000_ble.dts_compiled
|
||||||
dtb-$(CONFIG_BOARD_QEMU_CORTEX_M3) = qemu_cortex_m3.dts_compiled
|
dtb-$(CONFIG_BOARD_QEMU_CORTEX_M3) = qemu_cortex_m3.dts_compiled
|
||||||
dtb-$(CONFIG_BOARD_SAM_E70_XPLAINED) = sam_e70_xplained.dts_compiled
|
dtb-$(CONFIG_BOARD_SAM_E70_XPLAINED) = sam_e70_xplained.dts_compiled
|
||||||
|
dtb-$(CONFIG_BOARD_ARDUINO_DUE) = arduino_due.dts_compiled
|
||||||
|
|
||||||
always := $(dtb-y)
|
always := $(dtb-y)
|
||||||
endif
|
endif
|
||||||
|
|
22
dts/arm/arduino_due.dts
Normal file
22
dts/arm/arduino_due.dts
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include <atmel/sam3x.dtsi>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Arduino Due with an Atmel SAM3X8E SoC";
|
||||||
|
compatible = "arduino,due", "atmel,sam3x8e", "atmel,sam3x";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
uart_0 = &uart0;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
zephyr,sram = &sram0;
|
||||||
|
zephyr,flash = &flash0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
status = "ok";
|
||||||
|
current-speed = <115200>;
|
||||||
|
};
|
8
dts/arm/arduino_due.fixup
Normal file
8
dts/arm/arduino_due.fixup
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/* This file is a temporary workaround for mapping of the generated information
|
||||||
|
* to the current driver definitions. This will be removed when the drivers
|
||||||
|
* are modified to handle the generated information, or the mapping of
|
||||||
|
* generated data matches the driver definitions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
38
dts/arm/atmel/sam3x.dtsi
Normal file
38
dts/arm/atmel/sam3x.dtsi
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2017 Justin Watson
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <arm/armv7-m.dtsi>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
cpus {
|
||||||
|
cpu@0 {
|
||||||
|
compatible = "arm,cortex-m4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sram0: memory {
|
||||||
|
compatible = "sram";
|
||||||
|
reg = <0x20070000 0x18000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
flash0: flash {
|
||||||
|
compatible = "flash";
|
||||||
|
reg = <0x00080000 0x80000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
soc {
|
||||||
|
uart0: uart@400E0800 {
|
||||||
|
compatible = "atmel,sam3x-uart";
|
||||||
|
reg = <0x400E0800 0x124>;
|
||||||
|
interrupts = <8 0>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&nvic {
|
||||||
|
arm,num-irq-priority-bits = <3>;
|
||||||
|
};
|
30
dts/arm/yaml/atmel,sam3x-uart.yaml
Normal file
30
dts/arm/yaml/atmel,sam3x-uart.yaml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
---
|
||||||
|
title: SAM3X UART
|
||||||
|
id: atmel,sam3x-uart
|
||||||
|
version: 0.1
|
||||||
|
|
||||||
|
description: >
|
||||||
|
This binding gives a base representation of the SAM3X UART
|
||||||
|
|
||||||
|
inherits:
|
||||||
|
- !include uart.yaml
|
||||||
|
|
||||||
|
properties:
|
||||||
|
- compatible:
|
||||||
|
type: string
|
||||||
|
category: required
|
||||||
|
description: compatible strings
|
||||||
|
constraint: "atmel,sam3x-uart"
|
||||||
|
|
||||||
|
- reg:
|
||||||
|
type: array
|
||||||
|
description: mmio register space
|
||||||
|
generation: define
|
||||||
|
category: required
|
||||||
|
|
||||||
|
- interrupts:
|
||||||
|
type: array
|
||||||
|
category: required
|
||||||
|
description: required interrupts
|
||||||
|
generation: define
|
||||||
|
...
|
Loading…
Add table
Add a link
Reference in a new issue