Devicetree
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: netdev-bot+sashiko@kernel.org
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	geert+renesas@glider.be, magnus.damm@gmail.com,
	richardcochran@gmail.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, vadim.fedorenko@linux.dev,
	sergei.shtylyov@gmail.com, linux-renesas-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v8 3/3] arm64: dts: renesas: r8a779g0: Add gPTP node
Date: Sat, 14 Nov 2026 13:55:45 +0100	[thread overview]
Message-ID: <20261114125545.GC938627@ragnatech.se> (raw)
In-Reply-To: <179465147165.2199510.7987717328787148087@kernel.org>

On 2026-11-14 10:17:51 +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue(s) to consider.
> 
> Critical: 0 · High: 0 · Medium: 1 · Low: 0
> 
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
> 
> - [Medium] The new `gptp: ptp@e6449000` node in
>   arch/arm64/boot/dts/renesas/r8a779g0.dtsi uses `reg = <0 0xe6449000 0…

That is correct, please read cover letter.

> 
> --
> 
> arm64: dts: renesas: r8a779g0: Add gPTP node
> 
> This adds a gptp: ptp@e6449000 node to the R-Car V4H SoC dtsi. The commit
> message says the gPTP module is shared between the RAVB and RTSN Ethernet
> devices.
> 
> > diff --git a/arch/arm64/boot/dts/renesas/r8a779g0.dtsi b/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
> > index 5284923b6cef7..f2d6696680db8 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
> > @@ -606,6 +606,15 @@ mfis: system-controller@e6260000 {
> >  			status = "disabled";
> >  		};
> >  
> > +		gptp: ptp@e6449000 {
> > +			compatible = "renesas,r8a779g0-gptp", "renesas,rcar-gen4-gptp";
> > +			reg = <0 0xe6449000 0 0x500>;
> > +			clocks = <&cpg CPG_MOD 2723>;
> > +			power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
> > +			resets = <&cpg 2723>;
> > +			status = "disabled";
> > +		};
> > +
> >  		tsn0: ethernet@e6460000 {
> >  			compatible = "renesas,r8a779g0-ethertsn", "renesas,rcar-gen4-ethertsn";
> >  			reg = <0 0xe6460000 0 0x7000>,
> 
> [Severity: Medium]
> Can tsn0 and the new gptp node both be enabled on the same board?
> 
> The existing tsn0 node, which this patch does not change, already claims
> the same window as its second reg entry:
> 
> 	tsn0: ethernet@e6460000 {
> 		reg = <0 0xe6460000 0 0x7000>,
> 		      <0 0xe6449000 0 0x500>;
> 		reg-names = "tsnes", "gptp";
> 		...
> 		clocks = <&cpg CPG_MOD 2723>;
> 		resets = <&cpg 2723>;
> 
> rtsn_probe() in drivers/net/ethernet/renesas/rtsn.c maps that region
> exclusively and runs the timer itself:
> 
> 	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gptp");
> 	...
> 	ptpaddr = devm_ioremap_resource(&pdev->dev, res);
> 	if (IS_ERR(ptpaddr)) {
> 		ret = PTR_ERR(ptpaddr);
> 		goto error_free;
> 	}
> 
> 	priv->ptp_priv = rcar_gen4_ptp_alloc(pdev, ptpaddr);
> 
> ptp_rcar_gen4_probe() in drivers/ptp/ptp_rcar_gen4.c claims the same
> range:
> 
> 	priv->base = devm_platform_ioremap_resource(pdev, 0);
> 	if (IS_ERR(priv->base))
> 		return PTR_ERR(priv->base);
> 
> If a board sets both &tsn0 and &gptp to okay, the device that probes
> second should get -EBUSY from its request on 0xe6449000-0xe64494ff. When
> rtsn is the one that fails, the whole TSN Ethernet interface is lost,
> because a failed gptp mapping takes the error_free path in rtsn_probe().
> 
> The commit message says:
> 
>     The gPTP module is shared between the RAVB and RTSN Ethernet devices on
>     the SoC.
> 
> The new renesas,rcar-gen4-gptp.yaml binding also says "On R-Car V4H it is
> shared between RTSN and RAVB". However, renesas,ethertsn.yaml still
> requires the gptp reg entry on the TSN node. rtsn also has no ptp-timer
> phandle path. No DTS under arch/arm64/boot/dts/renesas/ references &gptp
> yet, so RAVB is not connected to this node either. RAVB uses the timer
> only through of_parse_phandle(..., "ptp-timer", 0).
> 
> Would it make sense to either move RTSN over to the shared node or
> document that the two nodes are mutually exclusive? Moving RTSN would mean
> dropping the gptp reg from tsn0 and from the ethertsn binding, and
> switching rtsn to a ptp-timer phandle.
> 
> A shared-node conversion would also need to handle reset 2723. rtsn takes
> it with the exclusive devm_reset_control_get() and pulses it in
> rtsn_reset(). That looks like it would wipe the timer setup, which
> ptp_rcar_gen4_probe() writes only once.
> 
> -- 
> Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261110080727.2377040-1-niklas.soderlund%2Brenesas%40ragnatech.se

-- 
Kind Regards,
Niklas Söderlund

      reply	other threads:[~2026-11-14 12:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  8:07 [PATCH net-next v8 0/3] ptp: Add driver for R-Car Gen4 Niklas Söderlund
2026-11-10  8:07 ` [PATCH net-next v8 1/3] dt-bindings: ptp: renesas,rcar-gen4-gptp: Add " Niklas Söderlund
2026-11-14 10:17   ` netdev-bot+sashiko
2026-11-14 12:52     ` Niklas Söderlund
2026-11-10  8:07 ` [PATCH net-next v8 2/3] ptp: Add driver for " Niklas Söderlund
2026-11-11  8:10   ` sashiko-bot
2026-11-14 10:17   ` netdev-bot+sashiko
2026-11-14 12:52     ` Niklas Söderlund
2026-11-10  8:07 ` [PATCH net-next v8 3/3] arm64: dts: renesas: r8a779g0: Add gPTP node Niklas Söderlund
2026-11-14 10:17   ` netdev-bot+sashiko
2026-11-14 12:55     ` Niklas Söderlund [this message]

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=20261114125545.GC938627@ragnatech.se \
    --to=niklas.soderlund+renesas@ragnatech.se \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=sergei.shtylyov@gmail.com \
    --cc=vadim.fedorenko@linux.dev \
    /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