linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* msm8996: sdhci-msm: apq8096-db820c sdhci fails to init - "Timeout waiting for hardware interrupt."
@ 2019-10-10 14:32 Paolo Pisati
  2019-10-10 14:36 ` Jeffrey Hugo
  2019-10-11  6:01 ` Brian Masney
  0 siblings, 2 replies; 7+ messages in thread
From: Paolo Pisati @ 2019-10-10 14:32 UTC (permalink / raw)
  To: linux-arm-msm; +Cc: Andy Gross, linux-kernel

Sdhci consistenlty fails to initialize (and thus work) on my apq8096-db820c.

The issue is present since v5.0[*] mainline up to latest v5.4-rc2, using defconfig and:

CONFIG_SCSI_UFS_QCOM=y
CONFIG_PHY_QCOM_QMP=y
CONFIG_PHY_QCOM_UFS=y
CONFIG_ATL1C=y

but can be 100% reproduced with a clean defconfig too.

During boot, when it's time to mount the sdcard, mmc0 spits out a lot of:

...
[   13.683059] mmc0: Timeout waiting for hardware interrupt.
[   13.683095] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[   13.687441] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x00004902
[   13.693861] mmc0: sdhci: Blk size:  0x00004200 | Blk cnt:  0x00000000
[   13.700285] mmc0: sdhci: Argument:  0x00012444 | Trn mode: 0x00000033
[   13.706707] mmc0: sdhci: Present:   0x01680206 | Host ctl: 0x0000001f
[   13.713131] mmc0: sdhci: Power:     0x00000001 | Blk gap:  0x00000000
[   13.719555] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
[   13.725979] mmc0: sdhci: Timeout:   0x0000000a | Int stat: 0x00000000
[   13.732403] mmc0: sdhci: Int enab:  0x03ff900b | Sig enab: 0x03ff100b
[   13.738824] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[   13.745249] mmc0: sdhci: Caps:      0x322dc8b2 | Caps_1:   0x00008007
[   13.751673] mmc0: sdhci: Cmd:       0x0000123a | Max curr: 0x00000000
[   13.758097] mmc0: sdhci: Resp[0]:   0x00000900 | Resp[1]:  0x5b590000
[   13.764519] mmc0: sdhci: Resp[2]:   0x76b27f80 | Resp[3]:  0x0a404012
[   13.770944] mmc0: sdhci: Host ctl2: 0x00000000
[   13.777365] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x00000001588be200
[   13.781708] mmc0: sdhci: ============================================
[   13.888927] mmc0: Reset 0x4 never completed.
...
[   14.004327] mmc0: Controller never released inhibit bit(s).

in between several sdhci register dumps.

Has anyone seen that before? Is sdhci-msm support broken upstream or am i missing
something config-wise? 

Full boot logs here: https://pastebin.ubuntu.com/p/BtRrgnjV7J/

*: nothing earlier then v5.0 boots on this board, so i couldn't test it.
-- 
bye,
p.

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

* Re: msm8996: sdhci-msm: apq8096-db820c sdhci fails to init - "Timeout waiting for hardware interrupt."
  2019-10-10 14:32 msm8996: sdhci-msm: apq8096-db820c sdhci fails to init - "Timeout waiting for hardware interrupt." Paolo Pisati
