soc: nordic: allow use of TWIM frequency workaround

Added Kconfig options to allow use of TWIM frequency
workaround in NRFX for nRF52 and nRF53.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
This commit is contained in:
Michał Stasiak 2025-03-14 09:16:44 +01:00 committed by Benjamin Cabé
commit def5f8ee07
3 changed files with 22 additions and 0 deletions

View file

@ -776,6 +776,12 @@
#ifdef CONFIG_NRFX_TWIM137
#define NRFX_TWIM137_ENABLED 1
#endif
#ifdef CONFIG_NRF52_ANOMALY_219_WORKAROUND
#define NRFX_TWIM_NRF52_ANOMALY_219_WORKAROUND_ENABLED 1
#endif
#ifdef CONFIG_SOC_NRF53_ANOMALY_47_WORKAROUND
#define NRFX_TWIM_NRF53_ANOMALY_47_WORKAROUND_ENABLED 1
#endif
#ifdef CONFIG_NRFX_TWIS
#define NRFX_TWIS_ENABLED 1

View file

@ -120,4 +120,12 @@ config NRF52_ANOMALY_109_WORKAROUND_EGU_INSTANCE
help
EGU instance used by the nRF52 Anomaly 109 workaround for PWM.
config NRF52_ANOMALY_219_WORKAROUND
bool "Anomaly 219 workaround"
depends on NRFX_TWIM
help
Due to Anomaly 219 the low period of SCL clock is too short to meet
the I2C specification at 400 kHz. This workaround configures the I2C
frequency to 390 kHz instead of 400 kHz.
endif # SOC_SERIES_NRF52X

View file

@ -41,6 +41,14 @@ if SOC_SERIES_NRF53X
VREGMAIN_PATH := $(dt_nodelabel_path,vregmain)
VREGRADIO_PATH := $(dt_nodelabel_path,vregradio)
config SOC_NRF53_ANOMALY_47_WORKAROUND
bool "Anomaly 47 workaround"
depends on NRFX_TWIM
help
Due to Anomaly 47 the low period of SCL clock is too short to meet
the I2C specification at 400 kHz. This workaround configures the I2C
frequency to 390 kHz instead of 400 kHz.
config SOC_NRF53_ANOMALY_160_WORKAROUND_NEEDED
bool "Workaround for nRF5340 anomaly 160"
imply SOC_NRF53_ANOMALY_160_WORKAROUND