Re: [PATCH 2/7] dt-bindings: rtc: add bindings for m41t93

From: Akhilesh Patil

Date: Tue Sep 09 2025 - 07:46:22 EST


On Wed, Sep 03, 2025 at 04:30:53PM +0200, Krzysztof Kozlowski wrote:
> On 03/09/2025 16:25, Akhilesh Patil wrote:
> > add DT bindings for m41t93 rtc in YAML format.
>
> A nit, subject: drop second/last, redundant "bindings". The
> "dt-bindings" prefix is already stating that these are bindings.
> See also:
> https://elixir.bootlin.com/linux/v6.17-rc3/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
>
>
> Please organize the patch documenting compatible (DT bindings) before
> their user.
> See also:
> https://elixir.bootlin.com/linux/v6.14-rc6/source/Documentation/devicetree/bindings/submitting-patches.rst#L46
>

Hi Krzysztof, Thanks for the review and pointng out to these resources.
I will fix those as per the guidelines and share v2 of the series.

> >
> > Signed-off-by: Akhilesh Patil <akhilesh@xxxxxxxxxxxxx>
> > ---
> > .../devicetree/bindings/rtc/st,m41t93.yaml | 43 +++++++++++++++++++
> > 1 file changed, 43 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/rtc/st,m41t93.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/rtc/st,m41t93.yaml b/Documentation/devicetree/bindings/rtc/st,m41t93.yaml
> > new file mode 100644
> > index 000000000000..03673adc79db
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/rtc/st,m41t93.yaml
> > @@ -0,0 +1,43 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/rtc/st,m41t93.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ST M41T93 RTC and compatible
> > +
> > +maintainers:
> > + - Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
>
> This should not be subsystem maintainer.

okay.

>
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - st,m41t93
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + "#clock-cells":
>
> Hm? Are you sure? Nothing in the driver nor commit msg suggests that.

This RTC chip has square wave output generation which can generate
clocks from 1Hz to 32KHz. Hence, this device can be clock provider and
other devices can be clock consumer via DT.
I will add this in the description.

>
> > + const: 1
> > +
> > +allOf:
> > + - $ref: rtc.yaml
> > +
> > +unevaluatedProperties: false
>
> This goes after required. See example schema.

sure.

>
> > +
> > +required:
> > + - compatible
> > + - reg
> > +
> > +examples:
> > + - |
> > + spi {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + rtc@0 {
> > + spi-max-frequency = <2000000>;
>
> Does not look tested.

Will run $ make dt_binding_check , retest on my board and add actual
node I test as an example here.

>
> > + compatible = "st,m41t93";
> > + reg = <0>;
>
> Please follow DTS coding style. Which property is the first in the
> coding style?

sure, will fix in v2 as much as understand referring resources you
shared and your DTS 101 talk from OSS 25 Europe.
Still, if I miss something do let me know on v2 series.

Regards,
Akhilesh

>
> Best regards,
> Krzysztof