All of lore.kernel.org
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: RE: [PATCH 3/3] arm64: dts: renesas: rzg2l-smarc: Enable MTU3a counter using DT overlay
Date: Fri, 21 Apr 2023 07:45:43 +0000	[thread overview]
Message-ID: <OS0PR01MB5922D327CD46A5BC183656F186609@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdV4LOsJf+bnb8XRQo5_1Mdby1EArSdnW2oY6t0_yR1Oug@mail.gmail.com>

Hi Geert,

> > > > > Enable MTU3a counter using DT overlay
> > > > >
> > > > > Hi Biju,
> > > > >
> > > > > On Mon, Apr 17, 2023 at 11:02 AM Biju Das
> > > > > <biju.das.jz@bp.renesas.com>
> > > > > wrote:
> > > > > > Enable mtu3 node using dt overlay and disable scif2 node and
> > > > > > delete {sd1_mux,sd1_mux_uhs} nodes as the pins are shared with
> > > > > > mtu3 external clock input pins and Z phase signal(MTIOC1A).
> > > > > >
> > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > >
> > > > > > --- /dev/null
> > > > > > +++ b/arch/arm64/boot/dts/renesas/rzg2l-smarc-pmod.dtso
> > > > > > @@ -0,0 +1,43 @@
> > > > > > +// SPDX-License-Identifier: GPL-2.0
> > > > > > +/*
> > > > > > + * Device Tree Source for the RZ/{G2L,V2L} SMARC EVK PMOD
> > > > > > +parts
> > > > > > + *
> > > > > > + * Copyright (C) 2023 Renesas Electronics Corp.
> > > > > > + */
> > > > > > +
> > > > > > +/dts-v1/;
> > > > > > +/plugin/;
> > > > > > +
> > > > > > +#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
> > > > > > +
> > > > > > +&mtu3 {
> > > > > > +       pinctrl-0 = <&mtu3_pins>;
> > > > > > +       pinctrl-names = "default";
> > > > > > +
> > > > > > +       status = "okay";
> > > > > > +};
> > > > > > +
> > > > > > +&pinctrl {
> > > > > > +       mtu3_pins: mtu3 {
> > > > > > +               mtu3-zphase-clk {
> > > > > > +                       pinmux = <RZG2L_PORT_PINMUX(19, 0,
> > > > > > +3)>; /* MTIOC1A
> > > > > */
> > > > > > +               };
> > > > >
> > > > > Unless I'm missing something, this signal is not available on
> > > > > the PMOD connector?
> > > >
> > > > Yes, it is not available on the PMOD connector. SD card detection
> > > > signal, is muxed with MTIOC1A (Z Phase signal). So for counter use
> > > > case, we use it as MTIOC1A pins.
> > >
> > > As the signal is not available on the PMOD connector, can't you just
> > > ignore the Z Phase signal, and keep the SD card CD signal available
> instead?
> >
> >
> > Some customers are using Z phase signal in their product to clear the
> counter.
> > Maybe we define a macro in overlay, by default Z phase signal is disabled.
> >
> > Is it ok?
> >
> > Note:-
> > I use SD card removal/insert which changes the Z phase signal level
> > for clearing the counter.
> 
> After giving this some more thought, I don't think this overlay belongs
> upstream: it does not just enable hardware support, but provides a way to
> test hardware, by redefining the meaning of signals on the PMOD interface.
> 

> Do you agree?

Like any other PMOD interface, we can test real counter device with PMOD interface[1]

https://www.mouser.co.uk/ProductDetail/Alps-Alpine/EC11E15244B2?qs=m0BA540hBPfDpUEkDmFV5A%3D%3D

I have used this device for testing as well, later I switched to gpios for generating phase signals.

> 
> I can add (a future version of) the overlay file (without the build
> glue) to my topic/renesas-overlays branch[1], though.
> 

Without any hassles, if anyone wants to test counter interface using RZ/{G2L,G2LC,G2UL,Five, V2L}
SMARC EVK then I am ok for adding it to topic/renesas-overlays branch.

I believe the current overlay patch will provide that flexibility.

Cheers,
Biju

  reply	other threads:[~2023-04-21  7:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17  9:01 [PATCH 1/3] arm64: dts: renesas: r9a07g044: Add MTU3a node Biju Das
2023-04-17  9:01 ` [PATCH 2/3] arm64: dts: renesas: r9a07g054: " Biju Das
2023-04-20 15:25   ` Geert Uytterhoeven
2023-04-17  9:01 ` [PATCH 3/3] arm64: dts: renesas: rzg2l-smarc: Enable MTU3a counter using DT overlay Biju Das
2023-04-20 15:40   ` Geert Uytterhoeven
2023-04-20 15:49     ` Biju Das
2023-04-20 17:15       ` Geert Uytterhoeven
2023-04-20 18:16         ` Biju Das
2023-04-21  7:27           ` Geert Uytterhoeven
2023-04-21  7:45             ` Biju Das [this message]
2023-06-08  6:57   ` Geert Uytterhoeven
2023-06-08  7:08     ` Biju Das
2023-06-08  7:46     ` Biju Das
2023-04-20 15:24 ` [PATCH 1/3] arm64: dts: renesas: r9a07g044: Add MTU3a node 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=OS0PR01MB5922D327CD46A5BC183656F186609@OS0PR01MB5922.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.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.