[PATCH 2/2] dt-bindings: Add clock guard DT description
From: Vyacheslav Yurkov via B4 Relay
Date: Wed Mar 18 2026 - 13:44:19 EST
From: Vyacheslav Yurkov <V.Yurkov.EXT@xxxxxxxxxx>
Describe device tree binding for virtual clock controller guard.
Signed-off-by: Vyacheslav Yurkov <uvv.mail@xxxxxxxxx>
Signed-off-by: Vyacheslav Yurkov <V.Yurkov.EXT@xxxxxxxxxx>
---
.../bindings/clock/clock-controller-guard.yaml | 79 ++++++++++++++++++++++
1 file changed, 79 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/clock-controller-guard.yaml b/Documentation/devicetree/bindings/clock/clock-controller-guard.yaml
new file mode 100644
index 000000000000..71c2d80de1f0
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/clock-controller-guard.yaml
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/clock/clock-controller-guard.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Clock Controller Guard
+
+maintainers:
+ - Vyacheslav Yurkov <V.Yurkov.EXT@xxxxxxxxxx>
+
+description: |
+ Clock controller that guards upstream clocks and/or GPIO
+ signals and exposes them as a single clock output.
+
+properties:
+ compatible:
+ const: clock-controller-guard
+
+ "#clock-cells":
+ const: 1
+
+ clocks:
+ description: Input clocks that will be guarded.
+ minItems: 0
+
+ clock-names: Input clock names.
+ minItems: 0
+
+ clock-output-names:
+ description: Names of the clock provided by this controller.
+ minItems: 1
+ items:
+ type: string
+
+ gpios:
+ description: |
+ GPIOs used to control or guard the clocks.
+ minItems: 0
+ maxItems: 32
+
+ gpio-names:
+ description: Names corresponding to each GPIO.
+ minItems: 0
+ maxItems: 32
+
+ items:
+ type: string
+
+required:
+ - compatible
+ - "#clock-cells"
+anyOf:
+ - required:
+ - clocks
+ - required:
+ - gpios
+dependencies:
+ gpio-names: [gpios]
+ clock-names: [clocks]
+
+additionalProperties: false
+
+examples:
+ - |
+ clkctrl: clock-controller {
+ compatible = "clock-controller-guard";
+ #clock-cells = <1>;
+
+ clocks = <&clk0 0>, <&pll 0>;
+
+ 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