From: Adam Van Ymeren <adam@vany.ca>
To: Robin Murphy <robin.murphy@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org
Cc: Heiko Stuebner <heiko@sntech.de>
Subject: Re: [PATCH] arm64: dts: rockchip: Fix rk3328-roc-cc sdmmcio-regulator
Date: Sat, 1 Feb 2020 17:10:15 -0500 [thread overview]
Message-ID: <510d310b-30af-7b24-d472-907bc6b2ef46@vany.ca> (raw)
In-Reply-To: <d8a8b696-268b-1ea8-7b5e-406a651011ff@arm.com>
On 2020-02-01 12:46 p.m., Robin Murphy wrote:
> On 2020-02-01 3:41 pm, Adam Van Ymeren wrote:
>>
>> On 2020-02-01 5:51 a.m., Robin Murphy wrote:
>>> Hi Adam,
>>>
>>> On 2020-01-31 11:38 pm, Adam Van Ymeren wrote:
>>>> With this change the kernel successfully finds the SD Card and can
>>>> load
>>>> a rootfs from it. Tested on hardware.
>>>>
>>>> Signed-off-by: Adam Van Ymeren <adam@vany.ca>
>>>>
>>>> diff -uprN -X linux-5.5/Documentation/dontdiff
>>>> linux-5.5-orig/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
>>>> linux-5.5/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
>>>> --- linux-5.5-orig/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
>>>> 2020-01-26 19:23:03.000000000 -0500
>>>> +++ linux-5.5/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
>>>> 2020-01-31 16:26:35.377075419 -0500
>>>> @@ -44,7 +44,7 @@
>>>> vcc_sdio: sdmmcio-regulator {
>>>> compatible = "regulator-gpio";
>>>> - gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>;
>>>> + gpios = <&gpio0 RK_PD1 GPIO_ACTIVE_HIGH>;
>>>
>>> Given that the RK3328 datasheet has no mention of GPIO0_D1 existing at
>>> all, how sure are you that this is correct - have you tested cards in
>>> both 3.3V and 1.8V (UHS-1) signalling modes?
>>>
>>> The ROC-RK3328-CC schematics show GPIO_MUTE being used to bias the
>>> feedback pin of an adjustable regulator supplying the SDMMC0 I/O
>>> domain, so it seems more likely that the pin is correct but the states
>>> (or the polarity) are backwards.
>>
>>
>> Hmm yeah after reading the schematics this doesn't make sense. I took
>> it from the vendors source tree[1], and it definitely allowed my system
>> to boot when it wouldn't before, but I only tried a 3.3V card. I'll try
>> just changing the polarity. I'll also find a UHS-1 card and test that,
>> any advice on how to verify that it's running in the 1.8V mode?
>
> My preferred method is to stick a meter on either the uSD socket pins
> or the regulator itself and wiggle the GPIO from userspace, but
> preferably only if the board can run without a card inserted.
>
> That said, I just suddenly remembered about regulator GPIOs being
> quirky for legacy ABI reasons - I'm now 99% sure that you should
> simply need to add the "enable-active-high" property to make it
> actually work as expected.
>
Whelp I did a whole bunch of tracing and debugging only to realize that
I didn't have CONFIG_GPIO_SYSCON enabled, so big suprise the gpio-syscon
driver needed for grf-gpio never came online. After turning that on I get
[ 1.277115] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req
400000Hz, actual 400000HZ div = 0)
in my dmesg, which is more than I used to get. However it fails to
detect the SDCard. I tried with and without enable-active-high; on the
sdmmcio-regulator entry, neither seemed to make a difference. I'll do
some more debugging in a bit, its always possible I did something stupid
like use the wrong .dtb file (or build without CONFIG_GPIO_SYSCON).
Thanks again!
-Adam
|
|
||
|
|
|
|||
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-02-01 22:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 23:38 [PATCH] arm64: dts: rockchip: Fix rk3328-roc-cc sdmmcio-regulator Adam Van Ymeren
2020-02-01 10:51 ` Robin Murphy
2020-02-01 15:41 ` Adam Van Ymeren
2020-02-01 17:46 ` Robin Murphy
2020-02-01 22:10 ` Adam Van Ymeren [this message]
2020-02-04 15:15 ` Peter Geis
2020-02-04 16:14 ` Adam Van Ymeren
2020-02-04 17:25 ` Peter Geis
2020-02-05 16:14 ` Adam Van Ymeren
2020-02-05 17:39 ` Robin Murphy
2020-02-05 18:43 ` Peter Geis
2020-02-05 19:02 ` Robin Murphy
2020-02-06 3:05 ` Thomas McKahan
2020-02-09 1:07 ` Adam Van Ymeren
2020-02-10 13:37 ` Robin Murphy
2020-02-11 21:32 ` Adam Van Ymeren
2020-02-11 21:39 ` Adam Van Ymeren
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=510d310b-30af-7b24-d472-907bc6b2ef46@vany.ca \
--to=adam@vany.ca \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robin.murphy@arm.com \
/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