diff --git a/configs/am335x_baltos_defconfig b/configs/am335x_baltos_defconfig
index c9524cab73..635c9beac7 100644
--- a/configs/am335x_baltos_defconfig
+++ b/configs/am335x_baltos_defconfig
@@ -48,6 +48,7 @@ CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MMC_OMAP_HS_ADMA=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
 CONFIG_SYS_NAND_U_BOOT_OFFS=0x00080000
diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig
index 6dd04a4c17..02d5ed3aa0 100644
--- a/configs/am3517_evm_defconfig
+++ b/configs/am3517_evm_defconfig
@@ -50,6 +50,7 @@ CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_DM_PCA953X=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
diff --git a/configs/apf27_defconfig b/configs/apf27_defconfig
index be8ef7d2dd..41f4b2cf15 100644
--- a/configs/apf27_defconfig
+++ b/configs/apf27_defconfig
@@ -44,6 +44,7 @@ CONFIG_FPGA_SPARTAN3=y
 CONFIG_MXC_GPIO=y
 CONFIG_MMC_MXC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
diff --git a/configs/apx4devkit_defconfig b/configs/apx4devkit_defconfig
index 28b507e23f..e46a9f1a2c 100644
--- a/configs/apx4devkit_defconfig
+++ b/configs/apx4devkit_defconfig
@@ -34,6 +34,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MXS_GPIO=y
 CONFIG_MMC_MXS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_MII=y
diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig
index ebb3885e91..c791a062f0 100644
--- a/configs/at91sam9x5ek_dataflash_defconfig
+++ b/configs/at91sam9x5ek_dataflash_defconfig
@@ -45,6 +45,7 @@ CONFIG_AT91_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 # CONFIG_SYS_NAND_USE_FLASH_BBT is not set
 CONFIG_NAND_ATMEL=y
diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig
index a225cf291a..0a575b411f 100644
--- a/configs/at91sam9x5ek_mmc_defconfig
+++ b/configs/at91sam9x5ek_mmc_defconfig
@@ -43,6 +43,7 @@ CONFIG_AT91_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 # CONFIG_SYS_NAND_USE_FLASH_BBT is not set
 CONFIG_NAND_ATMEL=y
diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig
index 1509dd7cff..fe2353178a 100644
--- a/configs/at91sam9x5ek_nandflash_defconfig
+++ b/configs/at91sam9x5ek_nandflash_defconfig
@@ -43,6 +43,7 @@ CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 # CONFIG_SYS_NAND_USE_FLASH_BBT is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
diff --git a/configs/at91sam9x5ek_spiflash_defconfig b/configs/at91sam9x5ek_spiflash_defconfig
index 8f53244e6f..a2e4a01f8e 100644
--- a/configs/at91sam9x5ek_spiflash_defconfig
+++ b/configs/at91sam9x5ek_spiflash_defconfig
@@ -45,6 +45,7 @@ CONFIG_AT91_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 # CONFIG_SYS_NAND_USE_FLASH_BBT is not set
 CONFIG_NAND_ATMEL=y
diff --git a/configs/bk4r1_defconfig b/configs/bk4r1_defconfig
index 173e56813e..686f1ca482 100644
--- a/configs/bk4r1_defconfig
+++ b/configs/bk4r1_defconfig
@@ -60,6 +60,7 @@ CONFIG_NAND_VF610_NFC_DT=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/dns325_defconfig b/configs/dns325_defconfig
index 5fa13df1c6..a7193875d5 100644
--- a/configs/dns325_defconfig
+++ b/configs/dns325_defconfig
@@ -32,6 +32,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-dns325"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
diff --git a/configs/dockstar_defconfig b/configs/dockstar_defconfig
index 2d501ef5cb..3cb368293d 100644
--- a/configs/dockstar_defconfig
+++ b/configs/dockstar_defconfig
@@ -29,6 +29,7 @@ CONFIG_DEFAULT_DEVICE_TREE="kirkwood-dockstar"
 CONFIG_ENV_IS_IN_NAND=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig
index 9720ff8e91..110f7f96cf 100644
--- a/configs/ds414_defconfig
+++ b/configs/ds414_defconfig
@@ -51,6 +51,7 @@ CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_BLK=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHY_ADDR_ENABLE=y
diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
index 6058272b24..c09888b4ed 100644
--- a/configs/ethernut5_defconfig
+++ b/configs/ethernut5_defconfig
@@ -57,6 +57,7 @@ CONFIG_CLK_AT91=y
 CONFIG_DM_GPIO=y
 CONFIG_AT91_GPIO=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD_RAW_NAND=y
 # CONFIG_SYS_NAND_USE_FLASH_BBT is not set
diff --git a/configs/gardena-smart-gateway-mt7688-ram_defconfig b/configs/gardena-smart-gateway-mt7688-ram_defconfig
index c362b407ea..0e43576c1c 100644
--- a/configs/gardena-smart-gateway-mt7688-ram_defconfig
+++ b/configs/gardena-smart-gateway-mt7688-ram_defconfig
@@ -50,6 +50,7 @@ CONFIG_LED=y
 CONFIG_LED_BLINK=y
 CONFIG_LED_GPIO=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_SPI_NAND=y
 CONFIG_SPI_FLASH=y
diff --git a/configs/gardena-smart-gateway-mt7688_defconfig b/configs/gardena-smart-gateway-mt7688_defconfig
index 5d3d7c9f04..b4ed551b43 100644
--- a/configs/gardena-smart-gateway-mt7688_defconfig
+++ b/configs/gardena-smart-gateway-mt7688_defconfig
@@ -53,6 +53,7 @@ CONFIG_LED=y
 CONFIG_LED_BLINK=y
 CONFIG_LED_GPIO=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_SPI_NAND=y
 CONFIG_SPI_FLASH=y
diff --git a/configs/goflexhome_defconfig b/configs/goflexhome_defconfig
index 3d51c0de82..33de608b6f 100644
--- a/configs/goflexhome_defconfig
+++ b/configs/goflexhome_defconfig
@@ -37,6 +37,7 @@ CONFIG_MVSATA_IDE=y
 CONFIG_BLK=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
diff --git a/configs/guruplug_defconfig b/configs/guruplug_defconfig
index 18346e59af..23e550ae07 100644
--- a/configs/guruplug_defconfig
+++ b/configs/guruplug_defconfig
@@ -37,6 +37,7 @@ CONFIG_MVSATA_IDE=y
 CONFIG_BLK=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index 6b343bf7b3..d8462001ea 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -65,6 +65,7 @@ CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_PHYLIB=y
 CONFIG_E1000=y
 CONFIG_MII=y
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
index 48ce0112ae..bb87d7728e 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -65,6 +65,7 @@ CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_PHYLIB=y
 CONFIG_MV88E61XX_SWITCH=y
 CONFIG_MV88E61XX_CPU_PORT=5
diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig
index d53210e204..21ffa20bff 100644
--- a/configs/gwventana_nand_defconfig
+++ b/configs/gwventana_nand_defconfig
@@ -68,6 +68,7 @@ CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
diff --git a/configs/ib62x0_defconfig b/configs/ib62x0_defconfig
index 89eb677664..df79f314d2 100644
--- a/configs/ib62x0_defconfig
+++ b/configs/ib62x0_defconfig
@@ -33,6 +33,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
diff --git a/configs/iconnect_defconfig b/configs/iconnect_defconfig
index 47ddd62ea0..c93a3d6992 100644
--- a/configs/iconnect_defconfig
+++ b/configs/iconnect_defconfig
@@ -28,6 +28,7 @@ CONFIG_DEFAULT_DEVICE_TREE="kirkwood-iconnect"
 CONFIG_ENV_IS_IN_NAND=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
diff --git a/configs/imx6dl_icore_nand_defconfig b/configs/imx6dl_icore_nand_defconfig
index e0fac8e60a..a93194bf3b 100644
--- a/configs/imx6dl_icore_nand_defconfig
+++ b/configs/imx6dl_icore_nand_defconfig
@@ -42,6 +42,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
diff --git a/configs/imx6q_icore_nand_defconfig b/configs/imx6q_icore_nand_defconfig
index 9b01bc3555..0dc81f026c 100644
--- a/configs/imx6q_icore_nand_defconfig
+++ b/configs/imx6q_icore_nand_defconfig
@@ -43,6 +43,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
index 110f91c4b2..ae3395a5bc 100644
--- a/configs/imx6q_logic_defconfig
+++ b/configs/imx6q_logic_defconfig
@@ -68,6 +68,8 @@ CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_FSL_USDHC=y
 CONFIG_DM_MTD=y
+CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_MXS=y
diff --git a/configs/imx6qdl_icore_mmc_defconfig b/configs/imx6qdl_icore_mmc_defconfig
index 2e8721e559..c497aee973 100644
--- a/configs/imx6qdl_icore_mmc_defconfig
+++ b/configs/imx6qdl_icore_mmc_defconfig
@@ -57,6 +57,7 @@ CONFIG_SYS_BOOTCOUNT_MAGIC=0x0B01C041
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
diff --git a/configs/imx6qdl_icore_nand_defconfig b/configs/imx6qdl_icore_nand_defconfig
index 9b01bc3555..0dc81f026c 100644
--- a/configs/imx6qdl_icore_nand_defconfig
+++ b/configs/imx6qdl_icore_nand_defconfig
@@ -43,6 +43,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
diff --git a/configs/imx6ul_geam_nand_defconfig b/configs/imx6ul_geam_nand_defconfig
index 86fdc61690..77fa6da182 100644
--- a/configs/imx6ul_geam_nand_defconfig
+++ b/configs/imx6ul_geam_nand_defconfig
@@ -43,6 +43,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
diff --git a/configs/imx6ul_isiot_nand_defconfig b/configs/imx6ul_isiot_nand_defconfig
index 95beb0a143..fe9e5c1dcc 100644
--- a/configs/imx6ul_isiot_nand_defconfig
+++ b/configs/imx6ul_isiot_nand_defconfig
@@ -43,6 +43,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig
index a74b6e565b..3ffba36dff 100644
--- a/configs/k2e_evm_defconfig
+++ b/configs/k2e_evm_defconfig
@@ -45,6 +45,7 @@ CONFIG_TI_AEMIF=y
 CONFIG_MISC=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
diff --git a/configs/k2e_hs_evm_defconfig b/configs/k2e_hs_evm_defconfig
index 15982f7c6d..8d494e6804 100644
--- a/configs/k2e_hs_evm_defconfig
+++ b/configs/k2e_hs_evm_defconfig
@@ -37,6 +37,7 @@ CONFIG_TI_AEMIF=y
 CONFIG_MISC=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index bfcd616824..0346558c69 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -45,6 +45,7 @@ CONFIG_MISC=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
diff --git a/configs/k2g_hs_evm_defconfig b/configs/k2g_hs_evm_defconfig
index 7cc7f77e28..b28f4a7da9 100644
--- a/configs/k2g_hs_evm_defconfig
+++ b/configs/k2g_hs_evm_defconfig
@@ -38,6 +38,7 @@ CONFIG_MISC=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index 7d33520de4..01c8be6201 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -45,6 +45,7 @@ CONFIG_TI_AEMIF=y
 CONFIG_MISC=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig
index 8b3b70d2b8..d9ed31f5fc 100644
--- a/configs/k2hk_hs_evm_defconfig
+++ b/configs/k2hk_hs_evm_defconfig
@@ -37,6 +37,7 @@ CONFIG_TI_AEMIF=y
 CONFIG_MISC=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index b781cccb40..00cc1a563f 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -45,6 +45,7 @@ CONFIG_TI_AEMIF=y
 CONFIG_MISC=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
diff --git a/configs/k2l_hs_evm_defconfig b/configs/k2l_hs_evm_defconfig
index 916de8f56e..79cca378b4 100644
--- a/configs/k2l_hs_evm_defconfig
+++ b/configs/k2l_hs_evm_defconfig
@@ -36,6 +36,7 @@ CONFIG_TI_AEMIF=y
 CONFIG_MISC=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig
index 10b33ab7ad..2f7a9e328c 100644
--- a/configs/km_kirkwood_128m16_defconfig
+++ b/configs/km_kirkwood_128m16_defconfig
@@ -37,6 +37,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=8100000
diff --git a/configs/km_kirkwood_defconfig b/configs/km_kirkwood_defconfig
index 199bb3c2fe..db60a113bf 100644
--- a/configs/km_kirkwood_defconfig
+++ b/configs/km_kirkwood_defconfig
@@ -37,6 +37,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=8100000
diff --git a/configs/km_kirkwood_pci_defconfig b/configs/km_kirkwood_pci_defconfig
index 7ff7ccf00d..5ff8c2842c 100644
--- a/configs/km_kirkwood_pci_defconfig
+++ b/configs/km_kirkwood_pci_defconfig
@@ -38,6 +38,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=8100000
diff --git a/configs/kmcoge4_defconfig b/configs/kmcoge4_defconfig
index 7ee4ce44aa..653ab00f4a 100644
--- a/configs/kmcoge4_defconfig
+++ b/configs/kmcoge4_defconfig
@@ -39,6 +39,8 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_MODE=0
 CONFIG_SF_DEFAULT_SPEED=20000000
diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig
index b66665416d..0a5b798d96 100644
--- a/configs/kmcoge5ne_defconfig
+++ b/configs/kmcoge5ne_defconfig
@@ -181,6 +181,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig
index 3ab3671faa..45c528a64f 100644
--- a/configs/kmcoge5un_defconfig
+++ b/configs/kmcoge5un_defconfig
@@ -40,6 +40,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=8100000
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index 369ba6a9d4..4da683c3a2 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -145,6 +145,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig
index 9ce041e1bd..aae2106187 100644
--- a/configs/kmnusa_defconfig
+++ b/configs/kmnusa_defconfig
@@ -40,6 +40,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=8100000
diff --git a/configs/kmopti2_defconfig b/configs/kmopti2_defconfig
index a72dc7f808..5abb694e18 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -165,6 +165,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig
index d67b4bc4b6..0bd6d9fa33 100644
--- a/configs/kmsugp1_defconfig
+++ b/configs/kmsugp1_defconfig
@@ -40,6 +40,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=8100000
diff --git a/configs/kmsupx5_defconfig b/configs/kmsupx5_defconfig
index 8ce90cd23f..1004cedccc 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -145,6 +145,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig
index 141f5e7e01..f813a76430 100644
--- a/configs/kmsuv31_defconfig
+++ b/configs/kmsuv31_defconfig
@@ -39,6 +39,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=8100000
diff --git a/configs/kmtegr1_defconfig b/configs/kmtegr1_defconfig
index e13bd84a45..276dbeacdf 100644
--- a/configs/kmtegr1_defconfig
+++ b/configs/kmtegr1_defconfig
@@ -145,6 +145,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig
index c131d7f2ef..7dc5bef99e 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -165,6 +165,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/m53menlo_defconfig b/configs/m53menlo_defconfig
index 2b16c1d403..9c8cbf9378 100644
--- a/configs/m53menlo_defconfig
+++ b/configs/m53menlo_defconfig
@@ -64,6 +64,7 @@ CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_FSL_ESDHC_IMX=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_MXC=y
diff --git a/configs/mgcoge3un_defconfig b/configs/mgcoge3un_defconfig
index 51b5358e69..6844600c57 100644
--- a/configs/mgcoge3un_defconfig
+++ b/configs/mgcoge3un_defconfig
@@ -39,6 +39,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=8100000
diff --git a/configs/mx28evk_auart_console_defconfig b/configs/mx28evk_auart_console_defconfig
index f434ee0c34..cdbfffca87 100644
--- a/configs/mx28evk_auart_console_defconfig
+++ b/configs/mx28evk_auart_console_defconfig
@@ -41,6 +41,7 @@ CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MXS_GPIO=y
 CONFIG_MMC_MXS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_MII=y
diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig
index 3f96f07586..207ebd4be1 100644
--- a/configs/mx28evk_defconfig
+++ b/configs/mx28evk_defconfig
@@ -41,6 +41,7 @@ CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MXS_GPIO=y
 CONFIG_MMC_MXS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_MII=y
