[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <iuqppo7k6qp7v4pm4xtllqkqdtnarlkr2ey7s3fp3g2jd5dynz@oanc7zlfod7m>
Date: Tue, 17 Jun 2025 21:33:31 -0500
From: Bjorn Andersson <andersson@...nel.org>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
Konrad Dybcio <konradybcio@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH] arm64: dts: qcom: add debug UART pins to reserved GPIO
ranges on RB2
On Tue, Jun 17, 2025 at 01:28:41PM +0200, Bartosz Golaszewski wrote:
> On Tue, Jun 17, 2025 at 5:18 AM Bjorn Andersson <andersson@...nel.org> wrote:
> >
> > On Mon, Jun 16, 2025 at 06:43:16PM +0200, Bartosz Golaszewski wrote:
> > > On Mon, Jun 16, 2025 at 6:20 PM Konrad Dybcio
> > > <konrad.dybcio@....qualcomm.com> wrote:
> > > >
> > > > On 6/16/25 4:33 PM, Bartosz Golaszewski wrote:
> > > > > From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> > > > >
> > > > > GPIO12 and GPIO13 are used for the debug UART and must not be available
> > > > > to drivers or user-space. Add them to the gpio-reserved-ranges.
> > > > >
> > > > > Fixes: 8d58a8c0d930c ("arm64: dts: qcom: Add base qrb4210-rb2 board dts")
> > > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> > > > > ---
> > > >
> > > > That also makes them unavailable to the kernel though, no?
> > > >
> > >
> > > Yes. They could only be used by QUP - I2C or SPI #4 - on sm6115 but
> > > none of these are used on RB2. I just noticed that my console froze
> > > when I accidentally requested GPIO12 and figured that it makes sense
> > > to make them unavailable. Let me know if this should be dropped.
> > >
> >
> > I'm guessing that this would be a problem for any pin that is used for
> > some other function. Should we instead prevent userspace from being able
> > to request pins that are not in "gpio" pinmux state?
> >
>
> That's supported by the "strict" flag in struct pinmux_ops. However
> the two pins in question are muxed to GPIOs as far as the msm pinctrl
> driver is concerned so it wouldn't help.
This doesn't sound correct, the pins needs to be muxed to the qup in
order for UART to work, so how can they show as "gpio" function?
> Turning on the strict flag at
> the global level of the pinctrl-msm driver would be risky though as it
> would affect so many platforms, I'm sure it would break things. So IMO
> it's either this change or let's drop it and leave it as is.
>
I share your concern, but the benefit sounds desirable. I think
protecting the UART pins would set a precedence for filling that list
with all kinds of pins, for all platforms, so lets give this some more
thought,
Thank you,
Bjorn
Powered by blists - more mailing lists