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 <andy.gross@linaro.org>
This commit is contained in:
Andy Gross 2017-01-29 23:59:48 -06:00 committed by Anas Nashif
commit 3979eb44ad
5 changed files with 114 additions and 0 deletions

25
dts/arm/armv7-m.dtsi Normal file
View file

@ -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";
};
};
};

View file

@ -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
...

13
dts/common/skeleton.dtsi Normal file
View file

@ -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>; };
};

25
dts/common/yaml/uart.yaml Normal file
View file

@ -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
...

View file

@ -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
...