Veyron Speedy / ASUS C201 fixes
Subsystems (5)
cover 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(-)
Signature · 1 line
2.21.0
PATCH 1/4 pinctrl: exit pinconfig_post_bind if there are no subnodes
This fixes RK3288 SPL hanging or hitting this assert:drivers/core/ofnode.c:183: ofnode_first_subnode: Assertion `ofnode_valid(node)' failed.
--- drivers/pinctrl/pinctrl-uclass.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/pinctrl/pinctrl-uclass.c +3 -0
@@ -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))
Signature · 1 line
2.21.0
PATCH 1/4 pinctrl: exit pinconfig_post_bind if there are no subnodes
Quoted 8 lines · Urja Rannikko
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 <[email protected]>--- drivers/pinctrl/pinctrl-uclass.c | 3 +++ 1 file changed, 3 insertions(+)
PATCH 1/4 pinctrl: exit pinconfig_post_bind if there are no subnodes
In reply to Urja RannikkoQuoted 9 lines
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 <[email protected]>Reviewed-by Simon Glass <[email protected]>--- drivers/pinctrl/pinctrl-uclass.c | 3 +++ 1 file changed, 3 insertions(+)
PATCH 1/4 pinctrl: exit pinconfig_post_bind if there are no subnodes
In reply to Urja RannikkoQuoted 10 lines
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 <[email protected]>Reviewed-by Simon Glass <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>--- drivers/pinctrl/pinctrl-uclass.c | 3 +++ 1 file changed, 3 insertions(+)
Applied to u-boot-rockchip, thanks!
PATCH 2/4 rk3288-board: remove pinctrl call for debug uart
In reply to Urja RannikkoThis failed and caused a boot failure on c201, and afaik the pins should be setup by the new pinctrl driver.
--- arch/arm/mach-rockchip/rk3288-board.c | 12 ------------ 1 file changed, 12 deletions(-)
arch/arm/mach-rockchip/rk3288-board.c +0 -12
@@ -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 );/*
Signature · 1 line
2.21.0
PATCH 2/4 rk3288-board: remove pinctrl call for debug uart
Hi Urja,
Quoted 3 lines · Urja Rannikko
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?
Quoted 5 lines
Signed-off-by Urja Rannikko <[email protected]>--- arch/arm/mach-rockchip/rk3288-board.c | 12 ------------ 1 file changed, 12 deletions(-)
PATCH 2/4 rk3288-board: remove pinctrl call for debug uart
Hi,
Quoted 11 lines · Simon Glass
Hi Urja,
Quoted 3 lines · Urja Rannikko
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...).
Quoted 7 lines
Quoted 5 lines
Signed-off-by Urja Rannikko <[email protected]>--- arch/arm/mach-rockchip/rk3288-board.c | 12 ------------ 1 file changed, 12 deletions(-)Reviewed-by Simon Glass <[email protected]>
Signature · 1 line
Urja Rannikko
PATCH 2/4 rk3288-board: remove pinctrl call for debug uart
In reply to Urja RannikkoQuoted 9 lines
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 <[email protected]>Reviewed-by Simon Glass <[email protected]>--- arch/arm/mach-rockchip/rk3288-board.c | 12 ------------ 1 file changed, 12 deletions(-)
PATCH 2/4 rk3288-board: remove pinctrl call for debug uart
In reply to Urja RannikkoQuoted 10 lines
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 <[email protected]>Reviewed-by Simon Glass <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>--- arch/arm/mach-rockchip/rk3288-board.c | 12 ------------ 1 file changed, 12 deletions(-)
Applied to u-boot-rockchip, thanks!
PATCH 3/4 rk3288-board: cosmetic: document selecting RK PWM
In reply to Urja RannikkoAtleast hat is what it says in the TRM.
--- arch/arm/mach-rockchip/rk3288-board.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-rockchip/rk3288-board.c +1 -0
@@ -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 );/*
Signature · 1 line
2.21.0
PATCH 3/4 rk3288-board: cosmetic: document selecting RK PWM
Quoted 2 lines · Urja Rannikko
Atleast hat is what it says in the TRM.
At least that
Quoted 5 lines
Signed-off-by Urja Rannikko <[email protected]>--- arch/arm/mach-rockchip/rk3288-board.c | 1 + 1 file changed, 1 insertion(+)
PATCH 3/4 rk3288-board: cosmetic: document selecting RK PWM
Hi,
Quoted 6 lines · Simon Glass
Quoted 2 lines · Urja Rannikko
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..
Quoted 8 lines
Quoted 6 lines
Signed-off-by Urja Rannikko <[email protected]>--- arch/arm/mach-rockchip/rk3288-board.c | 1 + 1 file changed, 1 insertion(+)Reviewed-by Simon Glass <[email protected]>
Signature · 1 line
Urja Rannikko
PATCH 4/4 dw_mmc: turn on the IO supply
In reply to Urja RannikkoFixes the microSD slot on the ASUS C201.
--- drivers/mmc/dw_mmc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/mmc/dw_mmc.c +15 -0
@@ -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 ; }
Signature · 1 line
2.21.0
Heiko Stübner
maintainerPATCH 4/4 dw_mmc: turn on the IO supply
Am Freitag, 22. März 2019, 20:14:36 CET schrieb Urja Rannikko:
Quoted 28 lines
Fixes the microSD slot on the ASUS C201.
Signed-off-by Urja Rannikko <[email protected]>--- drivers/mmc/dw_mmc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/mmc/dw_mmc.c +2
-0@@ -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);
drivers/mmc/dw_mmc.c static int dwmci_set_ios(struct mmc *mmc) · line 474
Quoted 4 lines
drivers/mmc/dw_mmc.c +1
-0@@ -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);
Quoted 16 lines
drivers/mmc/dw_mmc.c +12
-0+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 ; }
PATCH 4/4 dw_mmc: turn on the IO supply
Hi,
Quoted 4 lines · Heiko Stübner
Quoted 1 line
+#ifdef
CONFIG_DM_REGULATORthis 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(?).
Quoted 32 lines
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);Quoted 15 lines
drivers/mmc/dw_mmc.c +12
-0+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 ; }
Signature · 1 line
Urja Rannikko
Heiko Stuebner
maintainerPATCH 4/4 dw_mmc: turn on the IO supply
Am Sonntag, 31. März 2019, 21:45:15 CEST schrieb Urja Rannikko:
Quoted 10 lines
Hi,
Quoted 4 lines · Heiko Stübner
Quoted 1 line
+#ifdef
CONFIG_DM_REGULATORthis 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
Quoted 34 lines
Quoted 32 lines
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);Quoted 15 lines
drivers/mmc/dw_mmc.c +12
-0+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 ; }
PATCH v2 1/1 dw_mmc: turn on the IO supply
In reply to Urja RannikkoFixes the microSD slot on the ASUS C201.
---
v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR)
-
drivers/mmc/dw_mmc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/mmc/dw_mmc.c +15 -0
@@ -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 ; }
Signature · 1 line
2.21.0
PATCH v2 1/1 dw_mmc: turn on the IO supply
Hi,
Quoted 6 lines · Urja Rannikko
Fixes the microSD slot on the ASUS C201.
Signed-off-by Urja Rannikko <[email protected]>---
v2: use #ifCONFIG_IS_ENABLED(DM_REGULATOR)
Ping? Anything I should do wrt this?
Signature · 1 line
Urja Rannikko
PATCH v2 1/1 dw_mmc: turn on the IO supply
Hiya,
Quoted 5 lines · Urja Rannikko
Hi,
Quoted 1 line · Urja Rannikko
Quoted 7 lines
Quoted 5 lines
Fixes the microSD slot on the ASUS C201.
Signed-off-by Urja Rannikko <[email protected]>---
v2: use #ifCONFIG_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...
Signature · 1 line
Urja Rannikko
Heiko Stuebner
maintainerPATCH v2 1/1 dw_mmc: turn on the IO supply
In reply to Urja RannikkoAm Montag, 1. April 2019, 19:44:22 CEST schrieb Urja Rannikko:
Quoted 22 lines
Fixes the microSD slot on the ASUS C201.
Signed-off-by Urja Rannikko <[email protected]>---
v2: use #ifCONFIG_IS_ENABLED(DM_REGULATOR)(quoted diff) +0
-1- drivers/mmc/dw_mmc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/mmc/dw_mmc.c +1
-0@@ -13,6 +13,7 @@#include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h> #define PAGE_SIZE 4096
drivers/mmc/dw_mmc.c static int dwmci_set_ios(struct mmc *mmc) · line 444
Quoted 4 lines
drivers/mmc/dw_mmc.c +1
-0@@ -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?
Quoted 24 lines
drivers/mmc/dw_mmc.c +13
-0debug ("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 ; }
PATCH v3 1/1 dw_mmc: turn on the IO supply
Fixes the microSD slot on the ASUS C201.
---
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(+)
drivers/mmc/dw_mmc.c +16 -0
@@ -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 ; }
Signature · 1 line
2.21.0
PATCH v3 1/1 dw_mmc: turn on the IO supply
Quoted 10 lines · Urja Rannikko
Fixes the microSD slot on the ASUS C201.
Signed-off-by Urja Rannikko <[email protected]>---
v2: use #ifCONFIG_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(+)
Quoted 14 lines
drivers/mmc/dw_mmc.c +1
-0@@ -13,6 +13,7 @@#include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h> #define PAGE_SIZE 4096
drivers/mmc/dw_mmc.c static int dwmci_set_ios(struct mmc *mmc) · line 497
Quoted 4 lines
drivers/mmc/dw_mmc.c +1
-0@@ -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?
Quoted 20 lines
drivers/mmc/dw_mmc.c +14
-1+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
PATCH v3 1/1 dw_mmc: turn on the IO supply
In reply to Urja RannikkoQuoted 33 lines
Subject: [U-Boot] [PATCH v3]
dw_mmc: turn on the IO supplyFixes the microSD slot on the ASUS C201.
Signed-off-by Urja Rannikko <[email protected]>---
v2: use #ifCONFIG_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(+)drivers/mmc/dw_mmc.c index renamed from drivers/mmc/dw_mmc.c +0
-0
1992d61182..22f6c7eefd100644drivers/mmc/dw_mmc.c +6
-0@@ -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 )
drivers/mmc/dw_mmc.c static int dwmci_set_ios(struct mmc *mmc) · line 511
Quoted 10 lines
drivers/mmc/dw_mmc.c +10
-0+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 +
Quoted 14 lines
drivers/mmc/dw_mmc.c +0
-1return 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&data=02%7C01%7CPeng.Fan%40nxp.com %7Ce49ea3fa171f4230a40308d6d7a680fc%7C686ea1d3bc2b4c6fa92cd99c5 c301635%7C0%7C0%7C636933507511914198&sdata=Hyq5z5xI5xYUPA tcKJU%2FmdM3PLgCdHQcIr4qkSbz4Fc%3D&reserved=0
PATCH v3 1/1 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
Quoted 67 lines · Peng Fan <[email protected]> 于2019年5月20日周一 下午3:04写道:
Quoted 28 lines
Subject: [U-Boot] [PATCH v3]
dw_mmc: turn on the IO supplyFixes the microSD slot on the ASUS C201.
Signed-off-by Urja Rannikko <[email protected]>---
v2: use #ifCONFIG_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(+)drivers/mmc/dw_mmc.c index renamed from drivers/mmc/dw_mmc.c +0
-0
1992d61182..22f6c7eefd100644drivers/mmc/dw_mmc.c +1
-0@@ -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);drivers/mmc/dw_mmc.c static int dwmci_set_ios(struct mmc *mmc) · line 506
Quoted 10 lines
drivers/mmc/dw_mmc.c +10
-0+#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);
drivers/mmc/dw_mmc.c static int dwmci_set_ios(struct mmc *mmc) · line 511
Quoted 5 lines
drivers/mmc/dw_mmc.c +5
-0+if (ret) + return ret; + } +#endif +Reviewed-by Peng Fan <[email protected]>Quoted 10 lines
drivers/mmc/dw_mmc.c +0
-1return 0 ; } --2.21.0
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.dehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d
Quoted 4 lines
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 at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v3 1/1 dw_mmc: turn on the IO supply
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 <[email protected]>
Cc: Urja Rannikko <[email protected]>; 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
Quoted 33 lines · Peng Fan <peng.fan at nxp.com<mailto:[email protected]>> 于2019年5月20日周一 下午3:04写道:
Subject: [U-Boot] [PATCH v3]
dw_mmc: turn on the IO supplyFixes the microSD slot on the ASUS C201.
Signed-off-by Urja Rannikko <urjaman at gmail.com<mailto:[email protected]>>---
v2: use #ifCONFIG_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(+)drivers/mmc/dw_mmc.c index renamed from drivers/mmc/dw_mmc.c +0
-0
1992d61182..22f6c7eefd100644drivers/mmc/dw_mmc.c +6
-0@@ -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 )
drivers/mmc/dw_mmc.c static int dwmci_set_ios(struct mmc *mmc) · line 511
Quoted 10 lines
drivers/mmc/dw_mmc.c +10
-0+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 +
Quoted 6 lines
drivers/mmc/dw_mmc.c +0
-1return 0 ; } --2.21.0
Quoted 8 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de<mailto:[email protected]>
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&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&sdata=Hyq5z5xI5xYUPA
tcKJU%2FmdM3PLgCdHQcIr4qkSbz4Fc%3D&reserved=0
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de<mailto:[email protected]>
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>
Heiko Stübner
maintainercover Veyron Speedy / ASUS C201 fixes
In reply to Urja RannikkoHi Urja,
Am Freitag, 22. März 2019, 20:14:32 CET schrieb Urja Rannikko:
Quoted 16 lines
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-stuffNotably 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...)
Quoted 5 lines
Urja Rannikko (4):
pinctrl: exitpinconfig_post_bindif 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
cover Veyron Speedy / ASUS C201 fixes
Hi,
Quoted 8 lines · Heiko Stübner
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.plscript 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
Heiko Stübner
maintainercover Veyron Speedy / ASUS C201 fixes
Am Sonntag, 31. März 2019, 21:34:00 CEST schrieb Urja Rannikko:
Quoted 8 lines
Hi,
Quoted 5 lines · Heiko Stübner
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 :-) .
Quoted 8 lines
Quoted 3 lines
Similar to the kernel, uboot also has a
scripts/get_maintainer.plscript 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
cover Veyron Speedy / ASUS C201 fixes
In reply to Urja RannikkoHi all,
Quoted 6 lines · Urja Rannikko
Urja Rannikko (4):
pinctrl: exitpinconfig_post_bindif 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.)
cover Veyron Speedy / ASUS C201 fixes
In reply to Urja RannikkoHi,
Quoted 4 lines · Urja Rannikko
Urja Rannikko (4):
pinctrl: exitpinconfig_post_bindif 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?)
Signature · 1 line
Urja Rannikko