All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: David Summers <beagleboard@davidjohnsummers.uk>,
	heiko@sntech.de, robh+dt@kernel.org, mark.rutland@arm.com
Cc: linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/3] ARM: dts: rk3288 Tinker Board (S) sdcard changes
Date: Mon, 18 Feb 2019 11:54:09 +0000	[thread overview]
Message-ID: <6a15343b-554b-6059-09af-f6511e740866@arm.com> (raw)
In-Reply-To: <2d8ac4e6-b825-dca7-d3cb-57cb32b3230b@davidjohnsummers.uk>

On 17/02/2019 15:19, David Summers wrote:
> On 17/02/2019 14:00, Robin Murphy wrote:
>> Hi David,
>>
>> On 2019-02-17 12:15 pm, David Summers wrote:
>>> This patch makes some minor changes to how the sd card is
>>> described in the device tree for the ASUS Tinker Board (S). In
>>> particular on the Tinker Board S, when booted from the eMMC, and with
>>> no card in the sd slot, and the log has endless messages about not
>>> being able to detect the card.
>>>
>>> Several methods to remove this error have been tried, the only one
>>> that works is the broken-cd and so that is what is applied here.
>>
>> I don't have a Tinker Board, but the symptom sounds instantly familiar 
>> from hacking on another RK3288 box; have you tried adding 
>> "regulator-always-on" to the vccio_sd regulator?
>>
>> With the reference design (which I would assume the Tinker Board has 
>> no reason to deviate from in this area), the CD pin is either wired 
>> directly to the SoC with no external pull-up, or explicitly pulled up 
>> to VCCIO_SD. Either way, when the dwmmc driver probes and discovers 
>> there is no card present, it sets the currently-unnecessary 
>> vqmmc-supply as inactive, and thus the regulator core turns off 
>> VCCIO_SD entirely. Unfortunately, this removes the voltage from the 
>> entire I/O domain including the internal pull-up, which ends up 
>> leaving the CD pin floating and generating spurious events.
>>
>> Robin.
> 
> Hi Robin,
> 
> An interesting suggestion - no it hasn't been tried to always set the 
> vccio_sd regulator on. Will give it a go on ArchLinux Arm.
> 
> I guess this would explain why the Tinker Board booting from sd doesn't 
> see the error, as its enabled probably in uboot and then keeps working.
> 
> IIRC though, if booting the TBS from eMMC, then inserting an sd card and 
> the errors stop. I guess this wouldn't happen if the power wasn't applied?

That's the fun part of this scenario - the presence of a card is 
unambiguous, it's only the absence of one which depends on the pull-up 
state, so whenever as a card is inserted everything does work correctly. 
  Assuming they are the same errors I was seeing, they're from the 
driver *thinking* a card is inserted due to CD floating low, then 
failing to communicate with it, after which it powers down the I/O 
interface again and the whole cycle begins anew.

> I guess also that "regulator-always-on" is a quick test - but that for 
> submission to kernel it would be better done via "mmc-pwrseq-simple"?

No, it's a valid description of the hardware to say "disabling this 
regulator makes something fail to work as expected" if that is truly the 
case. Besides, pwrseq is about how to initialise a detected present 
card, not how to correctly detect that presence in the first place.

> Anyway I set up a test - so we can confirm this.

Great - there is of course still the possibility that the pin really 
isn't wired up at all, in which case ignoring CD and taking the CPU 
overhead of polling would be the only option, but the vendor DT doesn't 
have any signs to suggest that's the case, and makes me lean more 
towards the pull-up issue.

Robin.

WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com>
To: David Summers <beagleboard@davidjohnsummers.uk>,
	heiko@sntech.de, robh+dt@kernel.org, mark.rutland@arm.com
Cc: linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/3] ARM: dts: rk3288 Tinker Board (S) sdcard changes
Date: Mon, 18 Feb 2019 11:54:09 +0000	[thread overview]
Message-ID: <6a15343b-554b-6059-09af-f6511e740866@arm.com> (raw)
In-Reply-To: <2d8ac4e6-b825-dca7-d3cb-57cb32b3230b@davidjohnsummers.uk>

