* [PATCH] mmc: tegra: Disable UHS-I modes for tegra30
@ 2016-05-09 15:15 Jon Hunter
[not found] ` <1462806903-13860-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Jon Hunter @ 2016-05-09 15:15 UTC (permalink / raw)
To: Adrian Hunter, Ulf Hansson, Stephen Warren, Thierry Reding,
Alexandre Courbot
Cc: linux-mmc, linux-tegra, linux-kernel, Jon Hunter
Support for SD cards is not working on the Tegra30 Beaver board and on
boot the following error message is seen if an SD card is present:
mmc0: error -110 whilst initialising SD card
In addition to this, Tegra30 is also randomly hanging during system
suspend when entering and is caused by the Tegra SDHCI driver. Similar
issues have been seen on the Tegra124 Jetson TK1 and are linked to the
UHS-I tuning sequence. Disabling the UHS-I modes for Tegra30 fixes SD
card support and prevents any hangs from occurring when entering system
suspend. Therefore, disable the UHS-I modes for Tegra30 for now until
we can correct the tuning sequence for Tegra.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/mmc/host/sdhci-tegra.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index bcc0de47fe7e..24c33aee8e7c 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -347,10 +347,6 @@ static const struct sdhci_pltfm_data sdhci_tegra30_pdata = {
static const struct sdhci_tegra_soc_data soc_data_tegra30 = {
.pdata = &sdhci_tegra30_pdata,
- .nvquirks = NVQUIRK_ENABLE_SDHCI_SPEC_300 |
- NVQUIRK_ENABLE_SDR50 |
- NVQUIRK_ENABLE_SDR104 |
- NVQUIRK_HAS_PADCALIB,
};
static const struct sdhci_ops tegra114_sdhci_ops = {
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread[parent not found: <1462806903-13860-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] mmc: tegra: Disable UHS-I modes for tegra30 [not found] ` <1462806903-13860-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> @ 2016-05-10 6:25 ` Ulf Hansson 2016-05-10 7:09 ` Lucas Stach 2016-05-10 16:13 ` Jon Hunter 2 siblings, 0 replies; 8+ messages in thread From: Ulf Hansson @ 2016-05-10 6:25 UTC (permalink / raw) To: Jon Hunter Cc: Adrian Hunter, Stephen Warren, Thierry Reding, Alexandre Courbot, linux-mmc, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 9 May 2016 at 17:15, Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote: > Support for SD cards is not working on the Tegra30 Beaver board and on > boot the following error message is seen if an SD card is present: > > mmc0: error -110 whilst initialising SD card > > In addition to this, Tegra30 is also randomly hanging during system > suspend when entering and is caused by the Tegra SDHCI driver. Similar > issues have been seen on the Tegra124 Jetson TK1 and are linked to the > UHS-I tuning sequence. Disabling the UHS-I modes for Tegra30 fixes SD > card support and prevents any hangs from occurring when entering system > suspend. Therefore, disable the UHS-I modes for Tegra30 for now until > we can correct the tuning sequence for Tegra. > > Signed-off-by: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Perhaps we should add a fixes/stable tag as well? Kind regards Uffe > --- > drivers/mmc/host/sdhci-tegra.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c > index bcc0de47fe7e..24c33aee8e7c 100644 > --- a/drivers/mmc/host/sdhci-tegra.c > +++ b/drivers/mmc/host/sdhci-tegra.c > @@ -347,10 +347,6 @@ static const struct sdhci_pltfm_data sdhci_tegra30_pdata = { > > static const struct sdhci_tegra_soc_data soc_data_tegra30 = { > .pdata = &sdhci_tegra30_pdata, > - .nvquirks = NVQUIRK_ENABLE_SDHCI_SPEC_300 | > - NVQUIRK_ENABLE_SDR50 | > - NVQUIRK_ENABLE_SDR104 | > - NVQUIRK_HAS_PADCALIB, > }; > > static const struct sdhci_ops tegra114_sdhci_ops = { > -- > 2.1.4 > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mmc: tegra: Disable UHS-I modes for tegra30 [not found] ` <1462806903-13860-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2016-05-10 6:25 ` Ulf Hansson @ 2016-05-10 7:09 ` Lucas Stach [not found] ` <1462864193.13327.2.camel-8ppwABl0HbeELgA04lAiVw@public.gmane.org> 2016-05-10 16:13 ` Jon Hunter 2 siblings, 1 reply; 8+ messages in thread From: Lucas Stach @ 2016-05-10 7:09 UTC (permalink / raw) To: Jon Hunter, Adrian Hunter, Ulf Hansson, Stephen Warren, Thierry Reding, Alexandre Courbot Cc: linux-mmc-u79uwXL29TY76Z2rM5mHXA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA Hi Jon, Am Montag, den 09.05.2016, 16:15 +0100 schrieb Jon Hunter: > Support for SD cards is not working on the Tegra30 Beaver board and > on > boot the following error message is seen if an SD card is present: > > mmc0: error -110 whilst initialising SD card > Can you please tell me what kind of SD card you used and at which point in the initialization it is hanging? I've tested this change on Beaver and haven't seen any failures after I implemented the memcomppad calibration. > In addition to this, Tegra30 is also randomly hanging during system > suspend when entering and is caused by the Tegra SDHCI driver. I'll have a look at this soonish. > Similar > issues have been seen on the Tegra124 Jetson TK1 and are linked to > the > UHS-I tuning sequence. Disabling the UHS-I modes for Tegra30 fixes SD > card support and prevents any hangs from occurring when entering > system > suspend. Therefore, disable the UHS-I modes for Tegra30 for now until > we can correct the tuning sequence for Tegra. > > Signed-off-by: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > --- > drivers/mmc/host/sdhci-tegra.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci- > tegra.c > index bcc0de47fe7e..24c33aee8e7c 100644 > --- a/drivers/mmc/host/sdhci-tegra.c > +++ b/drivers/mmc/host/sdhci-tegra.c > @@ -347,10 +347,6 @@ static const struct sdhci_pltfm_data > sdhci_tegra30_pdata = { > > static const struct sdhci_tegra_soc_data soc_data_tegra30 = { > .pdata = &sdhci_tegra30_pdata, > - .nvquirks = NVQUIRK_ENABLE_SDHCI_SPEC_300 | > - NVQUIRK_ENABLE_SDR50 | > - NVQUIRK_ENABLE_SDR104 | > - NVQUIRK_HAS_PADCALIB, > }; > > static const struct sdhci_ops tegra114_sdhci_ops = { ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <1462864193.13327.2.camel-8ppwABl0HbeELgA04lAiVw@public.gmane.org>]
* Re: [PATCH] mmc: tegra: Disable UHS-I modes for tegra30 [not found] ` <1462864193.13327.2.camel-8ppwABl0HbeELgA04lAiVw@public.gmane.org> @ 2016-05-10 11:15 ` Jon Hunter 0 siblings, 0 replies; 8+ messages in thread From: Jon Hunter @ 2016-05-10 11:15 UTC (permalink / raw) To: Lucas Stach, Adrian Hunter, Ulf Hansson, Stephen Warren, Thierry Reding, Alexandre Courbot Cc: linux-mmc-u79uwXL29TY76Z2rM5mHXA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA On 10/05/16 08:09, Lucas Stach wrote: > Hi Jon, > > Am Montag, den 09.05.2016, 16:15 +0100 schrieb Jon Hunter: >> Support for SD cards is not working on the Tegra30 Beaver board and >> on >> boot the following error message is seen if an SD card is present: >> >> mmc0: error -110 whilst initialising SD card >> > Can you please tell me what kind of SD card you used and at which point > in the initialization it is hanging? I've tested this change on Beaver > and haven't seen any failures after I implemented the memcomppad > calibration. Yes it is an SDHC 4GB I believe. The board is remote and so I have not seen the exact card. However, here are some more details from sysfs: root@(none):/# cat /sys/class/mmc_host/mmc0/mmc0\:aaaa/name SS04G root@(none):/# cat /sys/class/mmc_host/mmc0/mmc0\:aaaa/csd 400e00325b5900001d8a7f800a404000 root@(none):/# cat /sys/class/mmc_host/mmc0/mmc0\:aaaa/cid 03534453533034478029b1301800f900 root@(none):/# cat /sys/class/mmc_host/mmc0/mmc0\:aaaa/oemid 0x5344 root@(none):/# cat /sys/class/mmc_host/mmc0/mmc0\:aaaa/manfid 0x000003 >> In addition to this, Tegra30 is also randomly hanging during system >> suspend when entering and is caused by the Tegra SDHCI driver. > > I'll have a look at this soonish. Thanks. I think I have mentioned this before, but I run a loop test for example ... count=0; while [ $count -lt 100 ]; do rtcwake -d rtc0 -m mem -s 3; echo Suspend iteration $count; count=`expr $count + 1`; done Cheers Jon ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mmc: tegra: Disable UHS-I modes for tegra30 [not found] ` <1462806903-13860-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 2016-05-10 6:25 ` Ulf Hansson 2016-05-10 7:09 ` Lucas Stach @ 2016-05-10 16:13 ` Jon Hunter 2016-05-10 16:34 ` Stephen Warren 2 siblings, 1 reply; 8+ messages in thread From: Jon Hunter @ 2016-05-10 16:13 UTC (permalink / raw) To: Adrian Hunter, Ulf Hansson, Stephen Warren, Thierry Reding, Alexandre Courbot Cc: linux-mmc-u79uwXL29TY76Z2rM5mHXA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Lucas Stach On 09/05/16 16:15, Jon Hunter wrote: > Support for SD cards is not working on the Tegra30 Beaver board and on > boot the following error message is seen if an SD card is present: > > mmc0: error -110 whilst initialising SD card > > In addition to this, Tegra30 is also randomly hanging during system > suspend when entering and is caused by the Tegra SDHCI driver. Similar > issues have been seen on the Tegra124 Jetson TK1 and are linked to the > UHS-I tuning sequence. Disabling the UHS-I modes for Tegra30 fixes SD > card support and prevents any hangs from occurring when entering system > suspend. Therefore, disable the UHS-I modes for Tegra30 for now until > we can correct the tuning sequence for Tegra. > > Signed-off-by: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > --- > drivers/mmc/host/sdhci-tegra.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c > index bcc0de47fe7e..24c33aee8e7c 100644 > --- a/drivers/mmc/host/sdhci-tegra.c > +++ b/drivers/mmc/host/sdhci-tegra.c > @@ -347,10 +347,6 @@ static const struct sdhci_pltfm_data sdhci_tegra30_pdata = { > > static const struct sdhci_tegra_soc_data soc_data_tegra30 = { > .pdata = &sdhci_tegra30_pdata, > - .nvquirks = NVQUIRK_ENABLE_SDHCI_SPEC_300 | Ugh ... looks like I may have been a bit trigger happy with sending this patch. I should not have removed the above line. However, it seems that if I don't then the problem with the SD not initialising persists. So this implies that something else is going on here with this particular SD card. Furthermore, I have seen that another tegra30-beaver is initialising the SD card fine on kernelci.org and it seems this is working for Lucas too. Plus in suspend I have not seen the mmc timeout warning that I was seeing on tegra114/124 when they were failing. That also implies a different problem. Stephen, for your u-boot testing, do you are set the bit in the vendor misc register to enable version 3.0 support for sdhci on tegra30? This is what the above quirk is doing (and has done so for a very long time). Sorry I am usually more thorough ... Jon ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mmc: tegra: Disable UHS-I modes for tegra30 2016-05-10 16:13 ` Jon Hunter @ 2016-05-10 16:34 ` Stephen Warren 2016-05-10 17:16 ` Jon Hunter 0 siblings, 1 reply; 8+ messages in thread From: Stephen Warren @ 2016-05-10 16:34 UTC (permalink / raw) To: Jon Hunter Cc: Adrian Hunter, Ulf Hansson, Thierry Reding, Alexandre Courbot, linux-mmc, linux-tegra, linux-kernel, Lucas Stach On 05/10/2016 10:13 AM, Jon Hunter wrote: > > On 09/05/16 16:15, Jon Hunter wrote: >> Support for SD cards is not working on the Tegra30 Beaver board and on >> boot the following error message is seen if an SD card is present: >> >> mmc0: error -110 whilst initialising SD card >> >> In addition to this, Tegra30 is also randomly hanging during system >> suspend when entering and is caused by the Tegra SDHCI driver. Similar >> issues have been seen on the Tegra124 Jetson TK1 and are linked to the >> UHS-I tuning sequence. Disabling the UHS-I modes for Tegra30 fixes SD >> card support and prevents any hangs from occurring when entering system >> suspend. Therefore, disable the UHS-I modes for Tegra30 for now until >> we can correct the tuning sequence for Tegra. >> >> Signed-off-by: Jon Hunter <jonathanh@nvidia.com> >> --- >> drivers/mmc/host/sdhci-tegra.c | 4 ---- >> 1 file changed, 4 deletions(-) >> >> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c >> index bcc0de47fe7e..24c33aee8e7c 100644 >> --- a/drivers/mmc/host/sdhci-tegra.c >> +++ b/drivers/mmc/host/sdhci-tegra.c >> @@ -347,10 +347,6 @@ static const struct sdhci_pltfm_data sdhci_tegra30_pdata = { >> >> static const struct sdhci_tegra_soc_data soc_data_tegra30 = { >> .pdata = &sdhci_tegra30_pdata, >> - .nvquirks = NVQUIRK_ENABLE_SDHCI_SPEC_300 | > > Ugh ... looks like I may have been a bit trigger happy with sending this > patch. I should not have removed the above line. However, it seems that > if I don't then the problem with the SD not initialising persists. So > this implies that something else is going on here with this particular > SD card. Furthermore, I have seen that another tegra30-beaver is > initialising the SD card fine on kernelci.org and it seems this is > working for Lucas too. > > Plus in suspend I have not seen the mmc timeout warning that I was > seeing on tegra114/124 when they were failing. That also implies a > different problem. > > Stephen, for your u-boot testing, do you are set the bit in the vendor > misc register to enable version 3.0 support for sdhci on tegra30? This > is what the above quirk is doing (and has done so for a very long time). I don't see anything in the U-Boot driver that is equivalent to the kernel's NVQUIRK_ENABLE_SDHCI_SPEC_300. I assume that means the controller advertises an early spec version when in U-Boot, which simply means U-Boot doesn't know to take advantage of any faster transfer modes enabled by later specification versions, but I'm not entirely sure what effect the following kernel code has on the HW: > /* Erratum: Enable SDHCI spec v3.00 support */ > if (soc_data->nvquirks & NVQUIRK_ENABLE_SDHCI_SPEC_300) > misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300; Perhaps the kernel driver should pulse the controller's CAR reset signal in probe() to ensure that the HW is in a known state? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mmc: tegra: Disable UHS-I modes for tegra30 2016-05-10 16:34 ` Stephen Warren @ 2016-05-10 17:16 ` Jon Hunter 2016-05-10 17:49 ` Stephen Warren 0 siblings, 1 reply; 8+ messages in thread From: Jon Hunter @ 2016-05-10 17:16 UTC (permalink / raw) To: Stephen Warren Cc: Adrian Hunter, Ulf Hansson, Thierry Reding, Alexandre Courbot, linux-mmc, linux-tegra, linux-kernel, Lucas Stach On 10/05/16 17:34, Stephen Warren wrote: > On 05/10/2016 10:13 AM, Jon Hunter wrote: [snip] >> Stephen, for your u-boot testing, do you are set the bit in the vendor >> misc register to enable version 3.0 support for sdhci on tegra30? This >> is what the above quirk is doing (and has done so for a very long time). > > I don't see anything in the U-Boot driver that is equivalent to the > kernel's NVQUIRK_ENABLE_SDHCI_SPEC_300. I assume that means the > controller advertises an early spec version when in U-Boot, which simply > means U-Boot doesn't know to take advantage of any faster transfer modes > enabled by later specification versions, but I'm not entirely sure what > effect the following kernel code has on the HW: > >> /* Erratum: Enable SDHCI spec v3.00 support */ >> if (soc_data->nvquirks & NVQUIRK_ENABLE_SDHCI_SPEC_300) >> misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300; Do you see it touch the SDHCI_TEGRA_VENDOR_MISC_CTRL register? The TRM states ... "SDMMC_SPARE0[4] : When set, SD3.0 support is advertised in SDMMC_SLOT_INTERRUPT_STATUS_0_SPECIFICATION_VERSION_NUMBER Otherwise, only SD2.0 support is advertised" So I *believe* this means that the sdhci version will now appear as 3.0 and so the host->version == SDHCI_SPEC_300. There are many places in the sdhci driver where it is checking ... if (host->version >= SDHCI_SPEC_300) ... > Perhaps the kernel driver should pulse the controller's CAR reset signal > in probe() to ensure that the HW is in a known state? I will take a look. Jon ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mmc: tegra: Disable UHS-I modes for tegra30 2016-05-10 17:16 ` Jon Hunter @ 2016-05-10 17:49 ` Stephen Warren 0 siblings, 0 replies; 8+ messages in thread From: Stephen Warren @ 2016-05-10 17:49 UTC (permalink / raw) To: Jon Hunter Cc: Adrian Hunter, Ulf Hansson, Thierry Reding, Alexandre Courbot, linux-mmc, linux-tegra, linux-kernel, Lucas Stach On 05/10/2016 11:16 AM, Jon Hunter wrote: > > On 10/05/16 17:34, Stephen Warren wrote: >> On 05/10/2016 10:13 AM, Jon Hunter wrote: > > [snip] > >>> Stephen, for your u-boot testing, do you are set the bit in the vendor >>> misc register to enable version 3.0 support for sdhci on tegra30? This >>> is what the above quirk is doing (and has done so for a very long time). >> >> I don't see anything in the U-Boot driver that is equivalent to the >> kernel's NVQUIRK_ENABLE_SDHCI_SPEC_300. I assume that means the >> controller advertises an early spec version when in U-Boot, which simply >> means U-Boot doesn't know to take advantage of any faster transfer modes >> enabled by later specification versions, but I'm not entirely sure what >> effect the following kernel code has on the HW: >> >>> /* Erratum: Enable SDHCI spec v3.00 support */ >>> if (soc_data->nvquirks & NVQUIRK_ENABLE_SDHCI_SPEC_300) >>> misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300; > > Do you see it touch the SDHCI_TEGRA_VENDOR_MISC_CTRL register? Not at all. For reference, the register is defined in arch/arm/include/asm/arch-tegra/tegra_mmc.h as venmiscctl, and that symbol isn't referenced anywhere. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-05-10 17:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-09 15:15 [PATCH] mmc: tegra: Disable UHS-I modes for tegra30 Jon Hunter
[not found] ` <1462806903-13860-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-05-10 6:25 ` Ulf Hansson
2016-05-10 7:09 ` Lucas Stach
[not found] ` <1462864193.13327.2.camel-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
2016-05-10 11:15 ` Jon Hunter
2016-05-10 16:13 ` Jon Hunter
2016-05-10 16:34 ` Stephen Warren
2016-05-10 17:16 ` Jon Hunter
2016-05-10 17:49 ` Stephen Warren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).