[PATCH 2/2] arm64: dts: imx8mq-evk: Add spdif sound card support

Krzysztof Kozlowski krzk at kernel.org
Thu Oct 29 15:16:45 EDT 2020


On Thu, Oct 29, 2020 at 05:47:24PM +0800, Shengjiu Wang wrote:
> There are two spdif IP on imx8mq, spdif1 is for normal
> spdif device, spdif2 is for HDMI ARC interface.
> 
> Enable these spdif sound card in this patch.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang at nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 38 ++++++++++++++++
>  arch/arm64/boot/dts/freescale/imx8mq.dtsi    | 48 ++++++++++++++++++++
>  2 files changed, 86 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
> index 2418cca00bc5..e4250812586b 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
> @@ -87,6 +87,21 @@ link_codec: simple-audio-card,codec {
>  			clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
>  		};
>  	};
> +
> +	sound-spdif {
> +		compatible = "fsl,imx-audio-spdif";
> +		model = "imx-spdif";
> +		spdif-controller = <&spdif1>;
> +		spdif-out;
> +		spdif-in;
> +	};
> +
> +	sound-hdmi-arc {
> +		compatible = "fsl,imx-audio-spdif";
> +		model = "imx-hdmi-arc";
> +		spdif-controller = <&spdif2>;
> +		spdif-in;
> +	};
>  };
>  
>  &A53_0 {
> @@ -336,6 +351,22 @@ &snvs_pwrkey {
>  	status = "okay";
>  };
>  
> +&spdif1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_spdif1>;
> +	assigned-clocks = <&clk IMX8MQ_CLK_SPDIF1>;
> +	assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
> +	assigned-clock-rates = <24576000>;
> +	status = "okay";
> +};
> +
> +&spdif2 {
> +	assigned-clocks = <&clk IMX8MQ_CLK_SPDIF2>;
> +	assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
> +	assigned-clock-rates = <24576000>;
> +	status = "okay";
> +};
> +
>  &uart1 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_uart1>;
> @@ -467,6 +498,13 @@ MX8MQ_IOMUXC_GPIO1_IO08_GPIO1_IO8       0xd6
>  		>;
>  	};
>  
> +	pinctrl_spdif1: spdif1grp {
> +		fsl,pins = <
> +			MX8MQ_IOMUXC_SPDIF_TX_SPDIF1_OUT	0xd6
> +			MX8MQ_IOMUXC_SPDIF_RX_SPDIF1_IN		0xd6
> +		>;
> +	};
> +
>  	pinctrl_uart1: uart1grp {
>  		fsl,pins = <
>  			MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX		0x49
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index 49cc79246288..c94b2f80880f 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -793,6 +793,30 @@ bus at 30800000 { /* AIPS3 */
>  			ranges = <0x30800000 0x30800000 0x400000>,
>  				 <0x08000000 0x08000000 0x10000000>;
>  
> +			spdif1: spdif at 30810000 {
> +				compatible = "fsl,imx8mq-spdif", "fsl,imx35-spdif";

This is an undocumented compatible. Checkpatch should point this out.

If this patchset depends on others, please describe it in cover letter or
after '---' separator.

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list