On 17/02/2019 15:19, David Summers wrote:
> On 17/02/2019 14:00, Robin Murphy wrote:
>> Hi David,
>>
>> On 2019-02-17 12:15 pm, David Summers wrote:
>>> This patch makes some minor changes to how the sd card is
>>> described in the device tree for the ASUS Tinker Board (S). In
>>> particular on the Tinker Board S, when booted from the eMMC, and with
>>> no card in the sd slot, and the log has endless messages about not
>>> being able to detect the card.
>>>
>>> Several methods to remove this error have been tried, the only one
>>> that works is the broken-cd and so that is what is applied here.
>>
>> I don't have a Tinker Board, but the symptom sounds instantly familiar 
>> from hacking on another RK3288 box; have you tried adding 
>> "regulator-always-on" to the vccio_sd regulator?
>>
>> With the reference design (which I would assume the Tinker Board has 
>> no reason to deviate from in this area), the CD pin is either wired 
>> directly to the SoC with no external pull-up, or explicitly pulled up 
>> to VCCIO_SD. Either way, when the dwmmc driver probes and discovers 
>> there is no card present, it sets the currently-unnecessary 
>> vqmmc-supply as inactive, and thus the regulator core turns off 
>> VCCIO_SD entirely. Unfortunately, this removes the voltage from the 
>> entire I/O domain including the internal pull-up, which ends up 
>> leaving the CD pin floating and generating spurious events.
>>
>> Robin.
> 
> Hi Robin,
> 
> An interesting suggestion - no it hasn't been tried to always set the 
> vccio_sd regulator on. Will give it a go on ArchLinux Arm.
> 
> I guess this would explain why the Tinker Board booting from sd doesn't 
> see the error, as its enabled probably in uboot and then keeps working.
> 
> IIRC though, if booting the TBS from eMMC, then inserting an sd card and 
> the errors stop. I guess this wouldn't happen if the power wasn't applied?

That's the fun part of this scenario - the presence of a card is 
unambiguous, it's only the absence of one which depends on the pull-up 
state, so whenever as a card is inserted everything does work correctly. 
  Assuming they are the same errors I was seeing, they're from the 
driver *thinking* a card is inserted due to CD floating low, then 
failing to communicate with it, after which it powers down the I/O 
interface again and the whole cycle begins anew.

> I guess also that "regulator-always-on" is a quick test - but that for 
> submission to kernel it would be better done via "mmc-pwrseq-simple"?

No, it's a valid description of the hardware to say "disabling this 
regulator makes something fail to work as expected" if that is truly the 
case. Besides, pwrseq is about how to initialise a detected present 
card, not how to correctly detect that presence in the first place.

> Anyway I set up a test - so we can confirm this.

Great - there is of course still the possibility that the pin really 
isn't wired up at all, in which case ignoring CD and taking the CPU 
overhead of polling would be the only option, but the vendor DT doesn't 
have any signs to suggest that's the case, and makes me lean more 
towards the pull-up issue.

Robin.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-02-18 11:54 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-17 12:15 [PATCH 0/3] ARM: dts: rk3288 Tinker Board (S) updates David Summers
2019-02-17 12:15 ` David Summers
2019-02-17 12:15 ` [PATCH 1/3] ARM: dts: rk3288 Tinker Board (S) sdcard changes David Summers
2019-02-17 12:15   ` David Summers
2019-02-17 14:00   ` Robin Murphy
2019-02-17 14:00     ` Robin Murphy
2019-02-17 15:19     ` David Summers
2019-02-17 15:19       ` David Summers
2019-02-18 11:54       ` Robin Murphy [this message]
2019-02-18 11:54         ` Robin Murphy
2019-02-19 20:13         ` David Summers
2019-02-19 20:13           ` David Summers
     [not found]   ` <20190217121513.22965-2-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-17 20:29     ` Stefan Wahren
2019-02-17 20:29       ` Stefan Wahren
     [not found]       ` <1660942499.343639.1550435365757-uEpKuDZ350hmhno068Nerg@public.gmane.org>
2019-02-18 20:08         ` David Summers
2019-02-18 20:08           ` David Summers
2019-02-22 18:47     ` [PATCH 1/3 v2] ARM: dts: rk3288-tinker.dtsi: Fix SD card detection David Summers
     [not found]       ` <20190222184708.32004-1-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-24 19:26         ` Jonas Karlman
