dts: mps2_an385: Add ARM CMSDK support
This patch adds device tree support for ARM CMSDK IPs on MPS2 AN385. Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
This commit is contained in:
parent
df3cec7641
commit
051da9fd4a
3 changed files with 85 additions and 55 deletions
|
@ -10,56 +10,6 @@
|
|||
#include <soc_memory_map.h>
|
||||
#include <soc_irq.h>
|
||||
|
||||
#if defined(CONFIG_GPIO)
|
||||
/* CMSDK AHB General Purpose Input/Output (GPIO) */
|
||||
#define CMSDK_AHB_GPIO0 GPIO_0_BASE_ADDR
|
||||
#define IRQ_PORT0_ALL IRQ_GPIO_0_COMBINED
|
||||
#define CMSDK_AHB_GPIO1 GPIO_1_BASE_ADDR
|
||||
#define IRQ_PORT1_ALL IRQ_GPIO_1_COMBINED
|
||||
#define CMSDK_AHB_GPIO2 GPIO_2_BASE_ADDR
|
||||
#define IRQ_PORT2_ALL IRQ_GPIO_2_COMBINED
|
||||
#define CMSDK_AHB_GPIO3 GPIO_3_BASE_ADDR
|
||||
#define IRQ_PORT3_ALL IRQ_GPIO_3_COMBINED
|
||||
#endif /* CONFIG_GPIO */
|
||||
|
||||
#if defined(CONFIG_UART_CMSDK_APB)
|
||||
/* CMSDK APB Universal Asynchronous Receiver-Transmitter (UART) */
|
||||
#define CMSDK_APB_UART0 UART_0_BASE_ADDR
|
||||
#define CMSDK_APB_UART1 UART_1_BASE_ADDR
|
||||
#define CMSDK_APB_UART2 UART_2_BASE_ADDR
|
||||
#define CMSDK_APB_UART3 UART_3_BASE_ADDR
|
||||
#define CMSDK_APB_UART4 UART_4_BASE_ADDR
|
||||
#ifndef CONFIG_HAS_DTS
|
||||
#define CMSDK_APB_UART_0_IRQ_TX IRQ_UART_0_TX
|
||||
#define CMSDK_APB_UART_0_IRQ_RX IRQ_UART_0_RX
|
||||
#define CMSDK_APB_UART_1_IRQ_TX IRQ_UART_1_TX
|
||||
#define CMSDK_APB_UART_1_IRQ_RX IRQ_UART_1_RX
|
||||
#define CMSDK_APB_UART_2_IRQ_TX IRQ_UART_2_TX
|
||||
#define CMSDK_APB_UART_2_IRQ_RX IRQ_UART_2_RX
|
||||
#define CMSDK_APB_UART_3_IRQ_TX IRQ_UART_3_TX
|
||||
#define CMSDK_APB_UART_3_IRQ_RX IRQ_UART_3_RX
|
||||
#define CMSDK_APB_UART_4_IRQ_TX IRQ_UART_4_TX
|
||||
#define CMSDK_APB_UART_4_IRQ_RX IRQ_UART_4_RX
|
||||
#endif
|
||||
#endif /* CONFIG_UART_CMSDK_APB */
|
||||
|
||||
#if defined(CONFIG_WATCHDOG)
|
||||
/* CMSDK APB Watchdog */
|
||||
#define CMSDK_APB_WDOG WDOG_BASE_ADDR
|
||||
#endif /* CONFIG_WATCHDOG */
|
||||
|
||||
#if defined(CONFIG_COUNTER)
|
||||
/* CMSDK APB Timers */
|
||||
#define CMSDK_APB_TIMER0 TIMER_0_BASE_ADDR
|
||||
#define CMSDK_APB_TIMER_0_IRQ IRQ_TIMER_0
|
||||
#define CMSDK_APB_TIMER1 TIMER_1_BASE_ADDR
|
||||
#define CMSDK_APB_TIMER_1_IRQ IRQ_TIMER_1
|
||||
|
||||
/* CMSDK APB Dual Timer */
|
||||
#define CMSDK_APB_DTIMER DTIMER_BASE_ADDR
|
||||
#define CMSDK_APB_DUALTIMER_IRQ IRQ_DUAL_TIMER
|
||||
#endif /* CONFIG_COUNTER */
|
||||
|
||||
#if defined(CONFIG_I2C_SBCON)
|
||||
#define I2C_SBCON_0_BASE_ADDR I2C_TOUCH_BASE_ADDR
|
||||
#define I2C_SBCON_1_BASE_ADDR I2C_AUDIO_CONF_BASE_ADDR
|
||||
|
|
|
@ -30,40 +30,87 @@
|
|||
};
|
||||
|
||||
soc {
|
||||
timer0: timer@40000000 {
|
||||
compatible = "arm,cmsdk-timer";
|
||||
reg = <0x40000000 0x1000>;
|
||||
interrupts = <IRQ_TIMER_0 3>;
|
||||
};
|
||||
|
||||
timer1: timer@40001000 {
|
||||
compatible = "arm,cmsdk-timer";
|
||||
reg = <0x40001000 0x1000>;
|
||||
interrupts = <IRQ_TIMER_1 3>;
|
||||
};
|
||||
|
||||
dtimer0: dtimer@40002000 {
|
||||
compatible = "arm,cmsdk-dtimer";
|
||||
reg = <0x40000000 0x1000>;
|
||||
interrupts = <IRQ_DUAL_TIMER 3>;
|
||||
};
|
||||
|
||||
uart0: uart@40004000 {
|
||||
compatible = "arm,cmsdk-uart";
|
||||
reg = <0x40004000 0x14>;
|
||||
reg = <0x40004000 0x1000>;
|
||||
interrupts = <IRQ_UART_0_TX 3 IRQ_UART_0_RX 3>;
|
||||
current-speed = <115200>;
|
||||
};
|
||||
|
||||
uart1: uart@40005000 {
|
||||
compatible = "arm,cmsdk-uart";
|
||||
reg = <0x40005000 0x14>;
|
||||
reg = <0x40005000 0x1000>;
|
||||
interrupts = <IRQ_UART_1_TX 3 IRQ_UART_1_RX 3>;
|
||||
current-speed = <115200>;
|
||||
};
|
||||
|
||||
uart2: uart@40006000 {
|
||||
compatible = "arm,cmsdk-uart";
|
||||
reg = <0x40006000 0x14>;
|
||||
reg = <0x40006000 0x1000>;
|
||||
interrupts = <IRQ_UART_2_TX 3 IRQ_UART_2_RX 3>;
|
||||
current-speed = <115200>;
|
||||
};
|
||||
|
||||
uart3: uart@40007000 {
|
||||
compatible = "arm,cmsdk-uart";
|
||||
reg = <0x40007000 0x14>;
|
||||
reg = <0x40007000 0x1000>;
|
||||
interrupts = <IRQ_UART_3_TX 3 IRQ_UART_3_RX 3>;
|
||||
current-speed = <115200>;
|
||||
};
|
||||
|
||||
wdog0: wdog@40008000 {
|
||||
compatible = "arm,cmsdk-watchdog";
|
||||
reg = <0x40008000 0x1000>;
|
||||
};
|
||||
|
||||
uart4: uart@40009000 {
|
||||
compatible = "arm,cmsdk-uart";
|
||||
reg = <0x40009000 0x14>;
|
||||
reg = <0x40009000 0x1000>;
|
||||
interrupts = <IRQ_UART_4_TX 3 IRQ_UART_4_RX 3>;
|
||||
current-speed = <115200>;
|
||||
};
|
||||
|
||||
gpio0: gpio@40010000 {
|
||||
compatible = "arm,cmsdk-gpio";
|
||||
reg = <0x40010000 0x1000>;
|
||||
interrupts = <IRQ_GPIO_0_COMBINED 3>;
|
||||
};
|
||||
|
||||
gpio1: gpio@40011000 {
|
||||
compatible = "arm,cmsdk-gpio";
|
||||
reg = <0x40011000 0x1000>;
|
||||
interrupts = <IRQ_GPIO_1_COMBINED 3>;
|
||||
};
|
||||
|
||||
gpio2: gpio@40012000 {
|
||||
compatible = "arm,cmsdk-gpio";
|
||||
reg = <0x40012000 0x1000>;
|
||||
interrupts = <IRQ_GPIO_2_COMBINED 3>;
|
||||
};
|
||||
|
||||
gpio3: gpio@40013000 {
|
||||
compatible = "arm,cmsdk-gpio";
|
||||
reg = <0x40013000 0x1000>;
|
||||
interrupts = <IRQ_GPIO_3_COMBINED 3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,26 +1,59 @@
|
|||
#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 Dual Timer */
|
||||
#define CMSDK_APB_DTIMER ARM_CMSDK_DTIMER_40002000_BASE_ADDRESS_0
|
||||
#define CMSDK_APB_DUALTIMER_IRQ ARM_CMSDK_DTIMER_40002000_IRQ_0
|
||||
|
||||
/* CMSDK APB Universal Asynchronous Receiver-Transmitter (UART) */
|
||||
#define CMSDK_APB_UART0 ARM_CMSDK_UART_40004000_BASE_ADDRESS_0
|
||||
#define CMSDK_APB_UART_0_IRQ_TX ARM_CMSDK_UART_40004000_IRQ_0
|
||||
#define CMSDK_APB_UART_0_IRQ_RX ARM_CMSDK_UART_40004000_IRQ_1
|
||||
#define CONFIG_UART_CMSDK_APB_PORT0_IRQ_PRI ARM_CMSDK_UART_40004000_IRQ_0_PRIORITY
|
||||
#define CONFIG_UART_CMSDK_APB_PORT0_BAUD_RATE ARM_CMSDK_UART_40004000_CURRENT_SPEED
|
||||
|
||||
#define CMSDK_APB_UART1 ARM_CMSDK_UART_40005000_BASE_ADDRESS_0
|
||||
#define CMSDK_APB_UART_1_IRQ_TX ARM_CMSDK_UART_40005000_IRQ_0
|
||||
#define CMSDK_APB_UART_1_IRQ_RX ARM_CMSDK_UART_40005000_IRQ_1
|
||||
#define CONFIG_UART_CMSDK_APB_PORT1_IRQ_PRI ARM_CMSDK_UART_40005000_IRQ_0_PRIORITY
|
||||
#define CONFIG_UART_CMSDK_APB_PORT1_BAUD_RATE ARM_CMSDK_UART_40005000_CURRENT_SPEED
|
||||
|
||||
#define CMSDK_APB_UART2 ARM_CMSDK_UART_40006000_BASE_ADDRESS_0
|
||||
#define CMSDK_APB_UART_2_IRQ_TX ARM_CMSDK_UART_40006000_IRQ_0
|
||||
#define CMSDK_APB_UART_2_IRQ_RX ARM_CMSDK_UART_40006000_IRQ_1
|
||||
#define CONFIG_UART_CMSDK_APB_PORT2_IRQ_PRI ARM_CMSDK_UART_40006000_IRQ_0_PRIORITY
|
||||
#define CONFIG_UART_CMSDK_APB_PORT2_BAUD_RATE ARM_CMSDK_UART_40006000_CURRENT_SPEED
|
||||
|
||||
#define CMSDK_APB_UART3 ARM_CMSDK_UART_40007000_BASE_ADDRESS_0
|
||||
#define CMSDK_APB_UART_3_IRQ_TX ARM_CMSDK_UART_40007000_IRQ_0
|
||||
#define CMSDK_APB_UART_3_IRQ_RX ARM_CMSDK_UART_40007000_IRQ_1
|
||||
#define CONFIG_UART_CMSDK_APB_PORT3_IRQ_PRI ARM_CMSDK_UART_40007000_IRQ_0_PRIORITY
|
||||
#define CONFIG_UART_CMSDK_APB_PORT3_BAUD_RATE ARM_CMSDK_UART_40007000_CURRENT_SPEED
|
||||
|
||||
#define CMSDK_APB_UART4 ARM_CMSDK_UART_40009000_BASE_ADDRESS_0
|
||||
#define CMSDK_APB_UART_4_IRQ_TX ARM_CMSDK_UART_40009000_IRQ_0
|
||||
#define CMSDK_APB_UART_4_IRQ_RX ARM_CMSDK_UART_40009000_IRQ_1
|
||||
#define CONFIG_UART_CMSDK_APB_PORT4_IRQ_PRI ARM_CMSDK_UART_40009000_IRQ_0_PRIORITY
|
||||
#define CONFIG_UART_CMSDK_APB_PORT4_BAUD_RATE ARM_CMSDK_UART_40009000_CURRENT_SPEED
|
||||
|
||||
/* CMSDK APB Watchdog */
|
||||
#define CMSDK_APB_WDOG ARM_CMSDK_WATCHDOG_40008000_BASE_ADDRESS_0
|
||||
|
||||
/* CMSDK AHB General Purpose Input/Output (GPIO) */
|
||||
#define CMSDK_AHB_GPIO0 ARM_CMSDK_GPIO_40010000_BASE_ADDRESS_0
|
||||
#define IRQ_PORT0_ALL ARM_CMSDK_GPIO_40010000_IRQ_0
|
||||
|
||||
#define CMSDK_AHB_GPIO1 ARM_CMSDK_GPIO_40011000_BASE_ADDRESS_0
|
||||
#define IRQ_PORT1_ALL ARM_CMSDK_GPIO_40011000_IRQ_0
|
||||
|
||||
#define CMSDK_AHB_GPIO2 ARM_CMSDK_GPIO_40012000_BASE_ADDRESS_0
|
||||
#define IRQ_PORT2_ALL ARM_CMSDK_GPIO_40012000_IRQ_0
|
||||
|
||||
#define CMSDK_AHB_GPIO3 ARM_CMSDK_GPIO_40013000_BASE_ADDRESS_0
|
||||
#define IRQ_PORT3_ALL ARM_CMSDK_GPIO_40013000_IRQ_0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue