TI's AM62 SoC can optionally provide two audio reference clocks (AUDIO_REFCLKx) to external peripherals. By default the reference clock is looped-back inside the SoC to a mux that goes to McASP AHCLK, but can optionally be enabled as an output to peripherals outside the SoC by setting a bit through CTRL_MMR registers. This patch series extends the existing syscon-clk driver to support the audio reference clock, and also adds new device tree bindings documentation. Please apply this on-top-of Andrew's series [1] removing the unnecessary dependency on syscon compatible. Signed-off-by: Jai Luthra <j-luthra@xxxxxx> --- Changes in v2: - Removed "syscon" compatible and rebased on top of [1] - Moved reg above other properties in bindings yaml - Link to v1: https://lore.kernel.org/r/20230515-refclk-v1-0-5e89f01d6733@xxxxxx [1]: https://lore.kernel.org/linux-clk/20230516184626.154892-1-afd@xxxxxx/#t Range-diff from v1: 1: 8107cb140f7d ! 1: a690c2044971 dt-bindings: clock: Add binding documentation for TI Audio REFCLK @@ Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml (new) + compatible: + items: + - const: ti,am62-audio-refclk -+ - const: syscon -+ -+ "#clock-cells": -+ const: 0 + + reg: + maxItems: 1 + ++ "#clock-cells": ++ const: 0 ++ + clocks: + maxItems: 1 + +required: + - compatible -+ - "#clock-cells" + - reg ++ - "#clock-cells" + - clocks + +additionalProperties: false @@ Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml (new) +examples: + - | + audio_refclk0: clock@82e0 { -+ compatible = "ti,am62-audio-refclk", "syscon"; ++ compatible = "ti,am62-audio-refclk"; + reg = <0x82e0 0x4>; + clocks = <&k3_clks 157 0>; + assigned-clocks = <&k3_clks 157 0>; 2: 5a555757fe42 = 2: 854166d4305f clk: keystone: syscon-clk: Add support for audio refclk --- Jai Luthra (2): dt-bindings: clock: Add binding documentation for TI Audio REFCLK clk: keystone: syscon-clk: Add support for audio refclk .../bindings/clock/ti,am62-audio-refclk.yaml | 43 ++++++++++++++++++++++ drivers/clk/keystone/syscon-clk.c | 43 +++++++++++++++++++--- 2 files changed, 81 insertions(+), 5 deletions(-) --- base-commit: 62f117ff3cbc8ea2bf9be36f019eba60369b6a81 change-id: 20230515-refclk-5b544d314c23 Best regards, -- Jai Luthra <j-luthra@xxxxxx>