2019-02-24 19:26           ` Jonas Karlman
     [not found]           ` <AM3PR03MB096656098C6CB4712C73C095AC790-XQTXrJX/giFAc9da7WRX18eAHadYHfrlvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-02-24 19:35             ` David Summers
     [not found]               ` <5387a001-1036-bb5c-e781-18e87ca6e7bd-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-24 19:56                 ` Jonas Karlman
     [not found]                   ` <AM3PR03MB09663F32FC40000E42C1A722AC790-XQTXrJX/giFAc9da7WRX18eAHadYHfrlvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-02-24 20:10                     ` David Summers
     [not found]                       ` <e1f1a93e-505b-bf53-a253-5c1ddaeaebf8-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-24 22:54                         ` Heiko Stübner
2019-02-24 22:54                           ` Heiko Stübner
2019-02-25  8:59                           ` Jonas Karlman
2019-02-25 21:00                           ` David Summers
     [not found]                             ` <31863095-94b5-5fec-0293-b30172426b93-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-25 21:14                               ` Doug Anderson
2019-02-25 17:13         ` Doug Anderson
     [not found]           ` <CAD=FV=UkQ7pEan4aGezvQZZjBc0gDJ1R7YRbN1Lbv9HBVQRgHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-02-25 21:11             ` David Summers
     [not found]               ` <9e90c5dd-7b1e-9e53-81ac-fb3b515215ca-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-25 21:18                 ` Doug Anderson
     [not found]                   ` <CAD=FV=XEPKpDVLdpCVB9eMzJNE8C5Pr=fRgRmJXgxzrDFJ39mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-02-25 22:20                     ` Heiko Stübner
2019-02-26 14:46                       ` Robin Murphy
     [not found]                         ` <108411d8-9607-d92d-e546-d0c85bcabc51-5wv7dgnIgG8@public.gmane.org>
2019-02-26 16:43                           ` Doug Anderson
     [not found]                             ` <CAD=FV=X0rRPkEim1sHS9EqDCLiWPO7e5Vu-0gAcX7YZ_omeKPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-02-27 13:48                               ` Robin Murphy
2019-03-03 11:08         ` David Summers
2019-02-17 12:15 ` [PATCH 2/3] ARM: dts: rk3288 Tinker Board (S) add wi-fi David Summers
2019-02-17 12:15   ` David Summers
     [not found]   ` <20190217121513.22965-3-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-17 14:32     ` Tony McKahan
2019-02-17 14:32       ` Tony McKahan
2019-02-17 15:55       ` David Summers
     [not found]         ` <4ef63671-f58d-3b16-9055-09e69314a0e6-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-17 17:32           ` Tony McKahan
2019-02-17 17:32             ` Tony McKahan
2019-02-17 21:19           ` Stefan Wahren
2019-02-17 21:19             ` Stefan Wahren
     [not found]       ` <CAERgokmpHQb2czJdx++qFoogFRmkvXZm=4BNOsVuCz-ZvgTEaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-02-17 19:03         ` David Summers
2019-02-17 19:03           ` David Summers
2019-02-17 20:43     ` Stefan Wahren
2019-02-17 20:43       ` Stefan Wahren
2019-02-18 12:30       ` Robin Murphy
2019-02-18 12:30         ` Robin Murphy
     [not found]       ` <1528638260.343699.1550436208775-uEpKuDZ350hmhno068Nerg@public.gmane.org>
2019-02-18 20:26         ` David Summers
2019-02-18 20:26           ` David Summers
2019-02-18 21:48           ` Stefan Wahren
2019-02-18 21:48             ` Stefan Wahren
2019-03-03 19:40   ` David Summers
2019-03-03 19:40     ` David Summers
     [not found]     ` <9df2e318-a459-bded-2971-90a6722e1a4f-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-03 22:12       ` Tony McKahan
