Re: [PATCH 1/6] dt-bindings: clock: r9a06g032-sysctrl: Document reset cells

From: Ralph Siemsen

Date: Sat Nov 21 2026 - 08:00:43 EST


On Fri, Nov 20, 2026 at 12:11:42PM +0100, Wolfram Sang wrote:

> > +#define R9A06G032_RST_TS 1
> > +#define R9A06G032_RST_MIIC 2
>
> I didn't find any listing of the resets in the RZN1 docs, so coming up
> with arbitrary numbers as we need them seems okay to me.

Why aren't we starting at 0?

I wondered as well but clocks are also starting from 1, so we could
argue with consistency.

The clocks use value 0 to indicate "no parent clock", but only for the ".source" element of struct r9a06g032. The encoding macros add and subtract 1 to the clock IDs, so it should in fact be possible to use 0-based values even for the clocks. Too late to change now since the values are encoded into DTBs.

Thinking about it some more, perhaps instead of using 0 as the special case for "no parent", we could set .source to match .index. In other words a clock pointing to itself means "no parent". Worth changing?
Ralph