devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
	Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
	 Mark Brown <broonie@kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	 Stephen Boyd <sboyd@kernel.org>,
	 "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	 "linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	 Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	 "biju.das.au" <biju.das.au@gmail.com>
Subject: Re: [PATCH v3 1/9] dt-bindings: memory: Document RZ/G3E support
Date: Mon, 31 Mar 2025 21:04:33 +0200	[thread overview]
Message-ID: <CAMuHMdWucnfe_r63Bio0-k9nxzBEgpWHmatR8y8VEUHGzSe7MA@mail.gmail.com> (raw)
In-Reply-To: <TY3PR01MB11346E47B6455546AD1E6062886AD2@TY3PR01MB11346.jpnprd01.prod.outlook.com>

Hi Biju,

On Mon, 31 Mar 2025 at 20:29, Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > From: Geert Uytterhoeven <geert@linux-m68k.org>
> > On Mon, 31 Mar 2025 at 17:33, Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > From: Geert Uytterhoeven <geert@linux-m68k.org> On Mon, 31 Mar 2025
> > > > at 16:34, Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> On Mon, 31 Mar
> > > > > > 2025 at 15:54, Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > > > > > From: Biju Das <biju.das.jz@bp.renesas.com> Document support
> > > > > > > > for the Expanded Serial Peripheral Interface (xSPI)
> > > > > > > > Controller in the Renesas RZ/G3E
> > > > > > > > (R9A09G047) SoC.
> > > > > > > >
> > > > > > > > Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> > > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > > > >
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/Documentation/devicetree/bindings/memory-controllers/r
> > > > > > > > +++ enes
> > > > > > > > +++ as,r
> > > > > > > > +++ zg3e
> > > > > > > > +++ -xspi.yaml
> > > > > >
> > > > > > > > +    spi@11030000 {
> > > > > > > > +        compatible = "renesas,r9a09g047-xspi";
> > > > > > > > +        reg = <0x11030000 0x10000>, <0x20000000 0x10000000>;
> > > > > > > > +        reg-names = "regs", "dirmap";
> > > > > > > > +        interrupts = <GIC_SPI 228 IRQ_TYPE_EDGE_RISING>,
> > > > > > > > +                     <GIC_SPI 229 IRQ_TYPE_EDGE_RISING>;
> > > > > > > > +        interrupt-names = "pulse", "err_pulse";
> > > > > > > > +        clocks = <&cpg CPG_MOD 0x9f>, <&cpg CPG_MOD 0xa0>,
> > > > > > > > +                 <&cpg CPG_MOD 0xa1>, <&cpg CPG_MOD 0xa1>;
> > > > > > >
> > > > > > > On the next version I am going to update spix2 clk as <&cpg
> > > > > > > CPG_CORE R9A09G047_SPI_CLK_SPIX2>
> >
> > According to the RZ/G3E clock system diagram, (the parent of) clk_spi is derived from (the parent of)
> > clk_spix2, not the other way around?
> > So you can model clk_spi as a fixed divider clock with parent clk_spix2 and factor two.  I.e. provide
> > a new core clock R9A09G047_SPI_CLK_SPI instead of your proposed R9A09G047_SPI_CLK_SPIX2?
    ^^^^

> > > > > > What's spix2 clk? Ah, re-adding dropped line:
> > > > > >
> > > > > > > > +        clock-names = "ahb", "axi", "spi", "spix2";

> Can you please share your thoughts to handle this?

See above ^^^^ ;-)

> 1) Gate only spi clk

Gate only clk_spix2, which is the parent of clk_spi.
So enabling any of them will (propagate to) enable clk_spix2,
which uses the hardware gate.

> 2) For monitoring use both clock

Check only clk_spix2 for monitoring.

> 3) Clock specifier needs two distinct entries. So that consumer will get
>    proper rates for both clocks.

clk_spi would be a separate fixed-divider clock.

Does that make sense?
Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2025-03-31 19:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11 11:36 [PATCH v3 0/9] Add RZ/G3E xSPI support Biju Das
2025-03-11 11:36 ` [PATCH v3 1/9] dt-bindings: memory: Document RZ/G3E support Biju Das
2025-03-31 13:54   ` Biju Das
2025-03-31 14:11     ` Geert Uytterhoeven
2025-03-31 14:34       ` Biju Das
2025-03-31 15:27         ` Geert Uytterhoeven
2025-03-31 15:33           ` Biju Das
2025-03-31 18:24             ` Geert Uytterhoeven
2025-03-31 18:29               ` Biju Das
2025-03-31 19:04                 ` Geert Uytterhoeven [this message]
2025-03-31 19:14                   ` Biju Das
2025-06-17 21:05               ` Lad, Prabhakar
2025-06-18  6:21                 ` Biju Das
2025-06-18 11:42                   ` Lad, Prabhakar
2025-06-18  7:03                 ` Geert Uytterhoeven
2025-06-18 12:06                   ` Lad, Prabhakar
2025-06-18 12:58                     ` Geert Uytterhoeven
2025-06-18 13:30                       ` Biju Das
2025-06-18 13:40                       ` Lad, Prabhakar
2025-06-18 14:02                         ` Geert Uytterhoeven
2025-06-18 15:24                           ` Lad, Prabhakar
2025-06-19  8:17                             ` Geert Uytterhoeven
2025-06-19  8:46                               ` Biju Das
2025-06-19 11:11                               ` Lad, Prabhakar

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=CAMuHMdWucnfe_r63Bio0-k9nxzBEgpWHmatR8y8VEUHGzSe7MA@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=sboyd@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).