[U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes

Hi,
Just saying: I'm not familiar with this stuff so i might've misunderstood something in my commit messages, but anyways i managed to make it boot.
There's more stuff than just these, but i decided I'd keep it short... If you want to know my full setup, you can check out my gh repo for now: https://github.com/urjaman/u-boot/commits/c201-stuff
Notably I did include http://patchwork.ozlabs.org/patch/1040541/ in my tree when testing (rk3288 pinctrl patch that was linked to on the previous thread i found about the veyron speedy being broken).
The one thing that I havent yet fixed is that the USB host port on the otg-capable controller (near screen) doesn't work - one guess i have is that the dwc2 host driver doesn't force it into host mode... (It doesn't even read dr_mode ...)
Urja Rannikko (4): pinctrl: exit pinconfig_post_bind if there are no subnodes rk3288-board: remove pinctrl call for debug uart rk3288-board: cosmetic: document selecting RK PWM dw_mmc: turn on the IO supply
arch/arm/mach-rockchip/rk3288-board.c | 13 +------------ drivers/mmc/dw_mmc.c | 15 +++++++++++++++ drivers/pinctrl/pinctrl-uclass.c | 3 +++ 3 files changed, 19 insertions(+), 12 deletions(-)

This fixes RK3288 SPL hanging or hitting this assert: drivers/core/ofnode.c:183: ofnode_first_subnode: Assertion `ofnode_valid(node)' failed.
Signed-off-by: Urja Rannikko urjaman@gmail.com --- drivers/pinctrl/pinctrl-uclass.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 0e3260afd1..bda951b07f 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -138,6 +138,9 @@ static int pinconfig_post_bind(struct udevice *dev) ofnode node; int ret;
+ if (!dev_of_valid(dev)) + return 0; + dev_for_each_subnode(node, dev) { if (pre_reloc_only && !ofnode_pre_reloc(node))

On Fri, 22 Mar 2019 at 13:15, Urja Rannikko urjaman@gmail.com wrote:
This fixes RK3288 SPL hanging or hitting this assert: drivers/core/ofnode.c:183: ofnode_first_subnode: Assertion `ofnode_valid(node)' failed.
Signed-off-by: Urja Rannikko urjaman@gmail.com
drivers/pinctrl/pinctrl-uclass.c | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

This fixes RK3288 SPL hanging or hitting this assert: drivers/core/ofnode.c:183: ofnode_first_subnode: Assertion `ofnode_valid(node)' failed.
Signed-off-by: Urja Rannikko urjaman@gmail.com Reviewed-by: Simon Glass sjg@chromium.org
drivers/pinctrl/pinctrl-uclass.c | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com

This fixes RK3288 SPL hanging or hitting this assert: drivers/core/ofnode.c:183: ofnode_first_subnode: Assertion `ofnode_valid(node)' failed.
Signed-off-by: Urja Rannikko urjaman@gmail.com Reviewed-by: Simon Glass sjg@chromium.org Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
drivers/pinctrl/pinctrl-uclass.c | 3 +++ 1 file changed, 3 insertions(+)
Applied to u-boot-rockchip, thanks!

This failed and caused a boot failure on c201, and afaik the pins should be setup by the new pinctrl driver.
Signed-off-by: Urja Rannikko urjaman@gmail.com --- arch/arm/mach-rockchip/rk3288-board.c | 12 ------------ 1 file changed, 12 deletions(-)
diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c index 9c4f7f219f..f5df44dab1 100644 --- a/arch/arm/mach-rockchip/rk3288-board.c +++ b/arch/arm/mach-rockchip/rk3288-board.c @@ -321,7 +321,6 @@ int board_early_init_f(void) { const uintptr_t GRF_SOC_CON0 = 0xff770244; const uintptr_t GRF_SOC_CON2 = 0xff77024c; - struct udevice *pinctrl; struct udevice *dev; int ret;
@@ -335,18 +334,7 @@ int board_early_init_f(void) debug("CLK init failed: %d\n", ret); return ret; } - ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl); - if (ret) { - debug("%s: Cannot find pinctrl device\n", __func__); - return ret; - }
- /* Enable debug UART */ - ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG); - if (ret) { - debug("%s: Failed to set up console UART\n", __func__); - return ret; - } rk_setreg(GRF_SOC_CON2, 1 << 0);
/*

Hi Urja,
On Fri, 22 Mar 2019 at 13:15, Urja Rannikko urjaman@gmail.com wrote:
This failed and caused a boot failure on c201, and afaik the pins should be setup by the new pinctrl driver.
It should be set up in SPL, if enabled.
I wonder when this code is actually used?
Signed-off-by: Urja Rannikko urjaman@gmail.com
arch/arm/mach-rockchip/rk3288-board.c | 12 ------------ 1 file changed, 12 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

Hi,
On Sat, Mar 30, 2019 at 9:18 PM Simon Glass sjg@chromium.org wrote:
Hi Urja,
On Fri, 22 Mar 2019 at 13:15, Urja Rannikko urjaman@gmail.com wrote:
This failed and caused a boot failure on c201, and afaik the pins should be setup by the new pinctrl driver.
It should be set up in SPL, if enabled.
I wonder when this code is actually used?
The original code mentioned chainloading so i thought eg. from coreboot, but i mean i thought you should know better than me, see commit fe974716326ce2eee4bcac710ce7ec007919845e. It seemed to also have something to do with the clock driver (which is a thing that has changed in the last 2 years too...).
Signed-off-by: Urja Rannikko urjaman@gmail.com
arch/arm/mach-rockchip/rk3288-board.c | 12 ------------ 1 file changed, 12 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

This failed and caused a boot failure on c201, and afaik the pins should be setup by the new pinctrl driver.
Signed-off-by: Urja Rannikko urjaman@gmail.com Reviewed-by: Simon Glass sjg@chromium.org
arch/arm/mach-rockchip/rk3288-board.c | 12 ------------ 1 file changed, 12 deletions(-)
Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com

This failed and caused a boot failure on c201, and afaik the pins should be setup by the new pinctrl driver.
Signed-off-by: Urja Rannikko urjaman@gmail.com Reviewed-by: Simon Glass sjg@chromium.org Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
arch/arm/mach-rockchip/rk3288-board.c | 12 ------------ 1 file changed, 12 deletions(-)
Applied to u-boot-rockchip, thanks!

Atleast hat is what it says in the TRM.
Signed-off-by: Urja Rannikko urjaman@gmail.com --- arch/arm/mach-rockchip/rk3288-board.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c index f5df44dab1..9c05149610 100644 --- a/arch/arm/mach-rockchip/rk3288-board.c +++ b/arch/arm/mach-rockchip/rk3288-board.c @@ -335,6 +335,7 @@ int board_early_init_f(void) return ret; }
+ /* Select RK PWM (as opposed to old PWM solution) */ rk_setreg(GRF_SOC_CON2, 1 << 0);
/*

On Fri, 22 Mar 2019 at 13:15, Urja Rannikko urjaman@gmail.com wrote:
Atleast hat is what it says in the TRM.
At least that
Signed-off-by: Urja Rannikko urjaman@gmail.com
arch/arm/mach-rockchip/rk3288-board.c | 1 + 1 file changed, 1 insertion(+)
Reviewed-by: Simon Glass sjg@chromium.org

Hi,
On Sat, Mar 30, 2019 at 9:18 PM Simon Glass sjg@chromium.org wrote:
On Fri, 22 Mar 2019 at 13:15, Urja Rannikko urjaman@gmail.com wrote:
Atleast hat is what it says in the TRM.
At least that
Whoops. But actually i found out (by chance from an another patch on the list just now) that instead of documenting this bit set, we could instead remove it since it is already set in arch/arm/mach-rockchip/rk3288/rk3288.c. I just added the comment because i thought from code proximity that this code had something to do with the debug uart thing that i was cleaning out and upon checking it had nothing to do with the uart..
Signed-off-by: Urja Rannikko urjaman@gmail.com
arch/arm/mach-rockchip/rk3288-board.c | 1 + 1 file changed, 1 insertion(+)
Reviewed-by: Simon Glass sjg@chromium.org

Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com --- drivers/mmc/dw_mmc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 93a836eac3..e1960b213a 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h>
#define PAGE_SIZE 4096
@@ -440,6 +441,7 @@ static int dwmci_set_ios(struct mmc *mmc) #endif struct dwmci_host *host = (struct dwmci_host *)mmc->priv; u32 ctype, regs; + int ret;
debug("Buswidth = %d, clock: %d\n", mmc->bus_width, mmc->clock);
@@ -469,6 +471,19 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host);
+#ifdef CONFIG_DM_REGULATOR + if (mmc->vqmmc_supply) { + if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) + regulator_set_value(mmc->vqmmc_supply, 1800000); + else + regulator_set_value(mmc->vqmmc_supply, 3300000); + + ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true); + if (ret) + return ret; + } +#endif + return 0; }

Am Freitag, 22. März 2019, 20:14:36 CET schrieb Urja Rannikko:
Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com
drivers/mmc/dw_mmc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 93a836eac3..e1960b213a 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h>
#define PAGE_SIZE 4096
@@ -440,6 +441,7 @@ static int dwmci_set_ios(struct mmc *mmc) #endif struct dwmci_host *host = (struct dwmci_host *)mmc->priv; u32 ctype, regs;
int ret;
debug("Buswidth = %d, clock: %d\n", mmc->bus_width, mmc->clock);
@@ -469,6 +471,19 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host);
+#ifdef CONFIG_DM_REGULATOR
this should be #if CONFIG_IS_ENABLED(DM_REGULATOR)
because otherwise an SPL-build using the mmc driver may fail with
drivers/mmc/dw_mmc.c: In function ‘dwmci_set_ios’: drivers/mmc/dw_mmc.c:475:9: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ if (mmc->vqmmc_supply) { ^~ drivers/mmc/dw_mmc.c:477:27: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ regulator_set_value(mmc->vqmmc_supply, 1800000); ^~ drivers/mmc/dw_mmc.c:479:27: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ regulator_set_value(mmc->vqmmc_supply, 3300000); ^~ drivers/mmc/dw_mmc.c:481:44: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
- if (mmc->vqmmc_supply) {
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
regulator_set_value(mmc->vqmmc_supply, 1800000);
else
regulator_set_value(mmc->vqmmc_supply, 3300000);
ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
if (ret)
return ret;
- }
+#endif
- return 0;
}

Hi,
On Fri, Mar 29, 2019 at 2:09 PM Heiko Stübner heiko@sntech.de wrote:
+#ifdef CONFIG_DM_REGULATOR
this should be #if CONFIG_IS_ENABLED(DM_REGULATOR)
Ok, just FYI that fragment was based on the one in tmio-common.c, so maybe that should also be fixed(?).
because otherwise an SPL-build using the mmc driver may fail with
drivers/mmc/dw_mmc.c: In function ‘dwmci_set_ios’: drivers/mmc/dw_mmc.c:475:9: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ if (mmc->vqmmc_supply) { ^~ drivers/mmc/dw_mmc.c:477:27: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ regulator_set_value(mmc->vqmmc_supply, 1800000); ^~ drivers/mmc/dw_mmc.c:479:27: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ regulator_set_value(mmc->vqmmc_supply, 3300000); ^~ drivers/mmc/dw_mmc.c:481:44: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
if (mmc->vqmmc_supply) {
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
regulator_set_value(mmc->vqmmc_supply, 1800000);
else
regulator_set_value(mmc->vqmmc_supply, 3300000);
ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
if (ret)
return ret;
}
+#endif
return 0;
}

Am Sonntag, 31. März 2019, 21:45:15 CEST schrieb Urja Rannikko:
Hi,
On Fri, Mar 29, 2019 at 2:09 PM Heiko Stübner heiko@sntech.de wrote:
+#ifdef CONFIG_DM_REGULATOR
this should be #if CONFIG_IS_ENABLED(DM_REGULATOR)
Ok, just FYI that fragment was based on the one in tmio-common.c, so maybe that should also be fixed(?).
yep, looks like it. While it doesn't cause compile errors right now, it might after all create runtime errors otherwise.
Heiko
because otherwise an SPL-build using the mmc driver may fail with
drivers/mmc/dw_mmc.c: In function ‘dwmci_set_ios’: drivers/mmc/dw_mmc.c:475:9: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ if (mmc->vqmmc_supply) { ^~ drivers/mmc/dw_mmc.c:477:27: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ regulator_set_value(mmc->vqmmc_supply, 1800000); ^~ drivers/mmc/dw_mmc.c:479:27: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ regulator_set_value(mmc->vqmmc_supply, 3300000); ^~ drivers/mmc/dw_mmc.c:481:44: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
if (mmc->vqmmc_supply) {
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
regulator_set_value(mmc->vqmmc_supply, 1800000);
else
regulator_set_value(mmc->vqmmc_supply, 3300000);
ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
if (ret)
return ret;
}
+#endif
return 0;
}

Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com --- v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) - drivers/mmc/dw_mmc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 93a836eac3..b04c1f9f41 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h>
#define PAGE_SIZE 4096
@@ -440,6 +441,7 @@ static int dwmci_set_ios(struct mmc *mmc) #endif struct dwmci_host *host = (struct dwmci_host *)mmc->priv; u32 ctype, regs; + int ret;
debug("Buswidth = %d, clock: %d\n", mmc->bus_width, mmc->clock);
@@ -469,6 +471,19 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host);
+#if CONFIG_IS_ENABLED(DM_REGULATOR) + if (mmc->vqmmc_supply) { + if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) + regulator_set_value(mmc->vqmmc_supply, 1800000); + else + regulator_set_value(mmc->vqmmc_supply, 3300000); + + ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true); + if (ret) + return ret; + } +#endif + return 0; }

Hi,
On Mon, Apr 1, 2019 at 5:44 PM Urja Rannikko urjaman@gmail.com wrote:
Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com
v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR)
Ping? Anything I should do wrt this?

Hiya,
On Thu, Apr 11, 2019 at 8:07 PM Urja Rannikko urjaman@gmail.com wrote:
Hi,
On Mon, Apr 1, 2019 at 5:44 PM Urja Rannikko urjaman@gmail.com wrote:
Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com
v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR)
Ping? Anything I should do wrt this?
Ping number two. I think i'll resend this the next time so that the actual patch isnt lost in the depths of mailboxes...

Am Montag, 1. April 2019, 19:44:22 CEST schrieb Urja Rannikko:
Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com
v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR)
drivers/mmc/dw_mmc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 93a836eac3..b04c1f9f41 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h>
#define PAGE_SIZE 4096
@@ -440,6 +441,7 @@ static int dwmci_set_ios(struct mmc *mmc) #endif struct dwmci_host *host = (struct dwmci_host *)mmc->priv; u32 ctype, regs;
- int ret;
This produces a new warning about an unused variable in the !DM_REGULATOR case. I guess either move the "ret" below or add a " __maybe_unused" if that is possible for variables?
debug("Buswidth = %d, clock: %d\n", mmc->bus_width, mmc->clock);
@@ -469,6 +471,19 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host);
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
- if (mmc->vqmmc_supply) {
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
regulator_set_value(mmc->vqmmc_supply, 1800000);
else
regulator_set_value(mmc->vqmmc_supply, 3300000);
ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
if (ret)
return ret;
- }
+#endif
- return 0;
}

Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com --- v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) v3: Move ret variable inside the if block (only used there) --- drivers/mmc/dw_mmc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 1992d61182..22f6c7eefd 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h>
#define PAGE_SIZE 4096
@@ -493,6 +494,21 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host);
+#if CONFIG_IS_ENABLED(DM_REGULATOR) + if (mmc->vqmmc_supply) { + int ret; + + if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) + regulator_set_value(mmc->vqmmc_supply, 1800000); + else + regulator_set_value(mmc->vqmmc_supply, 3300000); + + ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true); + if (ret) + return ret; + } +#endif + return 0; }

On Mon, 13 May 2019 at 07:25, Urja Rannikko urjaman@gmail.com wrote:
Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com
v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) v3: Move ret variable inside the if block (only used there)
drivers/mmc/dw_mmc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 1992d61182..22f6c7eefd 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h>
#define PAGE_SIZE 4096
@@ -493,6 +494,21 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host);
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
I wonder if we could use if() here instead?
if (mmc->vqmmc_supply) {
int ret;
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
regulator_set_value(mmc->vqmmc_supply, 1800000);
else
regulator_set_value(mmc->vqmmc_supply, 3300000);
ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
if (ret)
return ret;
}
+#endif
return 0;
}
-- 2.21.0

Subject: [U-Boot] [PATCH v3] dw_mmc: turn on the IO supply
Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com
v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) v3: Move ret variable inside the if block (only used there)
drivers/mmc/dw_mmc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 1992d61182..22f6c7eefd 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h>
#define PAGE_SIZE 4096
@@ -493,6 +494,21 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host);
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
- if (mmc->vqmmc_supply) {
int ret;
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
regulator_set_value(mmc->vqmmc_supply, 1800000);
else
regulator_set_value(mmc->vqmmc_supply, 3300000);
ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
if (ret)
return ret;
- }
+#endif
Reviewed-by: Peng Fan peng.fan@nxp.com
return 0; }
-- 2.21.0
U-Boot mailing list U-Boot@lists.denx.de https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d enx.de%2Flistinfo%2Fu-boot&data=02%7C01%7CPeng.Fan%40nxp.com %7Ce49ea3fa171f4230a40308d6d7a680fc%7C686ea1d3bc2b4c6fa92cd99c5 c301635%7C0%7C0%7C636933507511914198&sdata=Hyq5z5xI5xYUPA tcKJU%2FmdM3PLgCdHQcIr4qkSbz4Fc%3D&reserved=0

Hi Peng, Simon,
This patch is delegate to Philipp now, does this patch should go to Rockchip branch first? I can do it if yes, but double with you in case this patch should go to mmc branch first.
Thanks, - Kever
Peng Fan peng.fan@nxp.com 于2019年5月20日周一 下午3:04写道:
Subject: [U-Boot] [PATCH v3] dw_mmc: turn on the IO supply
Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com
v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) v3: Move ret variable inside the if block (only used there)
drivers/mmc/dw_mmc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 1992d61182..22f6c7eefd 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h>
#define PAGE_SIZE 4096
@@ -493,6 +494,21 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host);
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
if (mmc->vqmmc_supply) {
int ret;
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
regulator_set_value(mmc->vqmmc_supply, 1800000);
else
regulator_set_value(mmc->vqmmc_supply, 3300000);
ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply,
true);
if (ret)
return ret;
}
+#endif
Reviewed-by: Peng Fan peng.fan@nxp.com
return 0;
}
-- 2.21.0
U-Boot mailing list U-Boot@lists.denx.de
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d
enx.de%2Flistinfo%2Fu-boot&data=02%7C01%7CPeng.Fan%40nxp.com %7Ce49ea3fa171f4230a40308d6d7a680fc%7C686ea1d3bc2b4c6fa92cd99c5 c301635%7C0%7C0%7C636933507511914198&sdata=Hyq5z5xI5xYUPA tcKJU%2FmdM3PLgCdHQcIr4qkSbz4Fc%3D&reserved=0
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Hi Kever,
You could pick it up, not depends on mmc branch.
Thanks, Peng.
From: Kever Yang [mailto:kever.yang@rock-chips.com] Sent: 2019年7月26日 15:06 To: Peng Fan peng.fan@nxp.com Cc: Urja Rannikko urjaman@gmail.com; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH v3] dw_mmc: turn on the IO supply
Hi Peng, Simon,
This patch is delegate to Philipp now, does this patch should go to Rockchip branch first? I can do it if yes, but double with you in case this patch should go to mmc branch first.
Thanks, - Kever
Peng Fan <peng.fan@nxp.commailto:peng.fan@nxp.com> 于2019年5月20日周一 下午3:04写道:
Subject: [U-Boot] [PATCH v3] dw_mmc: turn on the IO supply
Fixes the microSD slot on the ASUS C201.
Signed-off-by: Urja Rannikko <urjaman@gmail.commailto:urjaman@gmail.com>
v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) v3: Move ret variable inside the if block (only used there)
drivers/mmc/dw_mmc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 1992d61182..22f6c7eefd 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h>
#define PAGE_SIZE 4096
@@ -493,6 +494,21 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host);
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
if (mmc->vqmmc_supply) {
int ret;
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
regulator_set_value(mmc->vqmmc_supply, 1800000);
else
regulator_set_value(mmc->vqmmc_supply, 3300000);
ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
if (ret)
return ret;
}
+#endif
Reviewed-by: Peng Fan <peng.fan@nxp.commailto:peng.fan@nxp.com>
return 0;
}
-- 2.21.0
U-Boot mailing list U-Boot@lists.denx.demailto:U-Boot@lists.denx.de https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.dhttps://lists.d enx.dehttps://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fenx.de&data=02%7C01%7Cpeng.fan%40nxp.com%7C11ccf6dc22aa4b87faa308d71197bfa7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636997215762062849&sdata=ZRlAdJM9%2BafKEW2CIgJ9AKbFsgYpZ2q61m%2Fxh5ktdkU%3D&reserved=0%2Flistinfo%2Fu-boot&data=02%7C01%7CPeng.Fan%40nxp.comhttps://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2F40nxp.com&data=02%7C01%7Cpeng.fan%40nxp.com%7C11ccf6dc22aa4b87faa308d71197bfa7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636997215762062849&sdata=km5AEShdXwRM2MtHYLm2662Sz9Z1b2C7RiZgMeygUsc%3D&reserved=0 %7Ce49ea3fa171f4230a40308d6d7a680fc%7C686ea1d3bc2b4c6fa92cd99c5 c301635%7C0%7C0%7C636933507511914198&sdata=Hyq5z5xI5xYUPA tcKJU%2FmdM3PLgCdHQcIr4qkSbz4Fc%3D&reserved=0
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.demailto:U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boothttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.denx.de%2Flistinfo%2Fu-boot&data=02%7C01%7Cpeng.fan%40nxp.com%7C11ccf6dc22aa4b87faa308d71197bfa7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636997215762072839&sdata=kbZSSFXgebiyhUrLvOjydXNYlfgIMltU3fXhmNUAmxc%3D&reserved=0

Hi Urja,
Am Freitag, 22. März 2019, 20:14:32 CET schrieb Urja Rannikko:
Just saying: I'm not familiar with this stuff so i might've misunderstood something in my commit messages, but anyways i managed to make it boot.
There's more stuff than just these, but i decided I'd keep it short... If you want to know my full setup, you can check out my gh repo for now: https://github.com/urjaman/u-boot/commits/c201-stuff
Notably I did include http://patchwork.ozlabs.org/patch/1040541/ in my tree when testing (rk3288 pinctrl patch that was linked to on the previous thread i found about the veyron speedy being broken).
The one thing that I havent yet fixed is that the USB host port on the otg-capable controller (near screen) doesn't work - one guess i have is that the dwc2 host driver doesn't force it into host mode... (It doesn't even read dr_mode ...)
Urja Rannikko (4): pinctrl: exit pinconfig_post_bind if there are no subnodes rk3288-board: remove pinctrl call for debug uart rk3288-board: cosmetic: document selecting RK PWM dw_mmc: turn on the IO supply
In my u-boot list archive I only see the list itself als recipient. You may want to resend your series with actual maintainers in Cc so that they actually see your patches :-) .
Similar to the kernel, uboot also has a scripts/get_maintainer.pl script to give you a list of applicable maintainers (Philipp and Simon in this case)
Heiko

Hi,
On Fri, Mar 29, 2019 at 1:56 PM Heiko Stübner heiko@sntech.de wrote:
In my u-boot list archive I only see the list itself als recipient. You may want to resend your series with actual maintainers in Cc so that they actually see your patches :-) .
Similar to the kernel, uboot also has a scripts/get_maintainer.pl script to give you a list of applicable maintainers (Philipp and Simon in this case)
I did CC these to 3 maintainers (who you mentioned plus Jaehoon Chung for MMC ...), as given by that script - weird that you dont see those. Gmail is showing them in the one i sent so atleast i didnt forget but maybe the list filtered them (?).
-- Urja Rannikko

Am Sonntag, 31. März 2019, 21:34:00 CEST schrieb Urja Rannikko:
Hi,
On Fri, Mar 29, 2019 at 1:56 PM Heiko Stübner heiko@sntech.de wrote:
In my u-boot list archive I only see the list itself als recipient. You may want to resend your series with actual maintainers in Cc so that they actually see your patches :-) .
Similar to the kernel, uboot also has a scripts/get_maintainer.pl script to give you a list of applicable maintainers (Philipp and Simon in this case)
I did CC these to 3 maintainers (who you mentioned plus Jaehoon Chung for MMC ...), as given by that script - weird that you dont see those. Gmail is showing them in the one i sent so atleast i didnt forget but maybe the list filtered them (?).
yeah, that is possible ... for whatever reason and I could only reply to the list mail itself ... so all good then :-)
Heiko

Hi all,
On Fri, Mar 22, 2019 at 7:15 PM Urja Rannikko urjaman@gmail.com wrote:
Urja Rannikko (4): pinctrl: exit pinconfig_post_bind if there are no subnodes rk3288-board: remove pinctrl call for debug uart rk3288-board: cosmetic: document selecting RK PWM dw_mmc: turn on the IO supply
I've now replied to what needs replying (and i'll send a fix to the dw_mmc one tomorrow), but I have a question about fixing the defconfig(s) so that the default configuration is bootable (and maybe also sensible). I made the changes in a very "dont touch anything but speedy"-way in my git tree, but I was thinking it would make sense to fix all the veyrons at once (maybe all rk3288 boards, but I know even less about them to make the changes)?
Anyways the changes for veyrons would mostly be enable pinctrl for SPI in SPL, slim down the SPL config (drop eMMC from SPL) and turn off OTG support since they dont have an OTG port.
There is also currently a forced #define CONFIG_CMD_USB_MASS_STORAGE* in rk3288_common.h that seems not very sensible for devices without an OTG port, i think that would be better moved into defconfig of non-veyron rk3288 boards. (My patch just does an #ifdef otg..)
(Oh i also have a patch to set the correct spi flash bus for veyrons so that environment in SPI flash works...)
Anyways, comments?
-- Urja Rannikko
(* This feature is a command to turn the device into an usb mass storage device (default block device is mmc, so into a card reader of sorts), not usb stick support just in case you were wondering.)

Hi,
On Fri, Mar 22, 2019 at 7:15 PM Urja Rannikko urjaman@gmail.com wrote:
Urja Rannikko (4): pinctrl: exit pinconfig_post_bind if there are no subnodes rk3288-board: remove pinctrl call for debug uart
AFAIK these first two from this series would be "ready" so to say, anything i should do? (Resend only them as a 2-patch series?)
participants (7)
-
Heiko Stuebner
-
Heiko Stübner
-
Kever Yang
-
Peng Fan
-
Philipp Tomsich
-
Simon Glass
-
Urja Rannikko