1 From 232af1e58a977f3857074d3aba3709c860bd8058 Mon Sep 17 00:00:00 2001
2 From: Jonas Karlman <jonas@kwiboo.se>
3 Date: Fri, 2 Aug 2024 22:12:22 +0000
4 Subject: [PATCH] dm: adc: Add SPL_ADC Kconfig symbol for use of ADC in SPL
6 What model of Radxa ZERO 3W/3E board can be identified using ADC at
7 runtime, add a Kconfig symbol to allow use of ADC in SPL.
9 This will be used to identify board model in SPL to allow loading
10 correct FIT configuration and FDT for U-Boot proper at SPL phase.
12 Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
13 Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 drivers/Makefile | 2 +-
16 drivers/adc/Kconfig | 5 +++++
17 drivers/adc/Makefile | 2 +-
18 3 files changed, 7 insertions(+), 2 deletions(-)
20 --- a/drivers/Makefile
21 +++ b/drivers/Makefile
23 # SPDX-License-Identifier: GPL-2.0+
25 +obj-$(CONFIG_$(SPL_TPL_)ADC) += adc/
26 obj-$(CONFIG_$(SPL_TPL_)BIOSEMU) += bios_emulator/
27 obj-$(CONFIG_$(SPL_TPL_)BLK) += block/
28 obj-$(CONFIG_$(SPL_TPL_)BOOTCOUNT_LIMIT) += bootcount/
29 @@ -81,7 +82,6 @@ endif
31 ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
35 obj-$(CONFIG_DM_DEMO) += demo/
37 --- a/drivers/adc/Kconfig
38 +++ b/drivers/adc/Kconfig
41 bool "Enable ADC drivers using Driver Model"
44 This enables ADC API for drivers, which allows driving ADC features
45 by single and multi-channel methods for:
46 @@ -11,6 +12,10 @@ config ADC
47 - support supply's phandle with auto-enable
48 - supply polarity setting in fdt
51 + bool "Enable ADC drivers using Driver Model in SPL"
55 bool "Enable Exynos 54xx ADC driver"
57 --- a/drivers/adc/Makefile
58 +++ b/drivers/adc/Makefile
60 # Przemyslaw Marczak <p.marczak@samsung.com>
63 -obj-$(CONFIG_ADC) += adc-uclass.o
64 +obj-$(CONFIG_$(SPL_TPL_)ADC) += adc-uclass.o
65 obj-$(CONFIG_ADC_EXYNOS) += exynos-adc.o
66 obj-$(CONFIG_ADC_SANDBOX) += sandbox.o
67 obj-$(CONFIG_SARADC_ROCKCHIP) += rockchip-saradc.o