[v2,1/6] dt-bindings: rtc: sun6i: add sun60i-a733 support

Message ID 20260629-a733-rtc-v2-1-7b72112784f8@baylibre.com (mailing list archive)
State New
Headers
Series clk: sun6i-rtc: Add support for Allwinner A733 SoC |

Commit Message

Jerome Brunet June 29, 2026, 12:42 p.m. UTC
Add a new rtc compatible for the sun60i-a733 SoC and new IDs for the
peripheral oscillator clock gates of this SoC.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 1 +
 include/dt-bindings/clock/sun6i-rtc.h                              | 4 ++++
 2 files changed, 5 insertions(+)
  

Comments

Jerome Brunet June 29, 2026, 3:05 p.m. UTC | #1
On lun. 29 juin 2026 at 12:53, sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] The `clock-output-names` property has a global `maxItems: 3`
> constraint and a description limiting it to three clocks, which contradicts
> the new clock outputs (IDs up to 11) added for the sun60i-a733-rtc.
> --
>
> commit a1565b632e372c724867216463a453c9d1600ad2
> Author: Jerome Brunet <jbrunet@baylibre.com>
>
> dt-bindings: rtc: sun6i: add sun60i-a733 support
>     
> Adds a new rtc compatible for the sun60i-a733 SoC and new IDs for the
> peripheral oscillator clock gates of this SoC.
>
>> diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
>> index 9df5cdb6f63f2..197a6f67b180a 100644
>> --- a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
>> +++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
>> @@ -33,6 +33,7 @@ properties:
>>            - enum:
>>                - allwinner,sun20i-d1-rtc
>>                - allwinner,sun55i-a523-rtc
>> +              - allwinner,sun60i-a733-rtc
>>            - const: allwinner,sun50i-r329-rtc
>
> [ ... ]
>
>> diff --git a/include/dt-bindings/clock/sun6i-rtc.h b/include/dt-bindings/clock/sun6i-rtc.h
>> index 3bd3aa3d57ce1..5132a393ca4b6 100644
>> --- a/include/dt-bindings/clock/sun6i-rtc.h
>> +++ b/include/dt-bindings/clock/sun6i-rtc.h
>> @@ -6,5 +6,9 @@
>>  #define CLK_OSC32K		0
>>  #define CLK_OSC32K_FANOUT	1
>>  #define CLK_IOSC		2
>> +#define CLK_HOSC_UFS		8
>> +#define CLK_HOSC_HDMI		9
>> +#define CLK_HOSC_SERDES0	10
>> +#define CLK_HOSC_SERDES1	11
>
> [Severity: Low]
> Will adding clock IDs up to 11 conflict with the existing clock-output-names
> constraint in allwinner,sun6i-a31-rtc.yaml?
>
> The clock-output-names property currently has a global maxItems constraint
> alongside its description:
>
>   clock-output-names:
>     minItems: 1
>     maxItems: 3
>     description:
>       The RTC provides up to three clocks
>
> If a device tree author attempts to define an array of clock-output-names
> to document all outputs for the allwinner,sun60i-a733-rtc node, won't it fail
> dt_binding_check validation because it exceeds the maximum allowed items?

Not quite sure what to do with that one.

The h616 compatible devices all exposed more than 3 clock through the
provider, even if the higher IDs did not have define.

The clock output names for the h616 compatible device are not really
supposed to be defined through DT ... at least AFAIU ??
  
