dts: v2m_beetle: Add Timer support

This patch adds the ARM CMSDK Timer support to the V2M Beetle device
tree.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
This commit is contained in:
Vincenzo Frascino 2017-05-11 11:42:55 +01:00 committed by Kumar Gala
commit 2fe95044c2
5 changed files with 46 additions and 8 deletions

View file

@ -106,10 +106,6 @@
#define CMSDK_AHB_GPIO2 _BEETLE_GPIO2_BASE #define CMSDK_AHB_GPIO2 _BEETLE_GPIO2_BASE
#define CMSDK_AHB_GPIO3 _BEETLE_GPIO3_BASE #define CMSDK_AHB_GPIO3 _BEETLE_GPIO3_BASE
/* CMSDK APB Timers */
#define CMSDK_APB_TIMER0 _BEETLE_TIMER0_BASE
#define CMSDK_APB_TIMER1 _BEETLE_TIMER1_BASE
/* CMSDK APB Dual Timer */ /* CMSDK APB Dual Timer */
#define CMSDK_APB_DTIMER _BEETLE_DTIMER_BASE #define CMSDK_APB_DTIMER _BEETLE_DTIMER_BASE

View file

@ -57,10 +57,6 @@
#define IRQ_PORT3_ALL 43 /* GPIO Port 3 combined Interrupt */ #define IRQ_PORT3_ALL 43 /* GPIO Port 3 combined Interrupt */
#define IRQ_TRNG 44 /* Random number generator Interrupt */ #define IRQ_TRNG 44 /* Random number generator Interrupt */
/* CMSDK APB Timers */
#define CMSDK_APB_TIMER_0_IRQ IRQ_TIMER0
#define CMSDK_APB_TIMER_1_IRQ IRQ_TIMER1
/* CMSDK APB Dualtimer */ /* CMSDK APB Dualtimer */
#define CMSDK_APB_DUALTIMER_IRQ IRQ_DUALTIMER #define CMSDK_APB_DUALTIMER_IRQ IRQ_DUALTIMER

View file

@ -30,6 +30,18 @@
}; };
soc { soc {
timer0: timer@40000000 {
compatible = "arm,cmsdk-timer";
reg = <0x40000000 0x1000>;
interrupts = <IRQ_TIMER0 3>;
};
timer1: timer@40001000 {
compatible = "arm,cmsdk-timer";
reg = <0x40001000 0x1000>;
interrupts = <IRQ_TIMER1 3>;
};
uart0: uart@40004000 { uart0: uart@40004000 {
compatible = "arm,cmsdk-uart"; compatible = "arm,cmsdk-uart";
reg = <0x40004000 0x1000>; reg = <0x40004000 0x1000>;

View file

@ -1,5 +1,12 @@
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS #define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
/* CMSDK APB Timers */
#define CMSDK_APB_TIMER0 ARM_CMSDK_TIMER_40000000_BASE_ADDRESS_0
#define CMSDK_APB_TIMER_0_IRQ ARM_CMSDK_TIMER_40000000_IRQ_0
#define CMSDK_APB_TIMER1 ARM_CMSDK_TIMER_40001000_BASE_ADDRESS_0
#define CMSDK_APB_TIMER_1_IRQ IRQ_TIMER1 ARM_CMSDK_TIMER_40001000_IRQ_0
/* CMSDK APB Universal Asynchronous Receiver-Transmitter (UART) */ /* CMSDK APB Universal Asynchronous Receiver-Transmitter (UART) */
#define CMSDK_APB_UART0 ARM_CMSDK_UART_40004000_BASE_ADDRESS_0 #define CMSDK_APB_UART0 ARM_CMSDK_UART_40004000_BASE_ADDRESS_0
#define CMSDK_APB_UART_0_IRQ ARM_CMSDK_UART_40004000_IRQ_0 #define CMSDK_APB_UART_0_IRQ ARM_CMSDK_UART_40004000_IRQ_0

View file

@ -0,0 +1,27 @@
---
title: ARM CMSDK TIMER
id: arm,cmsdk-timer
version: 0.1
description: >
This binding gives a base representation of the ARM CMSDK TIMER
properties:
- compatible:
type: string
category: required
description: compatible strings
constraint: "arm,cmsdk-timer"
- reg:
type: array
description: mmio register space
generation: define
category: required
- interrupts:
type: array
category: required
description: required interrupts
generation: define
...