diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index aa86994ca7340a7f6e6e0a91f89c2b5d0000a7ac..2857bd6f642c5a11be67539300c2f38e4bd1802b 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1605,6 +1605,7 @@ config SERIAL_STM32_CONSOLE
 
 config SERIAL_MVEBU_UART
 	bool "Marvell EBU serial port support"
+	depends on ARCH_MVEBU || COMPILE_TEST
 	select SERIAL_CORE
 	help
 	  This driver is for Marvell EBU SoC's UART. If you have a machine