Re: [PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
On 02/11/2021 08:02, Peter Robinson wrote: > On Mon, Nov 1, 2021 at 10:32 PM Jack Mitchell wrote: >> >> On 01/11/2021 22:11, Peter Robinson wrote: >>> On Mon, Nov 1, 2021 at 11:18 AM Jack Mitchell wrote: On 01/11/2021 09:07, Alper Nebi Yasak wrote: > I'm trying to make my gru-kevin's eMMC work properly (it times out while > tuning for HS400 and stops working when reinitialized via "mmc dev 0"). I'm also experiencing issue with the re-init of emmc on a 3399 platform, did you come to any conclusions on the reason? It works fine to load u-boot proper from SPL but then fails in u-boot proper when attempting to perform any mmc activity. >>> >>> Does the following patch fix the rk3399 problem? >>> http://patchwork.ozlabs.org/project/uboot/patch/20211101044347.17822-1-yifeng.z...@rock-chips.com/ >>> >> >> Hi Peter, >> >> I have this patch in my tree which fixes the initial init of the emmc, >> but it then fails later when it is re-initialised. Does everything work >> fine on your Rock960, can you boot Linux from the emmc when going SPL >> (emmc) -> Proper (emmc) -> Linux (emmc)? > > Yes, I tested it last night with the patch applied on 2021.10. If you get some time would you mind checking what speed the emmc is running at, by breaking into u-boot proper and running `mmc info`. I'm wondering if yours isn't configuring at hs400 and therefore bypassing the issue. > >> Thanks for the suggestion! >> >> Regards, >> Regards, Jack. > While experimenting with what works on my board I ended up implementing > HS400ES support. And while I'm at it, I decided to do it for RK3568 as > well since it turned out easy enough. Both are ported from relevant > Linux drivers. > > I'm trying this with "load mmc 0:1 0xd000 /bigfile $size" and getting > the following speeds; and with "mmc info" the following differences: > > gru-kevin mmc0 | w/o this series | w/ this series > +---+--- > Bus Speed | 5200 | 2 > Mode| MMC High Speed (52MHz)| HS400ES (200 MHz) > 8MiB Load Speed | ~9.5 MiB/s| ~51.5 MiB/s > 256MiB Load Speed | ~177.8 MiB/s | ~114.5 MiB/s > > Listing partitions, listing files, reading files and the loaded bytes > all look fine to me, but I'm not sure I haven't missed anything. > > > Alper Nebi Yasak (3): > mmc: sdhci: Add HS400 Enhanced Strobe support > rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3399 > rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3568 > > drivers/mmc/rockchip_sdhci.c | 51 > drivers/mmc/sdhci.c | 18 + > include/sdhci.h | 1 + > 3 files changed, 70 insertions(+) > -- Jack Mitchell, Consultant https://www.tuxable.co.uk >> >> >> -- >> Jack Mitchell, Consultant >> https://www.tuxable.co.uk -- Jack Mitchell, Consultant https://www.tuxable.co.uk
Re: [PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
On Mon, Nov 1, 2021 at 10:32 PM Jack Mitchell wrote: > > On 01/11/2021 22:11, Peter Robinson wrote: > > On Mon, Nov 1, 2021 at 11:18 AM Jack Mitchell wrote: > >> > >> On 01/11/2021 09:07, Alper Nebi Yasak wrote: > >>> I'm trying to make my gru-kevin's eMMC work properly (it times out while > >>> tuning for HS400 and stops working when reinitialized via "mmc dev 0"). > >> > >> I'm also experiencing issue with the re-init of emmc on a 3399 platform, > >> did you come to any conclusions on the reason? It works fine to load > >> u-boot proper from SPL but then fails in u-boot proper when attempting > >> to perform any mmc activity. > > > > Does the following patch fix the rk3399 problem? > > http://patchwork.ozlabs.org/project/uboot/patch/20211101044347.17822-1-yifeng.z...@rock-chips.com/ > > > > Hi Peter, > > I have this patch in my tree which fixes the initial init of the emmc, > but it then fails later when it is re-initialised. Does everything work > fine on your Rock960, can you boot Linux from the emmc when going SPL > (emmc) -> Proper (emmc) -> Linux (emmc)? Yes, I tested it last night with the patch applied on 2021.10. > Thanks for the suggestion! > > Regards, > > >> Regards, > >> Jack. > >> > >>> While experimenting with what works on my board I ended up implementing > >>> HS400ES support. And while I'm at it, I decided to do it for RK3568 as > >>> well since it turned out easy enough. Both are ported from relevant > >>> Linux drivers. > >>> > >>> I'm trying this with "load mmc 0:1 0xd000 /bigfile $size" and getting > >>> the following speeds; and with "mmc info" the following differences: > >>> > >>> gru-kevin mmc0 | w/o this series | w/ this series > >>> +---+--- > >>> Bus Speed | 5200 | 2 > >>> Mode| MMC High Speed (52MHz)| HS400ES (200 MHz) > >>> 8MiB Load Speed | ~9.5 MiB/s| ~51.5 MiB/s > >>> 256MiB Load Speed | ~177.8 MiB/s | ~114.5 MiB/s > >>> > >>> Listing partitions, listing files, reading files and the loaded bytes > >>> all look fine to me, but I'm not sure I haven't missed anything. > >>> > >>> > >>> Alper Nebi Yasak (3): > >>> mmc: sdhci: Add HS400 Enhanced Strobe support > >>> rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3399 > >>> rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3568 > >>> > >>> drivers/mmc/rockchip_sdhci.c | 51 > >>> drivers/mmc/sdhci.c | 18 + > >>> include/sdhci.h | 1 + > >>> 3 files changed, 70 insertions(+) > >>> > >> > >> -- > >> Jack Mitchell, Consultant > >> https://www.tuxable.co.uk > > > -- > Jack Mitchell, Consultant > https://www.tuxable.co.uk
Re: [PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
Hi, On 11/1/21 9:16 PM, Alper Nebi Yasak wrote: > On 01/11/2021 14:18, Jack Mitchell wrote: >> On 01/11/2021 09:07, Alper Nebi Yasak wrote: >>> I'm trying to make my gru-kevin's eMMC work properly (it times out while >>> tuning for HS400 and stops working when reinitialized via "mmc dev 0"). >> >> I'm also experiencing issue with the re-init of emmc on a 3399 platform, >> did you come to any conclusions on the reason? It works fine to load >> u-boot proper from SPL but then fails in u-boot proper when attempting >> to perform any mmc activity. > > Not really. But I have a nice hack to keep it in a working state: > > diff --git a/cmd/mmc.c b/cmd/mmc.c > index 96d81ffdf368..83bd18e34609 100644 > --- a/cmd/mmc.c > +++ b/cmd/mmc.c > @@ -129,10 +129,13 @@ static struct mmc *__init_mmc_device(...) > if (!mmc) { > printf("no mmc device at slot %x\n", dev); > return NULL; > } > > + if (mmc->cfg->host_caps & MMC_CAP_NONREMOVABLE) > + force_init = false; > + I don't have rockchip board, but this code is working fine. It seems that needs to implement a reinit callback function to clear the previous configurations in rockchip_sdhci.c. Best Regards, Jaehoon Chung > if (!mmc_getcd(mmc)) > force_init = true; > > if (force_init) > mmc->has_init = 0; >
Re: [PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
On 01/11/2021 22:11, Peter Robinson wrote: > On Mon, Nov 1, 2021 at 11:18 AM Jack Mitchell wrote: >> >> On 01/11/2021 09:07, Alper Nebi Yasak wrote: >>> I'm trying to make my gru-kevin's eMMC work properly (it times out while >>> tuning for HS400 and stops working when reinitialized via "mmc dev 0"). >> >> I'm also experiencing issue with the re-init of emmc on a 3399 platform, >> did you come to any conclusions on the reason? It works fine to load >> u-boot proper from SPL but then fails in u-boot proper when attempting >> to perform any mmc activity. > > Does the following patch fix the rk3399 problem? > http://patchwork.ozlabs.org/project/uboot/patch/20211101044347.17822-1-yifeng.z...@rock-chips.com/ > Hi Peter, I have this patch in my tree which fixes the initial init of the emmc, but it then fails later when it is re-initialised. Does everything work fine on your Rock960, can you boot Linux from the emmc when going SPL (emmc) -> Proper (emmc) -> Linux (emmc)? Thanks for the suggestion! Regards, >> Regards, >> Jack. >> >>> While experimenting with what works on my board I ended up implementing >>> HS400ES support. And while I'm at it, I decided to do it for RK3568 as >>> well since it turned out easy enough. Both are ported from relevant >>> Linux drivers. >>> >>> I'm trying this with "load mmc 0:1 0xd000 /bigfile $size" and getting >>> the following speeds; and with "mmc info" the following differences: >>> >>> gru-kevin mmc0 | w/o this series | w/ this series >>> +---+--- >>> Bus Speed | 5200 | 2 >>> Mode| MMC High Speed (52MHz)| HS400ES (200 MHz) >>> 8MiB Load Speed | ~9.5 MiB/s| ~51.5 MiB/s >>> 256MiB Load Speed | ~177.8 MiB/s | ~114.5 MiB/s >>> >>> Listing partitions, listing files, reading files and the loaded bytes >>> all look fine to me, but I'm not sure I haven't missed anything. >>> >>> >>> Alper Nebi Yasak (3): >>> mmc: sdhci: Add HS400 Enhanced Strobe support >>> rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3399 >>> rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3568 >>> >>> drivers/mmc/rockchip_sdhci.c | 51 >>> drivers/mmc/sdhci.c | 18 + >>> include/sdhci.h | 1 + >>> 3 files changed, 70 insertions(+) >>> >> >> -- >> Jack Mitchell, Consultant >> https://www.tuxable.co.uk -- Jack Mitchell, Consultant https://www.tuxable.co.uk
Re: [PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
On Mon, Nov 1, 2021 at 11:18 AM Jack Mitchell wrote: > > On 01/11/2021 09:07, Alper Nebi Yasak wrote: > > I'm trying to make my gru-kevin's eMMC work properly (it times out while > > tuning for HS400 and stops working when reinitialized via "mmc dev 0"). > > I'm also experiencing issue with the re-init of emmc on a 3399 platform, > did you come to any conclusions on the reason? It works fine to load > u-boot proper from SPL but then fails in u-boot proper when attempting > to perform any mmc activity. Does the following patch fix the rk3399 problem? http://patchwork.ozlabs.org/project/uboot/patch/20211101044347.17822-1-yifeng.z...@rock-chips.com/ > Regards, > Jack. > > > While experimenting with what works on my board I ended up implementing > > HS400ES support. And while I'm at it, I decided to do it for RK3568 as > > well since it turned out easy enough. Both are ported from relevant > > Linux drivers. > > > > I'm trying this with "load mmc 0:1 0xd000 /bigfile $size" and getting > > the following speeds; and with "mmc info" the following differences: > > > > gru-kevin mmc0 | w/o this series | w/ this series > > +---+--- > > Bus Speed | 5200 | 2 > > Mode| MMC High Speed (52MHz)| HS400ES (200 MHz) > > 8MiB Load Speed | ~9.5 MiB/s| ~51.5 MiB/s > > 256MiB Load Speed | ~177.8 MiB/s | ~114.5 MiB/s > > > > Listing partitions, listing files, reading files and the loaded bytes > > all look fine to me, but I'm not sure I haven't missed anything. > > > > > > Alper Nebi Yasak (3): > > mmc: sdhci: Add HS400 Enhanced Strobe support > > rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3399 > > rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3568 > > > > drivers/mmc/rockchip_sdhci.c | 51 > > drivers/mmc/sdhci.c | 18 + > > include/sdhci.h | 1 + > > 3 files changed, 70 insertions(+) > > > > -- > Jack Mitchell, Consultant > https://www.tuxable.co.uk
Re: [PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
On 01/11/2021 14:18, Jack Mitchell wrote: > On 01/11/2021 09:07, Alper Nebi Yasak wrote: >> I'm trying to make my gru-kevin's eMMC work properly (it times out while >> tuning for HS400 and stops working when reinitialized via "mmc dev 0"). > > I'm also experiencing issue with the re-init of emmc on a 3399 platform, > did you come to any conclusions on the reason? It works fine to load > u-boot proper from SPL but then fails in u-boot proper when attempting > to perform any mmc activity. Not really. But I have a nice hack to keep it in a working state: diff --git a/cmd/mmc.c b/cmd/mmc.c index 96d81ffdf368..83bd18e34609 100644 --- a/cmd/mmc.c +++ b/cmd/mmc.c @@ -129,10 +129,13 @@ static struct mmc *__init_mmc_device(...) if (!mmc) { printf("no mmc device at slot %x\n", dev); return NULL; } + if (mmc->cfg->host_caps & MMC_CAP_NONREMOVABLE) + force_init = false; + if (!mmc_getcd(mmc)) force_init = true; if (force_init) mmc->has_init = 0;
Re: [PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
On 01/11/2021 09:07, Alper Nebi Yasak wrote: > I'm trying to make my gru-kevin's eMMC work properly (it times out while > tuning for HS400 and stops working when reinitialized via "mmc dev 0"). I'm also experiencing issue with the re-init of emmc on a 3399 platform, did you come to any conclusions on the reason? It works fine to load u-boot proper from SPL but then fails in u-boot proper when attempting to perform any mmc activity. Regards, Jack. > While experimenting with what works on my board I ended up implementing > HS400ES support. And while I'm at it, I decided to do it for RK3568 as > well since it turned out easy enough. Both are ported from relevant > Linux drivers. > > I'm trying this with "load mmc 0:1 0xd000 /bigfile $size" and getting > the following speeds; and with "mmc info" the following differences: > > gru-kevin mmc0 | w/o this series | w/ this series > +---+--- > Bus Speed | 5200 | 2 > Mode| MMC High Speed (52MHz)| HS400ES (200 MHz) > 8MiB Load Speed | ~9.5 MiB/s| ~51.5 MiB/s > 256MiB Load Speed | ~177.8 MiB/s | ~114.5 MiB/s > > Listing partitions, listing files, reading files and the loaded bytes > all look fine to me, but I'm not sure I haven't missed anything. > > > Alper Nebi Yasak (3): > mmc: sdhci: Add HS400 Enhanced Strobe support > rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3399 > rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3568 > > drivers/mmc/rockchip_sdhci.c | 51 > drivers/mmc/sdhci.c | 18 + > include/sdhci.h | 1 + > 3 files changed, 70 insertions(+) > -- Jack Mitchell, Consultant https://www.tuxable.co.uk
Re: [PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
On 01/11/2021 12:19, Jaehoon Chung wrote: > On 11/1/21 6:07 PM, Alper Nebi Yasak wrote: >> I'm trying this with "load mmc 0:1 0xd000 /bigfile $size" and getting >> the following speeds; and with "mmc info" the following differences: >> >> gru-kevin mmc0 | w/o this series | w/ this series >> +---+--- >> Bus Speed | 5200 | 2 >> Mode| MMC High Speed (52MHz)| HS400ES (200 MHz) >> 8MiB Load Speed | ~9.5 MiB/s| ~51.5 MiB/s >> 256MiB Load Speed | ~177.8 MiB/s | ~114.5 MiB/s > > I wonder why HS400ES is lower than High Speed mode in 256MiB Load Speed. I messed up the table, noticed it shortly after sending the series and sent a correction same time as your email. The actual values are: > 8MiB Load Speed | ~9.5 MiB/s| ~177.8 MiB/s > 256MiB Load Speed | ~51.5 MiB/s | ~114.5 MiB/s Sorry for the noise.
Re: [PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
Hi, On 11/1/21 6:07 PM, Alper Nebi Yasak wrote: > I'm trying to make my gru-kevin's eMMC work properly (it times out while > tuning for HS400 and stops working when reinitialized via "mmc dev 0"). > While experimenting with what works on my board I ended up implementing > HS400ES support. And while I'm at it, I decided to do it for RK3568 as > well since it turned out easy enough. Both are ported from relevant > Linux drivers. > > I'm trying this with "load mmc 0:1 0xd000 /bigfile $size" and getting > the following speeds; and with "mmc info" the following differences: > > gru-kevin mmc0 | w/o this series | w/ this series > +---+--- > Bus Speed | 5200 | 2 > Mode| MMC High Speed (52MHz)| HS400ES (200 MHz) > 8MiB Load Speed | ~9.5 MiB/s| ~51.5 MiB/s > 256MiB Load Speed | ~177.8 MiB/s | ~114.5 MiB/s I wonder why HS400ES is lower than High Speed mode in 256MiB Load Speed. Best Regards, Jaehoon Chung > > Listing partitions, listing files, reading files and the loaded bytes > all look fine to me, but I'm not sure I haven't missed anything. > > > Alper Nebi Yasak (3): > mmc: sdhci: Add HS400 Enhanced Strobe support > rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3399 > rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3568 > > drivers/mmc/rockchip_sdhci.c | 51 > drivers/mmc/sdhci.c | 18 + > include/sdhci.h | 1 + > 3 files changed, 70 insertions(+) >
Re: [PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
On 01/11/2021 12:07, Alper Nebi Yasak wrote: > I'm trying this with "load mmc 0:1 0xd000 /bigfile $size" and getting > the following speeds; and with "mmc info" the following differences: > > gru-kevin mmc0 | w/o this series | w/ this series > +---+--- > Bus Speed | 5200 | 2 > Mode| MMC High Speed (52MHz)| HS400ES (200 MHz) > 8MiB Load Speed | ~9.5 MiB/s| ~51.5 MiB/s > 256MiB Load Speed | ~177.8 MiB/s | ~114.5 MiB/s I have messed this table up while reformatting it from one orientation to another... The last two rows are transposed, and are instead: > 8MiB Load Speed | ~9.5 MiB/s| ~177.8 MiB/s > 256MiB Load Speed | ~51.5 MiB/s | ~114.5 MiB/s
[PATCH 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support
I'm trying to make my gru-kevin's eMMC work properly (it times out while tuning for HS400 and stops working when reinitialized via "mmc dev 0"). While experimenting with what works on my board I ended up implementing HS400ES support. And while I'm at it, I decided to do it for RK3568 as well since it turned out easy enough. Both are ported from relevant Linux drivers. I'm trying this with "load mmc 0:1 0xd000 /bigfile $size" and getting the following speeds; and with "mmc info" the following differences: gru-kevin mmc0 | w/o this series | w/ this series +---+--- Bus Speed | 5200 | 2 Mode| MMC High Speed (52MHz)| HS400ES (200 MHz) 8MiB Load Speed | ~9.5 MiB/s| ~51.5 MiB/s 256MiB Load Speed | ~177.8 MiB/s | ~114.5 MiB/s Listing partitions, listing files, reading files and the loaded bytes all look fine to me, but I'm not sure I haven't missed anything. Alper Nebi Yasak (3): mmc: sdhci: Add HS400 Enhanced Strobe support rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3399 rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3568 drivers/mmc/rockchip_sdhci.c | 51 drivers/mmc/sdhci.c | 18 + include/sdhci.h | 1 + 3 files changed, 70 insertions(+) -- 2.33.1