From: Linus Walleij <firstname.lastname@example.org>
To: Konrad Dybcio <email@example.com>
Cc: Petr Vorel <firstname.lastname@example.org>,
Bjorn Andersson <email@example.com>,
Andy Gross <firstname.lastname@example.org>, Rob Herring <email@example.com>,
Ricardo Ribalda <firstname.lastname@example.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
Subject: Re: [PATCH 1/1] arm64: dts: qcom: msm8994: Reserve gpio ranges
Date: Thu, 8 Apr 2021 23:40:58 +0200 [thread overview]
Message-ID: <CACRpkdb249pKC7VvM6HxRKgwF36_9Qp8G9sD6Troa22fYznuXQ@mail.gmail.com> (raw)
On Thu, Apr 8, 2021 at 10:05 PM Konrad Dybcio <email@example.com> wrote:
> On Qualcomm boards GPIOs that are used for "secure" (duh) peripherals,
> like a fingerprint scanner, are not allowed to be controlled from Linux (the "non-secure world").
> Trying to do so causes an immediate reboot due to "attempting to violate the security".
OK I see. Yeah HW security is pretty neat, making it cause a reboot
seems like maybe not the best choice, but hey we know for sure what
is wrong when it happens so it gives a good feeling of having everything
fully inder control. Which is nice, despite the annoyance.
> The GPIOs seem to all be iterated over on boot, except for the ones specified in
> So, why did it work before!?
We do things like read all direction registers to check if GPIO lines are set up
as input or output. If that causes reset then, well.
> As a result, if such "secure" GPIOs are not declared in the DT, the board essentially dies on TLMM (pinctrl) probe
> (which happens veeeery early - so that all other peripherals can set the pins as they see fit)
> and that's very unpleasant to debug. Without this patch, Petr's device will simply not boot.
In a way specifying it is a very correct thing to do.
When they were registered with the GPIO subsystem before they were,
well registered with the GPIO subsystem which means they are supposedly
available for general-purpose input-output. Which they were not.
They seem highly special-purpose to me. So
reserving them is the right thing to do.
next prev parent reply other threads:[~2021-04-08 21:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 20:02 [PATCH 1/1] arm64: dts: qcom: msm8994: Reserve gpio ranges Petr Vorel
2021-04-05 20:09 ` Ricardo Ribalda Delgado
2021-04-05 20:15 ` Petr Vorel
2021-04-05 22:52 ` Bjorn Andersson
2021-04-06 4:38 ` Petr Vorel
2021-04-08 7:17 ` Linus Walleij
2021-04-08 19:02 ` Petr Vorel
2021-04-08 20:05 ` Konrad Dybcio
2021-04-08 21:40 ` Linus Walleij [this message]
2021-04-09 3:19 ` Petr Vorel
2021-04-09 3:37 ` Bjorn Andersson
2021-04-10 5:52 ` Petr Vorel
2021-04-10 9:16 ` Konrad Dybcio
2021-04-10 17:20 ` Petr Vorel
2021-04-12 17:48 ` Petr Vorel
2021-04-08 21:35 ` Linus Walleij
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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).