diff --git a/drivers/i2c/i2c_nrfx_twi_common.h b/drivers/i2c/i2c_nrfx_twi_common.h index a8925d3f75b..a3e9847bab5 100644 --- a/drivers/i2c/i2c_nrfx_twi_common.h +++ b/drivers/i2c/i2c_nrfx_twi_common.h @@ -22,7 +22,8 @@ extern "C" { : I2C_NRFX_TWI_INVALID_FREQUENCY) #define I2C(idx) DT_NODELABEL(i2c##idx) #define I2C_FREQUENCY(idx) \ - I2C_NRFX_TWI_FREQUENCY(DT_PROP(I2C(idx), clock_frequency)) + I2C_NRFX_TWI_FREQUENCY(DT_PROP_OR(I2C(idx), clock_frequency, \ + I2C_BITRATE_STANDARD)) struct i2c_nrfx_twi_common_data { uint32_t dev_config; diff --git a/drivers/i2c/i2c_nrfx_twim_common.h b/drivers/i2c/i2c_nrfx_twim_common.h index 23811a225e7..ba7fa72f019 100644 --- a/drivers/i2c/i2c_nrfx_twim_common.h +++ b/drivers/i2c/i2c_nrfx_twim_common.h @@ -28,7 +28,8 @@ extern "C" { #define I2C(idx) DT_NODELABEL(i2c##idx) #define I2C_HAS_PROP(idx, prop) DT_NODE_HAS_PROP(I2C(idx), prop) -#define I2C_FREQUENCY(idx) I2C_NRFX_TWIM_FREQUENCY(DT_PROP(I2C(idx), clock_frequency)) +#define I2C_FREQUENCY(idx) I2C_NRFX_TWIM_FREQUENCY(DT_PROP_OR(I2C(idx), clock_frequency, \ + I2C_BITRATE_STANDARD)) struct i2c_nrfx_twim_common_config { nrfx_twim_t twim;