Conor Dooley June 29, 2026, 3:16 p.m. UTC | #2
On Mon, Jun 29, 2026 at 05:05:51PM +0200, Jerome Brunet wrote:
> On lun. 29 juin 2026 at 12:53, sashiko-bot@kernel.org wrote:
> 
> > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > - [Low] The `clock-output-names` property has a global `maxItems: 3`
> > constraint and a description limiting it to three clocks, which contradicts
> > the new clock outputs (IDs up to 11) added for the sun60i-a733-rtc.
> > --
> >
> > commit a1565b632e372c724867216463a453c9d1600ad2
> > Author: Jerome Brunet <jbrunet@baylibre.com>
> >
> > dt-bindings: rtc: sun6i: add sun60i-a733 support
> >     
> > Adds a new rtc compatible for the sun60i-a733 SoC and new IDs for the
> > peripheral oscillator clock gates of this SoC.
> >
> >> diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
> >> index 9df5cdb6f63f2..197a6f67b180a 100644
> >> --- a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
> >> +++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
> >> @@ -33,6 +33,7 @@ properties:
> >>            - enum:
> >>                - allwinner,sun20i-d1-rtc
> >>                - allwinner,sun55i-a523-rtc
> >> +              - allwinner,sun60i-a733-rtc
> >>            - const: allwinner,sun50i-r329-rtc
> >
> > [ ... ]
> >
> >> diff --git a/include/dt-bindings/clock/sun6i-rtc.h b/include/dt-bindings/clock/sun6i-rtc.h
> >> index 3bd3aa3d57ce1..5132a393ca4b6 100644
> >> --- a/include/dt-bindings/clock/sun6i-rtc.h
> >> +++ b/include/dt-bindings/clock/sun6i-rtc.h
> >> @@ -6,5 +6,9 @@
> >>  #define CLK_OSC32K		0
> >>  #define CLK_OSC32K_FANOUT	1
> >>  #define CLK_IOSC		2
> >> +#define CLK_HOSC_UFS		8
> >> +#define CLK_HOSC_HDMI		9
> >> +#define CLK_HOSC_SERDES0	10
> >> +#define CLK_HOSC_SERDES1	11
> >
> > [Severity: Low]
> > Will adding clock IDs up to 11 conflict with the existing clock-output-names
> > constraint in allwinner,sun6i-a31-rtc.yaml?
> >
> > The clock-output-names property currently has a global maxItems constraint
> > alongside its description:
> >
> >   clock-output-names:
> >     minItems: 1
> >     maxItems: 3
> >     description:
> >       The RTC provides up to three clocks
> >
> > If a device tree author attempts to define an array of clock-output-names
> > to document all outputs for the allwinner,sun60i-a733-rtc node, won't it fail
> > dt_binding_check validation because it exceeds the maximum allowed items?
> 
> Not quite sure what to do with that one.
> 
> The h616 compatible devices all exposed more than 3 clock through the
> provider, even if the higher IDs did not have define.
> 
> The clock output names for the h616 compatible device are not really
> supposed to be defined through DT ... at least AFAIU ??

The output names aren't even defined anyway, so the property is not
really all that helpful. It's worth increasing the max to whatever is
permitted now and look into the conditional sections to see if any
constraints need updating.
  
