Hi Biju, On Thu, Apr 20, 2023 at 8:16 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote: > > -----Original Message----- > > From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> > > Sent: Thursday, April 20, 2023 6:15 PM > > To: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > > Cc: Rob Herring <robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski > > <krzysztof.kozlowski+dt@xxxxxxxxxx>; Magnus Damm <magnus.damm@xxxxxxxxx>; > > linux-renesas-soc@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; Prabhakar > > Mahadev Lad <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx> > > Subject: Re: [PATCH 3/3] arm64: dts: renesas: rzg2l-smarc: Enable MTU3a > > counter using DT overlay > > > > Hi Biju, > > > > On Thu, Apr 20, 2023 at 5:49 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote: > > > > -----Original Message----- > > > > From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> > > > > Sent: Thursday, April 20, 2023 4:40 PM > > > > To: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > > > > Cc: Rob Herring <robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski > > > > <krzysztof.kozlowski+dt@xxxxxxxxxx>; Geert Uytterhoeven > > > > <geert+renesas@xxxxxxxxx>; Magnus Damm <magnus.damm@xxxxxxxxx>; > > > > linux- renesas-soc@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; > > > > Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx> > > > > Subject: Re: [PATCH 3/3] arm64: dts: renesas: rzg2l-smarc: Enable > > > > MTU3a counter using DT overlay > > > > > > > > Hi Biju, > > > > > > > > On Mon, Apr 17, 2023 at 11:02 AM Biju Das > > > > <biju.das.jz@xxxxxxxxxxxxxx> > > > > 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@xxxxxxxxxxxxxx> > > > > > > > --- /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? I can add (a future version of) the overlay file (without the build glue) to my topic/renesas-overlays branch[1], though. [1] https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/renesas-overlays Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx 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