Skip to content

Commit

Permalink
arch: arm: nrf52: Support UARTE defines in dts.fixup
Browse files Browse the repository at this point in the history
If we select UART0 as UARTE we will get different defines from the
generation script.  Support both UART and UARTE for UART0.  Also fixup
UART1 defines since this will always be UARTE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information
galak committed Jul 10, 2018
1 parent f93b3d1 commit b3d34d2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions arch/arm/soc/nordic_nrf/nrf52/dts.fixup
@@ -1,13 +1,19 @@
/* SoC level DTS fixup file */

#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
#if defined(NORDIC_NRF_UARTE_40002000_BASE_ADDRESS)
#define CONFIG_UART_0_IRQ_PRI NORDIC_NRF_UARTE_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_0_BAUD_RATE NORDIC_NRF_UARTE_40002000_CURRENT_SPEED
#define CONFIG_UART_0_NAME NORDIC_NRF_UARTE_40002000_LABEL
#else
#define CONFIG_UART_0_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_0_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_0_NAME NORDIC_NRF_UART_40002000_LABEL
#endif

#define CONFIG_UART_1_IRQ_PRI NORDIC_NRF_UART_40028000_IRQ_0_PRIORITY
#define CONFIG_UART_1_BAUD_RATE NORDIC_NRF_UART_40028000_CURRENT_SPEED
#define CONFIG_UART_1_NAME NORDIC_NRF_UART_40028000_LABEL
#define CONFIG_UART_1_IRQ_PRI NORDIC_NRF_UARTE_40028000_IRQ_0_PRIORITY
#define CONFIG_UART_1_BAUD_RATE NORDIC_NRF_UARTE_40028000_CURRENT_SPEED
#define CONFIG_UART_1_NAME NORDIC_NRF_UARTE_40028000_LABEL

#define FLASH_DEV_NAME NRF_NRF52_FLASH_CONTROLLER_4001E000_LABEL

Expand Down

0 comments on commit b3d34d2

Please sign in to comment.