Re: [PATCH 1/4] dt-bindings: clock: Add Ingenic X1600 CGU bindings

From: Krzysztof Kozlowski

Date: Fri Oct 30 2026 - 07:30:53 EST


On Sun, Oct 25, 2026 at 08:18:24PM +0100, H. Nikolaus Schaller wrote:
> Add the device tree bindings and the clock ID definitions for the
> Clock Generation Unit (CGU) of the Ingenic X1600 SoC.
>
> The clock layout features specific I2S handling. To properly support
> the I2S controllers on the X1600 without relying on complex compound
> dividers that are not yet natively supported by the drivers, split
> the structures to explicitly describe the additional I2S divider
> fields. This design accounts for the current driver limitations
> regarding division encoding while matching the hardware's internal
> gating architecture.
>
> Furthermore, introduce dedicated I2S0 RX and TX clock definitions to
> allow independent and precise routing for I2S stream usage.
>
> Co-developed-by: Paul Boddie <paul@xxxxxxxxxxxxx>
> Signed-off-by: Paul Boddie <paul@xxxxxxxxxxxxx>
> Co-developed-by: H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>
> Signed-off-by: H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>
> ---
> .../bindings/clock/ingenic,cgu.yaml | 2 +
> include/dt-bindings/clock/ingenic,x1600-cgu.h | 64 +++++++++++++++++++
> 2 files changed, 66 insertions(+)
> create mode 100644 include/dt-bindings/clock/ingenic,x1600-cgu.h
>
> diff --git a/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml b/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml
> index 509df06b9c9d8..c622131c5c49b 100644
> --- a/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml
> +++ b/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml
> @@ -28,6 +28,7 @@ select:
> - ingenic,jz4770-cgu
> - ingenic,jz4780-cgu
> - ingenic,x1000-cgu
> + - ingenic,x1600-cgu
> - ingenic,x1830-cgu
> required:
> - compatible
> @@ -58,6 +59,7 @@ properties:
> - ingenic,jz4770-cgu
> - ingenic,jz4780-cgu
> - ingenic,x1000-cgu
> + - ingenic,x1600-cgu
> - ingenic,x1830-cgu
> - const: simple-mfd
> minItems: 1
> diff --git a/include/dt-bindings/clock/ingenic,x1600-cgu.h b/include/dt-bindings/clock/ingenic,x1600-cgu.h
> new file mode 100644
> index 0000000000000..a0001a63a6b54
> --- /dev/null
> +++ b/include/dt-bindings/clock/ingenic,x1600-cgu.h
> @@ -0,0 +1,64 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * This header provides clock numbers for the ingenic,x1600-cgu DT binding.
> + *
> + * They are roughly ordered as:
> + * - external clocks
> + * - PLLs
> + * - muxes/dividers in the order they appear in the x1600 programmers manual
> + * - gates in order of their bit in the CLKGR* registers
> + */
> +
> +#ifndef __DT_BINDINGS_CLOCK_X1600_CGU_H__
> +#define __DT_BINDINGS_CLOCK_X1600_CGU_H__
> +
> +/*
> + * beware of unwritten rules:
> + * - list must start with 0
> + * - list must not have "holes"

Please drop this, no need for individual souces to document standard
rules. If you think documentation misses them, then please update
writing-bindings doc.

If this is driver requirement, then please fix your driver not to impose
such rules, although these two particularly are fine rules.

> + * - all clock parents must have lower number than a clock itself so that
> + * parents are initialized before
> + */

Best regards,
Krzysztof