From 4b24c69af9cd5bd8fe98ab2ddd822d73f5e20a00 Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Wed, 22 Jan 2025 18:35:41 +0200 Subject: [PATCH 1/4] dt-bindings: arm: imx: Add board revisions for i.MX8MP, i.MX8QM and i.MX8QXP wm8960 codec is EOL so we have i.MX8MP EVK Rev B4, i.MX8QM MEK Rev D and i.MX8QXP MEK WCPU boards with wm8962 codec. Therefore, add compatibles for them. Signed-off-by: Iuliana Prodan Signed-off-by: Daniel Baluta Link: https://patch.msgid.link/20250122163544.1392869-2-daniel.baluta@nxp.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/arm/fsl.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml index 6e0dcf4307f10..df26b6b26e8c0 100644 --- a/Documentation/devicetree/bindings/arm/fsl.yaml +++ b/Documentation/devicetree/bindings/arm/fsl.yaml @@ -1091,6 +1091,7 @@ properties: - dmo,imx8mp-data-modul-edm-sbc # i.MX8MP eDM SBC - emcraft,imx8mp-navqp # i.MX8MP Emcraft Systems NavQ+ Kit - fsl,imx8mp-evk # i.MX8MP EVK Board + - fsl,imx8mp-evk-revb4 # i.MX8MP EVK Rev B4 Board - gateworks,imx8mp-gw71xx-2x # i.MX8MP Gateworks Board - gateworks,imx8mp-gw72xx-2x # i.MX8MP Gateworks Board - gateworks,imx8mp-gw73xx-2x # i.MX8MP Gateworks Board @@ -1262,6 +1263,7 @@ properties: items: - enum: - fsl,imx8qm-mek # i.MX8QM MEK Board + - fsl,imx8qm-mek-revd # i.MX8QM MEK Rev D Board - toradex,apalis-imx8 # Apalis iMX8 Modules - toradex,apalis-imx8-v1.1 # Apalis iMX8 V1.1 Modules - const: fsl,imx8qm @@ -1290,6 +1292,7 @@ properties: - enum: - einfochips,imx8qxp-ai_ml # i.MX8QXP AI_ML Board - fsl,imx8qxp-mek # i.MX8QXP MEK Board + - fsl,imx8qxp-mek-wcpu # i.MX8QXP MEK WCPU Board - const: fsl,imx8qxp - description: i.MX8DXL based Boards From 66084793fac9c8b841f65da1809ad0ad398f9f2f Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Wed, 22 Jan 2025 18:35:42 +0200 Subject: [PATCH 2/4] ASoC: SOF: imx: Add mach entry to select cs42888 topology After commit 2b9cdef13648 ("ASoC: SOF: imx: Add devicetree support to select topologies") we select topology to be used by the board compatible string in the dts. Now that we have a way to know when the baseboard is installed, use the board compatible and select proper topology files when the cs42888 Audio IO card is used. Reviewed-by: Peter Ujfalusi Reviewed-by: Liam Girdwood Reviewed-by: Bard Liao Reviewed-by: Iuliana Prodan Reviewed-by: Laurentiu Mihalcea Signed-off-by: Daniel Baluta Link: https://patch.msgid.link/20250122163544.1392869-3-daniel.baluta@nxp.com Signed-off-by: Mark Brown --- sound/soc/sof/imx/imx8.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c index 0b85b29d1067f..d6117a3d42660 100644 --- a/sound/soc/sof/imx/imx8.c +++ b/sound/soc/sof/imx/imx8.c @@ -611,6 +611,17 @@ static struct snd_sof_of_mach sof_imx8_machs[] = { .sof_tplg_filename = "sof-imx8-wm8960.tplg", .drv_name = "asoc-audio-graph-card2", }, + { + .compatible = "fsl,imx8qxp-mek-bb", + .sof_tplg_filename = "sof-imx8-cs42888.tplg", + .drv_name = "asoc-audio-graph-card2", + }, + { + .compatible = "fsl,imx8qm-mek-bb", + .sof_tplg_filename = "sof-imx8-cs42888.tplg", + .drv_name = "asoc-audio-graph-card2", + }, + {} }; From a9f54c7fbd2edb28c8d4d812be3d0129167f92d4 Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Wed, 22 Jan 2025 18:35:43 +0200 Subject: [PATCH 3/4] ASoC: SOF: imx8: Add entries for new 8QM and 8QXP revisions The new revisions for 8QM and 8QXP have wm8962 codec instead of wm8960. Therefore add new entries in sof_imx8_machs, an array of snd_sof_of_mach, where we describe topology name and driver name. For the new revisions we have new compatible values and based on these, we select the new topology file, for wm8962 codec. Reviewed-by: Peter Ujfalusi Reviewed-by: Liam Girdwood Reviewed-by: Bard Liao Reviewed-by: Laurentiu Mihalcea Signed-off-by: Iuliana Prodan Signed-off-by: Daniel Baluta Link: https://patch.msgid.link/20250122163544.1392869-4-daniel.baluta@nxp.com Signed-off-by: Mark Brown --- sound/soc/sof/imx/imx8.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c index d6117a3d42660..3b418114e8d59 100644 --- a/sound/soc/sof/imx/imx8.c +++ b/sound/soc/sof/imx/imx8.c @@ -606,11 +606,21 @@ static struct snd_sof_of_mach sof_imx8_machs[] = { .sof_tplg_filename = "sof-imx8-wm8960.tplg", .drv_name = "asoc-audio-graph-card2", }, + { + .compatible = "fsl,imx8qxp-mek-wcpu", + .sof_tplg_filename = "sof-imx8-wm8962.tplg", + .drv_name = "asoc-audio-graph-card2", + }, { .compatible = "fsl,imx8qm-mek", .sof_tplg_filename = "sof-imx8-wm8960.tplg", .drv_name = "asoc-audio-graph-card2", }, + { + .compatible = "fsl,imx8qm-mek-revd", + .sof_tplg_filename = "sof-imx8-wm8962.tplg", + .drv_name = "asoc-audio-graph-card2", + }, { .compatible = "fsl,imx8qxp-mek-bb", .sof_tplg_filename = "sof-imx8-cs42888.tplg", From af65d7d041d486cc55530e14d806e16143037962 Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Wed, 22 Jan 2025 18:35:44 +0200 Subject: [PATCH 4/4] ASoC: SOF: imx8m: Add entry for new 8M Plus revision The new revision for 8M Plus has wm8962 codec instead of wm8960. Therefore add new entry in sof_imx8mp_machs, an array of snd_sof_of_mach, where we describe topology name and driver name. For the new revision we have new compatible value and based on this, we select the new topology file, for wm8962 codec. Reviewed-by: Peter Ujfalusi Reviewed-by: Liam Girdwood Reviewed-by: Bard Liao Reviewed-by: Laurentiu Mihalcea Signed-off-by: Daniel Baluta Signed-off-by: Iuliana Prodan Link: https://patch.msgid.link/20250122163544.1392869-5-daniel.baluta@nxp.com Signed-off-by: Mark Brown --- sound/soc/sof/imx/imx8m.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c index ff42743efa791..1dee0b7a1f3d6 100644 --- a/sound/soc/sof/imx/imx8m.c +++ b/sound/soc/sof/imx/imx8m.c @@ -471,6 +471,11 @@ static const struct snd_sof_dsp_ops sof_imx8m_ops = { }; static struct snd_sof_of_mach sof_imx8mp_machs[] = { + { + .compatible = "fsl,imx8mp-evk-revb4", + .sof_tplg_filename = "sof-imx8mp-wm8962.tplg", + .drv_name = "asoc-audio-graph-card2", + }, { .compatible = "fsl,imx8mp-evk", .sof_tplg_filename = "sof-imx8mp-wm8960.tplg",