From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Katherine Perez <kaperez@linux.microsoft.com>
Cc: Vinod Koul <vkoul@kernel.org>, Andy Gross <agross@kernel.org>,
Rob Herring <robh+dt@kernel.org>, Felipe Balbi <balbi@kernel.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] arm64: dts: sm8350: fix tlmm base address
Date: Tue, 7 Dec 2021 18:35:41 -0800 [thread overview]
Message-ID: <YbAZ/YHMWQZ27NrG@ripper> (raw)
In-Reply-To: <20211208022103.GA15963@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
On Tue 07 Dec 18:21 PST 2021, Katherine Perez wrote:
> On Tue, Dec 07, 2021 at 05:16:14PM +0530, Vinod Koul wrote:
> > On 30-11-21, 21:15, Bjorn Andersson wrote:
> > > On Mon 22 Nov 22:03 CST 2021, Vinod Koul wrote:
> > >
> > > > On 22-11-21, 11:05, Katherine Perez wrote:
> > > > > TLMM controller base address is incorrect and will hang on some platforms.
> > > > > Fix by giving the correct address.
> > > >
> > > > Thanks, recheck the spec this looks correct. We should have tlmm reg
> > > > space here and not tlmm base which also contains xpu region (thus hang)
> > > >
> > >
> > > Aren't you reading the patch backwards?
> >
> > I guess :(
> >
> > > Afaict downstream the driver carries an offset of 0x100000, which we
> > > dropped as we upstreamed the driver. As such changing reg to 0x0f000000
> > > should cause most gpio register accesses to fall outside the actual
> > > register window.
> > >
> > > Or perhaps I'm missing something here?
> >
> > I relooked and XPU is at 0xF000000 and Reg at 0xF100000
> > So this patch should be dropped as such. The size mentioned in
> > documentation is also correct
> >
> > Katherine, can you elaborate more on the hang you have observed? Any
> > specific pins you use which causes this?
>
> Hi Vinod,
>
> Yes, it seems to hang in msm_pinctrl_probe. Specifically, line 734 in
> gpiolib.c: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpio/gpiolib.c#n734.
> On i=4, it hangs on assign_bit and the system goes into a reboot loop.
> When I set the TLMM address to f000000, I don't see this issue at all.
>
The cause for that is quite likely that gc->get_direction() will read
the configuration from gpio<i>'s registers and gpio4 in your system is
reserved for use by some trusted application.
When you change the TLMM address you avoid this problem by just reading
random registers outside the region that contains protected registers.
Adjust the gpio-reserved-ranges in your device's tlmm node to mark gpio4
(probably 4 pins long) as "invalid", gpiolib will then not touch them.
Regards,
Bjorn
> >
> >
> > --
> > ~Vinod
next prev parent reply other threads:[~2021-12-08 2:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 19:05 [RESEND PATCH 0/2] arm64: dts: sm8350: add support for Microsoft Surface Duo 2 Katherine Perez
2021-11-22 19:05 ` [PATCH v2 1/2] arm64: dts: add minimal DTS for Microsoft Surface Duo2 Katherine Perez
2021-11-23 4:00 ` Vinod Koul
2021-11-30 17:44 ` Katherine Perez
2021-11-22 19:05 ` [PATCH v2 2/2] arm64: dts: sm8350: fix tlmm base address Katherine Perez
2021-11-23 4:03 ` Vinod Koul
2021-12-01 3:15 ` Bjorn Andersson
2021-12-07 1:16 ` Katherine Perez
2021-12-07 11:46 ` Vinod Koul
2021-12-08 2:21 ` Katherine Perez
2021-12-08 2:35 ` Bjorn Andersson [this message]
2021-12-08 23:18 ` Katherine Perez
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=YbAZ/YHMWQZ27NrG@ripper \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=balbi@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kaperez@linux.microsoft.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=vkoul@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