diff --git a/configs/mx28evk_nand_defconfig b/configs/mx28evk_nand_defconfig
index 81856e2286..cc536aa297 100644
--- a/configs/mx28evk_nand_defconfig
+++ b/configs/mx28evk_nand_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MXS_GPIO=y
 CONFIG_MMC_MXS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_MII=y
diff --git a/configs/mx28evk_spi_defconfig b/configs/mx28evk_spi_defconfig
index 6867c17209..7fcd068356 100644
--- a/configs/mx28evk_spi_defconfig
+++ b/configs/mx28evk_spi_defconfig
@@ -39,6 +39,7 @@ CONFIG_CMD_UBI=y
 CONFIG_MXS_GPIO=y
 CONFIG_MMC_MXS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_MII=y
diff --git a/configs/nas220_defconfig b/configs/nas220_defconfig
index 27dd7752db..9d194a2f6a 100644
--- a/configs/nas220_defconfig
+++ b/configs/nas220_defconfig
@@ -33,6 +33,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-blackarmor-nas220"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
diff --git a/configs/nsa310s_defconfig b/configs/nsa310s_defconfig
index df49fd8498..e950f6aabf 100644
--- a/configs/nsa310s_defconfig
+++ b/configs/nsa310s_defconfig
@@ -30,6 +30,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
diff --git a/configs/omap35_logic_defconfig b/configs/omap35_logic_defconfig
index a1fd2c1fb0..5decb71008 100644
--- a/configs/omap35_logic_defconfig
+++ b/configs/omap35_logic_defconfig
@@ -48,6 +48,7 @@ CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
diff --git a/configs/omap35_logic_somlv_defconfig b/configs/omap35_logic_somlv_defconfig
index 9773464d04..fe97a2f1a8 100644
--- a/configs/omap35_logic_somlv_defconfig
+++ b/configs/omap35_logic_somlv_defconfig
@@ -47,6 +47,7 @@ CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig
index ed7cb8f2ff..a4fd5cd494 100644
--- a/configs/omap3_beagle_defconfig
+++ b/configs/omap3_beagle_defconfig
@@ -68,6 +68,7 @@ CONFIG_TWL4030_LED=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
diff --git a/configs/omap3_evm_defconfig b/configs/omap3_evm_defconfig
index 2670dfb1e6..0aa6ed3f10 100644
--- a/configs/omap3_evm_defconfig
+++ b/configs/omap3_evm_defconfig
@@ -55,6 +55,7 @@ CONFIG_DM_MMC=y
 # CONFIG_SPL_DM_MMC is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
diff --git a/configs/omap3_ha_defconfig b/configs/omap3_ha_defconfig
index 12ce30659f..a78fc386bb 100644
--- a/configs/omap3_ha_defconfig
+++ b/configs/omap3_ha_defconfig
@@ -29,6 +29,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPL_NAND_SIMPLE=y
diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
index bc7334cef5..50172b2c10 100644
--- a/configs/omap3_logic_defconfig
+++ b/configs/omap3_logic_defconfig
@@ -47,6 +47,7 @@ CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MMC_OMAP36XX_PINS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
diff --git a/configs/omap3_logic_somlv_defconfig b/configs/omap3_logic_somlv_defconfig
index c2fac5b7c5..c6ac4e5682 100644
--- a/configs/omap3_logic_somlv_defconfig
+++ b/configs/omap3_logic_somlv_defconfig
@@ -48,6 +48,7 @@ CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MMC_OMAP36XX_PINS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/omap3_overo_defconfig b/configs/omap3_overo_defconfig
index a5069fd964..e8b18bdddd 100644
--- a/configs/omap3_overo_defconfig
+++ b/configs/omap3_overo_defconfig
@@ -37,6 +37,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPL_NAND_SIMPLE=y
diff --git a/configs/omap3_pandora_defconfig b/configs/omap3_pandora_defconfig
index d8ee7995de..1e33be3c39 100644
--- a/configs/omap3_pandora_defconfig
+++ b/configs/omap3_pandora_defconfig
@@ -31,6 +31,7 @@ CONFIG_DM=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_DM_SERIAL=y
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index ba42133e94..fee278907b 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -47,6 +47,7 @@ CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
 CONFIG_NAND_DAVINCI=y
