Re: [net-next 1/3] dt-bindings: ptp: renesas,rcar-gen4-gptp: Add binding for R-Car Gen4

From: Niklas Söderlund

Date: Wed Jun 10 2026 - 05:01:06 EST


Hi Krzysztof,

Thanks for your comments.

On 2026-06-10 08:54:06 +0200, Krzysztof Kozlowski wrote:
> On 09/06/2026 23:57, Niklas Söderlund wrote:
> > Add bindings for the R-Car Gen4 gPTP timer. The timer enables accurate
> > synchronization of the clock in the control system. The timer is
> > system-wide and used by different Ethernet devices on each Gen4 platform.
>
> A nit, subject: drop second/last, redundant "binding for". The
> "dt-bindings" prefix is already stating that these are bindings.

Thanks, will fix.

> See also:
> https://elixir.bootlin.com/linux/v6.17-rc3/source/Documentation/devicetree/bindings/submitting-patches.rst#L18

Not sure I follow this one, L18 reads,

"Few subsystems, like ASoC, media, regulators and SPI, expect reverse
order of the prefixes::"

But 'git log Documentation/devicetree/bindings/ptp/' shows all commits
in that directory use the 'dt-bindings: ptp:' prefix.

>
>
> >
> > - On R-Car S4 it is shared between RSWITCH and RAVB.
> >
> > - On R-Car V4H it is shared between RTSN and RAVB.
> >
> > - On R-Car V4M it is only used by RAVB.
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> > ---
> > .../bindings/ptp/renesas,rcar-gen4-gptp.yaml | 64 +++++++++++++++++++
> > MAINTAINERS | 6 ++
> > 2 files changed, 70 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/ptp/renesas,rcar-gen4-gptp.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/ptp/renesas,rcar-gen4-gptp.yaml b/Documentation/devicetree/bindings/ptp/renesas,rcar-gen4-gptp.yaml
> > new file mode 100644
> > index 000000000000..99e6e3ca73b6
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/ptp/renesas,rcar-gen4-gptp.yaml
> > @@ -0,0 +1,64 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +# Copyright (C) 2026 Renesas Electronics Corp.
> > +# Copyright (C) 2026 Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx>
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/ptp/renesas,rcar-gen4-gptp.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Renesas R-Car Gen4 gPTP timer
> > +
> > +maintainers:
> > + - Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx>
> > +
> > +description:
> > + The R-Car Gen4 gPTP timer enables accurate synchronization of the clock in
> > + the control system. The timer is system-wide and used by different Ethernet
> > + devices on each Gen4 platform.
> > +
> > + - On R-Car S4 it is shared between RSWITCH and RAVB.
> > + - On R-Car V4H it is shared between RTSN and RAVB.
> > + - On R-Car V4M it is only used by RAVB.
> > +
> > +properties:
> > + compatible:
> > + items:
> > + - enum:
> > + - renesas,r8a779f0-gptp # S4-8
> > + - renesas,r8a779g0-gptp # V4H
> > + - renesas,r8a779h0-gptp # V4M
> > + - const: renesas,rcar-gen4-gptp # Generic R-Car Gen4
>
> Please drop comment or drop generic compatible and make it specific.
> Generic compatibles are discouraged, so don't advertise that. Look how
> other RECENT Renesas bindings do it.

Thanks, I will drop the 'Generic R-Car Gen4' comment. The reason is to
reduce cruft in the driver. My current view is that there are no
platform specific quirks needed, but experience show this sometimes
happens.

Looking at RECENT Renesas bindings this seems to be the way.

>
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + clocks:
> > + maxItems: 1
> > +
> > + power-domains:
> > + maxItems: 1
> > +
> > + resets:
> > + maxItems: 1
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - clocks
> > + - power-domains
> > + - resets
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/clock/r8a779g0-cpg-mssr.h>
> > + #include <dt-bindings/power/r8a779g0-sysc.h>
> > +
> > + gptp: gptp@e6449000 {
>
> Drop unused label. Node name usually is "phc". Could be "ptp", but not
> "gptp". What is gptp in generic names?

Wops, thanks. Indeed there should be no label and the node named ptp.
gptp is the name used in the R-Car documentation and I must have typed
it from muscle memory, my bad.

>
> > L: linux-iio@xxxxxxxxxxxxxxx
>
>
> Best regards,
> Krzysztof

--
Kind Regards,
Niklas Söderlund