From 5df8b5d63e647306976f6c295e7ec2ae793d2df8 Mon Sep 17 00:00:00 2001 From: Maureen Helm Date: Fri, 3 Jan 2020 15:36:35 -0600 Subject: [PATCH] drivers: serial: Refactor mcux uart driver to use generated dts macros Refactors the mcux uart driver to use generated device tree macros directly. Removes now unused dts fixup macros from kinetis socs. Signed-off-by: Maureen Helm --- drivers/serial/uart_mcux.c | 132 +++++++++++++-------------- soc/arm/nxp_kinetis/k2x/dts_fixup.h | 29 ------ soc/arm/nxp_kinetis/k6x/dts_fixup.h | 60 ------------ soc/arm/nxp_kinetis/kv5x/dts_fixup.h | 60 ------------ soc/arm/nxp_kinetis/kwx/dts_fixup.h | 40 -------- 5 files changed, 66 insertions(+), 255 deletions(-) diff --git a/drivers/serial/uart_mcux.c b/drivers/serial/uart_mcux.c index 4be055b73e..7c04f85dd8 100644 --- a/drivers/serial/uart_mcux.c +++ b/drivers/serial/uart_mcux.c @@ -291,10 +291,10 @@ static void uart_mcux_config_func_0(struct device *dev); static const struct uart_mcux_config uart_mcux_0_config = { .base = UART0, - .clock_name = DT_UART_MCUX_0_CLOCK_NAME, - .clock_subsys = (clock_control_subsys_t)DT_UART_MCUX_0_CLOCK_SUBSYS, - .baud_rate = DT_UART_MCUX_0_BAUD_RATE, - .hw_flow_control = DT_UART_MCUX_0_HW_FLOW_CONTROL, + .clock_name = DT_NXP_KINETIS_UART_UART_0_CLOCK_CONTROLLER, + .clock_subsys = (clock_control_subsys_t)DT_NXP_KINETIS_UART_UART_0_CLOCK_NAME, + .baud_rate = DT_NXP_KINETIS_UART_UART_0_CURRENT_SPEED, + .hw_flow_control = DT_NXP_KINETIS_UART_UART_0_HW_FLOW_CONTROL, #ifdef CONFIG_UART_INTERRUPT_DRIVEN .irq_config_func = uart_mcux_config_func_0, #endif @@ -302,7 +302,7 @@ static const struct uart_mcux_config uart_mcux_0_config = { static struct uart_mcux_data uart_mcux_0_data; -DEVICE_AND_API_INIT(uart_0, DT_UART_MCUX_0_NAME, +DEVICE_AND_API_INIT(uart_0, DT_NXP_KINETIS_UART_UART_0_LABEL, &uart_mcux_init, &uart_mcux_0_data, &uart_mcux_0_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, @@ -311,17 +311,17 @@ DEVICE_AND_API_INIT(uart_0, DT_UART_MCUX_0_NAME, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_mcux_config_func_0(struct device *dev) { - IRQ_CONNECT(DT_UART_MCUX_0_IRQ_STATUS, - DT_UART_MCUX_0_IRQ_STATUS_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_0_IRQ_STATUS, + DT_NXP_KINETIS_UART_UART_0_IRQ_STATUS_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_0), 0); - irq_enable(DT_UART_MCUX_0_IRQ_STATUS); + irq_enable(DT_NXP_KINETIS_UART_UART_0_IRQ_STATUS); - IRQ_CONNECT(DT_UART_MCUX_0_IRQ_ERROR, - DT_UART_MCUX_0_IRQ_ERROR_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_0_IRQ_ERROR, + DT_NXP_KINETIS_UART_UART_0_IRQ_ERROR_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_0), 0); - irq_enable(DT_UART_MCUX_0_IRQ_ERROR); + irq_enable(DT_NXP_KINETIS_UART_UART_0_IRQ_ERROR); } #endif @@ -335,10 +335,10 @@ static void uart_mcux_config_func_1(struct device *dev); static const struct uart_mcux_config uart_mcux_1_config = { .base = UART1, - .clock_name = DT_UART_MCUX_1_CLOCK_NAME, - .clock_subsys = (clock_control_subsys_t)DT_UART_MCUX_1_CLOCK_SUBSYS, - .baud_rate = DT_UART_MCUX_1_BAUD_RATE, - .hw_flow_control = DT_UART_MCUX_1_HW_FLOW_CONTROL, + .clock_name = DT_NXP_KINETIS_UART_UART_1_CLOCK_CONTROLLER, + .clock_subsys = (clock_control_subsys_t)DT_NXP_KINETIS_UART_UART_1_CLOCK_NAME, + .baud_rate = DT_NXP_KINETIS_UART_UART_1_CURRENT_SPEED, + .hw_flow_control = DT_NXP_KINETIS_UART_UART_1_HW_FLOW_CONTROL, #ifdef CONFIG_UART_INTERRUPT_DRIVEN .irq_config_func = uart_mcux_config_func_1, #endif @@ -346,7 +346,7 @@ static const struct uart_mcux_config uart_mcux_1_config = { static struct uart_mcux_data uart_mcux_1_data; -DEVICE_AND_API_INIT(uart_1, DT_UART_MCUX_1_NAME, +DEVICE_AND_API_INIT(uart_1, DT_NXP_KINETIS_UART_UART_1_LABEL, &uart_mcux_init, &uart_mcux_1_data, &uart_mcux_1_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, @@ -355,17 +355,17 @@ DEVICE_AND_API_INIT(uart_1, DT_UART_MCUX_1_NAME, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_mcux_config_func_1(struct device *dev) { - IRQ_CONNECT(DT_UART_MCUX_1_IRQ_STATUS, - DT_UART_MCUX_1_IRQ_STATUS_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_1_IRQ_STATUS, + DT_NXP_KINETIS_UART_UART_1_IRQ_STATUS_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_1), 0); - irq_enable(DT_UART_MCUX_1_IRQ_STATUS); + irq_enable(DT_NXP_KINETIS_UART_UART_1_IRQ_STATUS); - IRQ_CONNECT(DT_UART_MCUX_1_IRQ_ERROR, - DT_UART_MCUX_1_IRQ_ERROR_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_1_IRQ_ERROR, + DT_NXP_KINETIS_UART_UART_1_IRQ_ERROR_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_1), 0); - irq_enable(DT_UART_MCUX_1_IRQ_ERROR); + irq_enable(DT_NXP_KINETIS_UART_UART_1_IRQ_ERROR); } #endif @@ -379,10 +379,10 @@ static void uart_mcux_config_func_2(struct device *dev); static const struct uart_mcux_config uart_mcux_2_config = { .base = UART2, - .clock_name = DT_UART_MCUX_2_CLOCK_NAME, - .clock_subsys = (clock_control_subsys_t)DT_UART_MCUX_2_CLOCK_SUBSYS, - .baud_rate = DT_UART_MCUX_2_BAUD_RATE, - .hw_flow_control = DT_UART_MCUX_2_HW_FLOW_CONTROL, + .clock_name = DT_NXP_KINETIS_UART_UART_2_CLOCK_CONTROLLER, + .clock_subsys = (clock_control_subsys_t)DT_NXP_KINETIS_UART_UART_2_CLOCK_NAME, + .baud_rate = DT_NXP_KINETIS_UART_UART_2_CURRENT_SPEED, + .hw_flow_control = DT_NXP_KINETIS_UART_UART_2_HW_FLOW_CONTROL, #ifdef CONFIG_UART_INTERRUPT_DRIVEN .irq_config_func = uart_mcux_config_func_2, #endif @@ -390,7 +390,7 @@ static const struct uart_mcux_config uart_mcux_2_config = { static struct uart_mcux_data uart_mcux_2_data; -DEVICE_AND_API_INIT(uart_2, DT_UART_MCUX_2_NAME, +DEVICE_AND_API_INIT(uart_2, DT_NXP_KINETIS_UART_UART_2_LABEL, &uart_mcux_init, &uart_mcux_2_data, &uart_mcux_2_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, @@ -399,17 +399,17 @@ DEVICE_AND_API_INIT(uart_2, DT_UART_MCUX_2_NAME, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_mcux_config_func_2(struct device *dev) { - IRQ_CONNECT(DT_UART_MCUX_2_IRQ_STATUS, - DT_UART_MCUX_2_IRQ_STATUS_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_2_IRQ_STATUS, + DT_NXP_KINETIS_UART_UART_2_IRQ_STATUS_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_2), 0); - irq_enable(DT_UART_MCUX_2_IRQ_STATUS); + irq_enable(DT_NXP_KINETIS_UART_UART_2_IRQ_STATUS); - IRQ_CONNECT(DT_UART_MCUX_2_IRQ_ERROR, - DT_UART_MCUX_2_IRQ_ERROR_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_2_IRQ_ERROR, + DT_NXP_KINETIS_UART_UART_2_IRQ_ERROR_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_2), 0); - irq_enable(DT_UART_MCUX_2_IRQ_ERROR); + irq_enable(DT_NXP_KINETIS_UART_UART_2_IRQ_ERROR); } #endif @@ -423,10 +423,10 @@ static void uart_mcux_config_func_3(struct device *dev); static const struct uart_mcux_config uart_mcux_3_config = { .base = UART3, - .clock_name = DT_UART_MCUX_3_CLOCK_NAME, - .clock_subsys = (clock_control_subsys_t)DT_UART_MCUX_3_CLOCK_SUBSYS, - .baud_rate = DT_UART_MCUX_3_BAUD_RATE, - .hw_flow_control = DT_UART_MCUX_3_HW_FLOW_CONTROL, + .clock_name = DT_NXP_KINETIS_UART_UART_3_CLOCK_CONTROLLER, + .clock_subsys = (clock_control_subsys_t)DT_NXP_KINETIS_UART_UART_3_CLOCK_NAME, + .baud_rate = DT_NXP_KINETIS_UART_UART_3_CURRENT_SPEED, + .hw_flow_control = DT_NXP_KINETIS_UART_UART_3_HW_FLOW_CONTROL, #ifdef CONFIG_UART_INTERRUPT_DRIVEN .irq_config_func = uart_mcux_config_func_3, #endif @@ -434,7 +434,7 @@ static const struct uart_mcux_config uart_mcux_3_config = { static struct uart_mcux_data uart_mcux_3_data; -DEVICE_AND_API_INIT(uart_3, DT_UART_MCUX_3_NAME, +DEVICE_AND_API_INIT(uart_3, DT_NXP_KINETIS_UART_UART_3_LABEL, &uart_mcux_init, &uart_mcux_3_data, &uart_mcux_3_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, @@ -443,17 +443,17 @@ DEVICE_AND_API_INIT(uart_3, DT_UART_MCUX_3_NAME, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_mcux_config_func_3(struct device *dev) { - IRQ_CONNECT(DT_UART_MCUX_3_IRQ_STATUS, - DT_UART_MCUX_3_IRQ_STATUS_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_3_IRQ_STATUS, + DT_NXP_KINETIS_UART_UART_3_IRQ_STATUS_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_3), 0); - irq_enable(DT_UART_MCUX_3_IRQ_STATUS); + irq_enable(DT_NXP_KINETIS_UART_UART_3_IRQ_STATUS); - IRQ_CONNECT(DT_UART_MCUX_3_IRQ_ERROR, - DT_UART_MCUX_3_IRQ_ERROR_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_3_IRQ_ERROR, + DT_NXP_KINETIS_UART_UART_3_IRQ_ERROR_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_3), 0); - irq_enable(DT_UART_MCUX_3_IRQ_ERROR); + irq_enable(DT_NXP_KINETIS_UART_UART_3_IRQ_ERROR); } #endif @@ -467,10 +467,10 @@ static void uart_mcux_config_func_4(struct device *dev); static const struct uart_mcux_config uart_mcux_4_config = { .base = UART4, - .clock_name = DT_UART_MCUX_4_CLOCK_NAME, - .clock_subsys = (clock_control_subsys_t)DT_UART_MCUX_4_CLOCK_SUBSYS, - .baud_rate = DT_UART_MCUX_4_BAUD_RATE, - .hw_flow_control = DT_UART_MCUX_4_HW_FLOW_CONTROL, + .clock_name = DT_NXP_KINETIS_UART_UART_4_CLOCK_CONTROLLER, + .clock_subsys = (clock_control_subsys_t)DT_NXP_KINETIS_UART_UART_4_CLOCK_NAME, + .baud_rate = DT_NXP_KINETIS_UART_UART_4_CURRENT_SPEED, + .hw_flow_control = DT_NXP_KINETIS_UART_UART_4_HW_FLOW_CONTROL, #ifdef CONFIG_UART_INTERRUPT_DRIVEN .irq_config_func = uart_mcux_config_func_4, #endif @@ -478,7 +478,7 @@ static const struct uart_mcux_config uart_mcux_4_config = { static struct uart_mcux_data uart_mcux_4_data; -DEVICE_AND_API_INIT(uart_4, DT_UART_MCUX_4_NAME, +DEVICE_AND_API_INIT(uart_4, DT_NXP_KINETIS_UART_UART_4_LABEL, &uart_mcux_init, &uart_mcux_4_data, &uart_mcux_4_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, @@ -487,17 +487,17 @@ DEVICE_AND_API_INIT(uart_4, DT_UART_MCUX_4_NAME, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_mcux_config_func_4(struct device *dev) { - IRQ_CONNECT(DT_UART_MCUX_4_IRQ_STATUS, - DT_UART_MCUX_4_IRQ_STATUS_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_4_IRQ_STATUS, + DT_NXP_KINETIS_UART_UART_4_IRQ_STATUS_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_4), 0); - irq_enable(DT_UART_MCUX_4_IRQ_STATUS); + irq_enable(DT_NXP_KINETIS_UART_UART_4_IRQ_STATUS); - IRQ_CONNECT(DT_UART_MCUX_4_IRQ_ERROR, - DT_UART_MCUX_4_IRQ_ERROR_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_4_IRQ_ERROR, + DT_NXP_KINETIS_UART_UART_4_IRQ_ERROR_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_4), 0); - irq_enable(DT_UART_MCUX_4_IRQ_ERROR); + irq_enable(DT_NXP_KINETIS_UART_UART_4_IRQ_ERROR); } #endif @@ -511,10 +511,10 @@ static void uart_mcux_config_func_5(struct device *dev); static const struct uart_mcux_config uart_mcux_5_config = { .base = UART5, - .clock_name = DT_UART_MCUX_5_CLOCK_NAME, - .clock_subsys = (clock_control_subsys_t)DT_UART_MCUX_5_CLOCK_SUBSYS, - .baud_rate = DT_UART_MCUX_5_BAUD_RATE, - .hw_flow_control = DT_UART_MCUX_5_HW_FLOW_CONTROL, + .clock_name = DT_NXP_KINETIS_UART_UART_5_CLOCK_CONTROLLER, + .clock_subsys = (clock_control_subsys_t)DT_NXP_KINETIS_UART_UART_5_CLOCK_NAME, + .baud_rate = DT_NXP_KINETIS_UART_UART_5_CURRENT_SPEED, + .hw_flow_control = DT_NXP_KINETIS_UART_UART_5_HW_FLOW_CONTROL, #ifdef CONFIG_UART_INTERRUPT_DRIVEN .irq_config_func = uart_mcux_config_func_5, #endif @@ -522,7 +522,7 @@ static const struct uart_mcux_config uart_mcux_5_config = { static struct uart_mcux_data uart_mcux_5_data; -DEVICE_AND_API_INIT(uart_5, DT_UART_MCUX_5_NAME, +DEVICE_AND_API_INIT(uart_5, DT_NXP_KINETIS_UART_UART_5_LABEL, &uart_mcux_init, &uart_mcux_5_data, &uart_mcux_5_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, @@ -531,17 +531,17 @@ DEVICE_AND_API_INIT(uart_5, DT_UART_MCUX_5_NAME, #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_mcux_config_func_5(struct device *dev) { - IRQ_CONNECT(DT_UART_MCUX_5_IRQ_STATUS, - DT_UART_MCUX_5_IRQ_STATUS_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_5_IRQ_STATUS, + DT_NXP_KINETIS_UART_UART_5_IRQ_STATUS_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_5), 0); - irq_enable(DT_UART_MCUX_5_IRQ_STATUS); + irq_enable(DT_NXP_KINETIS_UART_UART_5_IRQ_STATUS); - IRQ_CONNECT(DT_UART_MCUX_5_IRQ_ERROR, - DT_UART_MCUX_5_IRQ_ERROR_PRI, + IRQ_CONNECT(DT_NXP_KINETIS_UART_UART_5_IRQ_ERROR, + DT_NXP_KINETIS_UART_UART_5_IRQ_ERROR_PRIORITY, uart_mcux_isr, DEVICE_GET(uart_5), 0); - irq_enable(DT_UART_MCUX_5_IRQ_ERROR); + irq_enable(DT_NXP_KINETIS_UART_UART_5_IRQ_ERROR); } #endif diff --git a/soc/arm/nxp_kinetis/k2x/dts_fixup.h b/soc/arm/nxp_kinetis/k2x/dts_fixup.h index cdc4502110..59c5c8d3a4 100644 --- a/soc/arm/nxp_kinetis/k2x/dts_fixup.h +++ b/soc/arm/nxp_kinetis/k2x/dts_fixup.h @@ -7,35 +7,6 @@ /* SoC level DTS fixup file */ #define DT_NUM_IRQ_PRIO_BITS DT_ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS -#define DT_UART_MCUX_0_BAUD_RATE DT_NXP_KINETIS_UART_4006A000_CURRENT_SPEED -#define DT_UART_MCUX_0_NAME DT_NXP_KINETIS_UART_4006A000_LABEL -#define DT_UART_MCUX_0_IRQ_ERROR DT_NXP_KINETIS_UART_4006A000_IRQ_ERROR -#define DT_UART_MCUX_0_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006A000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_0_IRQ_STATUS DT_NXP_KINETIS_UART_4006A000_IRQ_STATUS -#define DT_UART_MCUX_0_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006A000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_0_CLOCK_NAME DT_NXP_KINETIS_UART_4006A000_CLOCK_CONTROLLER -#define DT_UART_MCUX_0_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006A000_CLOCK_NAME - -#define DT_UART_MCUX_1_BAUD_RATE DT_NXP_KINETIS_UART_4006B000_CURRENT_SPEED -#define DT_UART_MCUX_1_NAME DT_NXP_KINETIS_UART_4006B000_LABEL -#define DT_UART_MCUX_1_IRQ_ERROR DT_NXP_KINETIS_UART_4006B000_IRQ_ERROR -#define DT_UART_MCUX_1_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006B000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_1_IRQ_STATUS DT_NXP_KINETIS_UART_4006B000_IRQ_STATUS -#define DT_UART_MCUX_1_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006B000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_1_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006B000_HW_FLOW_CONTROL -#define DT_UART_MCUX_1_CLOCK_NAME DT_NXP_KINETIS_UART_4006B000_CLOCK_CONTROLLER -#define DT_UART_MCUX_1_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006B000_CLOCK_NAME - -#define DT_UART_MCUX_2_BAUD_RATE DT_NXP_KINETIS_UART_4006C000_CURRENT_SPEED -#define DT_UART_MCUX_2_NAME DT_NXP_KINETIS_UART_4006C000_LABEL -#define DT_UART_MCUX_2_IRQ_ERROR DT_NXP_KINETIS_UART_4006C000_IRQ_ERROR -#define DT_UART_MCUX_2_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006C000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_2_IRQ_STATUS DT_NXP_KINETIS_UART_4006C000_IRQ_STATUS -#define DT_UART_MCUX_2_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006C000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_2_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006C000_HW_FLOW_CONTROL -#define DT_UART_MCUX_2_CLOCK_NAME DT_NXP_KINETIS_UART_4006C000_CLOCK_CONTROLLER -#define DT_UART_MCUX_2_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006C000_CLOCK_NAME - #define DT_ADC_0_BASE_ADDRESS DT_NXP_KINETIS_ADC16_4003B000_BASE_ADDRESS #define DT_ADC_0_IRQ DT_NXP_KINETIS_ADC16_4003B000_IRQ_0 #define DT_ADC_0_IRQ_PRI DT_NXP_KINETIS_ADC16_4003B000_IRQ_0_PRIORITY diff --git a/soc/arm/nxp_kinetis/k6x/dts_fixup.h b/soc/arm/nxp_kinetis/k6x/dts_fixup.h index 93ac86ccff..8b07616b6c 100644 --- a/soc/arm/nxp_kinetis/k6x/dts_fixup.h +++ b/soc/arm/nxp_kinetis/k6x/dts_fixup.h @@ -3,66 +3,6 @@ /* SoC level DTS fixup file */ #define DT_NUM_IRQ_PRIO_BITS DT_ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS -#define DT_UART_MCUX_0_BAUD_RATE DT_NXP_KINETIS_UART_4006A000_CURRENT_SPEED -#define DT_UART_MCUX_0_NAME DT_NXP_KINETIS_UART_4006A000_LABEL -#define DT_UART_MCUX_0_IRQ_ERROR DT_NXP_KINETIS_UART_4006A000_IRQ_ERROR -#define DT_UART_MCUX_0_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006A000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_0_IRQ_STATUS DT_NXP_KINETIS_UART_4006A000_IRQ_STATUS -#define DT_UART_MCUX_0_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006A000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_0_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006A000_HW_FLOW_CONTROL -#define DT_UART_MCUX_0_CLOCK_NAME DT_NXP_KINETIS_UART_4006A000_CLOCK_CONTROLLER -#define DT_UART_MCUX_0_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006A000_CLOCK_NAME - -#define DT_UART_MCUX_1_BAUD_RATE DT_NXP_KINETIS_UART_4006B000_CURRENT_SPEED -#define DT_UART_MCUX_1_NAME DT_NXP_KINETIS_UART_4006B000_LABEL -#define DT_UART_MCUX_1_IRQ_ERROR DT_NXP_KINETIS_UART_4006B000_IRQ_ERROR -#define DT_UART_MCUX_1_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006B000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_1_IRQ_STATUS DT_NXP_KINETIS_UART_4006B000_IRQ_STATUS -#define DT_UART_MCUX_1_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006B000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_1_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006B000_HW_FLOW_CONTROL -#define DT_UART_MCUX_1_CLOCK_NAME DT_NXP_KINETIS_UART_4006B000_CLOCK_CONTROLLER -#define DT_UART_MCUX_1_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006B000_CLOCK_NAME - -#define DT_UART_MCUX_2_BAUD_RATE DT_NXP_KINETIS_UART_4006C000_CURRENT_SPEED -#define DT_UART_MCUX_2_NAME DT_NXP_KINETIS_UART_4006C000_LABEL -#define DT_UART_MCUX_2_IRQ_ERROR DT_NXP_KINETIS_UART_4006C000_IRQ_ERROR -#define DT_UART_MCUX_2_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006C000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_2_IRQ_STATUS DT_NXP_KINETIS_UART_4006C000_IRQ_STATUS -#define DT_UART_MCUX_2_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006C000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_2_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006C000_HW_FLOW_CONTROL -#define DT_UART_MCUX_2_CLOCK_NAME DT_NXP_KINETIS_UART_4006C000_CLOCK_CONTROLLER -#define DT_UART_MCUX_2_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006C000_CLOCK_NAME - -#define DT_UART_MCUX_3_BAUD_RATE DT_NXP_KINETIS_UART_4006D000_CURRENT_SPEED -#define DT_UART_MCUX_3_NAME DT_NXP_KINETIS_UART_4006D000_LABEL -#define DT_UART_MCUX_3_IRQ_ERROR DT_NXP_KINETIS_UART_4006D000_IRQ_ERROR -#define DT_UART_MCUX_3_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006D000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_3_IRQ_STATUS DT_NXP_KINETIS_UART_4006D000_IRQ_STATUS -#define DT_UART_MCUX_3_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006D000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_3_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006D000_HW_FLOW_CONTROL -#define DT_UART_MCUX_3_CLOCK_NAME DT_NXP_KINETIS_UART_4006D000_CLOCK_CONTROLLER -#define DT_UART_MCUX_3_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006D000_CLOCK_NAME - -#define DT_UART_MCUX_4_BAUD_RATE DT_NXP_KINETIS_UART_400EA000_CURRENT_SPEED -#define DT_UART_MCUX_4_NAME DT_NXP_KINETIS_UART_400EA000_LABEL -#define DT_UART_MCUX_4_IRQ_ERROR DT_NXP_KINETIS_UART_400EA000_IRQ_ERROR -#define DT_UART_MCUX_4_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_400EA000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_4_IRQ_STATUS DT_NXP_KINETIS_UART_400EA000_IRQ_STATUS -#define DT_UART_MCUX_4_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_400EA000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_4_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_400EA000_HW_FLOW_CONTROL -#define DT_UART_MCUX_4_CLOCK_NAME DT_NXP_KINETIS_UART_400EA000_CLOCK_CONTROLLER -#define DT_UART_MCUX_4_CLOCK_SUBSYS DT_NXP_KINETIS_UART_400EA000_CLOCK_NAME - -#define DT_UART_MCUX_5_BAUD_RATE DT_NXP_KINETIS_UART_400EB000_CURRENT_SPEED -#define DT_UART_MCUX_5_NAME DT_NXP_KINETIS_UART_400EB000_LABEL -#define DT_UART_MCUX_5_IRQ_ERROR DT_NXP_KINETIS_UART_400EB000_IRQ_ERROR -#define DT_UART_MCUX_5_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_400EB000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_5_IRQ_STATUS DT_NXP_KINETIS_UART_400EB000_IRQ_STATUS -#define DT_UART_MCUX_5_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_400EB000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_5_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_400EB000_HW_FLOW_CONTROL -#define DT_UART_MCUX_5_CLOCK_NAME DT_NXP_KINETIS_UART_400EB000_CLOCK_CONTROLLER -#define DT_UART_MCUX_5_CLOCK_SUBSYS DT_NXP_KINETIS_UART_400EB000_CLOCK_NAME - #define DT_ADC_0_BASE_ADDRESS DT_NXP_KINETIS_ADC16_4003B000_BASE_ADDRESS #define DT_ADC_0_IRQ DT_NXP_KINETIS_ADC16_4003B000_IRQ_0 #define DT_ADC_0_IRQ_PRI DT_NXP_KINETIS_ADC16_4003B000_IRQ_0_PRIORITY diff --git a/soc/arm/nxp_kinetis/kv5x/dts_fixup.h b/soc/arm/nxp_kinetis/kv5x/dts_fixup.h index eb14c5be40..bc914f99f0 100644 --- a/soc/arm/nxp_kinetis/kv5x/dts_fixup.h +++ b/soc/arm/nxp_kinetis/kv5x/dts_fixup.h @@ -43,63 +43,3 @@ #define DT_SPI_2_IRQ_PRI DT_NXP_KINETIS_DSPI_400AC000_IRQ_0_PRIORITY #define DT_SPI_2_CLOCK_NAME DT_NXP_KINETIS_DSPI_400AC000_CLOCK_CONTROLLER #define DT_SPI_2_CLOCK_SUBSYS DT_NXP_KINETIS_DSPI_400AC000_CLOCK_NAME - -#define DT_UART_MCUX_0_BAUD_RATE DT_NXP_KINETIS_UART_4006A000_CURRENT_SPEED -#define DT_UART_MCUX_0_NAME DT_NXP_KINETIS_UART_4006A000_LABEL -#define DT_UART_MCUX_0_IRQ_ERROR DT_NXP_KINETIS_UART_4006A000_IRQ_ERROR -#define DT_UART_MCUX_0_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006A000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_0_IRQ_STATUS DT_NXP_KINETIS_UART_4006A000_IRQ_STATUS -#define DT_UART_MCUX_0_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006A000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_0_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006A000_HW_FLOW_CONTROL -#define DT_UART_MCUX_0_CLOCK_NAME DT_NXP_KINETIS_UART_4006A000_CLOCK_CONTROLLER -#define DT_UART_MCUX_0_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006A000_CLOCK_NAME - -#define DT_UART_MCUX_1_BAUD_RATE DT_NXP_KINETIS_UART_4006B000_CURRENT_SPEED -#define DT_UART_MCUX_1_NAME DT_NXP_KINETIS_UART_4006B000_LABEL -#define DT_UART_MCUX_1_IRQ_ERROR DT_NXP_KINETIS_UART_4006B000_IRQ_ERROR -#define DT_UART_MCUX_1_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006B000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_1_IRQ_STATUS DT_NXP_KINETIS_UART_4006B000_IRQ_STATUS -#define DT_UART_MCUX_1_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006B000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_1_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006B000_HW_FLOW_CONTROL -#define DT_UART_MCUX_1_CLOCK_NAME DT_NXP_KINETIS_UART_4006B000_CLOCK_CONTROLLER -#define DT_UART_MCUX_1_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006B000_CLOCK_NAME - -#define DT_UART_MCUX_2_BAUD_RATE DT_NXP_KINETIS_UART_4006C000_CURRENT_SPEED -#define DT_UART_MCUX_2_NAME DT_NXP_KINETIS_UART_4006C000_LABEL -#define DT_UART_MCUX_2_IRQ_ERROR DT_NXP_KINETIS_UART_4006C000_IRQ_ERROR -#define DT_UART_MCUX_2_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006C000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_2_IRQ_STATUS DT_NXP_KINETIS_UART_4006C000_IRQ_STATUS -#define DT_UART_MCUX_2_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006C000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_2_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006C000_HW_FLOW_CONTROL -#define DT_UART_MCUX_2_CLOCK_NAME DT_NXP_KINETIS_UART_4006C000_CLOCK_CONTROLLER -#define DT_UART_MCUX_2_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006C000_CLOCK_NAME - -#define DT_UART_MCUX_3_BAUD_RATE DT_NXP_KINETIS_UART_4006D000_CURRENT_SPEED -#define DT_UART_MCUX_3_NAME DT_NXP_KINETIS_UART_4006D000_LABEL -#define DT_UART_MCUX_3_IRQ_ERROR DT_NXP_KINETIS_UART_4006D000_IRQ_ERROR -#define DT_UART_MCUX_3_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006D000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_3_IRQ_STATUS DT_NXP_KINETIS_UART_4006D000_IRQ_STATUS -#define DT_UART_MCUX_3_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006D000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_3_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006D000_HW_FLOW_CONTROL -#define DT_UART_MCUX_3_CLOCK_NAME DT_NXP_KINETIS_UART_4006D000_CLOCK_CONTROLLER -#define DT_UART_MCUX_3_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006D000_CLOCK_NAME - -#define DT_UART_MCUX_4_BAUD_RATE DT_NXP_KINETIS_UART_400EA000_CURRENT_SPEED -#define DT_UART_MCUX_4_NAME DT_NXP_KINETIS_UART_400EA000_LABEL -#define DT_UART_MCUX_4_IRQ_ERROR DT_NXP_KINETIS_UART_400EA000_IRQ_ERROR -#define DT_UART_MCUX_4_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_400EA000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_4_IRQ_STATUS DT_NXP_KINETIS_UART_400EA000_IRQ_STATUS -#define DT_UART_MCUX_4_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_400EA000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_4_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_400EA000_HW_FLOW_CONTROL -#define DT_UART_MCUX_4_CLOCK_NAME DT_NXP_KINETIS_UART_400EA000_CLOCK_CONTROLLER -#define DT_UART_MCUX_4_CLOCK_SUBSYS DT_NXP_KINETIS_UART_400EA000_CLOCK_NAME - -#define DT_UART_MCUX_5_BAUD_RATE DT_NXP_KINETIS_UART_400EB000_CURRENT_SPEED -#define DT_UART_MCUX_5_NAME DT_NXP_KINETIS_UART_400EB000_LABEL -#define DT_UART_MCUX_5_IRQ_ERROR DT_NXP_KINETIS_UART_400EB000_IRQ_ERROR -#define DT_UART_MCUX_5_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_400EB000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_5_IRQ_STATUS DT_NXP_KINETIS_UART_400EB000_IRQ_STATUS -#define DT_UART_MCUX_5_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_400EB000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_5_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_400EB000_HW_FLOW_CONTROL -#define DT_UART_MCUX_5_CLOCK_NAME DT_NXP_KINETIS_UART_400EB000_CLOCK_CONTROLLER -#define DT_UART_MCUX_5_CLOCK_SUBSYS DT_NXP_KINETIS_UART_400EB000_CLOCK_NAME diff --git a/soc/arm/nxp_kinetis/kwx/dts_fixup.h b/soc/arm/nxp_kinetis/kwx/dts_fixup.h index 007fcad5c7..9d23f2d9e4 100644 --- a/soc/arm/nxp_kinetis/kwx/dts_fixup.h +++ b/soc/arm/nxp_kinetis/kwx/dts_fixup.h @@ -20,46 +20,6 @@ #if defined(CONFIG_SOC_MKW22D5) || defined(CONFIG_SOC_MKW24D5) #define DT_NUM_IRQ_PRIO_BITS DT_ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS -#define DT_UART_MCUX_0_BAUD_RATE DT_NXP_KINETIS_UART_4006A000_CURRENT_SPEED -#define DT_UART_MCUX_0_NAME DT_NXP_KINETIS_UART_4006A000_LABEL -#define DT_UART_MCUX_0_IRQ_ERROR DT_NXP_KINETIS_UART_4006A000_IRQ_ERROR -#define DT_UART_MCUX_0_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006A000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_0_IRQ_STATUS DT_NXP_KINETIS_UART_4006A000_IRQ_STATUS -#define DT_UART_MCUX_0_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006A000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_0_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006A000_HW_FLOW_CONTROL -#define DT_UART_MCUX_0_CLOCK_NAME DT_NXP_KINETIS_UART_4006A000_CLOCK_CONTROLLER -#define DT_UART_MCUX_0_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006A000_CLOCK_NAME - -#define DT_UART_MCUX_1_BAUD_RATE DT_NXP_KINETIS_UART_4006B000_CURRENT_SPEED -#define DT_UART_MCUX_1_NAME DT_NXP_KINETIS_UART_4006B000_LABEL -#define DT_UART_MCUX_1_IRQ_ERROR DT_NXP_KINETIS_UART_4006B000_IRQ_ERROR -#define DT_UART_MCUX_1_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006B000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_1_IRQ_STATUS DT_NXP_KINETIS_UART_4006B000_IRQ_STATUS -#define DT_UART_MCUX_1_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006B000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_1_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006B000_HW_FLOW_CONTROL -#define DT_UART_MCUX_1_CLOCK_NAME DT_NXP_KINETIS_UART_4006B000_CLOCK_CONTROLLER -#define DT_UART_MCUX_1_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006B000_CLOCK_NAME - -#define DT_UART_MCUX_2_BAUD_RATE DT_NXP_KINETIS_UART_4006C000_CURRENT_SPEED -#define DT_UART_MCUX_2_NAME DT_NXP_KINETIS_UART_4006C000_LABEL -#define DT_UART_MCUX_2_IRQ_ERROR DT_NXP_KINETIS_UART_4006C000_IRQ_ERROR -#define DT_UART_MCUX_2_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006C000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_2_IRQ_STATUS DT_NXP_KINETIS_UART_4006C000_IRQ_STATUS -#define DT_UART_MCUX_2_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006C000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_2_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006C000_HW_FLOW_CONTROL -#define DT_UART_MCUX_2_CLOCK_NAME DT_NXP_KINETIS_UART_4006C000_CLOCK_CONTROLLER -#define DT_UART_MCUX_2_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006C000_CLOCK_NAME - -#define DT_UART_MCUX_3_BAUD_RATE DT_NXP_KINETIS_UART_4006D000_CURRENT_SPEED -#define DT_UART_MCUX_3_NAME DT_NXP_KINETIS_UART_4006D000_LABEL -#define DT_UART_MCUX_3_IRQ_ERROR DT_NXP_KINETIS_UART_4006D000_IRQ_ERROR -#define DT_UART_MCUX_3_IRQ_ERROR_PRI DT_NXP_KINETIS_UART_4006D000_IRQ_ERROR_PRIORITY -#define DT_UART_MCUX_3_IRQ_STATUS DT_NXP_KINETIS_UART_4006D000_IRQ_STATUS -#define DT_UART_MCUX_3_IRQ_STATUS_PRI DT_NXP_KINETIS_UART_4006D000_IRQ_STATUS_PRIORITY -#define DT_UART_MCUX_3_HW_FLOW_CONTROL DT_NXP_KINETIS_UART_4006D000_HW_FLOW_CONTROL -#define DT_UART_MCUX_3_CLOCK_NAME DT_NXP_KINETIS_UART_4006D000_CLOCK_CONTROLLER -#define DT_UART_MCUX_3_CLOCK_SUBSYS DT_NXP_KINETIS_UART_4006D000_CLOCK_NAME - #define DT_FLASH_DEV_BASE_ADDRESS DT_NXP_KINETIS_FTFL_40020000_BASE_ADDRESS #define DT_FLASH_DEV_NAME DT_NXP_KINETIS_FTFL_40020000_LABEL