From e3265ce3e8965e818a90866686c33ae7d78f0a60 Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Mon, 31 May 2021 15:33:08 +0200 Subject: [PATCH] S195xDTS: put PDM-I2S devices in their own sound card Since the PDM-I2S devices are on the 4mic board which is an daughterboard/external board/pluggable board/whatever you name it, and can be absent (in valid configurations, e.g. Google Cast builds), the sound card will not probe currently. This results in a valid configuration not being usable. By having an additional sound card per external daughterboard, it is now possible for a device to not be present and fail only its own sound card, while the rest works as well as before. Signed-off-by: Quentin Schulz --- .../fsl-imx8mm-sue-stream195x-kit1955-ak5704.dtsi | 11 +++++++++-- .../fsl-imx8mm-sue-stream195x-kit1955-pcmd3180.dtsi | 11 +++++++++-- .../fsl-imx8mm-sue-stream195x-kit1955.dtsi | 3 +++ .../fsl-imx8mm-sue-stream195x-kit3d.dtsi | 3 +++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955-ak5704.dtsi b/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955-ak5704.dtsi index ae1b22158a933c..97ce5c3ba260d0 100644 --- a/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955-ak5704.dtsi +++ b/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955-ak5704.dtsi @@ -1,8 +1,15 @@ // DTSI for original 4-microphone board with AK5704 / { - sound-pcm { - sue-card,dai-link@1 { + /* Create a new sound card per removable component */ + sound-ext-mic { + compatible = "sue,stream195x-audio"; + sue-card,name = "Microphones"; + + clocks = <&clk IMX8MM_AUDIO_PLL1_OUT>, <&clk IMX8MM_AUDIO_PLL2_OUT>; + clock-names = "pll8k", "pll11k"; + + sue-card,dai-link@0 { format = "i2s"; frame-master = <&dailink1_cpu>; diff --git a/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955-pcmd3180.dtsi b/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955-pcmd3180.dtsi index d0de4164d0ebda..83436a9d32fe11 100644 --- a/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955-pcmd3180.dtsi +++ b/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955-pcmd3180.dtsi @@ -1,8 +1,15 @@ // DTSI for new 4-microphone board based on TI PCMD3180 / { - sound-pcm { - sue-card,dai-link@1 { + /* Create a new sound card per removable component */ + sound-ext-mic { + compatible = "sue,stream195x-audio"; + sue-card,name = "Microphones"; + + clocks = <&clk IMX8MM_AUDIO_PLL1_OUT>, <&clk IMX8MM_AUDIO_PLL2_OUT>; + clock-names = "pll8k", "pll11k"; + + sue-card,dai-link@0 { format = "i2s"; frame-master = <&dailink1_cpu>; diff --git a/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955.dtsi b/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955.dtsi index 75e7b54c2bace3..a1e6736ec2a22d 100644 --- a/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955.dtsi +++ b/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit1955.dtsi @@ -22,6 +22,9 @@ gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; }; + /* Sound card for non-removable components on carrierboard. For + * removable components, add a new sound card per removable component. + */ sound-pcm { compatible = "sue,stream195x-audio"; sue-card,name = "Multichannel Audio on i.MX8MM"; diff --git a/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit3d.dtsi b/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit3d.dtsi index 5d2cda41dc8660..422907f81765af 100644 --- a/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit3d.dtsi +++ b/arch/arm64/boot/dts/streamunlimited/fsl-imx8mm-sue-stream195x-kit3d.dtsi @@ -22,6 +22,9 @@ gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; }; + /* Sound card for non-removable components on carrierboard. For + * removable components, add a new sound card per removable component. + */ sound-pcm { compatible = "sue,stream195x-audio"; sue-card,name = "Multichannel Audio on i.MX8MM";