From 03a99e0d7f6bbba1561e24f0512c8e11c41c9552 Mon Sep 17 00:00:00 2001 From: Marcin Szymczyk Date: Fri, 6 Dec 2019 11:09:51 +0100 Subject: [PATCH] soc: nrf: update dts_fixup.h to I2C DT Commit a8a85c21cff7319e80af16688ea6076594fab7c8 introduced separate DT symbols for TWI and TWIM. Update dts_fixup.h for all nRF chips to align with those changes. Signed-off-by: Marcin Szymczyk --- soc/arm/nordic_nrf/nrf51/dts_fixup.h | 4 ++-- soc/arm/nordic_nrf/nrf52/dts_fixup.h | 13 +++++++++++-- soc/arm/nordic_nrf/nrf53/dts_fixup.h | 4 ++-- soc/arm/nordic_nrf/nrf91/dts_fixup.h | 8 ++++---- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/soc/arm/nordic_nrf/nrf51/dts_fixup.h b/soc/arm/nordic_nrf/nrf51/dts_fixup.h index 4fedcaa0828..067a34cdf5d 100644 --- a/soc/arm/nordic_nrf/nrf51/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf51/dts_fixup.h @@ -12,8 +12,8 @@ #define DT_GPIO_P0_DEV_NAME DT_NORDIC_NRF_GPIO_GPIO_0_LABEL -#define DT_I2C_0_NAME DT_NORDIC_NRF_I2C_I2C_0_LABEL -#define DT_I2C_1_NAME DT_NORDIC_NRF_I2C_I2C_1_LABEL +#define DT_I2C_0_NAME DT_NORDIC_NRF_TWI_I2C_0_LABEL +#define DT_I2C_1_NAME DT_NORDIC_NRF_TWI_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 diff --git a/soc/arm/nordic_nrf/nrf52/dts_fixup.h b/soc/arm/nordic_nrf/nrf52/dts_fixup.h index 9dfcc69cff3..44fa3784d11 100644 --- a/soc/arm/nordic_nrf/nrf52/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf52/dts_fixup.h @@ -19,8 +19,17 @@ #define DT_GPIO_P0_DEV_NAME DT_NORDIC_NRF_GPIO_GPIO_0_LABEL #define DT_GPIO_P1_DEV_NAME DT_NORDIC_NRF_GPIO_GPIO_1_LABEL -#define DT_I2C_0_NAME DT_NORDIC_NRF_I2C_I2C_0_LABEL -#define DT_I2C_1_NAME DT_NORDIC_NRF_I2C_I2C_1_LABEL +#if defined(DT_NORDIC_NRF_TWIM_I2C_0_LABEL) +#define DT_I2C_0_NAME DT_NORDIC_NRF_TWIM_I2C_0_LABEL +#else +#define DT_I2C_0_NAME DT_NORDIC_NRF_TWI_I2C_0_LABEL +#endif + +#if defined(DT_NORDIC_NRF_TWIM_I2C_1_LABEL) +#define DT_I2C_1_NAME DT_NORDIC_NRF_TWIM_I2C_1_LABEL +#else +#define DT_I2C_1_NAME DT_NORDIC_NRF_TWI_I2C_1_LABEL +#endif #define DT_SPI_0_NAME DT_NORDIC_NRF_SPI_SPI_0_LABEL #define DT_SPI_1_NAME DT_NORDIC_NRF_SPI_SPI_1_LABEL diff --git a/soc/arm/nordic_nrf/nrf53/dts_fixup.h b/soc/arm/nordic_nrf/nrf53/dts_fixup.h index db37709027f..ec8672204c8 100644 --- a/soc/arm/nordic_nrf/nrf53/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf53/dts_fixup.h @@ -23,8 +23,8 @@ #define DT_GPIO_P0_DEV_NAME DT_NORDIC_NRF_GPIO_GPIO_0_LABEL #define DT_GPIO_P1_DEV_NAME DT_NORDIC_NRF_GPIO_GPIO_1_LABEL -#define DT_I2C_0_NAME DT_NORDIC_NRF_I2C_I2C_0_LABEL -#define DT_I2C_1_NAME DT_NORDIC_NRF_I2C_I2C_1_LABEL +#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 diff --git a/soc/arm/nordic_nrf/nrf91/dts_fixup.h b/soc/arm/nordic_nrf/nrf91/dts_fixup.h index de16fd65c04..a5da2aeb683 100644 --- a/soc/arm/nordic_nrf/nrf91/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf91/dts_fixup.h @@ -22,10 +22,10 @@ #define DT_GPIO_P0_DEV_NAME DT_NORDIC_NRF_GPIO_GPIO_0_LABEL -#define DT_I2C_0_NAME DT_NORDIC_NRF_I2C_I2C_0_LABEL -#define DT_I2C_1_NAME DT_NORDIC_NRF_I2C_I2C_1_LABEL -#define DT_I2C_2_NAME DT_NORDIC_NRF_I2C_I2C_2_LABEL -#define DT_I2C_3_NAME DT_NORDIC_NRF_I2C_I2C_3_LABEL +#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_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