devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Drew Fustini <dfustini@baylibre.com>
To: Guo Ren <guoren@kernel.org>
Cc: Conor Dooley <conor@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jisheng Zhang <jszhang@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>, Fu Wei <wefu@redhat.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Robert Nelson <robertcnelson@beagleboard.org>,
	Jason Kridner <jkridner@beagleboard.org>,
	Xi Ruoyao <xry111@xry111.site>, Han Gao <gaohan@iscas.ac.cn>,
	Icenowy Zheng <uwu@icenowy.me>,
	linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH 1/6] dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 support
Date: Sun, 24 Sep 2023 23:04:14 +0200	[thread overview]
Message-ID: <ZRCkTqV2qV/tMb4O@x1> (raw)
In-Reply-To: <CAJF2gTSeKnB=Zc6o1wJAOyax7d=RmDJ0o8PSOfkVo5BYVc=sAw@mail.gmail.com>

On Sat, Sep 23, 2023 at 04:10:11PM +0800, Guo Ren wrote:
> On Fri, Sep 22, 2023 at 11:18 PM Drew Fustini <dfustini@baylibre.com> wrote:
> >
> > On Fri, Sep 22, 2023 at 10:57:36AM +0100, Conor Dooley wrote:
> > > Hey Drew,
> > >
> > > On Thu, Sep 21, 2023 at 06:49:48PM -0700, Drew Fustini wrote:
> > > > Add compatible value for the T-Head TH1520 dwcmshc controller and add
> > > > thead,phy-pull-up property.
> > > >
> > > > Signed-off-by: Drew Fustini <dfustini@baylibre.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 4 ++++
> > > >  1 file changed, 4 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> > > > index a43eb837f8da..46b768d46712 100644
> > > > --- a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> > > > +++ b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> > > > @@ -19,6 +19,7 @@ properties:
> > > >        - rockchip,rk3568-dwcmshc
> > > >        - rockchip,rk3588-dwcmshc
> > > >        - snps,dwcmshc-sdhci
> > > > +      - thead,th1520-dwcmshc
> > > >
> > > >    reg:
> > > >      maxItems: 1
> > > > @@ -60,6 +61,9 @@ properties:
> > > >      description: Specify the number of delay for tx sampling.
> > > >      $ref: /schemas/types.yaml#/definitions/uint8
> > > >
> > > > +  thead,phy-pull-up:
> > > > +    description: Enable weak pull-up on PHY pads
> > > > +    type: boolean
> > >
> > > Why is the weak pull-up required? How would the dts author know if they
> > > need to use this property?
> >
> > This is a good question, and I don't have a good reason beyond it is
> > what the vendor SDK was doing.
> >
> > There are only two boards right now using the TH1520 that I know of.
> > Both the LPi4a [1] and the Ahead [2] have the pull-up property set on
> > all the mmc controller nodes their downstream device trees.
> >
> > Rob suggested on #devicetree that it would be simpler to just enable it
> > in the driver and disable support when needed. I like this idea as it
> > will simplify this binding patch and the code in the driver patch.
> It's for the PHY debug. You could directly remove them, or keep it
> with no-pull-up flag, then no pull-up flag in the dts for default..

Thank you for explaining that the purpose of the pull-up DT property
was for PHY debug.

I will plan to remove the pull-up DT property in the next version of
this patch series and remove sdhci_phy_1_8v_init_no_pull() and
sdhci_phy_3_3v_init_no_pull() from my sdhci-of-dwcmshc.c patch.

I will make th1520_phy_1_8v_init() and th1520_phy_3_3v_init() always
set WEAKPULL_EN = 1 (PULLUP) for CMDPAD_CNFG, DATAPAD_CNFG, RSTNPAD_CNFG
and set WEAKPULL_EN = 2 (PULLDOWN) for STBPAD_CNFG.

Thanks,
Drew

  reply	other threads:[~2023-09-24 21:04 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22  1:49 [PATCH 0/6] RISC-V: Add eMMC support for TH1520 boards Drew Fustini
2023-09-22  1:49 ` [PATCH 1/6] dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 support Drew Fustini
2023-09-22  9:57   ` Conor Dooley
2023-09-22 15:18     ` Drew Fustini
2023-09-23  8:10       ` Guo Ren
2023-09-24 21:04         ` Drew Fustini [this message]
2023-09-22  1:49 ` [PATCH 2/6] mmc: sdhci: add __sdhci_execute_tuning() to header Drew Fustini
2023-09-25 10:21   ` Adrian Hunter
2023-09-25 10:23     ` Xi Ruoyao
2023-09-25 10:31       ` Adrian Hunter
2023-09-25 14:41     ` Drew Fustini
2023-09-22  1:49 ` [PATCH 3/6] mmc: sdhci-of-dwcmshc: Add support for T-Head TH1520 Drew Fustini
2023-09-25 10:35   ` Adrian Hunter
2023-09-25 14:43     ` Drew Fustini
2023-10-04 16:19   ` Jisheng Zhang
2023-10-04 19:12     ` Drew Fustini
2023-09-22  1:49 ` [PATCH 4/6] riscv: dts: thead: Add TH1520 mmc controller and sdhci clock Drew Fustini
2023-09-22  1:49 ` [PATCH 5/6] riscv: dts: thead: Enable BeagleV Ahead eMMC controller Drew Fustini
2023-09-22  1:49 ` [PATCH 6/6] riscv: dts: thead: Enable LicheePi 4A " Drew Fustini
2023-09-22 11:41 ` [PATCH 0/6] RISC-V: Add eMMC support for TH1520 boards Xi Ruoyao
2023-09-22 16:23   ` Drew Fustini
2023-09-23 16:33     ` Xi Ruoyao
2023-09-23  0:11   ` Icenowy Zheng
2023-09-22 19:08 ` Robert Nelson
2023-09-22 22:48   ` Robert Nelson
2023-10-03  4:37     ` Drew Fustini
2023-10-04 11:30       ` Jisheng Zhang
2023-10-04 13:02         ` Lad, Prabhakar
2023-10-04 13:49           ` Robin Murphy
2023-10-04 14:02             ` Icenowy Zheng
2023-10-04 14:18               ` Robin Murphy
2023-10-04 14:46                 ` Icenowy Zheng
2023-10-04 14:58                 ` Icenowy Zheng
2023-10-04 16:03                 ` Lad, Prabhakar
2023-10-04 17:16                   ` Lad, Prabhakar
2023-10-04 18:49                     ` Samuel Holland
2023-10-04 19:38                       ` Robin Murphy
2023-10-04 20:47                         ` Lad, Prabhakar
2023-10-05  6:57                     ` Christoph Hellwig
2023-10-04 14:06             ` Jisheng Zhang
2023-10-04 15:27               ` Geert Uytterhoeven

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=ZRCkTqV2qV/tMb4O@x1 \
    --to=dfustini@baylibre.com \
    --cc=adrian.hunter@intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gaohan@iscas.ac.cn \
    --cc=guoren@kernel.org \
    --cc=jkridner@beagleboard.org \
    --cc=jszhang@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robertcnelson@beagleboard.org \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=uwu@icenowy.me \
    --cc=wefu@redhat.com \
    --cc=xry111@xry111.site \
    /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).