Chen-Yu Tsai June 29, 2026, 3:20 p.m. UTC | #3
On Mon, Jun 29, 2026 at 11:16 PM Conor Dooley <conor@kernel.org> wrote:
>
> On Mon, Jun 29, 2026 at 05:05:51PM +0200, Jerome Brunet wrote:
> > On lun. 29 juin 2026 at 12:53, sashiko-bot@kernel.org wrote:
> >
> > > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > > - [Low] The `clock-output-names` property has a global `maxItems: 3`
> > > constraint and a description limiting it to three clocks, which contradicts
> > > the new clock outputs (IDs up to 11) added for the sun60i-a733-rtc.
> > > --
> > >
> > > commit a1565b632e372c724867216463a453c9d1600ad2
> > > Author: Jerome Brunet <jbrunet@baylibre.com>
> > >
> > > dt-bindings: rtc: sun6i: add sun60i-a733 support
> > >
> > > Adds a new rtc compatible for the sun60i-a733 SoC and new IDs for the
> > > peripheral oscillator clock gates of this SoC.
> > >
> > >> diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
> > >> index 9df5cdb6f63f2..197a6f67b180a 100644
> > >> --- a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
> > >> +++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
> > >> @@ -33,6 +33,7 @@ properties:
> > >>            - enum:
> > >>                - allwinner,sun20i-d1-rtc
> > >>                - allwinner,sun55i-a523-rtc
> > >> +              - allwinner,sun60i-a733-rtc
> > >>            - const: allwinner,sun50i-r329-rtc
> > >
> > > [ ... ]
> > >
> > >> diff --git a/include/dt-bindings/clock/sun6i-rtc.h b/include/dt-bindings/clock/sun6i-rtc.h
> > >> index 3bd3aa3d57ce1..5132a393ca4b6 100644
> > >> --- a/include/dt-bindings/clock/sun6i-rtc.h
> > >> +++ b/include/dt-bindings/clock/sun6i-rtc.h
> > >> @@ -6,5 +6,9 @@
> > >>  #define CLK_OSC32K                0
> > >>  #define CLK_OSC32K_FANOUT 1
> > >>  #define CLK_IOSC          2
> > >> +#define CLK_HOSC_UFS              8
> > >> +#define CLK_HOSC_HDMI             9
> > >> +#define CLK_HOSC_SERDES0  10
> > >> +#define CLK_HOSC_SERDES1  11
> > >
> > > [Severity: Low]
> > > Will adding clock IDs up to 11 conflict with the existing clock-output-names
> > > constraint in allwinner,sun6i-a31-rtc.yaml?
> > >
> > > The clock-output-names property currently has a global maxItems constraint
> > > alongside its description:
> > >
> > >   clock-output-names:
> > >     minItems: 1
> > >     maxItems: 3
> > >     description:
> > >       The RTC provides up to three clocks
> > >
> > > If a device tree author attempts to define an array of clock-output-names
> > > to document all outputs for the allwinner,sun60i-a733-rtc node, won't it fail
> > > dt_binding_check validation because it exceeds the maximum allowed items?
> >
> > Not quite sure what to do with that one.
> >
> > The h616 compatible devices all exposed more than 3 clock through the
> > provider, even if the higher IDs did not have define.
> >
> > The clock output names for the h616 compatible device are not really
> > supposed to be defined through DT ... at least AFAIU ??
>
> The output names aren't even defined anyway, so the property is not
> really all that helpful. It's worth increasing the max to whatever is
> permitted now and look into the conditional sections to see if any
> constraints need updating.

Or just not allow it for the newer RTC compatible? On the kernel side,
the sunxi-ng clk library doesn't even use the property, presumably because
the library mainly targets the main clock controller that has at least
tens of clocks. Writing clock-output-names for them isn't really scalable,
and sort of useless as the name can be inferred by the clock ID and
compatible.


ChenYu
  
Jerome Brunet June 29, 2026, 3:27 p.m. UTC | #4
On lun. 29 juin 2026 at 23:20, Chen-Yu Tsai <wens@kernel.org> wrote:

