arm: dts: Add base DTS support for v2m_beetle
This patch adds the base DTS support for the V2M Beetle board. The initial set of changes include SRAM, FLASH, and IRQ controller support. Change-Id: I06685622b9c57ac358544c71350074ce06e3371e Signed-off-by: Andy Gross <andy.gross@linaro.org>
This commit is contained in:
parent
670aa0cc99
commit
ae5dbe47f6
8 changed files with 102 additions and 4 deletions
|
@ -11,6 +11,7 @@ if SOC_BEETLE_R0
|
|||
config SOC
|
||||
default beetle_r0
|
||||
|
||||
if !HAS_DTS
|
||||
#
|
||||
# Beetle R0 has one SRAM bank:
|
||||
# 128K @ 0x20000000
|
||||
|
@ -24,4 +25,6 @@ config SRAM_SIZE
|
|||
config FLASH_SIZE
|
||||
default 256
|
||||
|
||||
endif # !HAS_DTS
|
||||
|
||||
endif # SOC_BEETLE_R0
|
||||
|
|
|
@ -13,6 +13,8 @@ source "arch/arm/soc/arm/beetle/Kconfig.defconfig.beetle*"
|
|||
config SOC_SERIES
|
||||
default beetle
|
||||
|
||||
if !HAS_DTS
|
||||
|
||||
config NUM_IRQ_PRIO_BITS
|
||||
int
|
||||
default 3
|
||||
|
@ -21,14 +23,16 @@ config NUM_IRQS
|
|||
int
|
||||
default 45
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
int
|
||||
default 24000000
|
||||
|
||||
config SRAM_BASE_ADDRESS
|
||||
default 0x20000000
|
||||
|
||||
config FLASH_BASE_ADDRESS
|
||||
default 0x00000000
|
||||
|
||||
endif # !HAS_DTS
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
int
|
||||
default 24000000
|
||||
|
||||
endif # SOC_SERIES_BEETLE
|
||||
|
|
|
@ -31,3 +31,5 @@ CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_1"
|
|||
|
||||
# Watchdog
|
||||
CONFIG_WATCHDOG=y
|
||||
|
||||
CONFIG_HAS_DTS=y
|
||||
|
|
|
@ -3,5 +3,6 @@ dtb-$(CONFIG_BOARD_FRDM_K64F) = frdm_k64f.dts_compiled
|
|||
dtb-$(CONFIG_BOARD_HEXIWEAR_K64) = hexiwear_k64.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_CC3200_LAUNCHXL) = cc3200_launchxl.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_NUCLEO_L476RG) = nucleo_l476rg.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_V2M_BEETLE) = v2m_beetle.dts_compiled
|
||||
always := $(dtb-y)
|
||||
endif
|
||||
|
|
54
dts/arm/v2m_beetle.dts
Normal file
54
dts/arm/v2m_beetle.dts
Normal file
|
@ -0,0 +1,54 @@
|
|||
/dts-v1/;
|
||||
|
||||
#include "armv7-m.dtsi"
|
||||
#include "arm/beetle/soc_irq.h"
|
||||
|
||||
/ {
|
||||
compatible = "arm,beetle";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart1;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
|
||||
cpus {
|
||||
cpu@0 {
|
||||
compatible = "arm,cortex-m3";
|
||||
};
|
||||
};
|
||||
|
||||
sram0: memory {
|
||||
compatible = "sram";
|
||||
reg = <0x20000000 0x20000>;
|
||||
};
|
||||
|
||||
flash0: flash {
|
||||
reg = <0 0x40000>;
|
||||
};
|
||||
|
||||
soc {
|
||||
uart0: uart@40004000 {
|
||||
compatible = "arm,cmsdk-uart";
|
||||
reg = <0x40004000 0x14>;
|
||||
interrupts = <IRQ_UART0>;
|
||||
zephyr,irq-prio = <3>;
|
||||
baud-rate = <115200>;
|
||||
};
|
||||
|
||||
uart1: uart@40005000 {
|
||||
compatible = "arm,cmsdk-uart";
|
||||
reg = <0x40005000 0x14>;
|
||||
interrupts = <IRQ_UART1>;
|
||||
zephyr,irq-prio = <3>;
|
||||
baud-rate = <115200>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nvic {
|
||||
num-irq-prio-bits = <3>;
|
||||
num-irqs = <45>;
|
||||
};
|
2
dts/arm/v2m_beetle.fixup
Normal file
2
dts/arm/v2m_beetle.fixup
Normal file
|
@ -0,0 +1,2 @@
|
|||
#define CONFIG_NUM_IRQS ARM_ARMV7M_NVIC_E000E100_NUM_IRQS
|
||||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_ARMV7M_NVIC_E000E100_NUM_IRQ_PRIO_BITS
|
31
dts/arm/yaml/arm,cmsdk-uart.yaml
Normal file
31
dts/arm/yaml/arm,cmsdk-uart.yaml
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: ARM CMSDK UART
|
||||
id: arm,cmsdk-uart
|
||||
version: 0.1
|
||||
|
||||
description: >
|
||||
This binding gives a base representation of the ARM CMSDK UART
|
||||
|
||||
inherits:
|
||||
- !include uart.yaml
|
||||
- !include zephyr_devices.yaml
|
||||
|
||||
properties:
|
||||
- compatible:
|
||||
type: string
|
||||
category: required
|
||||
description: compatible strings
|
||||
constraint: "arm,cmsdk-uart"
|
||||
|
||||
- reg:
|
||||
type: array
|
||||
description: mmio register space
|
||||
generation: define
|
||||
category: required
|
||||
|
||||
- interrupts:
|
||||
type: array
|
||||
category: required
|
||||
description: required interrupts
|
||||
generation: define
|
||||
...
|
|
@ -154,6 +154,7 @@ ld_flags = $(LDFLAGS) $(ldflags-y)
|
|||
|
||||
dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
|
||||
$(ZEPHYRINCLUDE) \
|
||||
-I$(srctree)/arch/$(ARCH)/soc \
|
||||
-I$(srctree)/dts/common \
|
||||
-I$(srctree)/drivers/of/testcase-data \
|
||||
-undef -D__DTS__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue