Message ID | 20230222172552.1545519-1-luca.ceresoli@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp704923wrd; Wed, 22 Feb 2023 09:29:06 -0800 (PST) X-Google-Smtp-Source: AK7set/TTV6MSRw7sVYlFCmqcEnLtKMci5TM2ScnyX+0Muxyz5eujflCc/wXeaaSvE/qhDQqLuUm X-Received: by 2002:a17:906:aac6:b0:8b2:fa6d:45d5 with SMTP id kt6-20020a170906aac600b008b2fa6d45d5mr19539076ejb.71.1677086945913; Wed, 22 Feb 2023 09:29:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677086945; cv=none; d=google.com; s=arc-20160816; b=rdcgw4gu2ZRjOgYT1jGxzZVidWAFMP/AQJhiHxwZY8h8emg1jNHJiMzRjsBapOvSi5 TirzxVqUEoItJDgJO+Ih4Oz/dZx2A/VzDMcf+NtIRy0FvRkfDCUCcEjecACB2rxAw8V0 ZHvz1r4ZMwj35SqFcLol1iaXBc0f1gpL6cuPcrTVlinSQkDqXlon78jOShDZCcmGeAXx dtJKCDst0PNB+q9zoq0dnyjHqTm4296NG0xc7D23WxcpM3QcdaiKBkleb42uSwHJU4LO zmyg4KAYF7OZYG1UsTMfyiT8t0UI4E2etT9oLjV9x5up14x7Tho8F5xdW78pV78+p8D6 b+SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=liyc04uOfojNPzcXlOkF1rgtORQMcNRHYaWkiDbA6a0=; b=H5j/AAoMhW9ML5AqCWkY30tNTdiunM0HueRSI/SXIyA61WLdxakzdsDkUKv+BnKkvK D3yWDYOFSpEmY1OeD5m1koWPP2llZas0i+Ah5ITkhXGt672+nxwdPUjvSxHXKgNc1Y4W +BkKasRhpULdtBrmGunKuq/wUaIToD3v4+J0SSRlna4nTCoRb96NPU/CGrPa8TggqxEf /yLPvOi0xQiA2vhgMl/atVeCEHqe7x5nnR/Wb5M/0fg306V3QM6dNhZRDb/xBQ5AK66I R4YUfSO1I6nxsL4MTf8//VnnwUgJQ2Nq/BUj4Pp9RY9Nrm9VO3tl3mJfQ91mn1CUvcUu 2nWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mvjWs1Z5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iy17-20020a170907819100b008ce1317f9a3si10255430ejc.280.2023.02.22.09.28.42; Wed, 22 Feb 2023 09:29:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mvjWs1Z5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231910AbjBVR0l (ORCPT <rfc822;chinmaygameti@gmail.com> + 99 others); Wed, 22 Feb 2023 12:26:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbjBVR0i (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Feb 2023 12:26:38 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33BF541B56; Wed, 22 Feb 2023 09:26:02 -0800 (PST) Received: from booty.fritz.box (unknown [77.244.183.192]) (Authenticated sender: luca.ceresoli@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 9323A4000B; Wed, 22 Feb 2023 17:25:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1677086759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=liyc04uOfojNPzcXlOkF1rgtORQMcNRHYaWkiDbA6a0=; b=mvjWs1Z5miVuBFhQ2lrmffWQEUftHKgpfdmtOtiNOKutAM7No18k/KwnwSTsSxOXe2aUms XNs3u/bdFz07d8XJFz4Mf1mNL8e+7xXuH+D7aWyN/p4UdW9i9FIEB+Fe34Zd9g1y3d5ES7 0tyava2uy+oe6FI+3Id5/4DEcCgSvbj8R4DnJQjD1Ur6KNaVw0kbNZ6xiG+eoHhg9Xz0ap JE18X0lYrp9C5qHwspz3T3h1JfBl8A9pM1tDRiP6MIr2/qVdKh3TTeQhtozxzs1SidYIAJ J2PVlp6SBl7i8ex/TODZ2wV1tzELjcC/S+f/Ha/y+g6UMaDKy42WH8csXWp65A== From: Luca Ceresoli <luca.ceresoli@bootlin.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, Luca Ceresoli <luca.ceresoli@bootlin.com>, Martyn Welch <martyn.welch@collabora.com> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marek Vasut <marex@denx.de>, Abel Vesa <abel.vesa@nxp.com>, Jacky Bai <ping.bai@nxp.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Lucas Stach <l.stach@pengutronix.de>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Thomas Petazzoni <thomas.petazzoni@bootlin.com> Subject: [PATCH] arm64: dts: imx8mp-msc-sm2s: Add sound card Date: Wed, 22 Feb 2023 18:25:52 +0100 Message-Id: <20230222172552.1545519-1-luca.ceresoli@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222182252.2ad6d82b@booty> References: <20230222182252.2ad6d82b@booty> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758553121711785466?= X-GMAIL-MSGID: =?utf-8?q?1758553121711785466?= |
Series |
arm64: dts: imx8mp-msc-sm2s: Add sound card
|
|
Commit Message
Luca Ceresoli
Feb. 22, 2023, 5:25 p.m. UTC
The MSC SM2-MB-EP1 carrier board for the SM2S-IMX8PLUS SMARC module has an
NXPP SGTL5000 audio codec connected to I2S-0 (sai2).
This requires to:
* add the power supplies (always on)
* enable sai2 with pinmuxes
* reparent the CLKOUT1 clock that feeds the codec SYS_MCLK to
IMX8MP_CLK_24M in order it to generate an accurate 24 MHz rate
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
.../dts/freescale/imx8mp-msc-sm2s-ep1.dts | 60 +++++++++++++++++++
1 file changed, 60 insertions(+)
Comments
Hi Luca, On 23-02-22, Luca Ceresoli wrote: > The MSC SM2-MB-EP1 carrier board for the SM2S-IMX8PLUS SMARC module has an > NXPP SGTL5000 audio codec connected to I2S-0 (sai2). > > This requires to: > > * add the power supplies (always on) > * enable sai2 with pinmuxes > * reparent the CLKOUT1 clock that feeds the codec SYS_MCLK to > IMX8MP_CLK_24M in order it to generate an accurate 24 MHz rate > > Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> > --- > .../dts/freescale/imx8mp-msc-sm2s-ep1.dts | 60 +++++++++++++++++++ > 1 file changed, 60 insertions(+) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > index 470ff8e31e32..894d9809f76d 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > @@ -14,6 +14,57 @@ / { > compatible = "avnet,sm2s-imx8mp-14N0600E-ep1", > "avnet,sm2s-imx8mp-14N0600E", "avnet,sm2s-imx8mp", > "fsl,imx8mp"; ... > +/* I2S-0 = sai2 */ > +&sai2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_sai2>; > + > + assigned-clocks = <&clk IMX8MP_CLK_SAI2>; > + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; > + assigned-clock-rates = <12288000>; > + > + fsl,sai-mclk-direction-output; > + status = "okay"; > }; Do you have some downstream patches for the sai interfaces? AFAIR Marek worked on this but the patches are not mainlien yet. Regards, Marco
On 22/02/2023 18:25, Luca Ceresoli wrote: > The MSC SM2-MB-EP1 carrier board for the SM2S-IMX8PLUS SMARC module has an > NXPP SGTL5000 audio codec connected to I2S-0 (sai2). > > This requires to: > > * add the power supplies (always on) > * enable sai2 with pinmuxes > * reparent the CLKOUT1 clock that feeds the codec SYS_MCLK to > IMX8MP_CLK_24M in order it to generate an accurate 24 MHz rate > > Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> > --- > .../dts/freescale/imx8mp-msc-sm2s-ep1.dts | 60 +++++++++++++++++++ > 1 file changed, 60 insertions(+) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > index 470ff8e31e32..894d9809f76d 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > @@ -14,6 +14,57 @@ / { > compatible = "avnet,sm2s-imx8mp-14N0600E-ep1", > "avnet,sm2s-imx8mp-14N0600E", "avnet,sm2s-imx8mp", > "fsl,imx8mp"; > + > + reg_vcc_3v3_audio: 3v3_audio_regulator { No underscores in node names. > + compatible = "regulator-fixed"; > + regulator-name = "VCC_3V3_AUD"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + reg_vcc_1v8_audio: 1v8_audio_regulator { > + compatible = "regulator-fixed"; > + regulator-name = "VCC_1V8_AUD"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + }; > + > + sgtl5000-sound { Just: sound Best regards, Krzysztof
On 2/22/23 18:59, Marco Felsch wrote: > Hi Luca, > > On 23-02-22, Luca Ceresoli wrote: >> The MSC SM2-MB-EP1 carrier board for the SM2S-IMX8PLUS SMARC module has an >> NXPP SGTL5000 audio codec connected to I2S-0 (sai2). >> >> This requires to: >> >> * add the power supplies (always on) >> * enable sai2 with pinmuxes >> * reparent the CLKOUT1 clock that feeds the codec SYS_MCLK to >> IMX8MP_CLK_24M in order it to generate an accurate 24 MHz rate >> >> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> >> --- >> .../dts/freescale/imx8mp-msc-sm2s-ep1.dts | 60 +++++++++++++++++++ >> 1 file changed, 60 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts >> index 470ff8e31e32..894d9809f76d 100644 >> --- a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts >> +++ b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts >> @@ -14,6 +14,57 @@ / { >> compatible = "avnet,sm2s-imx8mp-14N0600E-ep1", >> "avnet,sm2s-imx8mp-14N0600E", "avnet,sm2s-imx8mp", >> "fsl,imx8mp"; > > ... > >> +/* I2S-0 = sai2 */ >> +&sai2 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&pinctrl_sai2>; >> + >> + assigned-clocks = <&clk IMX8MP_CLK_SAI2>; >> + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; >> + assigned-clock-rates = <12288000>; >> + >> + fsl,sai-mclk-direction-output; >> + status = "okay"; >> }; > > Do you have some downstream patches for the sai interfaces? AFAIR Marek > worked on this but the patches are not mainlien yet. I guess it is time to resubmit these.
On 23-02-22, Marek Vasut wrote: > On 2/22/23 18:59, Marco Felsch wrote: > > Hi Luca, > > > > On 23-02-22, Luca Ceresoli wrote: > > > The MSC SM2-MB-EP1 carrier board for the SM2S-IMX8PLUS SMARC module has an > > > NXPP SGTL5000 audio codec connected to I2S-0 (sai2). > > > > > > This requires to: > > > > > > * add the power supplies (always on) > > > * enable sai2 with pinmuxes > > > * reparent the CLKOUT1 clock that feeds the codec SYS_MCLK to > > > IMX8MP_CLK_24M in order it to generate an accurate 24 MHz rate > > > > > > Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> > > > --- > > > .../dts/freescale/imx8mp-msc-sm2s-ep1.dts | 60 +++++++++++++++++++ > > > 1 file changed, 60 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > > > index 470ff8e31e32..894d9809f76d 100644 > > > --- a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > > > +++ b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > > > @@ -14,6 +14,57 @@ / { > > > compatible = "avnet,sm2s-imx8mp-14N0600E-ep1", > > > "avnet,sm2s-imx8mp-14N0600E", "avnet,sm2s-imx8mp", > > > "fsl,imx8mp"; > > > > ... > > > > > +/* I2S-0 = sai2 */ > > > +&sai2 { > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&pinctrl_sai2>; > > > + > > > + assigned-clocks = <&clk IMX8MP_CLK_SAI2>; > > > + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; > > > + assigned-clock-rates = <12288000>; > > > + > > > + fsl,sai-mclk-direction-output; > > > + status = "okay"; > > > }; > > > > Do you have some downstream patches for the sai interfaces? AFAIR Marek > > worked on this but the patches are not mainlien yet. > > I guess it is time to resubmit these. I would have two patches for your series first is necessary the other is changing the sound-card to make use of the simple-audio-card. Regards, Marco 8<----------------------------------------------------------------------------------------- [1] diff --git a/drivers/clk/imx/clk-imx8mp-audiomix.c b/drivers/clk/imx/clk-imx8mp-audiomix.c index 2d5d8255c7fa2..32eb29ae8f71f 100644 --- a/drivers/clk/imx/clk-imx8mp-audiomix.c +++ b/drivers/clk/imx/clk-imx8mp-audiomix.c @@ -18,7 +18,7 @@ #define CLKEN0 0x000 #define CLKEN1 0x004 -#define SAI_MCLK_SEL(n) (300 + 4 * (n)) /* n in 0..5 */ +#define SAI_MCLK_SEL(n) (0x300 + 4 * (n)) /* n in 0..5 */ #define PDM_SEL 0x318 #define SAI_PLL_GNRL_CTL 0x400 8<----------------------------------------------------------------------------------------- [2] diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index 8547391d9cbbf..3b38ec7bb47be 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -47,7 +47,6 @@ reg_audio_pwr: regulator-audio-pwr { regulator-max-microvolt = <3300000>; gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; enable-active-high; - regulator-always-on; }; reg_can1_stby: regulator-can1-stby { @@ -94,21 +93,34 @@ reg_usdhc2_vmmc: regulator-usdhc2 { enable-active-high; }; - sound-wm8960 { - compatible = "fsl,imx-audio-wm8960"; - model = "wm8960-audio"; - audio-cpu = <&sai3>; - audio-codec = <&codec>; - audio-routing = + sound-wm8524 { + compatible = "simple-audio-card"; + simple-audio-card,name = "wm8960-audio"; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&cpudai>; + simple-audio-card,bitclock-master = <&cpudai>; + simple-audio-card,widgets = + "Headphone", "Headphone Jack", + "Speaker", "External Speaker", + "Microphone", "Mic Jack"; + simple-audio-card,routing = "Headphone Jack", "HP_L", "Headphone Jack", "HP_R", - "Ext Spk", "SPK_LP", - "Ext Spk", "SPK_LN", - "Ext Spk", "SPK_RP", - "Ext Spk", "SPK_RN", + "External Speaker", "SPK_LP", + "External Speaker", "SPK_LN", + "External Speaker", "SPK_RP", + "External Speaker", "SPK_RN", "LINPUT1", "Mic Jack", "LINPUT3", "Mic Jack", "Mic Jack", "MICB"; + + cpudai: simple-audio-card,cpu { + sound-dai = <&sai3>; + }; + + simple-audio-card,codec { + sound-dai = <&wm8960>; + }; }; }; @@ -364,7 +376,7 @@ &i2c3 { pinctrl-0 = <&pinctrl_i2c3>; status = "okay"; - codec: wm8960@1a { + wm8960: codec@1a { compatible = "wlf,wm8960"; reg = <0x1a>; clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI3_MCLK1>; @@ -373,6 +385,7 @@ codec: wm8960@1a { wlf,hp-cfg = <3 2 3>; wlf,gpio-cfg = <1 3>; SPKVDD1-supply = <®_audio_pwr>; + #sound-dai-cells = <0>; }; pca6416: gpio@20 { 8<-----------------------------------------------------------------------------------------
Hi Marco, On Wed, 22 Feb 2023 18:59:41 +0100 Marco Felsch <m.felsch@pengutronix.de> wrote: > Hi Luca, > > On 23-02-22, Luca Ceresoli wrote: > > The MSC SM2-MB-EP1 carrier board for the SM2S-IMX8PLUS SMARC module has an > > NXPP SGTL5000 audio codec connected to I2S-0 (sai2). > > > > This requires to: > > > > * add the power supplies (always on) > > * enable sai2 with pinmuxes > > * reparent the CLKOUT1 clock that feeds the codec SYS_MCLK to > > IMX8MP_CLK_24M in order it to generate an accurate 24 MHz rate > > > > Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> > > --- > > .../dts/freescale/imx8mp-msc-sm2s-ep1.dts | 60 +++++++++++++++++++ > > 1 file changed, 60 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > > index 470ff8e31e32..894d9809f76d 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > > +++ b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts > > @@ -14,6 +14,57 @@ / { > > compatible = "avnet,sm2s-imx8mp-14N0600E-ep1", > > "avnet,sm2s-imx8mp-14N0600E", "avnet,sm2s-imx8mp", > > "fsl,imx8mp"; > > ... > > > +/* I2S-0 = sai2 */ > > +&sai2 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&pinctrl_sai2>; > > + > > + assigned-clocks = <&clk IMX8MP_CLK_SAI2>; > > + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; > > + assigned-clock-rates = <12288000>; > > + > > + fsl,sai-mclk-direction-output; > > + status = "okay"; > > }; > > Do you have some downstream patches for the sai interfaces? AFAIR Marek > worked on this but the patches are not mainlien yet. Right, my patch is based on the v3 series by Marek, and it should be threaded accordingly (https://lore.kernel.org/linux-arm-kernel/20230222172552.1545519-1-luca.ceresoli@bootlin.com/), but I realize I haven't made it 100% clear -- sorry about this. I guess I should just resend separately with a clarifying cover letter next time.
Hi Luca, I love your patch! Yet something to improve: [auto build test ERROR on shawnguo/for-next] [also build test ERROR on krzk/for-next krzk-dt/for-next linus/master v6.2 next-20230223] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Luca-Ceresoli/arm64-dts-imx8mp-msc-sm2s-Add-sound-card/20230223-012837 base: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next patch link: https://lore.kernel.org/r/20230222172552.1545519-1-luca.ceresoli%40bootlin.com patch subject: [PATCH] arm64: dts: imx8mp-msc-sm2s: Add sound card config: arm64-defconfig (https://download.01.org/0day-ci/archive/20230223/202302231533.yOY5yoeD-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/a5c4ed6f9f95285c0ec312f5293250a83ccfc5ce git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Luca-Ceresoli/arm64-dts-imx8mp-msc-sm2s-Add-sound-card/20230223-012837 git checkout a5c4ed6f9f95285c0ec312f5293250a83ccfc5ce # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Link: https://lore.kernel.org/oe-kbuild-all/202302231533.yOY5yoeD-lkp@intel.com/ All errors (new ones prefixed by >>): >> Error: arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts:58.1-6 Label or path sai2 not found >> FATAL ERROR: Syntax error parsing input tree
On 2/22/23 20:02, Marco Felsch wrote: Hi, [...] > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts > index 8547391d9cbbf..3b38ec7bb47be 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts > @@ -47,7 +47,6 @@ reg_audio_pwr: regulator-audio-pwr { > regulator-max-microvolt = <3300000>; > gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; > enable-active-high; > - regulator-always-on; > }; > > reg_can1_stby: regulator-can1-stby { > @@ -94,21 +93,34 @@ reg_usdhc2_vmmc: regulator-usdhc2 { > enable-active-high; > }; > > - sound-wm8960 { > - compatible = "fsl,imx-audio-wm8960"; > - model = "wm8960-audio"; > - audio-cpu = <&sai3>; > - audio-codec = <&codec>; > - audio-routing = > + sound-wm8524 { Why WM8524 ? The MX8MP EVK I have here is populated with WM8960 chip and with single headphone jack, are you sure the below is correct ? [...]
On 23-02-23, Marek Vasut wrote: > On 2/22/23 20:02, Marco Felsch wrote: > > Hi, > > [...] > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts > > index 8547391d9cbbf..3b38ec7bb47be 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts > > +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts > > @@ -47,7 +47,6 @@ reg_audio_pwr: regulator-audio-pwr { > > regulator-max-microvolt = <3300000>; > > gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; > > enable-active-high; > > - regulator-always-on; > > }; > > reg_can1_stby: regulator-can1-stby { > > @@ -94,21 +93,34 @@ reg_usdhc2_vmmc: regulator-usdhc2 { > > enable-active-high; > > }; > > - sound-wm8960 { > > - compatible = "fsl,imx-audio-wm8960"; > > - model = "wm8960-audio"; > > - audio-cpu = <&sai3>; > > - audio-codec = <&codec>; > > - audio-routing = > > + sound-wm8524 { > > Why WM8524 ? The MX8MP EVK I have here is populated with WM8960 chip and > with single headphone jack, are you sure the below is correct ? Argh.. the name was copied from 8MM evk dts but the below setup is working, at least the audio-outpath. Didn't tested the mic path. Regards, Marco
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts index 470ff8e31e32..894d9809f76d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dts @@ -14,6 +14,57 @@ / { compatible = "avnet,sm2s-imx8mp-14N0600E-ep1", "avnet,sm2s-imx8mp-14N0600E", "avnet,sm2s-imx8mp", "fsl,imx8mp"; + + reg_vcc_3v3_audio: 3v3_audio_regulator { + compatible = "regulator-fixed"; + regulator-name = "VCC_3V3_AUD"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + reg_vcc_1v8_audio: 1v8_audio_regulator { + compatible = "regulator-fixed"; + regulator-name = "VCC_1V8_AUD"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + sgtl5000-sound { + compatible = "fsl,imx-audio-sgtl5000"; + model = "imx-sgtl5000"; + audio-cpu = <&sai2>; + audio-codec = <&sgtl5000_codec>; + }; +}; + +&i2c1 { + sgtl5000_codec: sgtl5000@a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + + assigned-clocks = <&clk IMX8MP_CLK_CLKOUT1_SEL>; + assigned-clock-parents = <&clk IMX8MP_CLK_24M>; + assigned-clock-rates = <24000000>; + clocks = <&clk IMX8MP_CLK_CLKOUT1>; + clock-names = "mclk"; + + VDDA-supply = <®_vcc_3v3_audio>; + VDDD-supply = <®_vcc_1v8_audio>; + VDDIO-supply = <®_vcc_1v8_audio>; + }; +}; + +/* I2S-0 = sai2 */ +&sai2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai2>; + + assigned-clocks = <&clk IMX8MP_CLK_SAI2>; + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; + assigned-clock-rates = <12288000>; + + fsl,sai-mclk-direction-output; + status = "okay"; }; &flexcan1 { @@ -49,4 +100,13 @@ pinctrl_smarc_gpio: smarcgpiosgrp { <MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x19>, /* GPIO12 */ <MX8MP_IOMUXC_SAI1_RXFS__GPIO4_IO00 0x19>; /* GPIO13 */ }; + + pinctrl_sai2: sai2grp { + fsl,pins = < + MX8MP_IOMUXC_SAI2_TXFS__AUDIOMIX_SAI2_TX_SYNC 0xd6 + MX8MP_IOMUXC_SAI2_TXC__AUDIOMIX_SAI2_TX_BCLK 0xd6 + MX8MP_IOMUXC_SAI2_RXD0__AUDIOMIX_SAI2_RX_DATA00 0xd6 + MX8MP_IOMUXC_SAI2_TXD0__AUDIOMIX_SAI2_TX_DATA00 0xd6 + >; + }; };