[PATCH v2 2/2] dt-bindings: Add GPIO locked fixed clock

From: Vyacheslav Yurkov via B4 Relay

Date: Sun May 10 2026 - 14:07:09 EST


From: Vyacheslav Yurkov <V.Yurkov.EXT@xxxxxxxxxx>

Describe device tree binding for a fixed clock, which state can only be
determined by the external GPIO. It's similar to gated-fixed-clock, but
the GPIO direction is inverted.

Signed-off-by: Vyacheslav Yurkov <uvv.mail@xxxxxxxxx>
Signed-off-by: Vyacheslav Yurkov <V.Yurkov.EXT@xxxxxxxxxx>
---
.../bindings/clock/gpio-locked-fixed-clock.yaml | 77 ++++++++++++++++++++++
1 file changed, 77 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/gpio-locked-fixed-clock.yaml b/Documentation/devicetree/bindings/clock/gpio-locked-fixed-clock.yaml
new file mode 100644
index 000000000000..e0256bbd441d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/gpio-locked-fixed-clock.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/gpio-locked-fixed-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GPIO Locked Fixed Clock
+
+maintainers:
+ - Vyacheslav Yurkov <V.Yurkov.EXT@xxxxxxxxxx>
+
+description: |
+ Clock controller that aggregates input clocks and/or GPIO
+ signals and exposes them as a single clock output.
+
+properties:
+ compatible:
+ const: gpio-locked-fixed-clock
+
+ "#clock-cells":
+ const: 0
+
+ clocks:
+ description: Input clocks that externally locked.
+
+ clock-names:
+ description: Input clock names.
+
+ clock-output-names:
+ description: Names of the clock provided by this controller.
+ maxItems: 1
+
+ locked-gpios:
+ description: |
+ GPIOs to check the lock state.
+ minItems: 1
+ maxItems: 32
+
+ gpio-names:
+ description: Names corresponding to each GPIO.
+ minItems: 1
+ maxItems: 32
+
+required:
+ - compatible
+ - "#clock-cells"
+anyOf:
+ - required:
+ - clocks
+ - required:
+ - locked-gpios
+dependentRequired:
+ gpio-names:
+ - locked-gpios
+ clock-names:
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ clk_gpio_locked: gpio-locked-fixed-clock {
+ compatible = "gpio-locked-fixed-clock";
+ #clock-cells = <0>;
+
+ clocks = <&clk0 0>, <&pll 0>;
+
+ locked-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>,
+ <&gpio0 5 GPIO_ACTIVE_HIGH>,
+ <&gpio1 2 GPIO_ACTIVE_LOW>;
+
+ gpio-names = "gpio0", "gpio1", "gpio2";
+
+ clock-output-names = "clkout0";
+ };

--
2.34.1