From 3979eb44adb965f77e55b295a37befb2b14e9f83 Mon Sep 17 00:00:00 2001 From: Andy Gross Date: Sun, 29 Jan 2017 23:59:48 -0600 Subject: [PATCH] dts: arm: Add base DTS and YAML definitions This patch adds the base DTS and YAML files that may be referenced by SoCs. The device tree files provide base definitions for the more well known ARMV7M device nodes. These files are meant to be included in SoC vendor specific device tree files. The YAML files provide definitions for the contents of device tree node that contain information that will be parsed and used for configuration in the system. DTS files define hardware and software configuration and YAML files provide the markers for knowing which pieces need to be extracted. Change-Id: I7e90fe19f09afb269b7b2988c2c19c0f26d7ee7c Signed-off-by: Andy Gross --- dts/arm/armv7-m.dtsi | 25 +++++++++++++++++++ dts/arm/yaml/arm_cortex_m4_nvic.yaml | 37 ++++++++++++++++++++++++++++ dts/common/skeleton.dtsi | 13 ++++++++++ dts/common/yaml/uart.yaml | 25 +++++++++++++++++++ dts/common/yaml/zephyr_devices.yaml | 14 +++++++++++ 5 files changed, 114 insertions(+) create mode 100644 dts/arm/armv7-m.dtsi create mode 100644 dts/arm/yaml/arm_cortex_m4_nvic.yaml create mode 100644 dts/common/skeleton.dtsi create mode 100644 dts/common/yaml/uart.yaml create mode 100644 dts/common/yaml/zephyr_devices.yaml diff --git a/dts/arm/armv7-m.dtsi b/dts/arm/armv7-m.dtsi new file mode 100644 index 00000000000..e73a05a2b36 --- /dev/null +++ b/dts/arm/armv7-m.dtsi @@ -0,0 +1,25 @@ +#include "skeleton.dtsi" + +/ { + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + interrupt-parent = <&nvic>; + ranges; + + nvic: interrupt-controller@e000e100 { + compatible = "arm,armv7m-nvic"; + reg = <0xe000e100 0xc00>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + systick: timer@e000e010 { + compatible = "arm,armv7m-systick"; + reg = <0xe000e010 0x10>; + status = "disabled"; + }; + }; +}; + diff --git a/dts/arm/yaml/arm_cortex_m4_nvic.yaml b/dts/arm/yaml/arm_cortex_m4_nvic.yaml new file mode 100644 index 00000000000..dfad8d9e1dc --- /dev/null +++ b/dts/arm/yaml/arm_cortex_m4_nvic.yaml @@ -0,0 +1,37 @@ +--- +title: ARM Cortex M4 NVIC Interrupt Controller +version: 0.1 + +description: > + This binding describes the ARM Cortex M4 NVIC IRQ controller + +properties: + - compatible: + category: required + type: string + description: compatible strings + constraint: "arm,armv7m-nvic" + + - reg: + category: required + type: int + description: mmio register space + generation: define + + - num-irq-prio-bits: + category: required + type: int + description: number of bits of IRQ priorities + generation: define + + - num-irqs: + category: required + type: int + description: number of interrupts controlled by controller + generation: define + +cell_prefix: IRQ + +"#cells": + - irq +... diff --git a/dts/common/skeleton.dtsi b/dts/common/skeleton.dtsi new file mode 100644 index 00000000000..b41d241de2c --- /dev/null +++ b/dts/common/skeleton.dtsi @@ -0,0 +1,13 @@ +/* + * Skeleton device tree; the bare minimum needed to boot; just include and + * add a compatible value. The bootloader will typically populate the memory + * node. + */ + +/ { + #address-cells = <1>; + #size-cells = <1>; + chosen { }; + aliases { }; + memory { device_type = "memory"; reg = <0 0>; }; +}; diff --git a/dts/common/yaml/uart.yaml b/dts/common/yaml/uart.yaml new file mode 100644 index 00000000000..6622395c577 --- /dev/null +++ b/dts/common/yaml/uart.yaml @@ -0,0 +1,25 @@ +--- +title: Uart Base Structure +id: uart +version: 0.1 + +description: > + This binding gives the base structures for all UART devices + +properties: + - clock-frequency: + type: int + category: optional + description: Clock frequency information for UART operation + generation: define + - baud-rate: + type: int + category: required + description: Initial baud rate setting for UART + generation: define + - clocks: + type: array + category: required + description: Clock gate information + generation: define +... diff --git a/dts/common/yaml/zephyr_devices.yaml b/dts/common/yaml/zephyr_devices.yaml new file mode 100644 index 00000000000..830f273ed16 --- /dev/null +++ b/dts/common/yaml/zephyr_devices.yaml @@ -0,0 +1,14 @@ +--- +title: Zephyr Device Specific Properties +version: 0.1 + +description: > + This binding describes Zephyr device specific properties + +properties: + - zephyr,irq-prio: + category: optional + type: int + description: priority setting + generation: define +...