linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@linaro.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@intel.com>,
	linux-gpio@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v3 1/2] pinctrl: qcom: sc8180x: drop the use of tiles
Date: Wed, 10 Mar 2021 18:37:33 +0800	[thread overview]
Message-ID: <20210310103728.GS17424@dragon> (raw)
In-Reply-To: <YEbus+4iOde4A0/X@builder.lan>

On Mon, Mar 08, 2021 at 09:42:43PM -0600, Bjorn Andersson wrote:
> On Mon 08 Mar 20:56 CST 2021, Shawn Guo wrote:
> 
> > On Mon, Mar 08, 2021 at 07:08:00PM -0600, Bjorn Andersson wrote:
> > > On Thu 04 Mar 00:05 CST 2021, Shawn Guo wrote:
> > > 
> > > > To support both ACPI and DT, it makes more sense to not use tiles for
> > > > pinctrl-sc8180x driver, as ACPI table describes TLMM block with one
> > > > single memory resource.  Since DTS of SC8180X hasn't landed, there is
> > > > still chance to align DT description with ACPI.
> > > > 
> > > 
> > > I don't like the idea that we make up addresses to put in the DT to fit
> > > what was put in the DSDT. It is 3 different memory regions, with things
> > > in-between that Linux shouldn't touch.
> > 
> > This is not a new idea but something pinctrl-sdm845 has been doing for
> > years.  And IMHO, it's not a bad idea but a reasonable compromise.
> > 
> 
> SDM845 was the first platform where the previous contiguous TLMM block
> was split up in tiles, at the time we didn't see a need to split it up.
> 
> But then we hit QCS404 (iirc) where one of the tiles was way off and
> concluded that we needed the DT binding to actually represent the
> hardware - so the tiles concept was introduced.
> 
> Unfortunately introducing the tiles back into sdm845 would cause issues
> with existing DT, so that has not happened.
> 
> > > Isn't it possible to during ACPI probe take reg 0 and register the 3
> > > named regions instead?
> > 
> > It is possible.  But let's see what it takes.  We will need to have some
> > quirk handling in the ACPI core to detect TLMM device on Flex 5G
> > machine, and then override the memory resource registration for that
> > device.  Myself is not even convinced this is a good solution, not
> > mentioning whether ACPI maintainers will accept it.
> > 
> 
> I don't think this quirk should belong in the core. Can't you massage
> the resources once you're in the probe function in pinctrl-sc8180x.c? Or
> the platform resources can't be modified when we reach that point?

Okay, I misread your comment.  Yes, we can massage the resources, but
it's a bit tricky.  It took me hours get it right.  Anyway, I will send
it out for review.  Hopefully we can agree on one solution out of three
I have worked out.

Shawn

  reply	other threads:[~2021-03-10 10:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04  6:05 [PATCH v3 0/2] Add ACPI support for SC8180X pinctrl driver Shawn Guo
2021-03-04  6:05 ` [PATCH v3 1/2] pinctrl: qcom: sc8180x: drop the use of tiles Shawn Guo
2021-03-09  1:08   ` Bjorn Andersson
2021-03-09  2:56     ` Shawn Guo
2021-03-09  3:42       ` Bjorn Andersson
2021-03-10 10:37         ` Shawn Guo [this message]
2021-03-04  6:05 ` [PATCH v3 2/2] pinctrl: qcom: sc8180x: add ACPI probe support Shawn Guo
2021-03-04 12:44   ` Andy Shevchenko
2021-03-07 11:54   ` Konrad Dybcio
2021-03-08 23:42     ` Bjorn Andersson
2021-03-04 12:44 ` [PATCH v3 0/2] Add ACPI support for SC8180X pinctrl driver Andy Shevchenko

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=20210310103728.GS17424@dragon \
    --to=shawn.guo@linaro.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.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).