From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Petr Vorel <petr.vorel@gmail.com>
Cc: linux-arm-msm@vger.kernel.org, Andy Gross <agross@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Ricardo Ribalda <ribalda@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Konrad Dybcio <konradybcio@gmail.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH 1/1] arm64: dts: qcom: msm8994: Reserve gpio ranges
Date: Mon, 5 Apr 2021 17:52:22 -0500 [thread overview]
Message-ID: <20210405225222.GD904837@yoga> (raw)
In-Reply-To: <20210405200259.23525-1-petr.vorel@gmail.com>
On Mon 05 Apr 15:02 CDT 2021, Petr Vorel wrote:
> Reserve pins 0-3 and 85-88 as these aren't meant to be accessible
> from the application CPUs. Fix similar to 9134586715e3.
>
> Fixes: 3edfb7bd76bd ("gpiolib: Show correct direction from the beginning")
>
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> ---
> Hi,
>
> tested on latest qcom/for-next.
>
> Simple testing with /sys/class/gpio/export showed that 85-88.
> 3 disables UART. I expect 0-2 are also reserved as on other msm8998.
>
Are you saying that once you export these gpios the uart stops working?
We use gpio-reserved-ranges to denote GPIOs that are owned by TZ, so
touching their registers causes the device to reboot. And per the
gpiolib patch you reference, this would happen as we register the
gpiochip.
It sounds instead like what you want is to make sure that these pins are
considered busy, muxing in the uart (i.e define a state for uart).
Regards,
Bjorn
> for i in $(seq 0 146); do echo $i > /sys/class/gpio/export; done
>
> I expect it's just angler specific, thus I haven't added it to msm8994.dtsi
> (otherwise Konrad would have fixed it).
>
> Kind regards,
> Petr
>
> arch/arm64/boot/dts/qcom/msm8994-angler-rev-101.dts | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/msm8994-angler-rev-101.dts b/arch/arm64/boot/dts/qcom/msm8994-angler-rev-101.dts
> index baa55643b40f..0dc94101d5de 100644
> --- a/arch/arm64/boot/dts/qcom/msm8994-angler-rev-101.dts
> +++ b/arch/arm64/boot/dts/qcom/msm8994-angler-rev-101.dts
> @@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0-only
> /* Copyright (c) 2015, Huawei Inc. All rights reserved.
> * Copyright (c) 2016, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2021 Petr Vorel <petr.vorel@gmail.com>
> */
>
> /dts-v1/;
> @@ -32,3 +33,7 @@ serial@f991e000 {
> };
> };
> };
> +
> +&tlmm {
> + gpio-reserved-ranges = <0 4>, <85 4>;
> +};
> --
> 2.30.2
>
next prev parent reply other threads:[~2021-04-05 22:52 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 [this message]
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
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
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=20210405225222.GD904837@yoga \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=petr.vorel@gmail.com \
--cc=ribalda@kernel.org \
--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 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).