From: Jiebing Chen <jiebing.chen@amlogic.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org,
jian.xu@amlogic.com, shuai.li@amlogic.com, zhe.wang@amlogic.com
Subject: Re: [PATCH v7 5/5] arm64: dts: amlogic: Add Amlogic S4 Audio
Date: Thu, 22 Oct 2026 10:54:18 +0800 [thread overview]
Message-ID: <cecef927-49f8-4351-803c-28ba2a10fed1@amlogic.com> (raw)
In-Reply-To: <179259528987.4070168.12089976339610295834.b4-review@b4>
在 2026/10/21 23:08, Jerome Brunet 写道:
> [ EXTERNAL EMAIL ]
>
>> Add basic audio driver support for the Amlogic S4 based
>> Amlogic AQ222 board.
>>
>> Signed-off-by: Jiebing Chen <jiebing.chen@amlogic.com>
>> ---
>> .../boot/dts/amlogic/meson-s4-s805x2-aq222.dts | 219 +++++++++++++
>> arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 360 +++++++++++++++++++++
>> 2 files changed, 579 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts b/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
>> index 0a3f81ea0fb0..d614dcd6933d 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
>> @@ -75,6 +75,19 @@ vddio_ao1v8: regulator-vddio-ao1v8 {
>> regulator-always-on;
>> };
>>
>> + vcc5v_reg: regulator-vcc-5v {
>> + compatible = "regulator-fixed";
>> + vin-supply = <&main_12v>;
>> + regulator-name = "VCC5V";
>> + regulator-min-microvolt = <5000000>;
>> + regulator-max-microvolt = <5000000>;
>> + gpio = <&gpio GPIOH_7 GPIO_ACTIVE_HIGH>;
>> + startup-delay-us = <7000>;
>> + enable-active-high;
>> + regulator-boot-on;
>> + regulator-always-on;
> You are adding that for audio and it needs to be always on ?
Thank you for the reminder. I have reviewed the U200 DTS and found that
it can be referenced within acodec.
Previously, we configured it as always on for testing.
>
>
>> + };
>> +
>> /* SY8120B1ABC DC/DC Regulator. */
>> vddcpu: regulator-vddcpu {
>> compatible = "pwm-regulator";
>> @@ -129,6 +142,212 @@ vddcpu: regulator-vddcpu {
>> <699000 98>,
>> <689000 100>;
>> };
>> +
>> + dmics: audio-codec-1 {
> Unused: nothing references dmics.
Noted with thanks.
>
>> + compatible = "dmic-codec";
>> + #sound-dai-cells = <0>;
>> + num-channels = <2>;
>> + wakeup-delay-ms = <50>;
>> + sound-name-prefix = "MIC";
>> + };
>> +
>> + dioo2133: audio-amplifier-0 {
>> + compatible = "simple-audio-amplifier";
>> + enable-gpios = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>;
>> + VCC-supply = <&vcc5v_reg>;
>> + sound-name-prefix = "10U2";
> Did you just copy over the u200 file or is it really the component name ?
Indeed, it was copied from U200. I was not clear about the original
naming intention.
Is it acceptable to name it based on the board name, such as aq222?
>
>> + };
>> +
>> + spdif_dir: audio-spdif-in {
>> + compatible = "linux,spdif-dir";
>> + #sound-dai-cells = <0>;
>> + sound-name-prefix = "DIR";
>> + };
>> +
>> + spdif_dit: audio-spdif-out {
>> + compatible = "linux,spdif-dit";
>> + #sound-dai-cells = <0>;
>> + sound-name-prefix = "DIT";
>> + };
>> +
>> + sound {
>> + compatible = "amlogic,axg-sound-card";
>> + model = "aq222";
>> + audio-widgets = "Line", "Lineout";
>> + audio-aux-devs = <&tdmout_a>, <&tdmout_b>, <&tdmout_c>,
>> + <&tdmin_a>, <&tdmin_b>, <&tdmin_c>,
>> + <&tdmin_lb>, <&dioo2133>;
>> + audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
>> + "TDMOUT_A IN 1", "FRDDR_B OUT 0",
>> + "TDMOUT_A IN 2", "FRDDR_C OUT 0",
>> + "TDM_A Playback", "TDMOUT_A OUT",
>> + "TDMOUT_B IN 0", "FRDDR_A OUT 1",
>> + "TDMOUT_B IN 1", "FRDDR_B OUT 1",
>> + "TDMOUT_B IN 2", "FRDDR_C OUT 1",
>> + "TDM_B Playback", "TDMOUT_B OUT",
>> + "TDMOUT_C IN 0", "FRDDR_A OUT 2",
>> + "TDMOUT_C IN 1", "FRDDR_B OUT 2",
>> + "TDMOUT_C IN 2", "FRDDR_C OUT 2",
>> + "TDM_C Playback", "TDMOUT_C OUT",
>> + "SPDIFOUT_A IN 0", "FRDDR_A OUT 3",
>> + "SPDIFOUT_A IN 1", "FRDDR_B OUT 3",
>> + "SPDIFOUT_A IN 2", "FRDDR_C OUT 3",
>> + "SPDIFOUT_B IN 0", "FRDDR_A OUT 4",
>> + "SPDIFOUT_B IN 1", "FRDDR_B OUT 4",
>> + "SPDIFOUT_B IN 2", "FRDDR_C OUT 4",
>> + "TDMIN_A IN 0", "TDM_A Capture",
>> + "TDMIN_A IN 1", "TDM_B Capture",
>> + "TDMIN_A IN 2", "TDM_C Capture",
>> + "TDMIN_A IN 3", "TDM_A Loopback",
>> + "TDMIN_A IN 4", "TDM_B Loopback",
>> + "TDMIN_A IN 5", "TDM_C Loopback",
>> + "TDMIN_B IN 0", "TDM_A Capture",
>> + "TDMIN_B IN 1", "TDM_B Capture",
>> + "TDMIN_B IN 2", "TDM_C Capture",
>> + "TDMIN_B IN 3", "TDM_A Loopback",
>> + "TDMIN_B IN 4", "TDM_B Loopback",
>> + "TDMIN_B IN 5", "TDM_C Loopback",
>> + "TDMIN_C IN 0", "TDM_A Capture",
>> + "TDMIN_C IN 1", "TDM_B Capture",
>> + "TDMIN_C IN 2", "TDM_C Capture",
>> + "TDMIN_C IN 3", "TDM_A Loopback",
>> + "TDMIN_C IN 4", "TDM_B Loopback",
>> + "TDMIN_C IN 5", "TDM_C Loopback",
>> + "TDMIN_LB IN 3", "TDM_A Capture",
>> + "TDMIN_LB IN 4", "TDM_B Capture",
>> + "TDMIN_LB IN 5", "TDM_C Capture",
>> + "TDMIN_LB IN 0", "TDM_A Loopback",
>> + "TDMIN_LB IN 1", "TDM_B Loopback",
>> + "TDMIN_LB IN 2", "TDM_C Loopback",
>> + "TODDR_A IN 0", "TDMIN_A OUT",
>> + "TODDR_B IN 0", "TDMIN_A OUT",
>> + "TODDR_C IN 0", "TDMIN_A OUT",
>> + "TODDR_A IN 1", "TDMIN_B OUT",
>> + "TODDR_B IN 1", "TDMIN_B OUT",
>> + "TODDR_C IN 1", "TDMIN_B OUT",
>> + "TODDR_A IN 2", "TDMIN_C OUT",
>> + "TODDR_B IN 2", "TDMIN_C OUT",
>> + "TODDR_C IN 2", "TDMIN_C OUT",
>> + "TODDR_A IN 3", "SPDIFIN Capture",
>> + "TODDR_B IN 3", "SPDIFIN Capture",
>> + "TODDR_C IN 3", "SPDIFIN Capture",
>> + "TODDR_A IN 6", "TDMIN_LB OUT",
>> + "TODDR_B IN 6", "TDMIN_LB OUT",
>> + "TODDR_C IN 6", "TDMIN_LB OUT",
>> + "10U2 INL", "ACODEC LOLP",
>> + "10U2 INR", "ACODEC LORP",
>> + "Lineout", "10U2 OUTL",
>> + "Lineout", "10U2 OUTR";
>> + clocks = <&clkc_pll CLKID_HIFI_PLL>,
>> + <&clkc_pll CLKID_MPLL0>;
>> + assigned-clocks = <&clkc_pll CLKID_HIFI_PLL>,
>> + <&clkc_pll CLKID_MPLL0>;
>> + assigned-clock-rates = <1179648000>,
>> + <270950400>;
> 2 PLLs only ?
> 1st appears to be for the 48k family, the 2nd for 44.1k
>
> No 64k support ?
I have carefully reviewed our previous records. Only the 48k and 44.1k
clock families were taken into account, and 64k was overlooked.
Upon checking the U200 DTS, I found that 393216000 is also included
there. I will add it in. thanks
>
>> +
>> + dai-link-0 {
>> + sound-dai = <&frddr_a>;
>> + };
>> +
>> + dai-link-1 {
>> + sound-dai = <&frddr_b>;
>> + };
>> +
>> + dai-link-2 {
>> + sound-dai = <&frddr_c>;
>> + };
>> +
>> + dai-link-3 {
>> + sound-dai = <&toddr_a>;
>> + };
>> +
>> + dai-link-4 {
>> + sound-dai = <&toddr_b>;
>> + };
>> +
>> + dai-link-5 {
>> + sound-dai = <&toddr_c>;
>> + };
>> +
>> + dai-link-6 {
>> + sound-dai = <&tdmif_a>;
>> + dai-format = "i2s";
>> + dai-tdm-slot-tx-mask-0 = <1 1>;
>> + mclk-fs = <256>;
>> + codec-0 {
>> + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
>> + };
>> + codec-1 {
>> + sound-dai = <&toacodec TOACODEC_IN_A>;
>> + };
>> + };
>> +
>> + dai-link-7 {
>> + sound-dai = <&tdmif_b>;
>> + dai-format = "i2s";
>> + dai-tdm-slot-tx-mask-0 = <1 1>;
>> + mclk-fs = <256>;
>> + codec-0 {
>> + sound-dai = <&toacodec TOACODEC_IN_B>;
>> + };
>> + codec-1 {
>> + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
>> + };
>> + };
>> +
>> + /* 8ch HDMI interface */
>> + dai-link-8 {
>> + sound-dai = <&tdmif_c>;
>> + dai-format = "i2s";
>> + dai-tdm-slot-tx-mask-0 = <1 1>;
>> + dai-tdm-slot-tx-mask-1 = <1 1>;
>> + dai-tdm-slot-tx-mask-2 = <1 1>;
>> + dai-tdm-slot-tx-mask-3 = <1 1>;
>> + mclk-fs = <256>;
>> + codec-0 {
>> + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
>> + };
>> + };
>> +
>> + /* spdif hdmi and coax output */
> No pinctrl on spdifout_a, so the coax output cannot work as is.
At the time of testing, we only covered SPDIF to HDMI TX.
I will configure the pinctrl settings to enable coax output.
thanks.
>
>> + dai-link-9 {
>> + sound-dai = <&spdifout_a>;
>> +
>> + codec-0 {
>> + sound-dai = <&spdif_dit>;
>> + };
>> +
>> + codec-1 {
>> + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>;
>> + };
>> + };
>> +
>> + /* spdif hdmi interface */
>> + dai-link-10 {
>> + sound-dai = <&spdifout_b>;
>> +
>> + codec {
>> + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>;
>> + };
>> + };
>> +
>> + /* spdif coax input */
>> + dai-link-11 {
>> + sound-dai = <&spdifin>;
>> +
>> + codec {
>> + sound-dai = <&spdif_dir>;
>> + };
>> + };
>> +
>> + dai-link-12 {
>> + sound-dai = <&toacodec TOACODEC_OUT>;
>> +
>> + codec {
>> + sound-dai = <&acodec>;
>> + };
>> + };
>> + };
>> };
>>
>> &pwm_ef {
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
>> index 2a6fbd530836..2cf9a8f3f396 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
>> @@ -11,6 +11,11 @@
>> #include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h>
>> #include <dt-bindings/power/meson-s4-power.h>
>> #include <dt-bindings/reset/amlogic,meson-s4-reset.h>
>> +#include <dt-bindings/clock/axg-audio-clkc.h>
>> +#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
>> +#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
>> +#include <dt-bindings/sound/meson-g12a-toacodec.h>
>> +#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
>>
>> / {
>> cpus {
>> @@ -908,4 +913,359 @@ emmc: mmc@fe08c000 {
>> assigned-clock-rates = <24000000>;
>> };
>> };
>> +
>> + tdmif_a: audio-controller-0 {
>> + compatible = "amlogic,axg-tdm-iface";
>> + #sound-dai-cells = <0>;
>> + sound-name-prefix = "TDM_A";
>> + clocks = <&clkc_audio AUD_CLKID_MST_A_SCLK>,
>> + <&clkc_audio AUD_CLKID_MST_A_LRCLK>,
>> + <&clkc_audio AUD_CLKID_MST_A_MCLK>;
>> + clock-names = "sclk", "lrclk","mclk";
> Should they all be disabled by default ?
Previously, we assumed that audio was always present. I found that U200
also configures it as disabled by default.
This approach is more prudent for SKUs without audio. Thank you for your
reminder.
Thank you for all of your review feedback.
>
>> + };
>> +
>> + tdmif_b: audio-controller-1 {
>> + compatible = "amlogic,axg-tdm-iface";
>> + #sound-dai-cells = <0>;
>> + sound-name-prefix = "TDM_B";
>> + clocks = <&clkc_audio AUD_CLKID_MST_B_SCLK>,
>> + <&clkc_audio AUD_CLKID_MST_B_LRCLK>,
>> + <&clkc_audio AUD_CLKID_MST_B_MCLK>;
>> + clock-names = "sclk", "lrclk","mclk";
>> + };
>> +
>> + tdmif_c: audio-controller-2 {
>> + compatible = "amlogic,axg-tdm-iface";
>> + #sound-dai-cells = <0>;
>> + sound-name-prefix = "TDM_C";
>> + clocks = <&clkc_audio AUD_CLKID_MST_C_SCLK>,
>> + <&clkc_audio AUD_CLKID_MST_C_LRCLK>,
>> + <&clkc_audio AUD_CLKID_MST_C_MCLK>;
>> + clock-names = "sclk", "lrclk","mclk";
>> + };
>> +};
>> +
>> +&apb4 {
>> + acodec: audio-controller@1a000 {
>> + compatible = "amlogic,t9015";
>> + reg = <0x0 0x1a000 0x0 0x14>;
>> + #sound-dai-cells = <0>;
>> + sound-name-prefix = "ACODEC";
>> + clocks = <&clkc_periphs CLKID_ACODEC>;
>> + clock-names = "pclk";
>> + resets = <&reset RESET_ACODEC>;
>> + AVDD-supply = <&vddio_ao1v8>;
> Board-level regulator referenced from the SoC dtsi.
>
> --
> Jerome
>
prev parent reply other threads:[~2026-10-22 2:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 7:08 [PATCH v7 0/5] Add support for S4 audio Jiebing Chen via B4 Relay
2026-10-21 7:08 ` [PATCH v7 1/5] dt-bindings: clock: meson: Add audio power domain for S4 soc Jiebing Chen via B4 Relay
2026-10-21 7:08 ` [PATCH v7 2/5] dt-bindings: Asoc: axg-audio: Add S4 audio tocodec Jiebing Chen via B4 Relay
2026-10-21 7:08 ` [PATCH v7 3/5] ASoC: meson: g12a-toacodec: Add S4 tocodec driver Jiebing Chen via B4 Relay
2026-10-21 15:08 ` Jerome Brunet
2026-10-22 2:24 ` Jiebing Chen
2026-10-21 7:08 ` [PATCH v7 4/5] clk: meson: axg_audio: add S4 support Jiebing Chen via B4 Relay
2026-10-21 15:08 ` Jerome Brunet
2026-10-21 7:08 ` [PATCH v7 5/5] arm64: dts: amlogic: Add Amlogic S4 Audio Jiebing Chen via B4 Relay
2026-10-21 15:08 ` Jerome Brunet
2026-10-22 2:54 ` Jiebing Chen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cecef927-49f8-4351-803c-28ba2a10fed1@amlogic.com \
--to=jiebing.chen@amlogic.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=jian.xu@amlogic.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=shuai.li@amlogic.com \
--cc=tiwai@suse.com \
--cc=zhe.wang@amlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®