diff --git a/drivers/eeprom/Kconfig b/drivers/eeprom/Kconfig index cbb6747c9e..81156c893b 100644 --- a/drivers/eeprom/Kconfig +++ b/drivers/eeprom/Kconfig @@ -19,6 +19,11 @@ config EE25XX_SPIMODE default 0 depends on SPI_EE_25XX +config EE25XX_FREQUENCY + int "SPI EEPROM SCK frequency" + default 10000000 + depends on SPI_EE_25XX + endif # SPI_EE_25XX config I2C_EE_24XX diff --git a/drivers/eeprom/spi_xx25xx.c b/drivers/eeprom/spi_xx25xx.c index 65c48c194c..4b76d1a111 100644 --- a/drivers/eeprom/spi_xx25xx.c +++ b/drivers/eeprom/spi_xx25xx.c @@ -290,7 +290,7 @@ static void ee25xx_lock(FAR struct spi_dev_s *dev) SPI_SETMODE(dev, CONFIG_EE25XX_SPIMODE); SPI_SETBITS(dev, 8); (void)SPI_HWFEATURES(dev, 0); - (void)SPI_SETFREQUENCY(dev, 10000000); /* This is the default speed */ + (void)SPI_SETFREQUENCY(dev, CONFIG_EE25XX_FREQUENCY); } /****************************************************************************