> On Mon, Jun 29, 2026 at 11:16 PM Conor Dooley <conor@kernel.org> wrote:
>>
>> On Mon, Jun 29, 2026 at 05:05:51PM +0200, Jerome Brunet wrote:
>> > On lun. 29 juin 2026 at 12:53, sashiko-bot@kernel.org wrote:
>> >
>> > > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>> > > - [Low] The `clock-output-names` property has a global `maxItems: 3`
>> > > constraint and a description limiting it to three clocks, which contradicts
>> > > the new clock outputs (IDs up to 11) added for the sun60i-a733-rtc.
>> > > --
>> > >
>> > > commit a1565b632e372c724867216463a453c9d1600ad2
>> > > Author: Jerome Brunet <jbrunet@baylibre.com>
>> > >
>> > > dt-bindings: rtc: sun6i: add sun60i-a733 support
>> > >
>> > > Adds a new rtc compatible for the sun60i-a733 SoC and new IDs for the
>> > > peripheral oscillator clock gates of this SoC.
>> > >
>> > >> diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
>> > >> index 9df5cdb6f63f2..197a6f67b180a 100644
>> > >> --- a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
>> > >> +++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
>> > >> @@ -33,6 +33,7 @@ properties:
>> > >>            - enum:
>> > >>                - allwinner,sun20i-d1-rtc
>> > >>                - allwinner,sun55i-a523-rtc
>> > >> +              - allwinner,sun60i-a733-rtc
>> > >>            - const: allwinner,sun50i-r329-rtc
>> > >
>> > > [ ... ]
>> > >
>> > >> diff --git a/include/dt-bindings/clock/sun6i-rtc.h b/include/dt-bindings/clock/sun6i-rtc.h
>> > >> index 3bd3aa3d57ce1..5132a393ca4b6 100644
>> > >> --- a/include/dt-bindings/clock/sun6i-rtc.h
>> > >> +++ b/include/dt-bindings/clock/sun6i-rtc.h
>> > >> @@ -6,5 +6,9 @@
>> > >>  #define CLK_OSC32K                0
>> > >>  #define CLK_OSC32K_FANOUT 1
>> > >>  #define CLK_IOSC          2
>> > >> +#define CLK_HOSC_UFS              8
>> > >> +#define CLK_HOSC_HDMI             9
>> > >> +#define CLK_HOSC_SERDES0  10
>> > >> +#define CLK_HOSC_SERDES1  11
>> > >
>> > > [Severity: Low]
>> > > Will adding clock IDs up to 11 conflict with the existing clock-output-names
>> > > constraint in allwinner,sun6i-a31-rtc.yaml?
>> > >
>> > > The clock-output-names property currently has a global maxItems constraint
>> > > alongside its description:
>> > >
>> > >   clock-output-names:
>> > >     minItems: 1
>> > >     maxItems: 3
>> > >     description:
>> > >       The RTC provides up to three clocks
>> > >
>> > > If a device tree author attempts to define an array of clock-output-names
>> > > to document all outputs for the allwinner,sun60i-a733-rtc node, won't it fail
>> > > dt_binding_check validation because it exceeds the maximum allowed items?
>> >
>> > Not quite sure what to do with that one.
>> >
>> > The h616 compatible devices all exposed more than 3 clock through the
>> > provider, even if the higher IDs did not have define.
>> >
>> > The clock output names for the h616 compatible device are not really
>> > supposed to be defined through DT ... at least AFAIU ??
>>
>> The output names aren't even defined anyway, so the property is not
>> really all that helpful. It's worth increasing the max to whatever is
>> permitted now and look into the conditional sections to see if any
>> constraints need updating.
>
> Or just not allow it for the newer RTC compatible? On the kernel side,

I was edging toward this. Would this be acceptable to you Conor ?
I'm thinking about disallowing it for all the h616 compatible ones, not
just the a733.

> the sunxi-ng clk library doesn't even use the property, presumably because
> the library mainly targets the main clock controller that has at least
> tens of clocks. Writing clock-output-names for them isn't really scalable,
> and sort of useless as the name can be inferred by the clock ID and
> compatible.
>
>
> ChenYu
  
