Re: [PATCH v11 1/2] dt-bindings: clock: Add gpio-enabled-clock
From: Jerome Brunet
Date: Fri Nov 27 2026 - 10:55:44 EST
> Some clocks are switched on and off by hardware outside software
> control, which reports through a GPIO whether the clock is currently
> running. Software cannot enable such a clock, but its consumers must
> not use it before the GPIO indicates that it is running.
>
> Add a binding for a clock that passes its parent clock through
> unchanged and is considered enabled only while a GPIO signal is
> asserted. The parent clock determines the rate. The status GPIO is
> given by enabled-gpios, and poll-timeout-us bounds how long a consumer
> waits for the clock to become available.
>
> Signed-off-by: Vyacheslav Yurkov <V.Yurkov.EXT@xxxxxxxxxx>
> ---
> Our use case: peripheral clocks generated by FPGA PLLs, with the
> PLL-lock signals routed to GPIOs of the SoC.
> ---
> .../bindings/clock/gpio-enabled-clock.yaml | 55 ++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/clock/gpio-enabled-clock.yaml b/Documentation/devicetree/bindings/clock/gpio-enabled-clock.yaml
> new file mode 100644
> index 000000000000..4861c87ae5e0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/gpio-enabled-clock.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/gpio-enabled-clock.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: GPIO Enabled Clock
> +
> +maintainers:
> + - Vyacheslav Yurkov <V.Yurkov.EXT@xxxxxxxxxx>
> +
> +properties:
> + compatible:
> + const: gpio-enabled-clock
> +
> + clocks:
> + maxItems: 1
> +
> + "#clock-cells":
> + const: 0
> +
> + clock-output-names:
> + maxItems: 1
> +
> + enabled-gpios:
> + description: GPIO that indicates whether the clock is enabled or disabled.
> + maxItems: 1
> +
> + poll-timeout-us:
> + description: Timeout in microseconds for waiting for a GPIO signal.
> + default: 10
> + minimum: 10
> + maximum: 1000
Those limits are made up. I'm not sure they make sense for a generic device.
It surely need a value, i'd prefer if it was required then.
I'll wait for the DT folks view on this before applying it
--
Jerome