From: "Jernej Škrabec" <jernej.skrabec@siol.net>
To: Andre Przywara <andre.przywara@arm.com>,
Michael Weiser <michael.weiser@gmx.de>
Cc: Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,
Maxime Ripard <mripard@kernel.org>,
devicetree <devicetree@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-sunxi <linux-sunxi@googlegroups.com>,
Daniel Kulesz <kuleszdl@posteo.org>
Subject: Re: Re: [linux-sunxi] [PATCH] arm64: dts: allwinner: Revert SD card CD GPIO for Pine64-LTS
Date: Mon, 12 Apr 2021 19:51:35 +0200 [thread overview]
Message-ID: <2453001.GT6EyWp2Io@kista> (raw)
In-Reply-To: <YHSGRSQr5w0h8vtt@weiser.dinsnail.net>
Dne ponedeljek, 12. april 2021 ob 19:41:25 CEST je Michael Weiser napisal(a):
> Hi Andre, ChenYu,
>
> On Mon, Apr 12, 2021 at 05:45:58PM +0100, Andre Przywara wrote:
> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> > > > index e79ce49e7e6a..843338e19694 100644
> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> > > > @@ -21,5 +21,5 @@
> > > > };
> > > >
> > > > &mmc0 {
> > > > - cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 push-push switch
*/
> > > > + non-removable; /* card detect is broken on some
boards */
> > >
> > > So a revert is good, but has anyone tried using the "broken-cd" instead?
> > Ha, that's a good idea, I totally forgot about this property!
>
> > > That way, at least on Linux, the mmc core resorts to polling for a card.
> > > At least this way the card is still removable.
> > Yes indeed, I tested it on my "stuck at 1" Pine64-LTS, and it works like
> > a charm!
>
> > Daniel, Michael, can you test this on your boards? So removing the
> > cd-gpios property, and adding "broken-cd;" instead?
>
> Yes, it works fine. What flummoxed me at first was that obviously I also
> have to disable the ACTIVE_LOW definition in sun50i-a64-sopine.dtsi
> after having added and disabled an ACTIVE_HIGH definition in
> sun50i-a64-pine64-lts.dts.
>
> BTW: My boards have a marking "PINE64-R18-V1_1" and below it
> "2017-08-03" on their upper side. On the back it says on one sticker
> "Model:PineA64 2GB LTS" and on another "2O1-PINE64R18-00" and
> "PINE64-R18-V1.1 2G". Is CD being stuck at 1 a bug of revision 1.0
> perhaps? Is there a way to detect this difference in software and add
> some sort of quirk handler for it?
This is job for bootloader (U-Boot) which can patch DT. Most Allwinner boards
have no reliable way to be distinguished, except from Olimex. So I would say
it's not possible.
Best regards,
Jernej
next prev parent reply other threads:[~2021-04-12 17:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 0:08 [PATCH] arm64: dts: allwinner: Revert SD card CD GPIO for Pine64-LTS Andre Przywara
2021-04-12 6:20 ` [linux-sunxi] " Chen-Yu Tsai
2021-04-12 16:45 ` Andre Przywara
2021-04-12 17:41 ` Michael Weiser
2021-04-12 17:51 ` Jernej Škrabec [this message]
2021-04-13 10:58 ` Andre Przywara
2021-04-13 18:48 ` Michael Weiser
2021-04-13 22:09 ` Daniel Kulesz
2021-04-14 10:35 ` Andre Przywara
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=2453001.GT6EyWp2Io@kista \
--to=jernej.skrabec@siol.net \
--cc=andre.przywara@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=kuleszdl@posteo.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-sunxi@googlegroups.com \
--cc=michael.weiser@gmx.de \
--cc=mripard@kernel.org \
--cc=robh+dt@kernel.org \
--cc=wens@csie.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