Conor Dooley June 29, 2026, 3:40 p.m. UTC | #5
On Mon, Jun 29, 2026 at 05:27:01PM +0200, Jerome Brunet wrote:
> On lun. 29 juin 2026 at 23:20, Chen-Yu Tsai <wens@kernel.org> wrote:
> 
> > On Mon, Jun 29, 2026 at 11:16 PM Conor Dooley <conor@kernel.org> wrote:
> >>
> >> On Mon, Jun 29, 2026 at 05:05:51PM +0200, Jerome Brunet wrote:
> >> > On lun. 29 juin 2026 at 12:53, sashiko-bot@kernel.org wrote:
> >> >
> >> > > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> >> > > - [Low] The `clock-output-names` property has a global `maxItems: 3`
> >> > > constraint and a description limiting it to three clocks, which contradicts
> >> > > the new clock outputs (IDs up to 11) added for the sun60i-a733-rtc.
> >> > > --
> >> > >
> >> > > commit a1565b632e372c724867216463a453c9d1600ad2
> >> > > Author: Jerome Brunet <jbrunet@baylibre.com>
> >> > >
> >> > > dt-bindings: rtc: sun6i: add sun60i-a733 support
> >> > >
> >> > > Adds a new rtc compatible for the sun60i-a733 SoC and new IDs for the
> >> > > peripheral oscillator clock gates of this SoC.
> >> > >
> >> > >> diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
> >> > >> index 9df5cdb6f63f2..197a6f67b180a 100644
> >> > >> --- a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
> >> > >> +++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
> >> > >> @@ -33,6 +33,7 @@ properties:
> >> > >>            - enum:
> >> > >>                - allwinner,sun20i-d1-rtc
> >> > >>                - allwinner,sun55i-a523-rtc
> >> > >> +              - allwinner,sun60i-a733-rtc
> >> > >>            - const: allwinner,sun50i-r329-rtc
> >> > >
> >> > > [ ... ]
> >> > >
> >> > >> diff --git a/include/dt-bindings/clock/sun6i-rtc.h b/include/dt-bindings/clock/sun6i-rtc.h
> >> > >> index 3bd3aa3d57ce1..5132a393ca4b6 100644
> >> > >> --- a/include/dt-bindings/clock/sun6i-rtc.h
> >> > >> +++ b/include/dt-bindings/clock/sun6i-rtc.h
> >> > >> @@ -6,5 +6,9 @@
> >> > >>  #define CLK_OSC32K                0
> >> > >>  #define CLK_OSC32K_FANOUT 1
> >> > >>  #define CLK_IOSC          2
> >> > >> +#define CLK_HOSC_UFS              8
> >> > >> +#define CLK_HOSC_HDMI             9
> >> > >> +#define CLK_HOSC_SERDES0  10
> >> > >> +#define CLK_HOSC_SERDES1  11
> >> > >
> >> > > [Severity: Low]
> >> > > Will adding clock IDs up to 11 conflict with the existing clock-output-names
> >> > > constraint in allwinner,sun6i-a31-rtc.yaml?
> >> > >
> >> > > The clock-output-names property currently has a global maxItems constraint
> >> > > alongside its description:
> >> > >
> >> > >   clock-output-names:
> >> > >     minItems: 1
> >> > >     maxItems: 3
> >> > >     description:
> >> > >       The RTC provides up to three clocks
> >> > >
> >> > > If a device tree author attempts to define an array of clock-output-names
> >> > > to document all outputs for the allwinner,sun60i-a733-rtc node, won't it fail
> >> > > dt_binding_check validation because it exceeds the maximum allowed items?
> >> >
> >> > Not quite sure what to do with that one.
> >> >
> >> > The h616 compatible devices all exposed more than 3 clock through the
> >> > provider, even if the higher IDs did not have define.
> >> >
> >> > The clock output names for the h616 compatible device are not really
> >> > supposed to be defined through DT ... at least AFAIU ??
> >>
> >> The output names aren't even defined anyway, so the property is not
> >> really all that helpful. It's worth increasing the max to whatever is
> >> permitted now and look into the conditional sections to see if any
> >> constraints need updating.
> >
> > Or just not allow it for the newer RTC compatible? On the kernel side,
> 
> I was edging toward this. Would this be acceptable to you Conor ?
> I'm thinking about disallowing it for all the h616 compatible ones, not
> just the a733.

Works for me.
Just make sure you note somewhere that the names aren't ever defined
anyway.
  

Patch

diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
index 9df5cdb6f63f..197a6f67b180 100644
--- a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
@@ -33,6 +33,7 @@  properties:
           - enum:
               - allwinner,sun20i-d1-rtc
               - allwinner,sun55i-a523-rtc
+              - allwinner,sun60i-a733-rtc
           - const: allwinner,sun50i-r329-rtc
 
   reg:
diff --git a/include/dt-bindings/clock/sun6i-rtc.h b/include/dt-bindings/clock/sun6i-rtc.h
index 3bd3aa3d57ce..5132a393ca4b 100644
--- a/include/dt-bindings/clock/sun6i-rtc.h
+++ b/include/dt-bindings/clock/sun6i-rtc.h
@@ -6,5 +6,9 @@ 
 #define CLK_OSC32K		0
 #define CLK_OSC32K_FANOUT	1
 #define CLK_IOSC		2
+#define CLK_HOSC_UFS		8
+#define CLK_HOSC_HDMI		9
+#define CLK_HOSC_SERDES0	10
+#define CLK_HOSC_SERDES1	11
 
 #endif /* _DT_BINDINGS_CLK_SUN6I_RTC_H_ */