diff --git a/configs/openrd_base_defconfig b/configs/openrd_base_defconfig
index b7e05a8039..ea0c6f719d 100644
--- a/configs/openrd_base_defconfig
+++ b/configs/openrd_base_defconfig
@@ -35,6 +35,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC_HW_PARTITIONING is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
diff --git a/configs/openrd_client_defconfig b/configs/openrd_client_defconfig
index 731e5cb1df..150de1f7c8 100644
--- a/configs/openrd_client_defconfig
+++ b/configs/openrd_client_defconfig
@@ -33,6 +33,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-openrd-client"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC_HW_PARTITIONING is not set
diff --git a/configs/openrd_ultimate_defconfig b/configs/openrd_ultimate_defconfig
index fd6fe37ae9..b6f8f078d9 100644
--- a/configs/openrd_ultimate_defconfig
+++ b/configs/openrd_ultimate_defconfig
@@ -33,6 +33,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-openrd-ultimate"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC_HW_PARTITIONING is not set
diff --git a/configs/pcm052_defconfig b/configs/pcm052_defconfig
index ad744c86e8..0525a97830 100644
--- a/configs/pcm052_defconfig
+++ b/configs/pcm052_defconfig
@@ -42,6 +42,7 @@ CONFIG_DM_MMC=y
 CONFIG_FSL_ESDHC_IMX=y
 CONFIG_DM_MTD=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_NAND_VF610_NFC_DT=y
diff --git a/configs/pcm058_defconfig b/configs/pcm058_defconfig
index f617d130d6..6ca24c0007 100644
--- a/configs/pcm058_defconfig
+++ b/configs/pcm058_defconfig
@@ -46,6 +46,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_DM=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_USE_FLASH_BBT=y
diff --git a/configs/pfla02_defconfig b/configs/pfla02_defconfig
index f80240b25a..970670d0ab 100644
--- a/configs/pfla02_defconfig
+++ b/configs/pfla02_defconfig
@@ -45,6 +45,7 @@ CONFIG_CMD_UBI=y
 CONFIG_DM=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
diff --git a/configs/platinum_picon_defconfig b/configs/platinum_picon_defconfig
index b850e2cbc9..86763c85fd 100644
--- a/configs/platinum_picon_defconfig
+++ b/configs/platinum_picon_defconfig
@@ -50,6 +50,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
diff --git a/configs/platinum_titanium_defconfig b/configs/platinum_titanium_defconfig
index 88d6d5302d..f5e8b7038e 100644
--- a/configs/platinum_titanium_defconfig
+++ b/configs/platinum_titanium_defconfig
@@ -50,6 +50,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
diff --git a/configs/pogo_e02_defconfig b/configs/pogo_e02_defconfig
index a1998f62ce..5aace219a4 100644
--- a/configs/pogo_e02_defconfig
+++ b/configs/pogo_e02_defconfig
@@ -28,6 +28,7 @@ CONFIG_DEFAULT_DEVICE_TREE="kirkwood-pogo_e02"
 CONFIG_ENV_IS_IN_NAND=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig
index ab3d1d0d32..94c32be666 100644
--- a/configs/sama5d3_xplained_mmc_defconfig
+++ b/configs/sama5d3_xplained_mmc_defconfig
@@ -63,6 +63,7 @@ CONFIG_AT91_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 # CONFIG_SYS_NAND_USE_FLASH_BBT is not set
 CONFIG_NAND_ATMEL=y
diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig
index 5f12455d47..9b30ee8efc 100644
--- a/configs/sama5d3_xplained_nandflash_defconfig
+++ b/configs/sama5d3_xplained_nandflash_defconfig
@@ -59,6 +59,7 @@ CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 # CONFIG_SYS_NAND_USE_FLASH_BBT is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_PMECC_CAP=4
diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
index 75682298ec..54bb1f5a5e 100644
--- a/configs/sheevaplug_defconfig
+++ b/configs/sheevaplug_defconfig
@@ -35,6 +35,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-sheevaplug"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index 7517df6e1e..983e04dddb 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -43,6 +43,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index 1c576cedfe..559d820ea3 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -43,6 +43,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
index f677149bec..273803d7e9 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_defconfig
@@ -43,6 +43,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_DM_ETH=y
diff --git a/configs/socfpga_is1_defconfig b/configs/socfpga_is1_defconfig
index 274e2aa382..aff5e5b05a 100644
--- a/configs/socfpga_is1_defconfig
+++ b/configs/socfpga_is1_defconfig
@@ -41,6 +41,7 @@ CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DW=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHY_MICREL=y
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
index 8e804a425f..dce6ef56e1 100644
--- a/configs/socfpga_sockit_defconfig
+++ b/configs/socfpga_sockit_defconfig
@@ -43,6 +43,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index 7c78fa3224..7455ffcabd 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -44,6 +44,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index e4286e5415..214edf46c3 100644
--- a/configs/socfpga_sr1500_defconfig
+++ b/configs/socfpga_sr1500_defconfig
@@ -45,6 +45,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=100000000
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/suvd3_defconfig b/configs/suvd3_defconfig
index 9c45501038..41de60b39a 100644
--- a/configs/suvd3_defconfig
+++ b/configs/suvd3_defconfig
@@ -166,6 +166,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/tao3530_defconfig b/configs/tao3530_defconfig
index 1fa5f010b1..72b1fb5c98 100644
--- a/configs/tao3530_defconfig
+++ b/configs/tao3530_defconfig
@@ -29,6 +29,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPL_NAND_SIMPLE=y
diff --git a/configs/titanium_defconfig b/configs/titanium_defconfig
index 3bd9262a4f..13675885c3 100644
--- a/configs/titanium_defconfig
+++ b/configs/titanium_defconfig
@@ -36,6 +36,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_FSL_USDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
diff --git a/configs/tricorder_defconfig b/configs/tricorder_defconfig
index 5c1404f4f0..4d22c63454 100644
--- a/configs/tricorder_defconfig
+++ b/configs/tricorder_defconfig
@@ -41,6 +41,7 @@ CONFIG_LED_STATUS_CMD=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPL_NAND_SIMPLE=y
 CONFIG_CONS_INDEX=3
diff --git a/configs/tricorder_flash_defconfig b/configs/tricorder_flash_defconfig
index fbcce5f6bc..c957bd4ea2 100644
--- a/configs/tricorder_flash_defconfig
+++ b/configs/tricorder_flash_defconfig
@@ -39,6 +39,7 @@ CONFIG_LED_STATUS_CMD=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPL_NAND_SIMPLE=y
 CONFIG_CONS_INDEX=3
diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig
index 3ddcad39d4..d5ef094716 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -145,6 +145,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/tuxx1_defconfig b/configs/tuxx1_defconfig
index 621e4ece7e..d3d4230626 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -167,6 +167,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig
index 4f22f3eefa..0602bf89ce 100644
--- a/configs/uniphier_ld4_sld8_defconfig
+++ b/configs/uniphier_ld4_sld8_defconfig
@@ -45,6 +45,7 @@ CONFIG_MMC_UNIPHIER=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DENALI_DT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
diff --git a/configs/uniphier_v7_defconfig b/configs/uniphier_v7_defconfig
index f41c61f7bd..9315ffa5f7 100644
--- a/configs/uniphier_v7_defconfig
+++ b/configs/uniphier_v7_defconfig
@@ -44,6 +44,7 @@ CONFIG_MMC_UNIPHIER=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DENALI_DT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
diff --git a/configs/uniphier_v8_defconfig b/configs/uniphier_v8_defconfig
index 78a872e157..7a4f78b0b8 100644
--- a/configs/uniphier_v8_defconfig
+++ b/configs/uniphier_v8_defconfig
@@ -45,6 +45,7 @@ CONFIG_MMC_SDHCI_CADENCE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DENALI_DT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
diff --git a/configs/vct_platinum_onenand_defconfig b/configs/vct_platinum_onenand_defconfig
index 1d3d405d8e..5cb798859c 100644
--- a/configs/vct_platinum_onenand_defconfig
+++ b/configs/vct_platinum_onenand_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_ENV_IS_IN_ONENAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SMC911X=y
 CONFIG_SMC911X_BASE=0x00000000
 CONFIG_SMC911X_32_BIT=y