@ 2019-10-10 14:36 ` Jeffrey Hugo
  2019-10-10 14:56   ` Paolo Pisati
  2019-10-11  6:01 ` Brian Masney
  1 sibling, 1 reply; 7+ messages in thread
From: Jeffrey Hugo @ 2019-10-10 14:36 UTC (permalink / raw)
  To: Paolo Pisati; +Cc: MSM, Andy Gross, lkml

I'm using sdhci-msm on msm8998, so its not completely broken upstream.

What speed card are you trying to use?

On Thu, Oct 10, 2019 at 8:33 AM Paolo Pisati <p.pisati@gmail.com> wrote:
>
> Sdhci consistenlty fails to initialize (and thus work) on my apq8096-db820c.
>
> The issue is present since v5.0[*] mainline up to latest v5.4-rc2, using defconfig and:
>
> CONFIG_SCSI_UFS_QCOM=y
> CONFIG_PHY_QCOM_QMP=y
> CONFIG_PHY_QCOM_UFS=y
> CONFIG_ATL1C=y
>
> but can be 100% reproduced with a clean defconfig too.
>
> During boot, when it's time to mount the sdcard, mmc0 spits out a lot of:
>
> ...
> [   13.683059] mmc0: Timeout waiting for hardware interrupt.
> [   13.683095] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
> [   13.687441] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x00004902
> [   13.693861] mmc0: sdhci: Blk size:  0x00004200 | Blk cnt:  0x00000000
> [   13.700285] mmc0: sdhci: Argument:  0x00012444 | Trn mode: 0x00000033
> [   13.706707] mmc0: sdhci: Present:   0x01680206 | Host ctl: 0x0000001f
> [   13.713131] mmc0: sdhci: Power:     0x00000001 | Blk gap:  0x00000000
> [   13.719555] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
> [   13.725979] mmc0: sdhci: Timeout:   0x0000000a | Int stat: 0x00000000
> [   13.732403] mmc0: sdhci: Int enab:  0x03ff900b | Sig enab: 0x03ff100b
> [   13.738824] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
> [   13.745249] mmc0: sdhci: Caps:      0x322dc8b2 | Caps_1:   0x00008007
> [   13.751673] mmc0: sdhci: Cmd:       0x0000123a | Max curr: 0x00000000
> [   13.758097] mmc0: sdhci: Resp[0]:   0x00000900 | Resp[1]:  0x5b590000
> [   13.764519] mmc0: sdhci: Resp[2]:   0x76b27f80 | Resp[3]:  0x0a404012
> [   13.770944] mmc0: sdhci: Host ctl2: 0x00000000
> [   13.777365] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x00000001588be200
> [   13.781708] mmc0: sdhci: ============================================
> [   13.888927] mmc0: Reset 0x4 never completed.
> ...
> [   14.004327] mmc0: Controller never released inhibit bit(s).
>
> in between several sdhci register dumps.
>
> Has anyone seen that before? Is sdhci-msm support broken upstream or am i missing
> something config-wise?
>
> Full boot logs here: https://pastebin.ubuntu.com/p/BtRrgnjV7J/
>
> *: nothing earlier then v5.0 boots on this board, so i couldn't test it.
> --
> bye,
> p.

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

* Re: msm8996: sdhci-msm: apq8096-db820c sdhci fails to init - "Timeout waiting for hardware interrupt."
  2019-10-10 14:36 ` Jeffrey Hugo
@ 2019-10-10 14:56   ` Paolo Pisati
  0 siblings, 0 replies; 7+ messages in thread
From: Paolo Pisati @ 2019-10-10 14:56 UTC (permalink / raw)
  To: Jeffrey Hugo; +Cc: MSM, Andy Gross, lkml

On Thu, Oct 10, 2019 at 4:36 PM Jeffrey Hugo <jeffrey.l.hugo@gmail.com> wrote:
>
> I'm using sdhci-msm on msm8998, so its not completely broken upstream.
>
> What speed card are you trying to use?

Sandisk SDHC 4 - i forgot to mention that the sd slot / card works
fine when using the qcomlt-4.14 branch[1], so it's definitely not an
hardware issue.

1: http://git.linaro.org/landing-teams/working/qualcomm/kernel.git

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

* Re: msm8996: sdhci-msm: apq8096-db820c sdhci fails to init - "Timeout waiting for hardware interrupt."
  2019-10-10 14:32 msm8996: sdhci-msm: apq8096-db820c sdhci fails to init - "Timeout waiting for hardware interrupt." Paolo Pisati
  2019-10-10 14:36 ` Jeffrey Hugo
@ 2019-10-11  6:01 ` Brian Masney
  2019-10-11 11:22   ` Paolo Pisati
  1 sibling, 1 reply; 7+ messages in thread
From: Brian Masney @ 2019-10-11  6:01 UTC (permalink / raw)
  To: Paolo Pisati; +Cc: linux-arm-msm, Andy Gross, linux-kernel, Jeffrey Hugo

Hi Paolo,

On Thu, Oct 10, 2019 at 04:32:32PM +0200, Paolo Pisati wrote:
> Sdhci consistenlty fails to initialize (and thus work) on my apq8096-db820c.
> 
> The issue is present since v5.0[*] mainline up to latest v5.4-rc2, using defconfig and:
> 
> CONFIG_SCSI_UFS_QCOM=y
> CONFIG_PHY_QCOM_QMP=y
> CONFIG_PHY_QCOM_UFS=y
> CONFIG_ATL1C=y
> 
> but can be 100% reproduced with a clean defconfig too.
> 
> During boot, when it's time to mount the sdcard, mmc0 spits out a lot of:
> 
> ...
> [   13.683059] mmc0: Timeout waiting for hardware interrupt.
> [   13.683095] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
> [   13.687441] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x00004902
> [   13.693861] mmc0: sdhci: Blk size:  0x00004200 | Blk cnt:  0x00000000
> [   13.700285] mmc0: sdhci: Argument:  0x00012444 | Trn mode: 0x00000033
> [   13.706707] mmc0: sdhci: Present:   0x01680206 | Host ctl: 0x0000001f
> [   13.713131] mmc0: sdhci: Power:     0x00000001 | Blk gap:  0x00000000
> [   13.719555] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
> [   13.725979] mmc0: sdhci: Timeout:   0x0000000a | Int stat: 0x00000000
> [   13.732403] mmc0: sdhci: Int enab:  0x03ff900b | Sig enab: 0x03ff100b
> [   13.738824] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
> [   13.745249] mmc0: sdhci: Caps:      0x322dc8b2 | Caps_1:   0x00008007
> [   13.751673] mmc0: sdhci: Cmd:       0x0000123a | Max curr: 0x00000000
> [   13.758097] mmc0: sdhci: Resp[0]:   0x00000900 | Resp[1]:  0x5b590000
> [   13.764519] mmc0: sdhci: Resp[2]:   0x76b27f80 | Resp[3]:  0x0a404012
> [   13.770944] mmc0: sdhci: Host ctl2: 0x00000000
> [   13.777365] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x00000001588be200
> [   13.781708] mmc0: sdhci: ============================================
> [   13.888927] mmc0: Reset 0x4 never completed.
> ...
> [   14.004327] mmc0: Controller never released inhibit bit(s).
> 
> in between several sdhci register dumps.
> 
> Has anyone seen that before? Is sdhci-msm support broken upstream or am i missing
> something config-wise? 

I encountered that same error working on the Nexus 5 support upstream.
Here's the fix:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=03864e57770a9541e7ff3990bacf2d9a2fffcd5d

Brian

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

* Re: msm8996: sdhci-msm: apq8096-db820c sdhci fails to init - "Timeout waiting for hardware interrupt."
  2019-10-11  6:01 ` Brian Masney
@ 2019-10-11 11:22   ` Paolo Pisati
  2019-10-11 12:47     ` Loic Poulain
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Pisati @ 2019-10-11 11:22 UTC (permalink / raw)
  To: Brian Masney
  Cc: Paolo Pisati, linux-arm-msm, Andy Gross, linux-kernel, Jeffrey Hugo

On Fri, Oct 11, 2019 at 02:01:30AM -0400, Brian Masney wrote:
> I encountered that same error working on the Nexus 5 support upstream.
> Here's the fix:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=03864e57770a9541e7ff3990bacf2d9a2fffcd5d

No dice, same exact problem.

But the patch is present downstream[1]:

commit c26727f853308dc4a6645dad09e9565429f8604f
Author: Loic Poulain <loic.poulain@linaro.org>
Date:   Wed Dec 12 17:51:48 2018 +0100

arm64: dts: apq8096-db820c: Increase load on l21 for SDCARD

In the same way as for msm8974-hammerhead, l21 load, used for SDCARD
VMMC, needs to be increased in order to prevent any voltage drop issues
(due to limited current) happening with some SDCARDS or during specific
operations (e.g. write).

Fixes: 660a9763c6a9 (arm64: dts: qcom: db820c: Add pm8994 regulator node)
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>


so it's probably worth carrying it.

1:
https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/commit/arch/arm64/boot/dts/qcom?h=release/qcomlt-4.14&id=e6415afc1aef2ac9361437ff583ba1be5a932b78
-- 
bye,
p.

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

* Re: msm8996: sdhci-msm: apq8096-db820c sdhci fails to init - "Timeout waiting for hardware interrupt."
  2019-10-11 11:22   ` Paolo Pisati
