Skip to content

Commit 99f3cf3

Browse files
roliver-rpipelwell
authored andcommitted
dt-bindings: clock: Add gpio-gate-clock-releasing
Document the gpio-gate-clock-releasing compatible string that enables acquire/release GPIO semantics on gpio-gated clocks. Signed-off-by: Richard Oliver <richard.oliver@raspberrypi.com>
1 parent 75cda0e commit 99f3cf3

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ maintainers:
1111

1212
properties:
1313
compatible:
14-
const: gpio-gate-clock
14+
enum:
15+
- gpio-gate-clock
16+
- gpio-gate-clock-releasing
17+
description: |
18+
Use "gpio-gate-clock" for normal operation where the GPIO is held for the
19+
lifetime of the clock. Use "gpio-gate-clock-releasing" for power-sensitive
20+
applications where the GPIO should be acquired only when the clock is
21+
enabled and released when disabled, allowing shared regulators to be
22+
powered down.
1523
1624
clocks:
1725
maxItems: 1
@@ -40,3 +48,14 @@ examples:
4048
#clock-cells = <0>;
4149
enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
4250
};
51+
52+
- |
53+
#include <dt-bindings/gpio/gpio.h>
54+
55+
/* Power-sensitive clock that releases GPIO when disabled */
56+
clock {
57+
compatible = "gpio-gate-clock-releasing";
58+
clocks = <&parentclk>;
59+
#clock-cells = <0>;
60+
enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
61+
};

0 commit comments

Comments
 (0)