From 81a26131bdf5d094c9d2cda89a06dca90f9084a1 Mon Sep 17 00:00:00 2001 From: Justin Klaassen Date: Fri, 23 May 2025 16:53:37 +0000 Subject: rockchip: io-domain: Add debug logging for regulators during probe Log the value of the regulators during initialization of the IO-domain driver to aid in debugging GPIO voltage configuration problems. Signed-off-by: Justin Klaassen Reviewed-by: Quentin Schulz Reviewed-by: Kever Yang --- drivers/misc/rockchip-io-domain.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/misc') diff --git a/drivers/misc/rockchip-io-domain.c b/drivers/misc/rockchip-io-domain.c index 025b6049a9f..a0573c52193 100644 --- a/drivers/misc/rockchip-io-domain.c +++ b/drivers/misc/rockchip-io-domain.c @@ -344,8 +344,10 @@ static int rockchip_iodomain_probe(struct udevice *dev) continue; ret = device_get_supply_regulator(dev, supply_name, ®); - if (ret) + if (ret) { + dev_dbg(dev, "%s: Regulator not found\n", supply_name); continue; + } ret = regulator_autoset(reg); if (ret && ret != -EALREADY && ret != -EMEDIUMTYPE && @@ -353,6 +355,7 @@ static int rockchip_iodomain_probe(struct udevice *dev) continue; uV = regulator_get_value(reg); + dev_dbg(dev, "%s: Regulator %s at %d uV\n", supply_name, reg->name, uV); if (uV <= 0) continue; -- cgit v1.2.3 From 83b1d04765de8aa9cfaa76d2db37b493a46cf504 Mon Sep 17 00:00:00 2001 From: Justin Klaassen Date: Fri, 23 May 2025 16:53:38 +0000 Subject: rockchip: io-domain: Add CONFIG_SPL_ROCKCHIP_IODOMAIN Allows use of the Rockchip IO-domain driver in SPL to configure the GPIO to match the voltage supplied by specific regulators (e.g. "vcc_sdio"). Signed-off-by: Justin Klaassen Reviewed-by: Quentin Schulz Reviewed-by: Kever Yang --- drivers/misc/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/misc') diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index ffc5868c0dd..8b8f6309ada 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -114,6 +114,14 @@ config ROCKCHIP_IODOMAIN for the IO-domain setting of the SoC to match the voltage supplied by the regulators. +config SPL_ROCKCHIP_IODOMAIN + bool "Rockchip IO-domain driver support in SPL" + depends on SPL_MISC && SPL_DM_REGULATOR && ARCH_ROCKCHIP + help + Enable support for IO-domains in Rockchip SoCs in SPL. It is necessary + for the IO-domain setting of the SoC to match the voltage supplied + by the regulators. + config SIFIVE_OTP bool "SiFive eMemory OTP driver" depends on MISC -- cgit v1.2.3