@ 2019-10-11 12:47     ` Loic Poulain
  2019-10-11 14:22       ` Paolo Pisati
  0 siblings, 1 reply; 7+ messages in thread
From: Loic Poulain @ 2019-10-11 12:47 UTC (permalink / raw)
  To: Paolo Pisati
  Cc: Brian Masney, linux-arm-msm, Andy Gross, linux-kernel, Jeffrey Hugo

Hi,

On Fri, 11 Oct 2019 at 13:22, Paolo Pisati <p.pisati@gmail.com> wrote:
>
> On Fri, Oct 11, 2019 at 02:01:30AM -0400, Brian Masney wrote:
> > I encountered that same error working on the Nexus 5 support upstream.
> > Here's the fix:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=03864e57770a9541e7ff3990bacf2d9a2fffcd5d
>
> No dice, same exact problem.
>
> But the patch is present downstream[1]:
>
> commit c26727f853308dc4a6645dad09e9565429f8604f
> Author: Loic Poulain <loic.poulain@linaro.org>
> Date:   Wed Dec 12 17:51:48 2018 +0100
>
> arm64: dts: apq8096-db820c: Increase load on l21 for SDCARD
>
> In the same way as for msm8974-hammerhead, l21 load, used for SDCARD
> VMMC, needs to be increased in order to prevent any voltage drop issues
> (due to limited current) happening with some SDCARDS or during specific
> operations (e.g. write).
>
> Fixes: 660a9763c6a9 (arm64: dts: qcom: db820c: Add pm8994 regulator node)
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
>
>
> so it's probably worth carrying it.

I've sent it to LKML, but it has never landed (and I've never followed-up).

Regards,
Loic

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

* Re: msm8996: sdhci-msm: apq8096-db820c sdhci fails to init - "Timeout waiting for hardware interrupt."
  2019-10-11 12:47     ` Loic Poulain
@ 2019-10-11 14:22       ` Paolo Pisati
  0 siblings, 0 replies; 7+ messages in thread
From: Paolo Pisati @ 2019-10-11 14:22 UTC (permalink / raw)
  To: Loic Poulain
  Cc: Paolo Pisati, Brian Masney, linux-arm-msm, Andy Gross,
	linux-kernel, Jeffrey Hugo

On Fri, Oct 11, 2019 at 02:47:05PM +0200, Loic Poulain wrote:
> > No dice, same exact problem.
> >
> > But the patch is present downstream[1]:
> >
> > commit c26727f853308dc4a6645dad09e9565429f8604f
> > Author: Loic Poulain <loic.poulain@linaro.org>
> > Date:   Wed Dec 12 17:51:48 2018 +0100
> >
> > arm64: dts: apq8096-db820c: Increase load on l21 for SDCARD
> >
> > In the same way as for msm8974-hammerhead, l21 load, used for SDCARD
> > VMMC, needs to be increased in order to prevent any voltage drop issues
> > (due to limited current) happening with some SDCARDS or during specific
> > operations (e.g. write).
> >
> > Fixes: 660a9763c6a9 (arm64: dts: qcom: db820c: Add pm8994 regulator node)
> > Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> >
> >
> > so it's probably worth carrying it.
> 
> I've sent it to LKML, but it has never landed (and I've never followed-up).

I see - btw, do you have a recent kernel where the mmc works on the db820c?
-- 
bye,
p.

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

end of thread, other threads:[~2019-10-11 14:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 14:32 msm8996: sdhci-msm: apq8096-db820c sdhci fails to init - "Timeout waiting for hardware interrupt." Paolo Pisati
2019-10-10 14:36 ` Jeffrey Hugo
2019-10-10 14:56   ` Paolo Pisati
2019-10-11  6:01 ` Brian Masney
2019-10-11 11:22   ` Paolo Pisati
2019-10-11 12:47     ` Loic Poulain
2019-10-11 14:22       ` Paolo Pisati

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