diff --git a/configs/vct_platinum_onenand_small_defconfig b/configs/vct_platinum_onenand_small_defconfig
index 50adb73129..00fc222710 100644
--- a/configs/vct_platinum_onenand_small_defconfig
+++ b/configs/vct_platinum_onenand_small_defconfig
@@ -30,4 +30,5 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_ONENAND=y
 # CONFIG_NET is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/vct_platinumavc_onenand_defconfig b/configs/vct_platinumavc_onenand_defconfig
index 692fae7036..f9f598b3cb 100644
--- a/configs/vct_platinumavc_onenand_defconfig
+++ b/configs/vct_platinumavc_onenand_defconfig
@@ -21,5 +21,6 @@ CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_ONENAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SYS_NS16550=y
 # CONFIG_REGEX is not set
diff --git a/configs/vct_platinumavc_onenand_small_defconfig b/configs/vct_platinumavc_onenand_small_defconfig
index bcf39bc1ed..be06cf5aac 100644
--- a/configs/vct_platinumavc_onenand_small_defconfig
+++ b/configs/vct_platinumavc_onenand_small_defconfig
@@ -30,4 +30,5 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_ONENAND=y
 # CONFIG_NET is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/vct_premium_onenand_defconfig b/configs/vct_premium_onenand_defconfig
index 2e87bdf358..fea07c1916 100644
--- a/configs/vct_premium_onenand_defconfig
+++ b/configs/vct_premium_onenand_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_ENV_IS_IN_ONENAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SMC911X=y
 CONFIG_SMC911X_BASE=0x00000000
 CONFIG_SMC911X_32_BIT=y
diff --git a/configs/vct_premium_onenand_small_defconfig b/configs/vct_premium_onenand_small_defconfig
index 93fd4299d2..998c5d3ef5 100644
--- a/configs/vct_premium_onenand_small_defconfig
+++ b/configs/vct_premium_onenand_small_defconfig
@@ -30,4 +30,5 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_ONENAND=y
 # CONFIG_NET is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/vf610twr_defconfig b/configs/vf610twr_defconfig
index 92c3299b4f..46e2ee9321 100644
--- a/configs/vf610twr_defconfig
+++ b/configs/vf610twr_defconfig
@@ -33,6 +33,7 @@ CONFIG_DM_GPIO=y
 CONFIG_VYBRID_GPIO=y
 CONFIG_FSL_ESDHC_IMX=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
diff --git a/configs/vf610twr_nand_defconfig b/configs/vf610twr_nand_defconfig
index b9a046ef8e..e8113f6684 100644
--- a/configs/vf610twr_nand_defconfig
+++ b/configs/vf610twr_nand_defconfig
@@ -33,6 +33,7 @@ CONFIG_DM_GPIO=y
 CONFIG_VYBRID_GPIO=y
 CONFIG_FSL_ESDHC_IMX=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
diff --git a/configs/x600_defconfig b/configs/x600_defconfig
index 33f67c8a0f..7267955fa3 100644
--- a/configs/x600_defconfig
+++ b/configs/x600_defconfig
@@ -51,6 +51,7 @@ CONFIG_SYS_I2C_DW=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_MICREL=y
diff --git a/include/env_internal.h b/include/env_internal.h
index b1ddcb5adf..801edfa23a 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -107,8 +107,8 @@ extern unsigned long nand_env_oob_offset;
 # ifndef CONFIG_ENV_SIZE
 #  error "Need to define CONFIG_ENV_SIZE when using CONFIG_ENV_IS_IN_UBI"
 # endif
-# ifndef CONFIG_CMD_UBI
-#  error "Need to define CONFIG_CMD_UBI when using CONFIG_ENV_IS_IN_UBI"
+# ifndef CONFIG_MTD_UBI
+#  error "Need to define CONFIG_MTD_UBI when using CONFIG_ENV_IS_IN_UBI"
 # endif
 #endif /* CONFIG_ENV_IS_IN_UBI */
 
