All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	Biju Das <biju.das.jz@bp.renesas.com>
Subject: Re: [PATCH v2 02/13] dt-bindings: serial: renesas,em-uart: Document r9a09g011 bindings
Date: Fri, 22 Apr 2022 10:45:11 +0200	[thread overview]
Message-ID: <CAMuHMdWtLxdXztfLxSvb57WOO46qTW6c+fD=P0O5qicop=b+3g@mail.gmail.com> (raw)
In-Reply-To: <TYYPR01MB7086BD705F91E855F0D3FD45F5F79@TYYPR01MB7086.jpnprd01.prod.outlook.com>

Hi Phil,

On Fri, Apr 22, 2022 at 10:28 AM Phil Edworthy
<phil.edworthy@renesas.com> wrote:
> On 20 April 2022 22:26 Geert Uytterhoeven wrote:
> > On Wed, Mar 30, 2022 at 5:41 PM Phil Edworthy <phil.edworthy@renesas.com>
> > wrote:
> > > The Renesas RZ/V2M (r9a09g011) SoC uses a uart that is compatible with
> > the
> > > EMMA Mobile SoC.
> > >
> > > Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> > > Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > ---
> > > v2: Fix dtbs_check by adding missing alternative binding
> >
> > Thanks for your patch, which is now commit 7bb301812b628099
> > ("dt-bindings: serial: renesas,em-uart: Document r9a09g011
> > bindings") in tty/tty-next.
> >
> > > --- a/Documentation/devicetree/bindings/serial/renesas,em-uart.yaml
> > > +++ b/Documentation/devicetree/bindings/serial/renesas,em-uart.yaml
> > > @@ -14,7 +14,14 @@ allOf:
> > >
> > >  properties:
> > >    compatible:
> > > -    const: renesas,em-uart
> > > +    oneOf:
> > > +      - items:
> > > +          - enum:
> > > +              - renesas,r9a09g011-uart    # RZ/V2M
> > > +          - const: renesas,em-uart        # generic EMMA Mobile
> > compatible UART
> > > +
> > > +      - items:
> > > +          - const: renesas,em-uart        # generic EMMA Mobile
> > compatible UART
> >
> > The above looks good to me.
> >
> > >
> > >    reg:
> > >      maxItems: 1
> >
> > However, unlike EMEV2, RZ/V2M defines two clocks: pclk and sclk.
> > Hence please update the clocks section to reflect that.
> You are right that the uart has two clocks.
>
> Note though that pclk is shared by both uarts. The HW manual says:
> "ch. 1 is for use with the ISP support package, so do not
> use registers related to this channel.". Due to this, section
> 48.5.2.50 Clock ON/OFF Control Register 15 (CPG_CLK_ON15) says
> that bit 20, CLK4_ONWEN (enable for URT_PCLK) should be written
> as 0.
>
> I took this to mean that the URT_PCLK is enabled by the ISP firmware
> and software must not touch it. I am not sure if the DT bindings
> should document a clock that is specified as do not touch in the
> HW manual. This is a bit of a grey area.

"DT describes hardware, not software policy".

But I agree this is a grey area.

One option would be to mark URT_PCLK critical, so it won't be disabled.
But that would still mean it's enabled by Linux, i.e. Linux would set
CLK4_ONWEN to 1 while enabling the clock.

Another option would be to create URT_PCLK as a non-gateable clock,
so Linux won't ever touch the register bits.

Or just ignore URT_PCLK and do nothing, like you did ;-)
Would it be possible for a user to not use the ISP firmware at all,
and go full Linux, hence using both UART channels and URT_PCLK?

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:[~2022-04-22  8:45 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 15:40 [PATCH v2 00/14] Add new Renesas RZ/V2M SoC and Renesas RZ/V2M EVK support Phil Edworthy
2022-03-30 15:40 ` [PATCH v2 01/13] dt-bindings: arm: renesas: Document Renesas RZ/V2M SoC and EVK board Phil Edworthy
2022-04-26 14:18   ` Geert Uytterhoeven
2022-03-30 15:40 ` [PATCH v2 02/13] dt-bindings: serial: renesas,em-uart: Document r9a09g011 bindings Phil Edworthy
2022-04-04 19:24   ` Rob Herring
2022-04-20 21:26   ` Geert Uytterhoeven
2022-04-22  8:28     ` Phil Edworthy
2022-04-22  8:45       ` Geert Uytterhoeven [this message]
2022-04-22  9:31         ` Phil Edworthy
2022-04-22 15:22           ` Geert Uytterhoeven
2022-03-30 15:40 ` [PATCH v2 03/13] dt-bindings: clock: Add r9a09g011 CPG Clock Definitions Phil Edworthy
2022-04-04 19:24   ` Rob Herring
2022-04-20 21:12   ` Geert Uytterhoeven
2022-04-22 11:29     ` Phil Edworthy
2022-04-22 15:02       ` Geert Uytterhoeven
2022-04-25  9:40         ` Phil Edworthy
2022-03-30 15:40 ` [PATCH v2 04/13] dt-bindings: clock: renesas,rzg2l: Document RZ/V2M SoC Phil Edworthy
2022-04-26 14:21   ` Geert Uytterhoeven
2022-04-26 14:39     ` Phil Edworthy
2022-04-26 15:00       ` Geert Uytterhoeven
2022-03-30 15:40 ` [PATCH v2 05/13] serial: 8250: Make SERIAL_8250_EM available for arm64 systems Phil Edworthy
2022-04-26 14:23   ` Geert Uytterhoeven
2022-03-30 15:40 ` [PATCH v2 07/13] clk: renesas: rzg2l: Set HIWORD mask for all mux and dividers Phil Edworthy
2022-04-26 15:20   ` Geert Uytterhoeven
2022-03-30 15:40 ` [PATCH v2 08/13] clk: renesas: rzg2l: Make use of CLK_MON registers optional Phil Edworthy
2022-04-26 15:31   ` Geert Uytterhoeven
2022-03-30 15:40 ` [PATCH v2 09/13] clk: renesas: rzg2l: Add support for RZ/V2M reset monitor reg Phil Edworthy
2022-04-26 15:37   ` Geert Uytterhoeven
2022-04-27 18:00     ` Phil Edworthy
2022-03-30 15:40 ` [PATCH v2 10/13] clk: renesas: Add RZ/V2M support using the rzg2l driver Phil Edworthy
2022-04-26 16:19   ` Geert Uytterhoeven
2022-03-30 15:40 ` [PATCH v2 11/13] arm64: defconfig: Enable Renesas RZ/V2M SoC Phil Edworthy
2022-03-30 15:40   ` Phil Edworthy
2022-04-26 16:20   ` Geert Uytterhoeven
2022-04-26 16:20     ` Geert Uytterhoeven
2022-03-30 15:40 ` [PATCH v2 12/13] arm64: dts: renesas: Add initial DTSI for " Phil Edworthy
2022-04-26 18:13   ` Geert Uytterhoeven
2022-04-27 18:53     ` Phil Edworthy
2022-04-28  7:28       ` Geert Uytterhoeven
2022-03-30 15:40 ` [PATCH v2 13/13] arm64: dts: renesas: Add initial device tree for RZ/V2M EVK Phil Edworthy
2022-04-26 18:17   ` Geert Uytterhoeven
2022-04-20 20:11 ` [PATCH v2 00/14] Add new Renesas RZ/V2M SoC and Renesas RZ/V2M EVK support Geert Uytterhoeven
2022-04-20 20:28   ` Phil Edworthy
2022-04-20 20:43 ` [PATCH v2 06/13] soc: renesas: Add RZ/V2M (R9A09G011) config option Phil Edworthy
2022-04-26 15:02   ` 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='CAMuHMdWtLxdXztfLxSvb57WOO46qTW6c+fD=P0O5qicop=b+3g@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=phil.edworthy@renesas.com \
    --cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.