linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Christian Kohlschütter" <christian@kohlschutter.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: wens@kernel.org, "Heiko Stübner" <heiko@sntech.de>,
	"Markus Reichl" <m.reichl@fivetechno.de>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Linux MMC List" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH v4] arm64: dts: rockchip: Fix SD card init on rk3399-nanopi4
Date: Fri, 15 Jul 2022 21:04:20 +0200	[thread overview]
Message-ID: <BF7CC548-88C9-4889-8A41-8E99C31EF81C@kohlschutter.com> (raw)
In-Reply-To: <9405b97a-6758-ad4e-ccff-eed072096539@arm.com>

Am 15.07.2022 um 20:57 schrieb Robin Murphy <robin.murphy@arm.com>:
> 
> On 2022-07-15 19:11, Robin Murphy wrote:
>> On 2022-07-15 18:16, Christian Kohlschütter wrote:
>>> OK, this took me a while to figure out.
>>> 
>>> When no undervoltage limit is configured, I can reliably trigger the initialization bug upon boot.
>>> When the limit is set to 3.0V, it rarely occurs, but just after I send the v3 patch, I was able to reproduce...
>> Well this has to be in the running for "weirdest placebo ever"... :/
>> All it actually seems to achieve is printing an error[1] (this is after all a tiny 5-pin fixed-voltage LDO regulator, not an intelligent PMIC), and if that makes an appreciable difference then there has to be some kind of weird timing condition at play. Maybe regulator_register() ends up turning it off and on again rapidly enough that the card sees a voltage brownout and glitches, and adding more delay by printing to the console somewhere in the middle gives it enough time to act as a proper power cycle with no ill effect?
> 
> ...and apparently the answer is yes, it seems to be doing exactly that (see attached). But seemingly my SD cards don't mind, or maybe my T4 board happens to have more capacitance than Christian's R4S so my voltage dip isn't as bad, or both.
> 
> So it seems like the solution here might indeed simply be to remove the regulator-always-on which doesn't seem to have any reason to be here anyway. Without that, the enable stays low until the MMC driver probes and claims it, which is then massively longer than the time it takes for VCC3V0_SD to ramp down completely.
> 
> Robin.

Removing "regulator-always-on" has the effect that the system freezes upon reboot. There may well be another bug slumbering in the codebase that is circumvented by 1. adding a delay in the code and 2. not turning the regulator off upon shutdown.


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

  reply	other threads:[~2022-07-15 19:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 22:22 [PATCH] arm64: dts: rockchip: Fix SD card init on rk3399-nanopi4 Christian Kohlschütter
2022-07-13 23:41 ` Heiko Stübner
2022-07-14 11:41   ` Robin Murphy
2022-07-14 12:14     ` Christian Kohlschütter
2022-07-14 13:14       ` Markus Reichl
2022-07-14 13:50       ` Robin Murphy
2022-07-14 16:24         ` Christian Kohlschütter
2022-07-14 16:26           ` [PATCH v2] " Christian Kohlschütter
2022-07-14 16:44             ` Christian Loehle
2022-07-14 17:20               ` Christian Kohlschütter
2022-07-15 17:02                 ` Christian Loehle
2022-07-14 17:02             ` Chen-Yu Tsai
2022-07-14 17:35               ` Robin Murphy
2022-07-14 17:57                 ` Christian Kohlschütter
2022-07-14 23:44                 ` Robin Murphy
2022-07-15 17:01                   ` [PATCH v3] " Christian Kohlschütter
2022-07-15 17:12                     ` [PATCH v4] " Christian Kohlschütter
2022-07-15 17:16                       ` Christian Kohlschütter
2022-07-15 18:11                         ` Robin Murphy
2022-07-15 18:57                           ` Christian Kohlschütter
2022-07-15 18:57                           ` Robin Murphy
2022-07-15 19:04                             ` Christian Kohlschütter [this message]
2022-07-15 19:38                               ` Robin Murphy
2022-07-15 22:33                                 ` Christian Kohlschütter
2022-07-16  0:24                                   ` Christian Kohlschütter
2022-07-16 19:43                                     ` [PATCH v5] " Christian Kohlschütter
2022-07-18 12:04                                       ` [PATCH v6] " Christian Kohlschütter
2022-07-18 12:05                                         ` Christian Kohlschütter
2022-07-18 21:04                                           ` Christian Kohlschütter

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=BF7CC548-88C9-4889-8A41-8E99C31EF81C@kohlschutter.com \
    --to=christian@kohlschutter.com \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=m.reichl@fivetechno.de \
    --cc=robin.murphy@arm.com \
    --cc=wens@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 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).