Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: clocks: add binding for gated-fixed-clocks

In contrast to fixed clocks that are described as ungateable, boards
sometimes use additional oscillators for things like PCIe reference
clocks, that need actual supplies to get enabled and enable-gpios to be
toggled for them to work.

This adds a binding for such oscillators that are not configurable
themself, but need to handle supplies for them to work.

In schematics they often can be seen as

----------------
Enable - | 100MHz,3.3V, | - VDD
| 3225 |
GND - | | - OUT
----------------

or similar. The enable pin might be separate but can also just be tied
to the vdd supply, hence it is optional in the binding.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240906082511.2963890-2-heiko@sntech.de
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Heiko Stuebner and committed by
Stephen Boyd
a4a7cbe3 9852d85e

+49
+49
Documentation/devicetree/bindings/clock/gated-fixed-clock.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/gated-fixed-clock.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Gated Fixed clock 8 + 9 + maintainers: 10 + - Heiko Stuebner <heiko@sntech.de> 11 + 12 + properties: 13 + compatible: 14 + const: gated-fixed-clock 15 + 16 + "#clock-cells": 17 + const: 0 18 + 19 + clock-frequency: true 20 + 21 + clock-output-names: 22 + maxItems: 1 23 + 24 + enable-gpios: 25 + description: 26 + Contains a single GPIO specifier for the GPIO that enables and disables 27 + the oscillator. 28 + maxItems: 1 29 + 30 + vdd-supply: 31 + description: handle of the regulator that provides the supply voltage 32 + 33 + required: 34 + - compatible 35 + - "#clock-cells" 36 + - clock-frequency 37 + - vdd-supply 38 + 39 + additionalProperties: false 40 + 41 + examples: 42 + - | 43 + clock-1000000000 { 44 + compatible = "gated-fixed-clock"; 45 + #clock-cells = <0>; 46 + clock-frequency = <1000000000>; 47 + vdd-supply = <&reg_vdd>; 48 + }; 49 + ...