From e6b3a33318f4bb6c1988e0e2ab6b4ebda9928a77 Mon Sep 17 00:00:00 2001 From: Marcin Szymczyk Date: Fri, 6 Dec 2019 11:41:51 +0100 Subject: [PATCH] soc: nrf: update dts_fixup.h to SPI DT Commit 94bed60abea53818c8cd723e233799a77c4b4e4b introduced separate DT symbols for SPI and SPIM. Update dts_fixup.h for all nRF chips to align with those changes. Signed-off-by: Marcin Szymczyk --- soc/arm/nordic_nrf/nrf52/dts_fixup.h | 17 ++++++++++++++++- soc/arm/nordic_nrf/nrf53/dts_fixup.h | 6 +++--- soc/arm/nordic_nrf/nrf91/dts_fixup.h | 8 ++++---- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/soc/arm/nordic_nrf/nrf52/dts_fixup.h b/soc/arm/nordic_nrf/nrf52/dts_fixup.h index 44fa3784d11..1303d076ab2 100644 --- a/soc/arm/nordic_nrf/nrf52/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf52/dts_fixup.h @@ -31,10 +31,25 @@ #define DT_I2C_1_NAME DT_NORDIC_NRF_TWI_I2C_1_LABEL #endif +#if defined(DT_NORDIC_NRF_SPIM_SPI_0_LABEL) +#define DT_SPI_0_NAME DT_NORDIC_NRF_SPIM_SPI_0_LABEL +#else #define DT_SPI_0_NAME DT_NORDIC_NRF_SPI_SPI_0_LABEL +#endif + +#if defined(DT_NORDIC_NRF_SPIM_SPI_1_LABEL) +#define DT_SPI_1_NAME DT_NORDIC_NRF_SPIM_SPI_1_LABEL +#else #define DT_SPI_1_NAME DT_NORDIC_NRF_SPI_SPI_1_LABEL +#endif + +#if defined(DT_NORDIC_NRF_SPIM_SPI_2_LABEL) +#define DT_SPI_2_NAME DT_NORDIC_NRF_SPIM_SPI_2_LABEL +#else #define DT_SPI_2_NAME DT_NORDIC_NRF_SPI_SPI_2_LABEL -#define DT_SPI_3_NAME DT_NORDIC_NRF_SPI_SPI_3_LABEL +#endif + +#define DT_SPI_3_NAME DT_NORDIC_NRF_SPIM_SPI_3_LABEL #define DT_WDT_0_NAME DT_NORDIC_NRF_WATCHDOG_WDT_0_LABEL diff --git a/soc/arm/nordic_nrf/nrf53/dts_fixup.h b/soc/arm/nordic_nrf/nrf53/dts_fixup.h index ec8672204c8..7370f6b33fc 100644 --- a/soc/arm/nordic_nrf/nrf53/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf53/dts_fixup.h @@ -26,9 +26,9 @@ #define DT_I2C_0_NAME DT_NORDIC_NRF_TWIM_I2C_0_LABEL #define DT_I2C_1_NAME DT_NORDIC_NRF_TWIM_I2C_1_LABEL -#define DT_SPI_0_NAME DT_NORDIC_NRF_SPI_SPI_0_LABEL -#define DT_SPI_1_NAME DT_NORDIC_NRF_SPI_SPI_1_LABEL -#define DT_SPI_2_NAME DT_NORDIC_NRF_SPI_SPI_2_LABEL +#define DT_SPI_0_NAME DT_NORDIC_NRF_SPIM_SPI_0_LABEL +#define DT_SPI_1_NAME DT_NORDIC_NRF_SPIM_SPI_1_LABEL +#define DT_SPI_2_NAME DT_NORDIC_NRF_SPIM_SPI_2_LABEL #define DT_WDT_0_NAME DT_NORDIC_NRF_WATCHDOG_WDT_0_LABEL diff --git a/soc/arm/nordic_nrf/nrf91/dts_fixup.h b/soc/arm/nordic_nrf/nrf91/dts_fixup.h index a5da2aeb683..63a7ca7ecf9 100644 --- a/soc/arm/nordic_nrf/nrf91/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf91/dts_fixup.h @@ -27,10 +27,10 @@ #define DT_I2C_2_NAME DT_NORDIC_NRF_TWIM_I2C_2_LABEL #define DT_I2C_3_NAME DT_NORDIC_NRF_TWIM_I2C_3_LABEL -#define DT_SPI_0_NAME DT_NORDIC_NRF_SPI_SPI_0_LABEL -#define DT_SPI_1_NAME DT_NORDIC_NRF_SPI_SPI_1_LABEL -#define DT_SPI_2_NAME DT_NORDIC_NRF_SPI_SPI_2_LABEL -#define DT_SPI_3_NAME DT_NORDIC_NRF_SPI_SPI_3_LABEL +#define DT_SPI_0_NAME DT_NORDIC_NRF_SPIM_SPI_0_LABEL +#define DT_SPI_1_NAME DT_NORDIC_NRF_SPIM_SPI_1_LABEL +#define DT_SPI_2_NAME DT_NORDIC_NRF_SPIM_SPI_2_LABEL +#define DT_SPI_3_NAME DT_NORDIC_NRF_SPIM_SPI_3_LABEL #define DT_WDT_0_NAME DT_NORDIC_NRF_WATCHDOG_WDT_0_LABEL