2019-03-03 22:12         ` Tony McKahan
2019-02-17 12:15 ` [PATCH 3/3] ARM: dts: rk3288 Tinker Board (S) add bluetooth David Summers
2019-02-17 12:15   ` David Summers
     [not found]   ` <20190217121513.22965-4-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-02-17 13:31     ` Tony McKahan
2019-02-17 13:31       ` Tony McKahan
2019-02-17 21:05     ` Stefan Wahren
2019-02-17 21:05       ` Stefan Wahren
2019-02-18 20:47       ` David Summers
2019-02-18 21:40         ` Stefan Wahren
2019-03-03 20:15   ` David Summers
2019-03-03 20:15     ` David Summers
2019-02-23 19:42 ` [PATCH 0/3] ARM: dts: rk3288 Tinker Board (S) updates David Summers
2019-02-23 19:42   ` David Summers
2019-03-09 15:36 ` [PATCH v3 1/3] arm: dts: rk3288-tinker.dtsi: Fix SD card detection David Summers
2019-03-09 15:36   ` David Summers
2019-03-09 15:39 ` David Summers
2019-03-09 15:39   ` David Summers
     [not found]   ` <20190309153923.22806-1-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-09 15:39     ` [PATCH v3 2/3] arm: dts: rk3288-tinker.dtsi: Enable WiFi David Summers
2019-03-09 15:39       ` David Summers
2019-03-11 22:18       ` Robin Murphy
2019-03-11 22:18         ` Robin Murphy
     [not found]         ` <383c9884-4885-34e1-9ef7-96e936bb211d-5wv7dgnIgG8@public.gmane.org>
2019-03-12 20:41           ` David Summers
2019-03-12 20:41             ` David Summers
     [not found]             ` <c91db9a2-4283-0ea5-949e-ed190a7a8083-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-12 20:55               ` Heiko Stübner
2019-03-12 20:55                 ` Heiko Stübner
     [not found]       ` <20190309153923.22806-2-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-12 14:18         ` Heiko Stuebner
2019-03-12 14:18           ` Heiko Stuebner
2019-03-12 14:21           ` Stefan Wahren
2019-03-12 14:21             ` Stefan Wahren
2019-03-13 10:50         ` Heiko Stübner
2019-03-13 10:50           ` Heiko Stübner
2019-03-09 15:39     ` [PATCH v3 3/3] arm: dts: rk3288-tinker.dtsi: Add outline Bluetooth support David Summers
2019-03-09 15:39       ` David Summers
2019-03-09 15:39       ` David Summers
2019-03-11 16:41       ` Marcel Holtmann
2019-03-11 16:41         ` Marcel Holtmann
2019-03-11 16:41         ` Marcel Holtmann
2019-03-11 20:48         ` David Summers
2019-03-11 20:48           ` David Summers
2019-03-11 20:48           ` David Summers
     [not found]       ` <20190309153923.22806-3-beagleboard-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-13 10:56         ` Heiko Stübner
2019-03-13 10:56           ` Heiko Stübner
2019-03-13 10:56           ` Heiko Stübner
2019-03-13 19:57           ` David Summers
2019-03-13 20:02           ` David Summers
2019-03-13 20:02             ` David Summers
2019-03-12 14:08     ` [PATCH v3 1/3] arm: dts: rk3288-tinker.dtsi: Fix SD card detection Heiko Stuebner
2019-03-12 14:08       ` Heiko Stuebner
2019-03-12 14:17       ` Robin Murphy
2019-03-12 14:17         ` Robin Murphy
2019-03-12 14:22     ` Heiko Stuebner
2019-03-12 14:22       ` Heiko Stuebner
2019-03-12 20:34       ` David Summers
     [not found]         ` <4a1ad220-103d-543e-56d1-3c6d6ad906ec-8lkWs+DogrrqRUWtDFdff/XRex20P6io@public.gmane.org>
2019-03-12 20:52           ` Heiko Stübner
2019-03-12 20:52             ` Heiko Stübner
2019-03-12 21:04             ` Jonas Karlman
2019-03-12 21:04               ` Jonas Karlman
2019-03-13 10:40     ` Heiko Stübner
2019-03-13 10:40       ` Heiko Stübner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a15343b-554b-6059-09af-f6511e740866@arm.com \
    --to=robin.murphy@arm.com \
    --cc=beagleboard@davidjohnsummers.uk \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.