From patchwork Wed Jan 11 07:16:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hardevsinh Palaniya X-Patchwork-Id: 13096152 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87999C5479D for ; Wed, 11 Jan 2023 07:18:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=WuGfAY8xCqnx6gsxYdMUhFrBV0RmJhYnGFRkqOKQNL4=; b=cfM8ebzriS/hq5 R5Xr4c1lCl4+B2vu19WcCpXH5OvSC0+xUq8YySFTFes8n/hjeWheDxE8vYeWbUw4gmxHQLDnriUDT jtQdqrr/1E2wUBGSTM1eCCAzTG/7Ogk3wMb5dB5V06wcRwPvdsdru0ZlToDmm4DGNB24+f7zAn5Bu aqWJMZSDMZ0jqrgduCg3txzvb+oewuAlhW0cz/B6p1GKLg6V0seXA/j538ZRIjoxTB3wXAQKQfkVy /pHQUMVRRwINFG9rg/NRIyUsfmmtiqwb0mjsAnOcbfyre1O/desuCVbuHxqpGntfAZWdLVNlFLt9L XTaB3OO6TWLkJeLalQUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFVMJ-00A0tC-AO; Wed, 11 Jan 2023 07:17:15 +0000 Received: from mail-bmxind01on2070.outbound.protection.outlook.com ([40.107.239.70] helo=IND01-BMX-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFVME-00A0oc-RM for linux-arm-kernel@lists.infradead.org; Wed, 11 Jan 2023 07:17:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y/JQNv1Z5DkC0v9T1qczQZAn6fjEcLX3n0eOV1w8OVD7ebcPO2MmCf173ll3QKD9QReonQYjo5m8muO1/uv7trjdsC7Hzt/q3UWd4dF88gYXqxBP/cEqxM2UyqBTIH45ErvfZ5wgEtBdMlwbfkknvMvyqDnMNhxBwTo1pODtL/WSLjOFK6CqEeGKJDSC6LSPzLSVNaigG+Nl6FJS0FpDyReAkRfFXceSjLD9uJlA154zkrsMwyw9Vf8ffFTSBXrhXf1jLfZh+enFFgceeQKEaUIAGsw2LXn2dSqDCJdeMhES0/JC/f8O+1A1nWeowWEZ+RkgxALhYeKn5rEDCkKFqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2PAFFFk8xFs3rqXp3NMyMivym7MECt67kXf396BhG1M=; b=bkebROVma/8nA5esz+1xlvjGkvHd9AW+GtTu+Knm9kfXOmH5ZqpNpOXVlDOFfkrqn8+TrXv59l8e2uaf/8Dh3B55UbHdAyJ+3XcfJousufRZMwoursrhB168QSX3IqJlGRjqbtiboGlPrfRcKGws4FYrrcJ3lK4xWd2BNe/yZoEDLsfEic31DsWjz52wvE/r/iAgzSwyCDlGscQhz2mutIJs42ohYIsM9sSHMgboISUzSz9skz5CmYOL9+NxO5ZhQJTBhHquX+7ccwk4JWTT1DUYsheSADgOmNLeXPIsoeDG/uz3zR3CSTCBj14Ecgb+U+5O+NVZHvxp4u+Gg39v1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siliconsignals.io; dmarc=pass action=none header.from=siliconsignals.io; dkim=pass header.d=siliconsignals.io; arc=none Received: from MA0PR01MB7145.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:31::9) by MA0PR01MB9268.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:be::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Wed, 11 Jan 2023 07:16:56 +0000 Received: from MA0PR01MB7145.INDPRD01.PROD.OUTLOOK.COM ([fe80::e762:50f5:c91e:7e61]) by MA0PR01MB7145.INDPRD01.PROD.OUTLOOK.COM ([fe80::e762:50f5:c91e:7e61%4]) with mapi id 15.20.6002.013; Wed, 11 Jan 2023 07:16:55 +0000 From: Hardevsinh Palaniya To: "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-imx@nxp.com" , "lgirdwood@gmail.com" , "broonie@kernel.org" , "perex@perex.cz" , "tiwai@suse.com" , "peng.fan@nxp.com" , "m.felsch@pengutronix.de" , "shengjiu.wang@nxp.com" , "Markus.Niebel@ew.tq-group.com" , "hongxing.zhu@nxp.com" , "tommaso.merciai@amarulasolutions.com" , Hardevsinh Palaniya , "jun.li@nxp.com" , "ckeepax@opensource.cirrus.com" , "rf@opensource.cirrus.com" , "povik+lin@cutebit.org" , "pierre-louis.bossart@linux.intel.com" , "james.schulman@cirrus.com" , "flatmax@flatmax.com" , "srinivas.kandagatla@linaro.org" , "ryan.lee.analog@gmail.com" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "alsa-devel@alsa-project.org" Subject: [PATCH] Support for MAX98090/91 codec in iMX8MM evk Thread-Topic: [PATCH] Support for MAX98090/91 codec in iMX8MM evk Thread-Index: AQHZJYqW0X9zj+hpQkK22Ny+RkFTBQ== Date: Wed, 11 Jan 2023 07:16:55 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siliconsignals.io; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MA0PR01MB7145:EE_|MA0PR01MB9268:EE_ x-ms-office365-filtering-correlation-id: 3d479f1b-86c0-402c-1506-08daf3a3d22c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: R+7uzeinz2rlAO2MqWpC9R1z5PC2pvxSYjUNuDk0NTunu950cl897t1rGwVaKPXrwG2vaiTv2BYRJwivAJSOC2XSuL5vERxlxrzr7fMEfZprNr18rww7ytBFZjKFSMWasL+euGI4IoUCnf6TY3K/5rlB/9GFSdgwsp1HsaHvZ/d9ecrMh1Jl5Mt1poPFvgd4U8Ns+wIh0b7qPJGSApouOyQs9eUm8cUGnhIT5apeet2B7kSWfDzaKNL3xTfId3mcA3z+KWMbWVKokA2b3/P458ascEi4Vg/EM736pEOTV0n4Y3QYiuj02pxLv7l8/h0b36n0pEHb7zhob4zmw1mNPLbNB1LgHdohCRB+rGjHpASNLo9B008DIlzjiVaUW3/m8D3sTYAa90WLYkB1acYT+aHDN7VyoWQ6Y1jK7n9tI95Or3sDs0+NHsMCQwgHCrE/FTLZgR8SXfrF5C5E4+vNeDAeo5Pic31vnqAykCKlEcKosSk4SqBjGiwT7vnaJJZDAdFITZeuEaYiT3aysAsYExGenFpaTBwMyU9BorB97oZhM9tTyZxOPPHDaZG9TjFPEKqT4erSyK7nN/omPJ7WAEP0ROO2TNidntqYZ0PWlfQ878zmv8RyUpx/cm76IEiBejRL+75MEItWaPnaeteJmj1ISImLunN9/6PWE1bVDT+DptaJSObPo1y5iOd9RPf4kuUHLhZS4wAq5RG4Otddc80oqnHkTLrg3AbBkOsUMDju45yQi0E08aaaB+PnLL+Ey4C4BeW9tXMsw9BWHVslOQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MA0PR01MB7145.INDPRD01.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(39830400003)(346002)(136003)(396003)(366004)(376002)(451199015)(110136005)(2906002)(52536014)(33656002)(5660300002)(7416002)(86362001)(44832011)(7406005)(8936002)(38070700005)(55016003)(8676002)(41300700001)(76116006)(66556008)(64756008)(66446008)(66476007)(66946007)(921005)(122000001)(38100700002)(91956017)(316002)(55236004)(53546011)(83380400001)(7696005)(6506007)(71200400001)(26005)(9686003)(478600001)(186003)(32563001)(473944003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?oko09MQ7ThZ1Y0P/L6LqGYG90Amj?= =?utf-8?q?mhPnFLR3O6mM0Ngw4TyDOYKJwVsuB7YC0X3YoNs6mgsEkTJZsQgOPjweawayIPgT3?= =?utf-8?q?/2MgSwN2fEn82aPffXzMNzZkZHZhyR9BrAc1ovqBZOVMweLqKJQC2pFFHuyHQQOZN?= =?utf-8?q?eHFxCaKsgkW7p7Zp7QJFqWAXa30gpOmG80pKeW9BDzvxTP7LHUeZSQTuo87O9h+ns?= =?utf-8?q?JvEFFhHXbuzxwxZa4iIc/0yoR1f/7HyYQWVieFuqG5Gc5K/jE9PJvPGkqMZsgT6Lo?= =?utf-8?q?FcewAWrIc3o7irj0D+3JygbFghgPes9Kc8LAYWjzvcqlasyi0QvPLZ90pgQrfOBba?= =?utf-8?q?RiUHIKYdKm2ZLCRNpK5d+28GWRoCAaqJskBEUbvIfP5XIil7gwrA/XME8bAFoXwQw?= =?ut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UOjyi1Zvb?= =?utf-8?q?A25XBWIPsBvv7D3l153YbYXZGaf4BKGs1aYtQCNB+/om+1utmPMewR2o1mLSBL7p1?= =?utf-8?q?fB1aWvFYH/0iRIboifgs2TZA3Wa+JByPdxDTpPrbOV5RviGj38OJZrKgVMe3AYPDa?= =?utf-8?q?4snb4rNLoUb41l1yEfgL93rJRnPDU0XlDLFzfUgzj6H9C9oTT0qyYtoUd5BZISxCO?= =?utf-8?q?hksxtV7oOY1rrDQMFaZk13XN5hChnA0MoPH4kQBTh3hnI0VaQ2B5rv5F6CWfLHfU2?= =?utf-8?q?UF1eclutfIy7ImaO0GpCrzwAt1dI7c/upHgqvKsJ74ruNDiP56v6Jcw=3D?= MIME-Version: 1.0 X-OriginatorOrg: siliconsignals.io X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MA0PR01MB7145.INDPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 3d479f1b-86c0-402c-1506-08daf3a3d22c X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2023 07:16:55.7198 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7ec5089e-a433-4bd1-a638-82ee62e21d37 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: l0umtnjB4EYUBvzPGdeyDGcKXL5zDjt/Gww5iERJqja/TZJS95C4Z6LPWrHUXEkfc62aBbTgl+0B+SXkOz+fBLDgVscsaZXSsu7zJVT7BxRAZyjm0K3tpBbl2HGfHuOb X-MS-Exchange-Transport-CrossTenantHeadersStamped: MA0PR01MB9268 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230110_231711_149830_9CE1D05B X-CRM114-Status: UNSURE ( 7.60 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Hardevsinh Palaniya Date: Sat, 7 Jan 2023 17:08:28 +0530 Subject: [PATCH] Support for MAX98090/91 codec in iMX8MM evk - Adding node for MAX98090/91 in dts imx8mm-evk.dtsi - Adding tristate option in Signed-off-by: Hardevsinh Palaniya Signed-off-by: Hardevsinh Palaniya --- 2.25.1 diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi index e0b604ac0da4..58ff63cbc930 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi @@ -132,6 +132,32 @@ simple-audio-card,codec {                  clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;            };      }; + +     sound-max98090 { +           compatible = "simple-audio-card"; +           simple-audio-card,name = "max98090-audio"; +           simple-audio-card,format = "i2s"; +           simple-audio-card,frame-master = <&cpudai>; +           simple-audio-card,bitclock-master = <&cpudai>; +           simple-audio-card,widgets = "Speakers", "Speakers"; +           simple-audio-card,routing = +                       "Speakers", "SPKR", +                       "Speakers", "SPKL", +                       "IN1", "MICBIAS", +                       "MIC1","IN1", +                       "MIC2","IN1"; + +           cpudai: simple-audio-card,cpu { +                 sound-dai = <&sai5>; +                 dai-tdm-slot-num = <2>; +                 dai-tdm-slot-width = <32>; +           }; + +           simple-audio-card,codec { +                 sound-dai = <&max98090>; +                 clocks = <&clk IMX8MM_CLK_SAI5_ROOT>; +           }; +     }; }; &A53_0 { @@ -339,6 +365,14 @@ &i2c3 {      pinctrl-0 = <&pinctrl_i2c3>;      status = "okay"; +     max98090: max98090@10 { +           #sound-dai-cells = <0>; +           compatible = "maxim,max98090"; +           reg = <0x10>; +           clocks = <&clk IMX8MM_CLK_SAI5_ROOT>; +           clock-names = "mclk"; +     }; +      pca6416: gpio@20 {            compatible = "ti,tca6416";            reg = <0x20>; @@ -391,6 +425,20 @@ &sai3 {      status = "okay"; }; +&sai5 { +     pinctrl-names = "default"; +     pinctrl-0 = <&pinctrl_sai5>; +     assigned-clocks = <&clk IMX8MM_CLK_SAI5>; +     assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; +     assigned-clock-rates = <24576000>; +     clocks = <&clk IMX8MM_CLK_SAI5_IPG>, <&clk IMX8MM_CLK_DUMMY>, +           <&clk IMX8MM_CLK_SAI5_ROOT>, <&clk IMX8MM_CLK_DUMMY>, +           <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_AUDIO_PLL1_OUT>, +           <&clk IMX8MM_AUDIO_PLL2_OUT>; +     clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k"; +     status = "okay"; +}; + &snvs_pwrkey {      status = "okay"; }; @@ -552,6 +600,16 @@ MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6            >;      }; +     pinctrl_sai5: sai5grp { +           fsl,pins = < +                 MX8MM_IOMUXC_SAI5_MCLK_SAI5_MCLK 0xd6 +                 MX8MM_IOMUXC_SAI5_RXD2_SAI5_TX_BCLK 0xd6 +                 MX8MM_IOMUXC_SAI5_RXD1_SAI5_TX_SYNC 0xd6 +                 MX8MM_IOMUXC_SAI5_RXD0_SAI5_RX_DATA0 0xd6 +                 MX8MM_IOMUXC_SAI5_RXD3_SAI5_TX_DATA0 0xd6 +           >; +     } +      pinctrl_typec1: typec1grp {            fsl,pins = <                  MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11  0x159 diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 0f9d71490075..efef2df362a4 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -1009,7 +1009,7 @@ config SND_SOC_MAX98088      depends on I2C config SND_SOC_MAX98090 -     tristate +     tristate "Maxim MAX98090/1, Stereo Audio Codec"      depends on I2C config SND_SOC_MAX98095