[PATCH v9 0/2] Add Amlogic S4 audio clock controller support.

Jiebing Chen via B4 Relay devnull+jiebing.chen.amlogic.com at kernel.org
Mon Nov 30 19:14:02 PST 2026


S4 uses the existing AXG audio clock driver and reuses the SM1 and
G12A clock hardware. Pad clock and data selection is done by pinmux,
so those pad clocks are not registered. The controller has an internal
reset line, like G12A and SM1, and an audio power domain that must be
enabled before use. The new compatible is amlogic,s4-audio-clkc;
power-domains is required for S4 and forbidden for the other
compatibles. 

Signed-off-by: jiebing chen <jiebing.chen at amlogic.com>
---
Changes in v9:
- Separate out the clk-related patches for independent submission. .
- Link to v8: https://patch.msgid.link/20261110-audio_drvier-v8-0-1489241e4c83@amlogic.com

Changes in v8: 
- The S4 clock-enable macros now have an _S4 suffix, and S4 uses its own source mux at the correct bit instead of the SM1 one.
- Align the new CTRL0_BCLK_ENABLE_SHIFT and CTRL0_MCLK_ENABLE_SHIFT macros with the existing style: two spaces after #define, 
  and the values lined up with the other CTRL0_* macros.
- Rename the DAPM supplies from I2S BCLK Gate and I2S MCLK Gate to I2S BCLK EN and I2S MCLK EN.
- Connect both clock supplies directly to OUT EN. They are no longer chained, so the audio path does not pass through them. 
  OUT EN enables BCLK and MCLK when it is powered on. The audio path remains IN -> SRC -> OUT EN -> OUT Capture.
- 5 V regulator. Drop regulator-boot-on and regulator-always-on from vcc5v_reg. It stays the amplifier VCC-supply and is enabled only when the amplifier is in use.
- Unused codec. Remove the dmics node. Nothing referenced it.
- Amplifier name. Change sound-name-prefix from 10U2 to Analog_PA, and update the audio-routing entries to Analog_PA INL, 
  Analog_PA INR, Analog_PA OUTL, and Analog_PA OUTR.
- 64 kHz clocks. Keep CLKID_HIFI_PLL at 1179648000 for the 48 kHz family and CLKID_MPLL0 at 270950400 for the 44.1 kHz family. Add CLKID_MPLL1 at 393216000 for the 64 kHz family.
- Coaxial SPDIF output. Add spdif_out_h_pins in meson-s4.dtsi. GPIOH_4 is muxed as spdif_out_h / spdif_out, with a 3 mA drive and the bias disabled. 
  &spdifout_a uses that pinctrl so the coaxial output can be enabled.
- Disabled by default. Mark the audio controllers, the audio clock controller, and the audio arbiter as status = "disabled" in meson-s4.dtsi. AQ222 enables only the instances it uses.
- Codec supply. Move AVDD-supply = <&vddio_ao1v8> out of the SoC dtsi and onto the board-level &acodec node.
- Add the missing blank lines after the new power-domains property and after the new allOf conditional block.
- Link to v7: https://patch.msgid.link/20261021-audio_drvier-v7-0-2b9aeae9cb8a@amlogic.com

Changes in v7:
- Use the supply widget to manage the tocodec clock enable signal.
- Remove redundant MPLL frequencies.
- Fixed dt_binding warning
- Link to v6: https://lore.kernel.org/r/20260126-audio_drvier-v6-0-99e350855bc2@amlogic.com

Changes in v6:
- Fix the problem of string for Documentation/devicetree/bindings/clock/amlogic,axg-audio-clkc.yaml
- Remove clock pad register, and it will be submitted as an independent patch.
- Redescribe sound/soc/meson/g12a-toacodec.c
- Link to v5: https://lore.kernel.org/r/20250710-audio_drvier-v5-0-d4155f1e7464@amlogic.com

Changes in v5:
- Fix warning Documentation/devicetree/bindings/clock/amlogic,axg-audio-clkc.yam when make dt_binding_check
- The audio reg is mounted below the APB bus in dts file.
- Deal with pad clock in a distinct controller.
- Fix warning for sound/soc/meson/g12a-toacodec.c
- Link to v4: https://lore.kernel.org/r/20250319-audio_drvier-v4-0-686867fad719@amlogic.com

Changes in v4:
- fix dtb check warning 
- add maxItems of power domain for dt-bindings
- fixed audio clock pads regmap base and reg offset 
- use dapm widget to control tocodec bclk and mclk enable
- Link to v3: https://lore.kernel.org/r/20250228-audio_drvier-v3-0-dbfd30507e4c@amlogic.com

Changes in v3:
- remove g12a tocodec switch event
- Modify the incorrect title for dt-bindings
- Link to v2: https://lore.kernel.org/r/20250214-audio_drvier-v2-0-37881fa37c9e@amlogic.com

Changes in v2:
- remove tdm pad control and change tocodec base on g12a
- change hifipll rate to support 24bit
- add s4 audio clock
- Link to v1: https://lore.kernel.org/r/20250113-audio_drvier-v1-0-8c14770f38a0@amlogic.com

To: Neil Armstrong <neil.armstrong at linaro.org>
To: Jerome Brunet <jbrunet at baylibre.com>
To: Michael Turquette <mturquette at baylibre.com>
To: Stephen Boyd <sboyd at kernel.org>
To: Rob Herring <robh at kernel.org>
To: Krzysztof Kozlowski <krzk+dt at kernel.org>
To: Conor Dooley <conor+dt at kernel.org>
To: Liam Girdwood <lgirdwood at gmail.com>
To: Mark Brown <broonie at kernel.org>
To: Jaroslav Kysela <perex at perex.cz>
To: Takashi Iwai <tiwai at suse.com>
To: Kevin Hilman <khilman at baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
Cc: linux-amlogic at lists.infradead.org
Cc: linux-clk at vger.kernel.org
Cc: devicetree at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Cc: linux-sound at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org

---
Jiebing Chen (2):
      clk: meson: axg_audio: add S4 support
      dt-bindings: clock: meson: Add audio power domain for S4 soc

 .../bindings/clock/amlogic,axg-audio-clkc.yaml     |  17 +++
 drivers/clk/meson/axg-audio.c                      | 165 +++++++++++++++++++++
 2 files changed, 182 insertions(+)
---
base-commit: a0c666c25aeefd16f4b088c6549a6fb6b65a8a1d
change-id: 20250110-audio_drvier-07a5381c494b

Best regards,
--  
Jiebing Chen <jiebing.chen at amlogic.com>





More information about the linux-arm-kernel mailing list