Re: [PATCH] arm64: dts: meson: add audio playback to P212
From: Neil Armstrong
Date: Mon Jan 17 2022 - 09:38:07 EST
Hi,
On 13/01/2022 05:45, Christian Hewitt wrote:
> Add initial audio support limited to HDMI i2s.
>
> Signed-off-by: Christian Hewitt <christianshewitt@xxxxxxxxx>
> ---
> The P212 dts is widely used with Android box devices that follow the
> reference design. The real P212 development board probably has many
> more audio capabilities, but as a minimum we can enable HDMI output
> and help box users too.
>
> .../boot/dts/amlogic/meson-gxl-s905x-p212.dts | 40 +++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
> index 2602940c2077..a39830379c74 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
> @@ -7,6 +7,7 @@
> /dts-v1/;
>
> #include "meson-gxl-s905x-p212.dtsi"
> +#include <dt-bindings/sound/meson-aiu.h>
>
> / {
> compatible = "amlogic,p212", "amlogic,s905x", "amlogic,meson-gxl";
> @@ -32,6 +33,45 @@
> };
> };
> };
> +
> + sound {
> + compatible = "amlogic,gx-sound-card";
> + model = "S905X-P212";
> + assigned-clocks = <&clkc CLKID_MPLL0>,
> + <&clkc CLKID_MPLL1>,
> + <&clkc CLKID_MPLL2>;
> + assigned-clock-parents = <0>, <0>, <0>;
> + assigned-clock-rates = <294912000>,
> + <270950400>,
> + <393216000>;
> + status = "okay";
> +
> + dai-link-0 {
> + sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
> + };
> +
> + dai-link-1 {
> + sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
> + dai-format = "i2s";
> + mclk-fs = <256>;
> +
> + codec-0 {
> + sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
> + };
> + };
> +
> + dai-link-2 {
> + sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
> +
> + codec-0 {
> + sound-dai = <&hdmi_tx>;
> + };
> + };
> + };
> +};
> +
> +&aiu {
> + status = "okay";
> };
>
> &cec_AO {
>
The P212 ref board has an analog audio output with a DIO2133CT14 amplifier unmuted by default with the active high GPIOH_5 to mute.
It's very probable all the STB boxes uses the same scheme, so it'll be safe to add the analog audio output here exactly like libretech-cc.
Neil