[PATCH v4 0/2] A proposal to add a gpio-locked fixed clock driver.
Vyacheslav Yurkov <[email protected]>
| Newsgroups | org.kernel.feeds.b4-sent,org.kernel.vger.linux-clk,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
A gpio-locked fixed clock aggregates one or more input clocks and/or one or more GPIOs. It's similar to a gated-fixed-clock, but GPIO direction is inverted. Consumers can use the output clock to wait until all input clocks are locked and only then initialize / access dependent peripherals. The usage example for such a driver is when peripherals depend on PLLs in a FPGA, which can't be directly accessed by the CPU, but need a GPIO pin to check whether clock is actually usable. E.g. some of the IPs might not have a proper split between registers and IP core, which means that if an external clock and/or PLL lock is missing and one tries to access the registers, the response never comes, thus the CPU stalls. Signed-off-by: Vyacheslav Yurkov <[email protected]> Signed-off-by: Vyacheslav Yurkov <[email protected]> --- Changes in v4: - Removed driver specifics from DT binding - Link to v3: https://lore.kernel.org/r/[email protected] Changes in v3: - Removed unnecessary dt bindings - Improved HW description and commit messages - Link to v2: https://lore.kernel.org/r/[email protected] Changes in v2: - Renamed to clk-gpio-locked to express intent. - Provide enable() / is_enabled() operations so the clock behaves as expected - Fixed DTS errors / warnings - Link to v1: https://lore.kernel.org/r/[email protected] --- Vyacheslav Yurkov (2): dt-bindings: Add GPIO-locked fixed clock clk: Add gpio-locked fixed clock driver .../bindings/clock/gpio-locked-fixed-clock.yaml | 59 ++++ drivers/clk/Makefile | 1 + drivers/clk/clk-gpio-locked.c | 306 +++++++++++++++++++++ 3 files changed, 366 insertions(+) --- base-commit: 3dab139d4795f688e4f243e40c7474df00d329d9 change-id: 20260318-feature-clock-guard-f20a2c35b965 Best regards, -- Vyacheslav Yurkov <[email protected]>