Re: [PATCH 2/2] dt-bindings: Add clock guard DT description

From: Krzysztof Kozlowski

Date: Thu Mar 26 2026 - 06:23:42 EST


On 26/03/2026 10:54, Vyacheslav Yurkov wrote:
> On 23.03.2026 21:14, Conor Dooley wrote:
>
>>
>> The binding you've got says "GPIOs used to control or guard the clocks",
>> which is not what you're saying that is going on in this mail. A more
>> suitable description would be "GPIOs used to check the status of the
>> clocks".
>
> Agree, the description I provided is not very accurate.
>
>> I want to see an example dts user for this please.
>
> DTS example:
> clock_guard: clock_controller_guard {
> compatible = "clock-controller-guard";
> #clock-cells = <1>;
> clocks = <&h2f_clk 0>, <&clk_fgpa_rx 0>, <clk_fpga_tx 0>;
> clock-names = "h2f_clk0", "clk_fpga_rx", "clk_fpga_tx";
> gpios = <&fpga_ip 0 GPIO_ACTIVE_HIGH>, <&fpga_ip 1 GPIO_ACTIVE_HIGH>;
> gpio-names = "gpio-input0", "gpio-input1";
> clock-output-names = "clkctrl-guard";
> };
>
> custom_device {
> compatible = "...";
> ...
> #clock-cells = <1>;
> clocks = <&clock_guard 0>;
> clock-names = "clock-guard";
> };

So a pure SW construct? Device has specific clock inputs but you do not
model them and instead replace with one fake-guard-input.

I don't see how this represents the hardware at all.

Maybe some diagrams would help, assuming we still talk about hardware.

Best regards,
Krzysztof