* [PATCH v2 1/5] rockchip: io-domain: Add debug logging for regulators during probe
2025-01-28 21:37 [PATCH v2 0/5] rockchip: rk3399: rk3399-nanopi-4: Fix SD power initialization in SPL Justin Klaassen
@ 2025-01-28 21:37 ` Justin Klaassen
2025-02-04 17:16 ` Quentin Schulz
2025-01-28 21:37 ` [PATCH v2 2/5] rockchip: io-domain: Add CONFIG_SPL_ROCKCHIP_IODOMAIN Justin Klaassen
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Justin Klaassen @ 2025-01-28 21:37 UTC (permalink / raw)
To: u-boot
Cc: Justin Klaassen, Jonas Karlman, Kever Yang, Philipp Tomsich,
Philipp Tomsich, Quentin Schulz, Simon Glass, Tom Rini
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 <justin@tidylabs.net>
---
Changes in v2:
- Made added IO-domain driver logs verbose and consistent
drivers/misc/rockchip-io-domain.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/rockchip-io-domain.c b/drivers/misc/rockchip-io-domain.c
index 025b6049a9f..fdefc9c5fe3 100644
--- a/drivers/misc/rockchip-io-domain.c
+++ b/drivers/misc/rockchip-io-domain.c
@@ -5,6 +5,8 @@
* Ported from linux drivers/soc/rockchip/io-domain.c
*/
+#define LOG_CATEGORY UCLASS_NOP
+
#include <dm.h>
#include <dm/device_compat.h>
#include <regmap.h>
@@ -344,8 +346,10 @@ static int rockchip_iodomain_probe(struct udevice *dev)
continue;
ret = device_get_supply_regulator(dev, supply_name, ®);
- if (ret)
+ if (ret) {
+ log_debug("%s: Regulator not found\n", supply_name);
continue;
+ }
ret = regulator_autoset(reg);
if (ret && ret != -EALREADY && ret != -EMEDIUMTYPE &&
@@ -353,6 +357,7 @@ static int rockchip_iodomain_probe(struct udevice *dev)
continue;
uV = regulator_get_value(reg);
+ log_debug("%s: Regulator %s at %d uV\n", supply_name, reg->name, uV);
if (uV <= 0)
continue;
--
2.45.3
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v2 1/5] rockchip: io-domain: Add debug logging for regulators during probe
2025-01-28 21:37 ` [PATCH v2 1/5] rockchip: io-domain: Add debug logging for regulators during probe Justin Klaassen
@ 2025-02-04 17:16 ` Quentin Schulz
2025-02-05 17:13 ` Justin Klaassen
0 siblings, 1 reply; 13+ messages in thread
From: Quentin Schulz @ 2025-02-04 17:16 UTC (permalink / raw)
To: Justin Klaassen, u-boot
Cc: Jonas Karlman, Kever Yang, Philipp Tomsich, Philipp Tomsich,
Simon Glass, Tom Rini
Hi Justin,
On 1/28/25 10:37 PM, Justin Klaassen wrote:
> [You don't often get email from justin@tidylabs.net. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> 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 <justin@tidylabs.net>
> ---
>
> Changes in v2:
> - Made added IO-domain driver logs verbose and consistent
>
> drivers/misc/rockchip-io-domain.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/misc/rockchip-io-domain.c b/drivers/misc/rockchip-io-domain.c
> index 025b6049a9f..fdefc9c5fe3 100644
> --- a/drivers/misc/rockchip-io-domain.c
> +++ b/drivers/misc/rockchip-io-domain.c
> @@ -5,6 +5,8 @@
> * Ported from linux drivers/soc/rockchip/io-domain.c
> */
>
> +#define LOG_CATEGORY UCLASS_NOP
> +
> #include <dm.h>
> #include <dm/device_compat.h>
> #include <regmap.h>
> @@ -344,8 +346,10 @@ static int rockchip_iodomain_probe(struct udevice *dev)
> continue;
>
> ret = device_get_supply_regulator(dev, supply_name, ®);
> - if (ret)
> + if (ret) {
> + log_debug("%s: Regulator not found\n", supply_name);
Can you use dev_dbg() instead?
This would match what we use for other messages in the probe function?
Specifically, it could add the device name in front, which would be
useful when debugging to highlight the IO domain device is the one
requesting this regulator that isn't found.
> continue;
> + }
>
> ret = regulator_autoset(reg);
> if (ret && ret != -EALREADY && ret != -EMEDIUMTYPE &&
> @@ -353,6 +357,7 @@ static int rockchip_iodomain_probe(struct udevice *dev)
> continue;
>
> uV = regulator_get_value(reg);
> + log_debug("%s: Regulator %s at %d uV\n", supply_name, reg->name, uV);
Ditto.
Not sure the reg->name brings a lot since this information could be
derived from supply_name if I'm not mistaken, but I'm not too bothered
by it :)
Cheers,
Quentin
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH v2 1/5] rockchip: io-domain: Add debug logging for regulators during probe
2025-02-04 17:16 ` Quentin Schulz
@ 2025-02-05 17:13 ` Justin Klaassen
0 siblings, 0 replies; 13+ messages in thread
From: Justin Klaassen @ 2025-02-05 17:13 UTC (permalink / raw)
To: Quentin Schulz
Cc: Jonas Karlman, Kever Yang, Philipp Tomsich, Philipp Tomsich,
Simon Glass, Tom Rini, u-boot
Hi Quentin,
On Feb 4, 2025 at 09:16:29, Quentin Schulz <quentin.schulz@cherry.de> wrote:
> Hi Justin,
>
> On 1/28/25 10:37 PM, Justin Klaassen wrote:
>
> [You don't often get email from justin@tidylabs.net. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
>
> 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 <justin@tidylabs.net>
>
> ---
>
>
> Changes in v2:
>
> - Made added IO-domain driver logs verbose and consistent
>
>
> drivers/misc/rockchip-io-domain.c | 7 ++++++-
>
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
>
> diff --git a/drivers/misc/rockchip-io-domain.c
> b/drivers/misc/rockchip-io-domain.c
>
> index 025b6049a9f..fdefc9c5fe3 100644
>
> --- a/drivers/misc/rockchip-io-domain.c
>
> +++ b/drivers/misc/rockchip-io-domain.c
>
> @@ -5,6 +5,8 @@
>
> * Ported from linux drivers/soc/rockchip/io-domain.c
>
> */
>
>
> +#define LOG_CATEGORY UCLASS_NOP
>
> +
>
> #include <dm.h>
>
> #include <dm/device_compat.h>
>
> #include <regmap.h>
>
> @@ -344,8 +346,10 @@ static int rockchip_iodomain_probe(struct udevice
> *dev)
>
> continue;
>
>
> ret = device_get_supply_regulator(dev, supply_name, ®);
>
> - if (ret)
>
> + if (ret) {
>
> + log_debug("%s: Regulator not found\n",
> supply_name);
>
>
> Can you use dev_dbg() instead?
>
Done.
> This would match what we use for other messages in the probe function?
>
> Specifically, it could add the device name in front, which would be
> useful when debugging to highlight the IO domain device is the one
> requesting this regulator that isn't found.
>
> continue;
>
> + }
>
>
> ret = regulator_autoset(reg);
>
> if (ret && ret != -EALREADY && ret != -EMEDIUMTYPE &&
>
> @@ -353,6 +357,7 @@ static int rockchip_iodomain_probe(struct udevice *dev)
>
> continue;
>
>
> uV = regulator_get_value(reg);
>
> + log_debug("%s: Regulator %s at %d uV\n", supply_name,
> reg->name, uV);
>
>
> Ditto.
>
Done.
> Not sure the reg->name brings a lot since this information could be
> derived from supply_name if I'm not mistaken, but I'm not too bothered
> by it 🙂
>
I found reg->name to be helpful when debugging as it made it slightly
easier to find the correct regulator without having to go through a few
levels of redirection in the device tree.
>
> Cheers,
> Quentin
>
>
Thanks,
Justin
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 2/5] rockchip: io-domain: Add CONFIG_SPL_ROCKCHIP_IODOMAIN
2025-01-28 21:37 [PATCH v2 0/5] rockchip: rk3399: rk3399-nanopi-4: Fix SD power initialization in SPL Justin Klaassen
2025-01-28 21:37 ` [PATCH v2 1/5] rockchip: io-domain: Add debug logging for regulators during probe Justin Klaassen
@ 2025-01-28 21:37 ` Justin Klaassen
2025-02-04 17:20 ` Quentin Schulz
2025-01-28 21:37 ` [PATCH v2 3/5] regulator: rk8xx: Add CONFIG_SPL_REGULATOR_RK8XX Justin Klaassen
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Justin Klaassen @ 2025-01-28 21:37 UTC (permalink / raw)
To: u-boot
Cc: Justin Klaassen, Jonas Karlman, Kever Yang, Marek Behún,
Philipp Tomsich, Raymond Mao, Simon Glass, Stefan Roese, Tom Rini,
Wan Yee Lau
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 <justin@tidylabs.net>
---
Changes in v2:
- Added separate patch for added CONFIG_SPL_ROCKCHIP_IODOMAIN Kconfig
drivers/misc/Kconfig | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index da84b35e804..ad935b81ae1 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -110,6 +110,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 && 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
--
2.45.3
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v2 2/5] rockchip: io-domain: Add CONFIG_SPL_ROCKCHIP_IODOMAIN
2025-01-28 21:37 ` [PATCH v2 2/5] rockchip: io-domain: Add CONFIG_SPL_ROCKCHIP_IODOMAIN Justin Klaassen
@ 2025-02-04 17:20 ` Quentin Schulz
2025-02-05 17:14 ` Justin Klaassen
0 siblings, 1 reply; 13+ messages in thread
From: Quentin Schulz @ 2025-02-04 17:20 UTC (permalink / raw)
To: Justin Klaassen, u-boot
Cc: Jonas Karlman, Kever Yang, Marek Behún, Philipp Tomsich,
Raymond Mao, Simon Glass, Stefan Roese, Tom Rini, Wan Yee Lau
Hi Justin
On 1/28/25 10:37 PM, Justin Klaassen wrote:
> 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 <justin@tidylabs.net>
> ---
>
> Changes in v2:
> - Added separate patch for added CONFIG_SPL_ROCKCHIP_IODOMAIN Kconfig
>
> drivers/misc/Kconfig | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> index da84b35e804..ad935b81ae1 100644
> --- a/drivers/misc/Kconfig
> +++ b/drivers/misc/Kconfig
> @@ -110,6 +110,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 && ARCH_ROCKCHIP
I believe this is missing SPL_DM_REGULATOR as well?
Cheers,
Quentin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/5] rockchip: io-domain: Add CONFIG_SPL_ROCKCHIP_IODOMAIN
2025-02-04 17:20 ` Quentin Schulz
@ 2025-02-05 17:14 ` Justin Klaassen
0 siblings, 0 replies; 13+ messages in thread
From: Justin Klaassen @ 2025-02-05 17:14 UTC (permalink / raw)
To: Quentin Schulz
Cc: Jonas Karlman, Kever Yang, Marek Behún, Philipp Tomsich,
Raymond Mao, Simon Glass, Stefan Roese, Tom Rini, Wan Yee Lau,
u-boot
Hi Quentin,
On Feb 4, 2025 at 09:20:56, Quentin Schulz <quentin.schulz@cherry.de> wrote:
> Hi Justin
>
> On 1/28/25 10:37 PM, Justin Klaassen wrote:
>
> 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 <justin@tidylabs.net>
>
> ---
>
>
> Changes in v2:
>
> - Added separate patch for added CONFIG_SPL_ROCKCHIP_IODOMAIN Kconfig
>
>
> drivers/misc/Kconfig | 8 ++++++++
>
> 1 file changed, 8 insertions(+)
>
>
> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
>
> index da84b35e804..ad935b81ae1 100644
>
> --- a/drivers/misc/Kconfig
>
> +++ b/drivers/misc/Kconfig
>
> @@ -110,6 +110,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 && ARCH_ROCKCHIP
>
>
> I believe this is missing SPL_DM_REGULATOR as well?
>
Good catch. Fixed.
> Cheers,
> Quentin
>
>
Thanks,
Justin
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 3/5] regulator: rk8xx: Add CONFIG_SPL_REGULATOR_RK8XX
2025-01-28 21:37 [PATCH v2 0/5] rockchip: rk3399: rk3399-nanopi-4: Fix SD power initialization in SPL Justin Klaassen
2025-01-28 21:37 ` [PATCH v2 1/5] rockchip: io-domain: Add debug logging for regulators during probe Justin Klaassen
2025-01-28 21:37 ` [PATCH v2 2/5] rockchip: io-domain: Add CONFIG_SPL_ROCKCHIP_IODOMAIN Justin Klaassen
@ 2025-01-28 21:37 ` Justin Klaassen
2025-02-04 17:30 ` Quentin Schulz
2025-02-04 17:30 ` Quentin Schulz
2025-01-28 21:37 ` [PATCH v2 4/5] rockchip: rk3399-nanopi-4: Allow MMC driver to control SD regulators Justin Klaassen
2025-01-28 21:37 ` [PATCH v2 5/5] rockchip: rk3399-nanopi-4: Enable IO-domain driver in SPL Justin Klaassen
4 siblings, 2 replies; 13+ messages in thread
From: Justin Klaassen @ 2025-01-28 21:37 UTC (permalink / raw)
To: u-boot
Cc: Justin Klaassen, Caleb Connolly, Jaehoon Chung, Jonas Karlman,
Keerthy, Kever Yang, Neil Armstrong, Quentin Schulz, Simon Glass,
Tom Rini, William Wu
Allows use of the regulator functions of the RK8XX PMIC in SPL, which is
necessary to support the functionality of the Rockchip IO-domain driver
on relevant platforms.
Signed-off-by: Justin Klaassen <justin@tidylabs.net>
---
Changes in v2:
- Added separate patch for added CONFIG_SPL_REGULATOR_RK8XX Kconfig
drivers/power/regulator/Kconfig | 9 +++++++++
drivers/power/regulator/rk8xx.c | 8 ++------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
index 958f337c7e7..9b50128f859 100644
--- a/drivers/power/regulator/Kconfig
+++ b/drivers/power/regulator/Kconfig
@@ -241,6 +241,15 @@ config REGULATOR_RK8XX
by the PMIC device. This driver is controlled by a device tree node
which includes voltage limits.
+config SPL_REGULATOR_RK8XX
+ bool "Enable driver for RK8XX regulators in SPL"
+ depends on SPL_DM_REGULATOR && SPL_PMIC_RK8XX
+ help
+ Enable support for the regulator functions of the RK8XX PMIC in SPL. The
+ driver implements get/set api for the various BUCKS and LDOs supported
+ by the PMIC device. This driver is controlled by a device tree node
+ which includes voltage limits.
+
config DM_REGULATOR_S2MPS11
bool "Enable driver for S2MPS11 regulator"
depends on DM_REGULATOR && PMIC_S2MPS11
diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c
index 368675ebb9f..88453bb7bdb 100644
--- a/drivers/power/regulator/rk8xx.c
+++ b/drivers/power/regulator/rk8xx.c
@@ -16,10 +16,6 @@
#include <power/pmic.h>
#include <power/regulator.h>
-#ifndef CONFIG_XPL_BUILD
-#define ENABLE_DRIVER
-#endif
-
/* Not used or exisit register and configure */
#define NA 0xff
@@ -202,7 +198,7 @@ static const struct rk8xx_reg_info rk818_buck[] = {
{ 1800000, 100000, REG_BUCK4_ON_VSEL, REG_BUCK4_SLP_VSEL, REG_BUCK4_CONFIG, RK818_BUCK4_VSEL_MASK, 0x00, 0x1f },
};
-#ifdef ENABLE_DRIVER
+#if CONFIG_IS_ENABLED(REGULATOR_RK8XX)
static const struct rk8xx_reg_info rk806_nldo[] = {
/* nldo 1 */
{ 500000, 12500, RK806_NLDO_ON_VSEL(1), RK806_NLDO_SLP_VSEL(1), NA, RK806_NLDO_VSEL_MASK, 0x00, 0xe7},
@@ -454,7 +450,7 @@ static int _buck_set_enable(struct udevice *pmic, int buck, bool enable)
return ret;
}
-#ifdef ENABLE_DRIVER
+#if CONFIG_IS_ENABLED(REGULATOR_RK8XX)
static int _buck_set_suspend_value(struct udevice *pmic, int buck, int uvolt)
{
const struct rk8xx_reg_info *info = get_buck_reg(pmic, buck, uvolt);
--
2.45.3
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v2 3/5] regulator: rk8xx: Add CONFIG_SPL_REGULATOR_RK8XX
2025-01-28 21:37 ` [PATCH v2 3/5] regulator: rk8xx: Add CONFIG_SPL_REGULATOR_RK8XX Justin Klaassen
@ 2025-02-04 17:30 ` Quentin Schulz
2025-02-04 17:30 ` Quentin Schulz
1 sibling, 0 replies; 13+ messages in thread
From: Quentin Schulz @ 2025-02-04 17:30 UTC (permalink / raw)
To: Justin Klaassen, u-boot
Cc: Caleb Connolly, Jaehoon Chung, Jonas Karlman, Keerthy, Kever Yang,
Neil Armstrong, Simon Glass, Tom Rini, William Wu
Hi Justin,
On 1/28/25 10:37 PM, Justin Klaassen wrote:
> Allows use of the regulator functions of the RK8XX PMIC in SPL, which is
> necessary to support the functionality of the Rockchip IO-domain driver
> on relevant platforms.
>
> Signed-off-by: Justin Klaassen <justin@tidylabs.net>
> ---
>
> Changes in v2:
> - Added separate patch for added CONFIG_SPL_REGULATOR_RK8XX Kconfig
>
> drivers/power/regulator/Kconfig | 9 +++++++++
> drivers/power/regulator/rk8xx.c | 8 ++------
> 2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
> index 958f337c7e7..9b50128f859 100644
> --- a/drivers/power/regulator/Kconfig
> +++ b/drivers/power/regulator/Kconfig
> @@ -241,6 +241,15 @@ config REGULATOR_RK8XX
> by the PMIC device. This driver is controlled by a device tree node
> which includes voltage limits.
>
> +config SPL_REGULATOR_RK8XX
> + bool "Enable driver for RK8XX regulators in SPL"
> + depends on SPL_DM_REGULATOR && SPL_PMIC_RK8XX
> + help
> + Enable support for the regulator functions of the RK8XX PMIC in SPL. The
> + driver implements get/set api for the various BUCKS and LDOs supported
> + by the PMIC device. This driver is controlled by a device tree node
> + which includes voltage limits.
> +
> config DM_REGULATOR_S2MPS11
> bool "Enable driver for S2MPS11 regulator"
> depends on DM_REGULATOR && PMIC_S2MPS11
> diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c
> index 368675ebb9f..88453bb7bdb 100644
> --- a/drivers/power/regulator/rk8xx.c
> +++ b/drivers/power/regulator/rk8xx.c
> @@ -16,10 +16,6 @@
> #include <power/pmic.h>
> #include <power/regulator.h>
>
> -#ifndef CONFIG_XPL_BUILD
> -#define ENABLE_DRIVER
> -#endif
> -
> /* Not used or exisit register and configure */
> #define NA 0xff
>
> @@ -202,7 +198,7 @@ static const struct rk8xx_reg_info rk818_buck[] = {
> { 1800000, 100000, REG_BUCK4_ON_VSEL, REG_BUCK4_SLP_VSEL, REG_BUCK4_CONFIG, RK818_BUCK4_VSEL_MASK, 0x00, 0x1f },
> };
>
> -#ifdef ENABLE_DRIVER
> +#if CONFIG_IS_ENABLED(REGULATOR_RK8XX)
> static const struct rk8xx_reg_info rk806_nldo[] = {
> /* nldo 1 */
> { 500000, 12500, RK806_NLDO_ON_VSEL(1), RK806_NLDO_SLP_VSEL(1), NA, RK806_NLDO_VSEL_MASK, 0x00, 0xe7},
> @@ -454,7 +450,7 @@ static int _buck_set_enable(struct udevice *pmic, int buck, bool enable)
> return ret;
> }
>
> -#ifdef ENABLE_DRIVER
> +#if CONFIG_IS_ENABLED(REGULATOR_RK8XX)
> static int _buck_set_suspend_value(struct udevice *pmic, int buck, int uvolt)
> {
> const struct rk8xx_reg_info *info = get_buck_reg(pmic, buck, uvolt);
I would split the modification of the c file into a separate patch as
the addition of the symbol and the modification of the C file aren't per
se co-dependent.
Their order wouldn't even matter in that case.
In any case, looks good to me so:
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Thanks!
Quentin
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH v2 3/5] regulator: rk8xx: Add CONFIG_SPL_REGULATOR_RK8XX
2025-01-28 21:37 ` [PATCH v2 3/5] regulator: rk8xx: Add CONFIG_SPL_REGULATOR_RK8XX Justin Klaassen
2025-02-04 17:30 ` Quentin Schulz
@ 2025-02-04 17:30 ` Quentin Schulz
2025-02-05 17:23 ` Justin Klaassen
1 sibling, 1 reply; 13+ messages in thread
From: Quentin Schulz @ 2025-02-04 17:30 UTC (permalink / raw)
To: Justin Klaassen, u-boot
Cc: Caleb Connolly, Jaehoon Chung, Jonas Karlman, Keerthy, Kever Yang,
Neil Armstrong, Simon Glass, Tom Rini, William Wu
Hi Justin,
On 1/28/25 10:37 PM, Justin Klaassen wrote:
> Allows use of the regulator functions of the RK8XX PMIC in SPL, which is
> necessary to support the functionality of the Rockchip IO-domain driver
> on relevant platforms.
>
> Signed-off-by: Justin Klaassen <justin@tidylabs.net>
> ---
>
> Changes in v2:
> - Added separate patch for added CONFIG_SPL_REGULATOR_RK8XX Kconfig
>
> drivers/power/regulator/Kconfig | 9 +++++++++
> drivers/power/regulator/rk8xx.c | 8 ++------
> 2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
> index 958f337c7e7..9b50128f859 100644
> --- a/drivers/power/regulator/Kconfig
> +++ b/drivers/power/regulator/Kconfig
> @@ -241,6 +241,15 @@ config REGULATOR_RK8XX
> by the PMIC device. This driver is controlled by a device tree node
> which includes voltage limits.
>
> +config SPL_REGULATOR_RK8XX
> + bool "Enable driver for RK8XX regulators in SPL"
> + depends on SPL_DM_REGULATOR && SPL_PMIC_RK8XX
> + help
> + Enable support for the regulator functions of the RK8XX PMIC in SPL. The
> + driver implements get/set api for the various BUCKS and LDOs supported
> + by the PMIC device. This driver is controlled by a device tree node
> + which includes voltage limits.
> +
> config DM_REGULATOR_S2MPS11
> bool "Enable driver for S2MPS11 regulator"
> depends on DM_REGULATOR && PMIC_S2MPS11
> diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c
> index 368675ebb9f..88453bb7bdb 100644
> --- a/drivers/power/regulator/rk8xx.c
> +++ b/drivers/power/regulator/rk8xx.c
> @@ -16,10 +16,6 @@
> #include <power/pmic.h>
> #include <power/regulator.h>
>
> -#ifndef CONFIG_XPL_BUILD
> -#define ENABLE_DRIVER
> -#endif
> -
> /* Not used or exisit register and configure */
> #define NA 0xff
>
> @@ -202,7 +198,7 @@ static const struct rk8xx_reg_info rk818_buck[] = {
> { 1800000, 100000, REG_BUCK4_ON_VSEL, REG_BUCK4_SLP_VSEL, REG_BUCK4_CONFIG, RK818_BUCK4_VSEL_MASK, 0x00, 0x1f },
> };
>
> -#ifdef ENABLE_DRIVER
> +#if CONFIG_IS_ENABLED(REGULATOR_RK8XX)
> static const struct rk8xx_reg_info rk806_nldo[] = {
> /* nldo 1 */
> { 500000, 12500, RK806_NLDO_ON_VSEL(1), RK806_NLDO_SLP_VSEL(1), NA, RK806_NLDO_VSEL_MASK, 0x00, 0xe7},
> @@ -454,7 +450,7 @@ static int _buck_set_enable(struct udevice *pmic, int buck, bool enable)
> return ret;
> }
>
> -#ifdef ENABLE_DRIVER
> +#if CONFIG_IS_ENABLED(REGULATOR_RK8XX)
> static int _buck_set_suspend_value(struct udevice *pmic, int buck, int uvolt)
> {
> const struct rk8xx_reg_info *info = get_buck_reg(pmic, buck, uvolt);
I would split the modification of the c file into a separate patch as
the addition of the symbol and the modification of the C file aren't per
se co-dependent.
Their order wouldn't even matter in that case.
In any case, looks good to me so:
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Thanks!
Quentin
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH v2 3/5] regulator: rk8xx: Add CONFIG_SPL_REGULATOR_RK8XX
2025-02-04 17:30 ` Quentin Schulz
@ 2025-02-05 17:23 ` Justin Klaassen
0 siblings, 0 replies; 13+ messages in thread
From: Justin Klaassen @ 2025-02-05 17:23 UTC (permalink / raw)
To: Quentin Schulz
Cc: Caleb Connolly, Jaehoon Chung, Jonas Karlman, Keerthy, Kever Yang,
Neil Armstrong, Simon Glass, Tom Rini, William Wu, u-boot
Hi Quentin,
On Feb 4, 2025 at 09:30:33, Quentin Schulz <quentin.schulz@cherry.de> wrote:
> Hi Justin,
>
> On 1/28/25 10:37 PM, Justin Klaassen wrote:
>
> Allows use of the regulator functions of the RK8XX PMIC in SPL, which is
>
> necessary to support the functionality of the Rockchip IO-domain driver
>
> on relevant platforms.
>
>
> Signed-off-by: Justin Klaassen <justin@tidylabs.net>
>
> ---
>
>
> Changes in v2:
>
> - Added separate patch for added CONFIG_SPL_REGULATOR_RK8XX Kconfig
>
>
> drivers/power/regulator/Kconfig | 9 +++++++++
>
> drivers/power/regulator/rk8xx.c | 8 ++------
>
> 2 files changed, 11 insertions(+), 6 deletions(-)
>
>
> diff --git a/drivers/power/regulator/Kconfig
> b/drivers/power/regulator/Kconfig
>
> index 958f337c7e7..9b50128f859 100644
>
> --- a/drivers/power/regulator/Kconfig
>
> +++ b/drivers/power/regulator/Kconfig
>
> @@ -241,6 +241,15 @@ config REGULATOR_RK8XX
>
> by the PMIC device. This driver is controlled by a device tree node
>
> which includes voltage limits.
>
>
>
> +config SPL_REGULATOR_RK8XX
>
> + bool "Enable driver for RK8XX regulators in SPL"
>
> + depends on SPL_DM_REGULATOR && SPL_PMIC_RK8XX
>
> + help
>
> + Enable support for the regulator functions of the RK8XX PMIC in SPL.
> The
>
> + driver implements get/set api for the various BUCKS and LDOs supported
>
> + by the PMIC device. This driver is controlled by a device tree node
>
> + which includes voltage limits.
>
> +
>
> config DM_REGULATOR_S2MPS11
>
> bool "Enable driver for S2MPS11 regulator"
>
> depends on DM_REGULATOR && PMIC_S2MPS11
>
> diff --git a/drivers/power/regulator/rk8xx.c
> b/drivers/power/regulator/rk8xx.c
>
> index 368675ebb9f..88453bb7bdb 100644
>
> --- a/drivers/power/regulator/rk8xx.c
>
> +++ b/drivers/power/regulator/rk8xx.c
>
> @@ -16,10 +16,6 @@
>
> #include <power/pmic.h>
>
> #include <power/regulator.h>
>
>
>
> -#ifndef CONFIG_XPL_BUILD
>
> -#define ENABLE_DRIVER
>
> -#endif
>
> -
>
> /* Not used or exisit register and configure */
>
> #define NA 0xff
>
>
>
> @@ -202,7 +198,7 @@ static const struct rk8xx_reg_info rk818_buck[] = {
>
> { 1800000, 100000, REG_BUCK4_ON_VSEL, REG_BUCK4_SLP_VSEL,
> REG_BUCK4_CONFIG, RK818_BUCK4_VSEL_MASK, 0x00, 0x1f },
>
> };
>
>
>
> -#ifdef ENABLE_DRIVER
>
> +#if CONFIG_IS_ENABLED(REGULATOR_RK8XX)
>
> static const struct rk8xx_reg_info rk806_nldo[] = {
>
> /* nldo 1 */
>
> { 500000, 12500, RK806_NLDO_ON_VSEL(1), RK806_NLDO_SLP_VSEL(1), NA,
> RK806_NLDO_VSEL_MASK, 0x00, 0xe7},
>
> @@ -454,7 +450,7 @@ static int _buck_set_enable(struct udevice *pmic, int
> buck, bool enable)
>
> return ret;
>
> }
>
>
>
> -#ifdef ENABLE_DRIVER
>
> +#if CONFIG_IS_ENABLED(REGULATOR_RK8XX)
>
> static int _buck_set_suspend_value(struct udevice *pmic, int buck, int
> uvolt)
>
> {
>
> const struct rk8xx_reg_info *info = get_buck_reg(pmic, buck, uvolt);
>
>
> I would split the modification of the c file into a separate patch as
> the addition of the symbol and the modification of the C file aren't per
> se co-dependent.
>
> Their order wouldn't even matter in that case.
>
My preference was to keep these changes together. Without the modification
to the C file, enabling CONFIG_SPL_REGULATOR_RK8XX would not have the
expected behavior since most of the driver code would still be disabled. If
you feel strongly otherwise, I am happy to split into separate patches.
> In any case, looks good to me so:
>
> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
>
> Thanks!
> Quentin
>
>
Thanks,
Justin
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 4/5] rockchip: rk3399-nanopi-4: Allow MMC driver to control SD regulators
2025-01-28 21:37 [PATCH v2 0/5] rockchip: rk3399: rk3399-nanopi-4: Fix SD power initialization in SPL Justin Klaassen
` (2 preceding siblings ...)
2025-01-28 21:37 ` [PATCH v2 3/5] regulator: rk8xx: Add CONFIG_SPL_REGULATOR_RK8XX Justin Klaassen
@ 2025-01-28 21:37 ` Justin Klaassen
2025-01-28 21:37 ` [PATCH v2 5/5] rockchip: rk3399-nanopi-4: Enable IO-domain driver in SPL Justin Klaassen
4 siblings, 0 replies; 13+ messages in thread
From: Justin Klaassen @ 2025-01-28 21:37 UTC (permalink / raw)
To: u-boot
Cc: Justin Klaassen, Dragan Simic, Jonas Karlman, Kever Yang,
Philipp Tomsich, Philipp Tomsich, Simon Glass, Tom Rini
This change removes the "regulator-always-on" property from the
"vcc3v0_sd" (vmmc-supply) and "vcc_sdio" (vqmmc-supply) regulators,
which otherwise prevents the MMC driver from being able to power cycle
the SD card as part of the initialization procedure.
It also removes the "regulator-boot-on" from the "vcc_sdio" regulator,
which could theoretically damage a SD card that is already initialized
in a low voltage mode.
Signed-off-by: Justin Klaassen <justin@tidylabs.net>
---
Changes in v2:
- Added patch to remove device-tree properties that conflicted with MMC driver initialization
arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
index 75736124996..ba2b73223d4 100644
--- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
@@ -19,8 +19,11 @@
&vcc3v0_sd {
bootph-pre-ram;
+ /delete-property/ regulator-always-on;
};
&vcc_sdio {
+ /delete-property/ regulator-always-on;
+ /delete-property/ regulator-boot-on;
regulator-init-microvolt = <3000000>;
};
--
2.45.3
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v2 5/5] rockchip: rk3399-nanopi-4: Enable IO-domain driver in SPL
2025-01-28 21:37 [PATCH v2 0/5] rockchip: rk3399: rk3399-nanopi-4: Fix SD power initialization in SPL Justin Klaassen
` (3 preceding siblings ...)
2025-01-28 21:37 ` [PATCH v2 4/5] rockchip: rk3399-nanopi-4: Allow MMC driver to control SD regulators Justin Klaassen
@ 2025-01-28 21:37 ` Justin Klaassen
4 siblings, 0 replies; 13+ messages in thread
From: Justin Klaassen @ 2025-01-28 21:37 UTC (permalink / raw)
To: u-boot
Cc: Justin Klaassen, Alexandre Vicenzi, Chen-Yu Tsai,
Christopher Obbard, Deepak Das, Dragan Simic, Jagan Teki,
Jonas Karlman, Kever Yang, Philipp Tomsich, Philipp Tomsich,
Quentin Schulz, Simon Glass, Tom Rini, Xiaobo Tian
The NanoPi RK3399 boards support UHS-I (up to SDR104) SD cards, however
using any of these 1.8v modes results in a boot failure in SPL upon soft
reboot.
The issue is that the "vcc_sdio" regulator is left at 1.8v on reboot
and the corresponding GPIO defaults to 3.3v. This prevents the SD card
from being reinitialized and read successfully.
This change enables the RK8XX regulators and Rockchip IO-domain drivers
in SPL, which initializes "vcc_sdio" regulator to 3.0v and configures
the GPIO for the correct level on boot.
Signed-off-by: Justin Klaassen <justin@tidylabs.net>
---
Changes in v2:
- Added defconfig changes for all NanoPi RK3399 boards
arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 9 +++++++++
configs/nanopc-t4-rk3399_defconfig | 7 +++++++
configs/nanopi-m4-2gb-rk3399_defconfig | 7 +++++++
configs/nanopi-m4-rk3399_defconfig | 7 +++++++
configs/nanopi-m4b-rk3399_defconfig | 7 +++++++
configs/nanopi-neo4-rk3399_defconfig | 7 +++++++
configs/nanopi-r4s-rk3399_defconfig | 7 +++++++
7 files changed, 51 insertions(+)
diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
index ba2b73223d4..62fd21f2ca5 100644
--- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
@@ -9,6 +9,14 @@
bootph-pre-ram;
};
+&i2c0_xfer {
+ bootph-pre-ram;
+};
+
+&io_domains {
+ bootph-pre-ram;
+};
+
&sdmmc {
pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
};
@@ -23,6 +31,7 @@
};
&vcc_sdio {
+ bootph-pre-ram;
/delete-property/ regulator-always-on;
/delete-property/ regulator-boot-on;
regulator-init-microvolt = <3000000>;
diff --git a/configs/nanopc-t4-rk3399_defconfig b/configs/nanopc-t4-rk3399_defconfig
index 26c12c51078..89987e4ff36 100644
--- a/configs/nanopc-t4-rk3399_defconfig
+++ b/configs/nanopc-t4-rk3399_defconfig
@@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000
CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-nanopc-t4"
CONFIG_DM_RESET=y
CONFIG_ROCKCHIP_RK3399=y
+CONFIG_SPL_DRIVERS_MISC=y
CONFIG_TARGET_EVB_RK3399=y
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_DEBUG_UART_BASE=0xFF1A0000
@@ -19,6 +20,8 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_MAX_SIZE=0x40000
CONFIG_SPL_PAD_TO=0x7f8000
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_I2C=y
+CONFIG_SPL_POWER=y
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_TPL=y
CONFIG_CMD_BOOTZ=y
@@ -35,6 +38,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_SPL_ROCKCHIP_IODOMAIN=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
@@ -48,8 +52,11 @@ CONFIG_NVME_PCI=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PHY_ROCKCHIP_TYPEC=y
CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
+CONFIG_SPL_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_REGULATOR_RK8XX=y
+CONFIG_SPL_REGULATOR_RK8XX=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_BAUDRATE=1500000
CONFIG_DEBUG_UART_SHIFT=2
diff --git a/configs/nanopi-m4-2gb-rk3399_defconfig b/configs/nanopi-m4-2gb-rk3399_defconfig
index d24b7bc6d17..3b17623b3ae 100644
--- a/configs/nanopi-m4-2gb-rk3399_defconfig
+++ b/configs/nanopi-m4-2gb-rk3399_defconfig
@@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000
CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4-2gb"
CONFIG_DM_RESET=y
CONFIG_ROCKCHIP_RK3399=y
+CONFIG_SPL_DRIVERS_MISC=y
CONFIG_TARGET_EVB_RK3399=y
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_DEBUG_UART_BASE=0xFF1A0000
@@ -20,6 +21,8 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_MAX_SIZE=0x40000
CONFIG_SPL_PAD_TO=0x7f8000
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_I2C=y
+CONFIG_SPL_POWER=y
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_TPL=y
CONFIG_CMD_BOOTZ=y
@@ -39,6 +42,7 @@ CONFIG_AHCI_PCI=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_SPL_ROCKCHIP_IODOMAIN=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
@@ -52,8 +56,11 @@ CONFIG_NVME_PCI=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PHY_ROCKCHIP_TYPEC=y
CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
+CONFIG_SPL_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_REGULATOR_RK8XX=y
+CONFIG_SPL_REGULATOR_RK8XX=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_SCSI=y
CONFIG_BAUDRATE=1500000
diff --git a/configs/nanopi-m4-rk3399_defconfig b/configs/nanopi-m4-rk3399_defconfig
index da3e44af841..cfdb81577a2 100644
--- a/configs/nanopi-m4-rk3399_defconfig
+++ b/configs/nanopi-m4-rk3399_defconfig
@@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000
CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-nanopi-m4"
CONFIG_DM_RESET=y
CONFIG_ROCKCHIP_RK3399=y
+CONFIG_SPL_DRIVERS_MISC=y
CONFIG_TARGET_EVB_RK3399=y
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_DEBUG_UART_BASE=0xFF1A0000
@@ -20,6 +21,8 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_MAX_SIZE=0x40000
CONFIG_SPL_PAD_TO=0x7f8000
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_I2C=y
+CONFIG_SPL_POWER=y
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_TPL=y
CONFIG_CMD_BOOTZ=y
@@ -38,6 +41,7 @@ CONFIG_AHCI_PCI=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_SPL_ROCKCHIP_IODOMAIN=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
@@ -51,8 +55,11 @@ CONFIG_NVME_PCI=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PHY_ROCKCHIP_TYPEC=y
CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
+CONFIG_SPL_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_REGULATOR_RK8XX=y
+CONFIG_SPL_REGULATOR_RK8XX=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_SCSI=y
CONFIG_BAUDRATE=1500000
diff --git a/configs/nanopi-m4b-rk3399_defconfig b/configs/nanopi-m4b-rk3399_defconfig
index 247056ab58b..802e6e54f46 100644
--- a/configs/nanopi-m4b-rk3399_defconfig
+++ b/configs/nanopi-m4b-rk3399_defconfig
@@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000
CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-nanopi-m4b"
CONFIG_DM_RESET=y
CONFIG_ROCKCHIP_RK3399=y
+CONFIG_SPL_DRIVERS_MISC=y
CONFIG_TARGET_EVB_RK3399=y
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_DEBUG_UART_BASE=0xFF1A0000
@@ -20,6 +21,8 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_MAX_SIZE=0x40000
CONFIG_SPL_PAD_TO=0x7f8000
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_I2C=y
+CONFIG_SPL_POWER=y
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_TPL=y
CONFIG_CMD_BOOTZ=y
@@ -38,6 +41,7 @@ CONFIG_AHCI_PCI=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_SPL_ROCKCHIP_IODOMAIN=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
@@ -51,8 +55,11 @@ CONFIG_NVME_PCI=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PHY_ROCKCHIP_TYPEC=y
CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
+CONFIG_SPL_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_REGULATOR_RK8XX=y
+CONFIG_SPL_REGULATOR_RK8XX=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_SCSI=y
CONFIG_BAUDRATE=1500000
diff --git a/configs/nanopi-neo4-rk3399_defconfig b/configs/nanopi-neo4-rk3399_defconfig
index 305877d2079..ac88466d3be 100644
--- a/configs/nanopi-neo4-rk3399_defconfig
+++ b/configs/nanopi-neo4-rk3399_defconfig
@@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000
CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-nanopi-neo4"
CONFIG_DM_RESET=y
CONFIG_ROCKCHIP_RK3399=y
+CONFIG_SPL_DRIVERS_MISC=y
CONFIG_TARGET_EVB_RK3399=y
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_DEBUG_UART_BASE=0xFF1A0000
@@ -18,6 +19,8 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_MAX_SIZE=0x40000
CONFIG_SPL_PAD_TO=0x7f8000
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_I2C=y
+CONFIG_SPL_POWER=y
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_TPL=y
CONFIG_CMD_BOOTZ=y
@@ -33,6 +36,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_SPL_ROCKCHIP_IODOMAIN=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
@@ -45,8 +49,11 @@ CONFIG_GMAC_ROCKCHIP=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PHY_ROCKCHIP_TYPEC=y
CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
+CONFIG_SPL_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_REGULATOR_RK8XX=y
+CONFIG_SPL_REGULATOR_RK8XX=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_BAUDRATE=1500000
CONFIG_DEBUG_UART_SHIFT=2
diff --git a/configs/nanopi-r4s-rk3399_defconfig b/configs/nanopi-r4s-rk3399_defconfig
index a6dafe3d9eb..905de05026f 100644
--- a/configs/nanopi-r4s-rk3399_defconfig
+++ b/configs/nanopi-r4s-rk3399_defconfig
@@ -8,6 +8,7 @@ CONFIG_ENV_OFFSET=0x3F8000
CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-nanopi-r4s"
CONFIG_DM_RESET=y
CONFIG_ROCKCHIP_RK3399=y
+CONFIG_SPL_DRIVERS_MISC=y
CONFIG_TARGET_EVB_RK3399=y
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_DEBUG_UART_BASE=0xFF1A0000
@@ -18,6 +19,8 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_MAX_SIZE=0x40000
CONFIG_SPL_PAD_TO=0x7f8000
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_I2C=y
+CONFIG_SPL_POWER=y
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_TPL=y
CONFIG_CMD_BOOTZ=y
@@ -33,6 +36,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_SPL_ROCKCHIP_IODOMAIN=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
@@ -45,8 +49,11 @@ CONFIG_GMAC_ROCKCHIP=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PHY_ROCKCHIP_TYPEC=y
CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_PMIC_RK8XX=y
+CONFIG_SPL_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_REGULATOR_RK8XX=y
+CONFIG_SPL_REGULATOR_RK8XX=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_RAM_ROCKCHIP_LPDDR4=y
CONFIG_BAUDRATE=1500000
--
2.45.3
^ permalink raw reply related [flat|nested] 13+ messages in thread