* [PATCH 1/3] board: adi: Build SOMCRR common code only with a carrier board
2026-10-30 14:01 [PATCH 0/3] SC5xx Carrier Board Kconfig Cleanup Caleb Ethridge
@ 2026-10-30 14:01 ` Caleb Ethridge
2026-10-30 14:01 ` [PATCH 2/3] arm: mach-sc5xx: Make the SC5xx board target select the " Caleb Ethridge
2026-10-30 14:01 ` [PATCH 3/3] configs: sc598-som-ezlite: drop explicit carrier board option Caleb Ethridge
2 siblings, 0 replies; 4+ messages in thread
From: Caleb Ethridge @ 2026-10-30 14:01 UTC (permalink / raw)
To: u-boot; +Cc: Tom Rini, malysagreg, linux, philip, Caleb Ethridge
From: Caleb Ethridge <caleb.ethridge@analog.com>
somcrr_common.c calls adi_somcrr_enable_ethernet() and
adi_somcrr_disable_ethernet(), which are only provided by the
carrier-specific files. It is built unconditionally, so a SOM built
without a carrier board would be left with undefined references.
Add an ADI_CARRIER_SOMCRR_COMMON symbol, selected by each carrier
board option, and only build somcrr_common.o when it is enabled.
Signed-off-by: Caleb Ethridge <caleb.ethridge@analog.com>
---
arch/arm/mach-sc5xx/Kconfig | 8 ++++++++
board/adi/carriers/Makefile | 2 +-
board/adi/common-sc594-som/sc594-som.c | 4 +---
board/adi/common-sc598-som/sc598-som.c | 4 +---
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig
index 0f4e63a355e..cf154c221eb 100644
--- a/arch/arm/mach-sc5xx/Kconfig
+++ b/arch/arm/mach-sc5xx/Kconfig
@@ -210,6 +210,12 @@ config ADI_BUG_EZKHW21
This workaround affects the SC584 EZKIT and addresses bug EZKHW21.
It disables gigabit ethernet mode and limits the board to 100 Mbps
+config ADI_CARRIER_SOMCRR_COMMON
+ bool
+ help
+ Common code shared by the EV-SOMCRR carrier board support.
+ Selected by the carrier board options.
+
choice
prompt "Analog Devices SOM Carrier Board Variant"
depends on (SC59X || SC59X_64)
@@ -220,12 +226,14 @@ choice
config ADI_CARRIER_SOMCRR_EZKIT
bool "Support the EV-SOMCRR-EZKIT"
+ select ADI_CARRIER_SOMCRR_COMMON
help
Say y to include support for the EV-SOMCRR-EZKIT carrier board,
which is compatible with the SC594 and SC598 SOMs.
config ADI_CARRIER_SOMCRR_EZLITE
bool "Support the EV-SOMCRR-EZLITE"
+ select ADI_CARRIER_SOMCRR_COMMON
help
Say y to include support for the EV-SOMCRR-EZLITE carrier board,
which is compatible with the SC594 and SC598 SOMs.
diff --git a/board/adi/carriers/Makefile b/board/adi/carriers/Makefile
index cefd2cc837f..ccb44e262fe 100644
--- a/board/adi/carriers/Makefile
+++ b/board/adi/carriers/Makefile
@@ -3,6 +3,6 @@
# (C) Copyright 2024 - Analog Devices, Inc.
#
-obj-y += somcrr_common.o
+obj-$(CONFIG_ADI_CARRIER_SOMCRR_COMMON) += somcrr_common.o
obj-$(CONFIG_ADI_CARRIER_SOMCRR_EZKIT) += somcrr_ezkit.o
obj-$(CONFIG_ADI_CARRIER_SOMCRR_EZLITE) += somcrr_ezlite.o
diff --git a/board/adi/common-sc594-som/sc594-som.c b/board/adi/common-sc594-som/sc594-som.c
index 37817c4b062..136548b4f35 100644
--- a/board/adi/common-sc594-som/sc594-som.c
+++ b/board/adi/common-sc594-som/sc594-som.c
@@ -23,10 +23,8 @@ int board_init(void)
{
sc59x_remap_ospi();
- if (IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_EZKIT) ||
- IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_EZLITE)) {
+ if (IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_COMMON))
adi_somcrr_init_ethernet();
- }
sc5xx_enable_rgmii();
diff --git a/board/adi/common-sc598-som/sc598-som.c b/board/adi/common-sc598-som/sc598-som.c
index 0e1ee828956..51c96fd69c8 100644
--- a/board/adi/common-sc598-som/sc598-som.c
+++ b/board/adi/common-sc598-som/sc598-som.c
@@ -23,10 +23,8 @@ int board_init(void)
{
sc59x_remap_ospi();
- if (IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_EZKIT) ||
- IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_EZLITE)) {
+ if (IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_COMMON))
adi_somcrr_init_ethernet();
- }
sc5xx_enable_rgmii();
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/3] arm: mach-sc5xx: Make the SC5xx board target select the carrier board
2026-10-30 14:01 [PATCH 0/3] SC5xx Carrier Board Kconfig Cleanup Caleb Ethridge
2026-10-30 14:01 ` [PATCH 1/3] board: adi: Build SOMCRR common code only with a carrier board Caleb Ethridge
@ 2026-10-30 14:01 ` Caleb Ethridge
2026-10-30 14:01 ` [PATCH 3/3] configs: sc598-som-ezlite: drop explicit carrier board option Caleb Ethridge
2 siblings, 0 replies; 4+ messages in thread
From: Caleb Ethridge @ 2026-10-30 14:01 UTC (permalink / raw)
To: u-boot; +Cc: Tom Rini, malysagreg, linux, philip, Caleb Ethridge
From: Caleb Ethridge <caleb.ethridge@analog.com>
The TARGET_SC5xx_SOM_* board options pick their carrier board with
"select ADI_CARRIER_SOMCRR_*", but the carrier options are members of a
choice and Kconfig ignores select on choice values. The carrier always
fell back to the choice default instead, so the sc594-som-ezlite was built
with the EZKIT carrier code.
Turn the carrier options into plain bool symbols so that we can
leverage the existing selects in the board targets.
Fixes: 9e24d9a61560 ("arm: SC594-SOM-EZLITE initial support")
Signed-off-by: Caleb Ethridge <caleb.ethridge@analog.com>
---
arch/arm/mach-sc5xx/Kconfig | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig
index cf154c221eb..fe19eb5ff66 100644
--- a/arch/arm/mach-sc5xx/Kconfig
+++ b/arch/arm/mach-sc5xx/Kconfig
@@ -216,29 +216,19 @@ config ADI_CARRIER_SOMCRR_COMMON
Common code shared by the EV-SOMCRR carrier board support.
Selected by the carrier board options.
-choice
- prompt "Analog Devices SOM Carrier Board Variant"
- depends on (SC59X || SC59X_64)
- default ADI_CARRIER_SOMCRR_EZKIT
- help
- Select the specific EV-SOMCRR carrier board that you are using.
- Using a SOM without a carrier board is not supported.
-
config ADI_CARRIER_SOMCRR_EZKIT
- bool "Support the EV-SOMCRR-EZKIT"
+ bool
select ADI_CARRIER_SOMCRR_COMMON
help
- Say y to include support for the EV-SOMCRR-EZKIT carrier board,
- which is compatible with the SC594 and SC598 SOMs.
+ Support for the EV-SOMCRR-EZKIT carrier board, which is compatible
+ with the SC594 and SC598 SOMs. Selected by the board target.
config ADI_CARRIER_SOMCRR_EZLITE
- bool "Support the EV-SOMCRR-EZLITE"
+ bool
select ADI_CARRIER_SOMCRR_COMMON
help
- Say y to include support for the EV-SOMCRR-EZLITE carrier board,
- which is compatible with the SC594 and SC598 SOMs.
-
-endchoice
+ Support for the EV-SOMCRR-EZLITE carrier board, which is compatible
+ with the SC594 and SC598 SOMs. Selected by the board target.
config ADI_SPL_FORCE_BMODE
int "Force the SPL to use this BMODE device during next boot stage"
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 3/3] configs: sc598-som-ezlite: drop explicit carrier board option
2026-10-30 14:01 [PATCH 0/3] SC5xx Carrier Board Kconfig Cleanup Caleb Ethridge
2026-10-30 14:01 ` [PATCH 1/3] board: adi: Build SOMCRR common code only with a carrier board Caleb Ethridge
2026-10-30 14:01 ` [PATCH 2/3] arm: mach-sc5xx: Make the SC5xx board target select the " Caleb Ethridge
@ 2026-10-30 14:01 ` Caleb Ethridge
2 siblings, 0 replies; 4+ messages in thread
From: Caleb Ethridge @ 2026-10-30 14:01 UTC (permalink / raw)
To: u-boot; +Cc: Tom Rini, malysagreg, linux, philip, Caleb Ethridge
From: Caleb Ethridge <caleb.ethridge@analog.com>
ADI_CARRIER_SOMCRR_EZLITE is now a symbol selected by
TARGET_SC598_SOM_EZLITE, remove the explicit carrier board option.
Signed-off-by: Caleb Ethridge <caleb.ethridge@analog.com>
---
configs/sc598-som-ezlite-spl_defconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/configs/sc598-som-ezlite-spl_defconfig b/configs/sc598-som-ezlite-spl_defconfig
index 8d42e9a4d2f..0c15da00ce7 100644
--- a/configs/sc598-som-ezlite-spl_defconfig
+++ b/configs/sc598-som-ezlite-spl_defconfig
@@ -12,7 +12,6 @@ CONFIG_SPL_STACK=0x200E4000
CONFIG_SC59X_64=y
CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_SYS_LOAD_ADDR=0x90000000
-CONFIG_ADI_CARRIER_SOMCRR_EZLITE=y
CONFIG_CGU1_PLL3_DDRCLK=y
CONFIG_CGU1_PLL3_VCO_MSEL=64
CONFIG_CGU1_PLL3_DCLK_DIV=2
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread