mmc: fixes for HS200/UHS core support
cover mmc: fixes for HS200/UHS core support
This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200 and UHS modes"
It fixes a bug with old SD and MMC cards that support only the legacy mode. It also addresses the comments made on the mailing list:
* dump card and host capabilities in debug mode
* use 1-bit if the DTS property 'bus-width' is not present.
* recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties
Tested on DRA7, DRA72 and AM335x
Jean-Jacques Hiblot (5):
dm: mmc: updated mmc_of_parse() to not fail because of an invalid
bus-width
mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean
properties
mmc: dump card and host capabilities if debug is enabled
mmc: Fixed a problem with old sd or mmc that do not support High speed
mmc: all hosts support 1-bit bus width and legacy timings
drivers/mmc/mmc-uclass.c | 11 ++++++++--- drivers/mmc/mmc.c | 24 +++++++++++++++++++----- 2 files changed, 27 insertions(+), 8 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/5 dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width
Instead of failing, the driver uses the default: 1-bit bus width.
--- drivers/mmc/mmc-uclass.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/mmc/mmc-uclass.c +4 -3
@@ -137,9 +137,10 @@ int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg) cfg->host_caps |=MMC_MODE_1BIT ;break ;default : -printf ("error: %s invalid bus-width property %d\n" , -fdt_get_name (fdt, node,NULL ), val); -return -ENOENT ; +debug ("warning: %s invalid bus-width property. using 1-bit\n" , +fdt_get_name (fdt, node,NULL )); + cfg->host_caps |=MMC_MODE_1BIT ; +break ; } cfg->f_max =fdtdec_get_int (fdt, node,"max-frequency" ,52000000 );
Signature · 1 line
1.9.1
PATCH 1/5 dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width
Quoted 25 lines · On Tue, 21 Nov 2017 16:13:04 +0100 Jean-Jacques Hiblot <[email protected]> wrote:
Instead of failing, the driver uses the default: 1-bit bus width.
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc-uclass.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/mmc/mmc-uclass.c +4
-3@@ -137,9 +137,10 @@ int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg) cfg->host_caps |= MMC_MODE_1BIT;break ;default : -printf ("error: %s invalid bus-width property %d\n" , -fdt_get_name (fdt, node,NULL ), val); -return -ENOENT ; + debug("warning: %s invalid bus-width property. using 1-bit\n", + fdt_get_name(fdt, node,NULL )); + cfg->host_caps |=MMC_MODE_1BIT ; +break ; }
Quoted 2 lines
cfg->f_max= fdtdec_get_int(fdt, node, "max-frequency",
52000000);
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/9913faba/attachment.sig>
PATCH 1/5 dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width
In reply to Jean-Jacques HiblotHi Jean-Jacques,
drivers/mmc/mmc-uclass.c int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg)
Quoted 12 lines · Jean-Jacques Hiblot
Instead of failing, the driver uses the default: 1-bit bus width.
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc-uclass.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/mmc/mmc-uclass.c +0
-0@@ -137,9 +137,10 @@ int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg)
Can you please add a function comment for this function in the header?
Also if you have time, this function should be converted to use live tree - dev_read...() etc.
Quoted 14 lines
drivers/mmc/mmc-uclass.c +4
-4cfg->host_caps |=MMC_MODE_1BIT ;break ;default : -printf ("error: %s invalid bus-width property %d\n" , -fdt_get_name (fdt, node,NULL ), val); -return -ENOENT ; +debug ("warning: %s invalid bus-width property. using 1-bit\n" , +fdt_get_name (fdt, node,NULL )); + cfg->host_caps |=MMC_MODE_1BIT ; +break ; } cfg->f_max =fdtdec_get_int (fdt, node,"max-frequency" ,52000000 ); --
Quoted 2 lines
1.9.1
Regards,
Simon
PATCH 2/5 mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties
In reply to Jean-Jacques Hiblot--- drivers/mmc/mmc-uclass.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/mmc-uclass.c +4 -0
@@ -161,8 +161,12 @@ int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg) cfg->host_caps |=MMC_CAP (UHS_DDR50 );if (fdtdec_get_bool (fdt, node,"mmc-ddr-1_8v" )) cfg->host_caps |=MMC_CAP (MMC_DDR_52 ); +if (fdtdec_get_bool (fdt, node,"mmc-ddr-1_2v" )) + cfg->host_caps |=MMC_CAP (MMC_DDR_52 );if (fdtdec_get_bool (fdt, node,"mmc-hs200-1_8v" )) cfg->host_caps |=MMC_CAP (MMC_HS_200 ); +if (fdtdec_get_bool (fdt, node,"mmc-hs200-1_2v" )) + cfg->host_caps |=MMC_CAP (MMC_HS_200 );return 0 ; }
Signature · 1 line
1.9.1
PATCH 2/5 mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties
Quoted 12 lines · On Tue, 21 Nov 2017 16:13:05 +0100 Jean-Jacques Hiblot <[email protected]> wrote:
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc-uclass.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/mmc-uclass.c +0
-0@@ -161,8 +161,12 @@ int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg) cfg->host_caps |= MMC_CAP(UHS_DDR50);if (fdtdec_get_bool (fdt, node,"mmc-ddr-1_8v" ))
drivers/mmc/mmc-uclass.c int mmc_of_parse(const void *fdt, int node, · line 172
Quoted 10 lines
drivers/mmc/mmc-uclass.c +4
-0cfg->host_caps |=MMC_CAP (MMC_DDR_52 ); +if (fdtdec_get_bool (fdt, node,"mmc-ddr-1_2v" )) + cfg->host_caps |=MMC_CAP (MMC_DDR_52 );if (fdtdec_get_bool (fdt, node,"mmc-hs200-1_8v" )) cfg->host_caps |=MMC_CAP (MMC_HS_200 ); +if (fdtdec_get_bool (fdt, node,"mmc-hs200-1_2v" )) + cfg->host_caps |=MMC_CAP (MMC_HS_200 );return 0 ; }
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/a752232a/attachment.sig>
PATCH 2/5 mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties
In reply to Jean-Jacques HiblotHi Jean-Jacques,
Quoted 10 lines · Jean-Jacques Hiblot
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc-uclass.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/mmc-uclass.c +0
-0
drivers/mmc/mmc-uclass.c int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg) · line 169
Quoted 9 lines
drivers/mmc/mmc-uclass.c +4
-0@@ -161,8 +161,12 @@ int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg) cfg->host_caps |=MMC_CAP (UHS_DDR50 );if (fdtdec_get_bool (fdt, node,"mmc-ddr-1_8v" )) cfg->host_caps |=MMC_CAP (MMC_DDR_52 ); +if (fdtdec_get_bool (fdt, node,"mmc-ddr-1_2v" )) + cfg->host_caps |=MMC_CAP (MMC_DDR_52 );if (fdtdec_get_bool (fdt, node,"mmc-hs200-1_8v" )) cfg->host_caps |=MMC_CAP (MMC_HS_200 ); +if (fdtdec_get_bool (fdt, node,"mmc-hs200-1_2v" )) + cfg->host_caps |=MMC_CAP (MMC_HS_200 );
Hmm, please convert to livetree first - e.g. ofnode_read_bool()
Quoted 6 lines
drivers/mmc/mmc-uclass.c +0
-1return 0 ; } --1.9.1
Regards,
Simon
PATCH 3/5 mmc: dump card and host capabilities if debug is enabled
In reply to Jean-Jacques HiblotThis is a useful information while debugging the initialization process or performance issues.
--- drivers/mmc/mmc.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/mmc/mmc.c +9 -0
@@ -1502,6 +1502,10 @@ void mmc_dump_capabilities(const char *text, uint caps)printf ("%s, " ,mmc_mode_name (mode));printf ("\b\b]\n" ); } +#else +void mmc_dump_capabilities (const char *text,uint caps) +{ +}#endif struct mode_width_tuning {
@@ -1582,6 +1586,8 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)bool uhs_en = (mmc->ocr &OCR_S18R ) ? true : false;uint caps; +mmc_dump_capabilities ("sd card" , card_caps); +mmc_dump_capabilities ("host" , mmc->host_caps |MMC_MODE_1BIT );/* Restrict card's capabilities by what the host can do */ caps = card_caps & (mmc->host_caps |MMC_MODE_1BIT );
@@ -1764,6 +1770,9 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)const struct mode_width_tuning *mwt;const struct ext_csd_bus_width *ecbw; +mmc_dump_capabilities ("mmc" , card_caps); +mmc_dump_capabilities ("host" , mmc->host_caps |MMC_MODE_1BIT ); +/* Restrict card's capabilities by what the host can do */ card_caps &= (mmc->host_caps |MMC_MODE_1BIT );
Signature · 1 line
1.9.1
PATCH 3/5 mmc: dump card and host capabilities if debug is enabled
Quoted 40 lines · On Tue, 21 Nov 2017 16:13:06 +0100 Jean-Jacques Hiblot <[email protected]> wrote:
This is a useful information while debugging the initialization process or performance issues.
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/mmc/mmc.c +8
-0@@ -1502,6 +1502,10 @@ void mmc_dump_capabilities(const char *text, uint caps) printf("%s, ", mmc_mode_name(mode));printf ("\b\b]\n" ); } +#else +void mmc_dump_capabilities (const char *text,uint caps) +{ +}#endif struct mode_width_tuning {@@ -1582,6 +1586,8 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps) bool uhs_en = (mmc->ocr & OCR_S18R) ? true : false;uint caps; +mmc_dump_capabilities ("sd card" , card_caps); +mmc_dump_capabilities ("host" , mmc->host_caps |MMC_MODE_1BIT );/* Restrict card's capabilities by what the host can do */ caps = card_caps & (mmc->host_caps |MMC_MODE_1BIT );@@ -1764,6 +1770,9 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps) const struct mode_width_tuning *mwt;const struct ext_csd_bus_width *ecbw; +mmc_dump_capabilities ("mmc" , card_caps); + mmc_dump_capabilities("host", mmc->host_caps |
MMC_MODE_1BIT); +
drivers/mmc/mmc.c static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps) · line 1777
Quoted 2 lines
drivers/mmc/mmc.c +0
-0/* Restrict card's capabilities by what the host can do */ card_caps &= (mmc->host_caps |MMC_MODE_1BIT );
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/8278f9c4/attachment.sig>
PATCH 3/5 mmc: dump card and host capabilities if debug is enabled
In reply to Jean-Jacques HiblotQuoted 7 lines · Jean-Jacques Hiblot
This is a useful information while debugging the initialization process or performance issues.
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc.c | 9 +++++++++ 1 file changed, 9 insertions(+)
PATCH 4/5 mmc: Fixed a problem with old sd or mmc that do not support High speed
In reply to Jean-Jacques HiblotAs the legacy modes were not added to the list of supported modes, old cards that do not support other modes could not be used.
--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/mmc.c +2 -2
@@ -818,7 +818,7 @@ static int mmc_get_capabilities(struct mmc *mmc)u8 *ext_csd = mmc->ext_csd;char cardtype; - mmc->card_caps =MMC_MODE_1BIT ; + mmc->card_caps =MMC_MODE_1BIT |MMC_CAP (MMC_LEGACY );if (mmc_host_is_spi (mmc))return 0 ;
@@ -1171,7 +1171,7 @@ static int sd_get_capabilities(struct mmc *mmc)int timeout;u32 sd3_bus_mode; - mmc->card_caps =MMC_MODE_1BIT ; + mmc->card_caps =MMC_MODE_1BIT |MMC_CAP (SD_LEGACY );if (mmc_host_is_spi (mmc))return 0 ;
Signature · 1 line
1.9.1
PATCH 4/5 mmc: Fixed a problem with old sd or mmc that do not support High speed
Quoted 22 lines · On Tue, 21 Nov 2017 16:13:07 +0100 Jean-Jacques Hiblot <[email protected]> wrote:
As the legacy modes were not added to the list of supported modes, old cards that do not support other modes could not be used.
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mmc/mmc.c +1
-1@@ -818,7 +818,7 @@ static int mmc_get_capabilities(struct mmc *mmc)u8 *ext_csd = mmc->ext_csd;char cardtype; - mmc->card_caps =MMC_MODE_1BIT ; + mmc->card_caps =MMC_MODE_1BIT |MMC_CAP (MMC_LEGACY );if (mmc_host_is_spi (mmc))return 0 ;
drivers/mmc/mmc.c static int sd_get_capabilities(struct mmc *mmc) · line 1177
Quoted 8 lines
drivers/mmc/mmc.c +1
-1@@ -1171,7 +1171,7 @@ static int sd_get_capabilities(struct mmc *mmc)int timeout;u32 sd3_bus_mode; - mmc->card_caps =MMC_MODE_1BIT ; + mmc->card_caps =MMC_MODE_1BIT |MMC_CAP (SD_LEGACY );if (mmc_host_is_spi (mmc))return 0 ;
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/09429154/attachment.sig>
PATCH 4/5 mmc: Fixed a problem with old sd or mmc that do not support High speed
In reply to Jean-Jacques HiblotOn 21 November 2017 at 08:13, Jean-Jacques Hiblot <[email protected]> wrote:
nit: It is common to use the imperative tense in patches rather than past tesse, e.g. 'Fix a problem with...'
Quoted 7 lines
As the legacy modes were not added to the list of supported modes, old cards that do not support other modes could not be used.
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
PATCH 5/5 mmc: all hosts support 1-bit bus width and legacy timings
In reply to Jean-Jacques HiblotMake sure that those basic capabilities are advertised by the host.
--- drivers/mmc/mmc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/mmc/mmc.c +10 -5
@@ -1587,10 +1587,10 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)uint caps;mmc_dump_capabilities ("sd card" , card_caps); -mmc_dump_capabilities ("host" , mmc->host_caps |MMC_MODE_1BIT ); +mmc_dump_capabilities ("host" , mmc->host_caps);/* Restrict card's capabilities by what the host can do */ - caps = card_caps & (mmc->host_caps |MMC_MODE_1BIT ); + caps = card_caps & mmc->host_caps;if (!uhs_en) caps &= ~UHS_CAPS ;
@@ -1771,10 +1771,10 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)const struct ext_csd_bus_width *ecbw;mmc_dump_capabilities ("mmc" , card_caps); -mmc_dump_capabilities ("host" , mmc->host_caps |MMC_MODE_1BIT ); +mmc_dump_capabilities ("host" , mmc->host_caps);/* Restrict card's capabilities by what the host can do */ - card_caps &= (mmc->host_caps |MMC_MODE_1BIT ); + card_caps &= mmc->host_caps;/* Only version 4 of MMC supports wider bus widths */ if (mmc->version <MMC_VERSION_4 )
@@ -2389,7 +2389,12 @@ int mmc_start_init(struct mmc *mmc)bool uhs_en =supports_uhs (mmc->cfg->host_caps);int err; - mmc->host_caps = mmc->cfg->host_caps; +/* +* all hosts are capable of 1 bit bus-width and able to use the legacy +* timings. +*/ + mmc->host_caps = mmc->cfg->host_caps |MMC_CAP (SD_LEGACY ) | +MMC_CAP (MMC_LEGACY ) |MMC_MODE_1BIT ;/* we pretend there's no card when init is NULL */ no_card =mmc_getcd (mmc) ==0 ;
Signature · 1 line
1.9.1
PATCH 5/5 mmc: all hosts support 1-bit bus width and legacy timings
Quoted 47 lines · On Tue, 21 Nov 2017 16:13:08 +0100 Jean-Jacques Hiblot <[email protected]> wrote:
Make sure that those basic capabilities are advertised by the host.
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)drivers/mmc/mmc.c +2
-2@@ -1587,10 +1587,10 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps) uint caps;mmc_dump_capabilities ("sd card" , card_caps); -mmc_dump_capabilities ("host" , mmc->host_caps | MMC_MODE_1BIT); +mmc_dump_capabilities ("host" , mmc->host_caps);/* Restrict card's capabilities by what the host can do */ - caps = card_caps & (mmc->host_caps |MMC_MODE_1BIT ); + caps = card_caps & mmc->host_caps;if (!uhs_en)drivers/mmc/mmc.c +2
-2caps &= ~UHS_CAPS ;@@ -1771,10 +1771,10 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps) const struct ext_csd_bus_width *ecbw;mmc_dump_capabilities ("mmc" , card_caps); -mmc_dump_capabilities ("host" , mmc->host_caps | MMC_MODE_1BIT); +mmc_dump_capabilities ("host" , mmc->host_caps);/* Restrict card's capabilities by what the host can do */ - card_caps &= (mmc->host_caps |MMC_MODE_1BIT ); + card_caps &= mmc->host_caps;/* Only version 4 of MMC supports wider bus widths */ drivers/mmc/mmc.c +2
-1if (mmc->version <MMC_VERSION_4 )@@ -2389,7 +2389,12 @@ int mmc_start_init(struct mmc *mmc)bool uhs_en =supports_uhs (mmc->cfg->host_caps);int err; - mmc->host_caps = mmc->cfg->host_caps; +/* +* all hosts are capable of 1 bit bus-width and able to use the legacy
drivers/mmc/mmc.c int mmc_start_init(struct mmc *mmc) · line 2400
Quoted 7 lines
drivers/mmc/mmc.c +4
-0+* timings. +*/ + mmc->host_caps = mmc->cfg->host_caps |MMC_CAP (SD_LEGACY ) | +MMC_CAP (MMC_LEGACY ) |MMC_MODE_1BIT ;/* we pretend there's no card when init is NULL */ no_card =mmc_getcd (mmc) ==0 ;
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/9fea8748/attachment.sig>
PATCH 5/5 mmc: all hosts support 1-bit bus width and legacy timings
In reply to Jean-Jacques HiblotHi Jean-Jacques,
Quoted 7 lines · Jean-Jacques Hiblot
Make sure that those basic capabilities are advertised by the host.
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
Your patch seems to suggest that the hardware is advertising the wrong thing. Is that right?
Regards,
Simon
PATCH 5/5 mmc: all hosts support 1-bit bus width and legacy timings
Quoted 5 lines · Simon Glass
Hi Jean-Jacques,
Quoted 2 lines · Jean-Jacques Hiblot
Make sure that those basic capabilities are advertised by the host.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Jean-Jacques Hiblot <[email protected]>--- drivers/mmc/mmc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)Your patch seems to suggest that the hardware is advertising the wrong thing. Is that right?
Yes and no....
1-bit, MMC legacy and SD legacy are capabilities that I introduced for consistency. IMO It makes the code easier. But they are not optional capabilities, all host can handle them.
Instead of converting all existing driver to explicitly advertise them, it's easier ans safer to just add those basic capabilities in the core. JJ
Quoted 4 lines
Regards,
Simon
cover mmc: fixes for HS200/UHS core support
In reply to Jean-Jacques HiblotQuoted 10 lines · Jean-Jacques Hiblot
This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200 and UHS modes"
It fixes a bug with old SD and MMC cards that support only the legacy mode. It also addresses the comments made on the mailing list:
* dump card and host capabilities in debug mode
* use 1-bit if the DTS property 'bus-width' is not present.
* recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS propertiesTested on DRA7, DRA72 and AM335x
Thanks for sending patches. After testing with my boards, will update. For your patches, i made the testing-uhs-supporting branch on u-boot-mmc.
At least, i will share the result about testing with my boards.
Best Regards,
Jaehoon Chung
Quoted 14 lines
Jean-Jacques Hiblot (5):
dm: mmc: updatedmmc_of_parse()to not fail because of an invalid
bus-width
mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean
properties
mmc: dump card and host capabilities if debug is enabled
mmc: Fixed a problem with old sd or mmc that do not support High speed
mmc: all hosts support 1-bit bus width and legacy timingsdrivers/mmc/mmc-uclass.c | 11 ++++++++--- drivers/mmc/mmc.c | 24 +++++++++++++++++++----- 2 files changed, 27 insertions(+), 8 deletions(-)
cover mmc: fixes for HS200/UHS core support
Quoted 10 lines · Jaehoon Chung
Quoted 9 lines · Jean-Jacques Hiblot
This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200 and UHS modes"
It fixes a bug with old SD and MMC cards that support only the legacy mode. It also addresses the comments made on the mailing list:
* dump card and host capabilities in debug mode
* use 1-bit if the DTS property 'bus-width' is not present.
* recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties
Quoted 6 lines
Quoted 1 line
Tested on DRA7, DRA72 and AM335x
Thanks for sending patches. After testing with my boards, will update. For your patches, i made the testing-uhs-supporting branch on u-boot-mmc.
At least, i will share the result about testing with my boards.
Any chance this UHS support will make it into this release finally ? It's been dragging on for like half a year already ...
Signature · 2 lines
Best regards, Marek Vasut
cover mmc: fixes for HS200/UHS core support
Quoted 11 lines · Marek Vasut
Quoted 10 lines · Jaehoon Chung
Quoted 9 lines · Jean-Jacques Hiblot
This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200 and UHS modes"
It fixes a bug with old SD and MMC cards that support only the legacy mode. It also addresses the comments made on the mailing list:
* dump card and host capabilities in debug mode
* use 1-bit if the DTS property 'bus-width' is not present.
* recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Tested on DRA7, DRA72 and AM335x
Thanks for sending patches. After testing with my boards, will update. For your patches, i made the testing-uhs-supporting branch on u-boot-mmc.
At least, i will share the result about testing with my boards.
Any chance this UHS support will make it into this release finally ?
I hope so too. Jaehoon, do you need some help with the testing? what would you need?
Quoted 2 lines
It's been dragging on for like half a year already ...
cover mmc: fixes for HS200/UHS core support
Quoted 17 lines · Jean-Jacques Hiblot
Quoted 14 lines · Marek Vasut
Quoted 13 lines · Jaehoon Chung
Quoted 12 lines · Jean-Jacques Hiblot
This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200
and UHS modes"It fixes a bug with old SD and MMC cards that support only the legacy mode.
It also addresses the comments made on the mailing list:
* dump card and host capabilities in debug mode
* use 1-bit if the DTS property 'bus-width' is not present.
* recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS propertiesTested on DRA7, DRA72 and AM335x
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Thanks for sending patches. After testing with my boards, will update. For your patches, i made the testing-uhs-supporting branch on u-boot-mmc.
At least, i will share the result about testing with my boards.
Any chance this UHS support will make it into this release finally ?
I hope so too. Jaehoon, do you need some help with the testing? what would you need?
It's been tested on 3 different HW platforms and controllers already, so I really fail to see much of a reason to drag this on. If something is botched on samsung controller, that can always be fixed later.
Quoted 4 lines
Quoted 2 lines
It's been dragging on for like half a year already ...
Signature · 2 lines
Best regards, Marek Vasut
cover mmc: fixes for HS200/UHS core support
Quoted 22 lines · Marek Vasut
Quoted 21 lines · Jean-Jacques Hiblot
Quoted 18 lines · Marek Vasut
Quoted 17 lines · Jaehoon Chung
Quoted 4 lines · Jean-Jacques Hiblot
This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200
and UHS modes"Quoted 8 lines
It fixes a bug with old SD and MMC cards that support only the legacy mode.
It also addresses the comments made on the mailing list:
* dump card and host capabilities in debug mode
* use 1-bit if the DTS property 'bus-width' is not present.
* recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS propertiesTested on DRA7, DRA72 and AM335x
Thanks for sending patches. After testing with my boards, will update. For your patches, i made the testing-uhs-supporting branch on u-boot-mmc.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
At least, i will share the result about testing with my boards.
Any chance this UHS support will make it into this release finally ?
I hope so too. Jaehoon, do you need some help with the testing? what would you need?
It's been tested on 3 different HW platforms and controllers already, so I really fail to see much of a reason to drag this on. If something is botched on samsung controller, that can always be fixed later.
Ok. I will do. Sorry.
Thanks!
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
It's been dragging on for like half a year already ...
cover mmc: fixes for HS200/UHS core support
In reply to Jean-Jacques HiblotHi JJ,
Quoted 14 lines · Jean-Jacques Hiblot
Quoted 11 lines · Marek Vasut
Quoted 10 lines · Jaehoon Chung
Quoted 9 lines · Jean-Jacques Hiblot
This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200 and UHS modes"
It fixes a bug with old SD and MMC cards that support only the legacy mode. It also addresses the comments made on the mailing list:
* dump card and host capabilities in debug mode
* use 1-bit if the DTS property 'bus-width' is not present.
* recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Tested on DRA7, DRA72 and AM335x
Thanks for sending patches. After testing with my boards, will update. For your patches, i made the testing-uhs-supporting branch on u-boot-mmc.
At least, i will share the result about testing with my boards.
Any chance this UHS support will make it into this release finally ?
I hope so too. Jaehoon, do you need some help with the testing? what would you need?
I will send the PR with previous your patches, there is a issue about "mmc rescan" and "mmc_init". So i want to fix it after merging to u-boot/master.
And these patches will be applied after reviewing..Sorry for late.
One more...After this patches, it seems that displayed the some dump message. Could you fix it? otherwise i will send the patch about it.
Best Regards,
Jaehoon Chung
Quoted 7 lines
Quoted 2 lines
It's been dragging on for like half a year already ...