All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes
@ 2019-03-22 19:14 Urja Rannikko
  2019-03-22 19:14 ` [U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes Urja Rannikko
                   ` (6 more replies)
  0 siblings, 7 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-03-22 19:14 UTC (permalink / raw)
  To: u-boot

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(-)

-- 
2.21.0

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes
  2019-03-22 19:14 [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Urja Rannikko
@ 2019-03-22 19:14 ` Urja Rannikko
  2019-03-30 21:18   ` Simon Glass
                     ` (2 more replies)
  2019-03-22 19:14 ` [U-Boot] [PATCH 2/4] rk3288-board: remove pinctrl call for debug uart Urja Rannikko
                   ` (5 subsequent siblings)
  6 siblings, 3 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-03-22 19:14 UTC (permalink / raw)
  To: u-boot

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))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 2/4] rk3288-board: remove pinctrl call for debug uart
  2019-03-22 19:14 [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Urja Rannikko
  2019-03-22 19:14 ` [U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes Urja Rannikko
@ 2019-03-22 19:14 ` Urja Rannikko
  2019-03-30 21:18   ` Simon Glass
                     ` (2 more replies)
  2019-03-22 19:14 ` [U-Boot] [PATCH 3/4] rk3288-board: cosmetic: document selecting RK PWM Urja Rannikko
                   ` (4 subsequent siblings)
  6 siblings, 3 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-03-22 19:14 UTC (permalink / raw)
  To: u-boot

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);
 
 	/*
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 3/4] rk3288-board: cosmetic: document selecting RK PWM
  2019-03-22 19:14 [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Urja Rannikko
  2019-03-22 19:14 ` [U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes Urja Rannikko
  2019-03-22 19:14 ` [U-Boot] [PATCH 2/4] rk3288-board: remove pinctrl call for debug uart Urja Rannikko
@ 2019-03-22 19:14 ` Urja Rannikko
  2019-03-30 21:18   ` Simon Glass
  2019-03-22 19:14 ` [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply Urja Rannikko
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 31+ messages in thread
From: Urja Rannikko @ 2019-03-22 19:14 UTC (permalink / raw)
  To: u-boot

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);
 
 	/*
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply
  2019-03-22 19:14 [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Urja Rannikko
                   ` (2 preceding siblings ...)
  2019-03-22 19:14 ` [U-Boot] [PATCH 3/4] rk3288-board: cosmetic: document selecting RK PWM Urja Rannikko
@ 2019-03-22 19:14 ` Urja Rannikko
  2019-03-29 14:09   ` Heiko Stübner
  2019-04-01 17:44   ` [U-Boot] [PATCH v2] " Urja Rannikko
  2019-03-29 13:56 ` [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Heiko Stübner
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-03-22 19:14 UTC (permalink / raw)
  To: u-boot

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;
 }
 
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes
  2019-03-22 19:14 [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Urja Rannikko
                   ` (3 preceding siblings ...)
  2019-03-22 19:14 ` [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply Urja Rannikko
@ 2019-03-29 13:56 ` Heiko Stübner
  2019-03-31 19:34   ` Urja Rannikko
  2019-03-31 22:19 ` Urja Rannikko
  2019-04-11 20:14 ` Urja Rannikko
  6 siblings, 1 reply; 31+ messages in thread
From: Heiko Stübner @ 2019-03-29 13:56 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply
  2019-03-22 19:14 ` [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply Urja Rannikko
@ 2019-03-29 14:09   ` Heiko Stübner
  2019-03-31 19:45     ` Urja Rannikko
  2019-04-01 17:44   ` [U-Boot] [PATCH v2] " Urja Rannikko
  1 sibling, 1 reply; 31+ messages in thread
From: Heiko Stübner @ 2019-03-29 14:09 UTC (permalink / raw)
  To: u-boot

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;
>  }
>  
> 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes
  2019-03-22 19:14 ` [U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes Urja Rannikko
@ 2019-03-30 21:18   ` Simon Glass
  2019-04-21 18:41   ` [U-Boot] [U-Boot, " Philipp Tomsich
  2019-04-23 14:33   ` Philipp Tomsich
  2 siblings, 0 replies; 31+ messages in thread
From: Simon Glass @ 2019-03-30 21:18 UTC (permalink / raw)
  To: u-boot

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>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 2/4] rk3288-board: remove pinctrl call for debug uart
  2019-03-22 19:14 ` [U-Boot] [PATCH 2/4] rk3288-board: remove pinctrl call for debug uart Urja Rannikko
@ 2019-03-30 21:18   ` Simon Glass
  2019-03-31 21:54     ` Urja Rannikko
  2019-04-21 18:41   ` [U-Boot] [U-Boot, " Philipp Tomsich
  2019-04-23 14:33   ` Philipp Tomsich
  2 siblings, 1 reply; 31+ messages in thread
From: Simon Glass @ 2019-03-30 21:18 UTC (permalink / raw)
  To: u-boot

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>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 3/4] rk3288-board: cosmetic: document selecting RK PWM
  2019-03-22 19:14 ` [U-Boot] [PATCH 3/4] rk3288-board: cosmetic: document selecting RK PWM Urja Rannikko
@ 2019-03-30 21:18   ` Simon Glass
  2019-03-31 21:46     ` Urja Rannikko
  0 siblings, 1 reply; 31+ messages in thread
From: Simon Glass @ 2019-03-30 21:18 UTC (permalink / raw)
  To: u-boot

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>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes
  2019-03-29 13:56 ` [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Heiko Stübner
@ 2019-03-31 19:34   ` Urja Rannikko
  2019-03-31 20:44     ` Heiko Stübner
  0 siblings, 1 reply; 31+ messages in thread
From: Urja Rannikko @ 2019-03-31 19:34 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply
  2019-03-29 14:09   ` Heiko Stübner
@ 2019-03-31 19:45     ` Urja Rannikko
  2019-04-02  8:25       ` Heiko Stuebner
  0 siblings, 1 reply; 31+ messages in thread
From: Urja Rannikko @ 2019-03-31 19:45 UTC (permalink / raw)
  To: u-boot

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;
> >  }
> >

-- 
Urja Rannikko

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes
  2019-03-31 19:34   ` Urja Rannikko
@ 2019-03-31 20:44     ` Heiko Stübner
  0 siblings, 0 replies; 31+ messages in thread
From: Heiko Stübner @ 2019-03-31 20:44 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 3/4] rk3288-board: cosmetic: document selecting RK PWM
  2019-03-30 21:18   ` Simon Glass
@ 2019-03-31 21:46     ` Urja Rannikko
  0 siblings, 0 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-03-31 21:46 UTC (permalink / raw)
  To: u-boot

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>



-- 
Urja Rannikko

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 2/4] rk3288-board: remove pinctrl call for debug uart
  2019-03-30 21:18   ` Simon Glass
@ 2019-03-31 21:54     ` Urja Rannikko
  0 siblings, 0 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-03-31 21:54 UTC (permalink / raw)
  To: u-boot

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>



-- 
Urja Rannikko

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes
  2019-03-22 19:14 [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Urja Rannikko
                   ` (4 preceding siblings ...)
  2019-03-29 13:56 ` [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Heiko Stübner
@ 2019-03-31 22:19 ` Urja Rannikko
  2019-04-11 20:14 ` Urja Rannikko
  6 siblings, 0 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-03-31 22:19 UTC (permalink / raw)
  To: u-boot

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.)

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH v2] dw_mmc: turn on the IO supply
  2019-03-22 19:14 ` [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply Urja Rannikko
  2019-03-29 14:09   ` Heiko Stübner
@ 2019-04-01 17:44   ` Urja Rannikko
  2019-04-11 20:07     ` Urja Rannikko
  2019-05-13 12:54     ` Heiko Stuebner
  1 sibling, 2 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-04-01 17:44 UTC (permalink / raw)
  To: u-boot

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;
 }
 
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply
  2019-03-31 19:45     ` Urja Rannikko
@ 2019-04-02  8:25       ` Heiko Stuebner
  0 siblings, 0 replies; 31+ messages in thread
From: Heiko Stuebner @ 2019-04-02  8:25 UTC (permalink / raw)
  To: u-boot

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;
> > >  }
> > >
> 
> 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH v2] dw_mmc: turn on the IO supply
  2019-04-01 17:44   ` [U-Boot] [PATCH v2] " Urja Rannikko
@ 2019-04-11 20:07     ` Urja Rannikko
  2019-05-13 12:25       ` Urja Rannikko
  2019-05-13 12:54     ` Heiko Stuebner
  1 sibling, 1 reply; 31+ messages in thread
From: Urja Rannikko @ 2019-04-11 20:07 UTC (permalink / raw)
  To: u-boot

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?

-- 
Urja Rannikko

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes
  2019-03-22 19:14 [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Urja Rannikko
                   ` (5 preceding siblings ...)
  2019-03-31 22:19 ` Urja Rannikko
@ 2019-04-11 20:14 ` Urja Rannikko
  6 siblings, 0 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-04-11 20:14 UTC (permalink / raw)
  To: u-boot

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?)

-- 
Urja Rannikko

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [U-Boot, 2/4] rk3288-board: remove pinctrl call for debug uart
  2019-03-22 19:14 ` [U-Boot] [PATCH 2/4] rk3288-board: remove pinctrl call for debug uart Urja Rannikko
  2019-03-30 21:18   ` Simon Glass
@ 2019-04-21 18:41   ` Philipp Tomsich
  2019-04-23 14:33   ` Philipp Tomsich
  2 siblings, 0 replies; 31+ messages in thread
From: Philipp Tomsich @ 2019-04-21 18:41 UTC (permalink / raw)
  To: u-boot

> 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>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [U-Boot, 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes
  2019-03-22 19:14 ` [U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes Urja Rannikko
  2019-03-30 21:18   ` Simon Glass
@ 2019-04-21 18:41   ` Philipp Tomsich
  2019-04-23 14:33   ` Philipp Tomsich
  2 siblings, 0 replies; 31+ messages in thread
From: Philipp Tomsich @ 2019-04-21 18:41 UTC (permalink / raw)
  To: u-boot

> 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>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [U-Boot, 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes
  2019-03-22 19:14 ` [U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes Urja Rannikko
  2019-03-30 21:18   ` Simon Glass
  2019-04-21 18:41   ` [U-Boot] [U-Boot, " Philipp Tomsich
@ 2019-04-23 14:33   ` Philipp Tomsich
  2 siblings, 0 replies; 31+ messages in thread
From: Philipp Tomsich @ 2019-04-23 14:33 UTC (permalink / raw)
  To: u-boot

> 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!

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [U-Boot, 2/4] rk3288-board: remove pinctrl call for debug uart
  2019-03-22 19:14 ` [U-Boot] [PATCH 2/4] rk3288-board: remove pinctrl call for debug uart Urja Rannikko
  2019-03-30 21:18   ` Simon Glass
  2019-04-21 18:41   ` [U-Boot] [U-Boot, " Philipp Tomsich
@ 2019-04-23 14:33   ` Philipp Tomsich
  2 siblings, 0 replies; 31+ messages in thread
From: Philipp Tomsich @ 2019-04-23 14:33 UTC (permalink / raw)
  To: u-boot

> 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!

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH v2] dw_mmc: turn on the IO supply
  2019-04-11 20:07     ` Urja Rannikko
@ 2019-05-13 12:25       ` Urja Rannikko
  0 siblings, 0 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-05-13 12:25 UTC (permalink / raw)
  To: u-boot

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...

-- 
Urja Rannikko

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH v2] dw_mmc: turn on the IO supply
  2019-04-01 17:44   ` [U-Boot] [PATCH v2] " Urja Rannikko
  2019-04-11 20:07     ` Urja Rannikko
@ 2019-05-13 12:54     ` Heiko Stuebner
  2019-05-13 13:25       ` [U-Boot] [PATCH v3] " Urja Rannikko
  1 sibling, 1 reply; 31+ messages in thread
From: Heiko Stuebner @ 2019-05-13 12:54 UTC (permalink / raw)
  To: u-boot

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;
>  }
>  
> 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH v3] dw_mmc: turn on the IO supply
  2019-05-13 12:54     ` Heiko Stuebner
@ 2019-05-13 13:25       ` Urja Rannikko
  2019-05-18 16:08         ` Simon Glass
  2019-05-20  7:03         ` Peng Fan
  0 siblings, 2 replies; 31+ messages in thread
From: Urja Rannikko @ 2019-05-13 13:25 UTC (permalink / raw)
  To: u-boot

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;
 }
 
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH v3] dw_mmc: turn on the IO supply
  2019-05-13 13:25       ` [U-Boot] [PATCH v3] " Urja Rannikko
@ 2019-05-18 16:08         ` Simon Glass
  2019-05-20  7:03         ` Peng Fan
  1 sibling, 0 replies; 31+ messages in thread
From: Simon Glass @ 2019-05-18 16:08 UTC (permalink / raw)
  To: u-boot

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
>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH v3] dw_mmc: turn on the IO supply
  2019-05-13 13:25       ` [U-Boot] [PATCH v3] " Urja Rannikko
  2019-05-18 16:08         ` Simon Glass
@ 2019-05-20  7:03         ` Peng Fan
  2019-07-26  7:06           ` Kever Yang
  1 sibling, 1 reply; 31+ messages in thread
From: Peng Fan @ 2019-05-20  7:03 UTC (permalink / raw)
  To: u-boot

> 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 at lists.denx.de
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d
> enx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7CPeng.Fan%40nxp.com
> %7Ce49ea3fa171f4230a40308d6d7a680fc%7C686ea1d3bc2b4c6fa92cd99c5
> c301635%7C0%7C0%7C636933507511914198&amp;sdata=Hyq5z5xI5xYUPA
> tcKJU%2FmdM3PLgCdHQcIr4qkSbz4Fc%3D&amp;reserved=0

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH v3] dw_mmc: turn on the IO supply
  2019-05-20  7:03         ` Peng Fan
@ 2019-07-26  7:06           ` Kever Yang
  2019-07-30  0:47             ` Peng Fan
  0 siblings, 1 reply; 31+ messages in thread
From: Kever Yang @ 2019-07-26  7:06 UTC (permalink / raw)
  To: u-boot

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 at lists.denx.de
> >
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d
> > enx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7CPeng.Fan%40nxp.com
> > %7Ce49ea3fa171f4230a40308d6d7a680fc%7C686ea1d3bc2b4c6fa92cd99c5
> > c301635%7C0%7C0%7C636933507511914198&amp;sdata=Hyq5z5xI5xYUPA
> > tcKJU%2FmdM3PLgCdHQcIr4qkSbz4Fc%3D&amp;reserved=0
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [U-Boot] [PATCH v3] dw_mmc: turn on the IO supply
  2019-07-26  7:06           ` Kever Yang
@ 2019-07-30  0:47             ` Peng Fan
  0 siblings, 0 replies; 31+ messages in thread
From: Peng Fan @ 2019-07-30  0:47 UTC (permalink / raw)
  To: u-boot

Hi Kever,

You could pick it up, not depends on mmc branch.

Thanks,
Peng.

From: Kever Yang [mailto:kever.yang at rock-chips.com]
Sent: 2019年7月26日 15:06
To: Peng Fan <peng.fan@nxp.com>
Cc: Urja Rannikko <urjaman@gmail.com>; u-boot at 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 at nxp.com<mailto: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 at gmail.com<mailto: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 at nxp.com<mailto:peng.fan@nxp.com>>

>       return 0;
>  }
>
> --
> 2.21.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de<mailto:U-Boot@lists.denx.de>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d<https://lists.d>
> enx.de<https://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&amp;data=02%7C01%7CPeng.Fan%40nxp.com<https://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&amp;sdata=Hyq5z5xI5xYUPA
> tcKJU%2FmdM3PLgCdHQcIr4qkSbz4Fc%3D&amp;reserved=0
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de<mailto:U-Boot@lists.denx.de>
https://lists.denx.de/listinfo/u-boot<https://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>

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2019-07-30  0:47 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 19:14 [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Urja Rannikko
2019-03-22 19:14 ` [U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes Urja Rannikko
2019-03-30 21:18   ` Simon Glass
2019-04-21 18:41   ` [U-Boot] [U-Boot, " Philipp Tomsich
2019-04-23 14:33   ` Philipp Tomsich
2019-03-22 19:14 ` [U-Boot] [PATCH 2/4] rk3288-board: remove pinctrl call for debug uart Urja Rannikko
2019-03-30 21:18   ` Simon Glass
2019-03-31 21:54     ` Urja Rannikko
2019-04-21 18:41   ` [U-Boot] [U-Boot, " Philipp Tomsich
2019-04-23 14:33   ` Philipp Tomsich
2019-03-22 19:14 ` [U-Boot] [PATCH 3/4] rk3288-board: cosmetic: document selecting RK PWM Urja Rannikko
2019-03-30 21:18   ` Simon Glass
2019-03-31 21:46     ` Urja Rannikko
2019-03-22 19:14 ` [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply Urja Rannikko
2019-03-29 14:09   ` Heiko Stübner
2019-03-31 19:45     ` Urja Rannikko
2019-04-02  8:25       ` Heiko Stuebner
2019-04-01 17:44   ` [U-Boot] [PATCH v2] " Urja Rannikko
2019-04-11 20:07     ` Urja Rannikko
2019-05-13 12:25       ` Urja Rannikko
2019-05-13 12:54     ` Heiko Stuebner
2019-05-13 13:25       ` [U-Boot] [PATCH v3] " Urja Rannikko
2019-05-18 16:08         ` Simon Glass
2019-05-20  7:03         ` Peng Fan
2019-07-26  7:06           ` Kever Yang
2019-07-30  0:47             ` Peng Fan
2019-03-29 13:56 ` [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Heiko Stübner
2019-03-31 19:34   ` Urja Rannikko
2019-03-31 20:44     ` Heiko Stübner
2019-03-31 22:19 ` Urja Rannikko
2019-04-11 20:14 ` Urja Rannikko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.