From patchwork Mon Oct 21 16:34:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13844452 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 9B1C4D15DBC for ; Mon, 21 Oct 2024 16:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1Jobsi1Q87wfcxwAn+zkEzDMXKEdqa79fU781bkEItk=; b=AUFsyvhzgQ2IRcgipegRengpsi uRUCFB9PAPptxeI0AcT/vs/uUlWMAeGzS3/O2ievLgJOnt2rB0X6cW4hND04GcYj5iYTcH7pcjztm R4upagXSnTw2XDaK3JYGhGIQ7BhvWyro9muVuF1+Eol3DkiAQ6Tel8M5dwbwzOxeoFIVnv0vnoICD hcNqjVoUIrQctn3m8WxlrY8RfxgV7bpQX3iOGgoPfPOPC9CqEuoqIyTbDTiBhvqQKN2TIsR4XcYy/ dGAkqEl5HeuspYd+xLHSB+gcAESmeq/Zq0W3umGKfStvkVDA11n0jj8MkZzvH4RIzouML/9NMk10q AsF8CkPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2vQ4-00000007yww-0pTz; Mon, 21 Oct 2024 16:38:12 +0000 Received: from mail-vi1eur02on20620.outbound.protection.outlook.com ([2a01:111:f403:2607::620] helo=EUR02-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2vN3-00000007y7Z-0Hnu for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2024 16:35:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=n3Ki6zMeHiTEH7zRlLPEM4pT01hoJmj0FQgPtUWxvo9C3P1VCnZox+rxIVP5PCwazzS8vhgcTxJxjkevZVvswSYmRGP28UAUH0mokNvSjcWDrarp04Epj+dGDRyMkt7NKiIpGtxJ3Z2WiuXVUrrC94Lt2K/bFj59P9oaMCFMeHDf+iwwHt/daKhfLFPjVZkkuxdpEmqYlQioz75iTPNoBJq6MqvWIgpztv0+RoHcLl/i2kk/ueSx1X7VUFbQQ3jbQQHm6JoF5V9wECSaB6z3KRZBCaEM/Ad+cK2VuAJyOdEVF6SSvHFFistZi2GKf1+hh6s16Ku0FhyVD29BZOVEtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=1Jobsi1Q87wfcxwAn+zkEzDMXKEdqa79fU781bkEItk=; b=sUUYIDxOlwFExKlZWhcGPCEaX0vJ7sgcpP5zHGf6uE79PP4uQvV6pcsh5E1PyAIgRiDQd24Q2wIYxxIO0KczDssawNSRUcheq4nJgHM4EsTdVk+ujY4r/5YgQtc2pFRMV5Uq53V7UsTba3USVkXlRdwxlSitDALN6XeBEjXLHjMwslxksLDyG3xTLhQOn7+OvoitgkB7j8gjFhOF68pV66pG1CtL6r1QtshcCoeLiGUbTy/cfHHFqWyPhNGBbG3RR8HH/I7BtNourJuwbTWwd1Xvd+SF1mpDm/eEZZ80zriotA5bugZtd5tNDCb54UWGSZjtvfzqQ9cK0NYTXROmZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1Jobsi1Q87wfcxwAn+zkEzDMXKEdqa79fU781bkEItk=; b=Bqm+4YjKMw1duwBOVfje45/KxRqWzM4IPDDG7sa12mrhpy9ye5m5hMiDnjLptGl7fBbCMWSxiq4j46VIL0qD4bQ/uuayEPT/H43AIVeG1yiLsZGNkMpYz/9K8ZTtskJaPIlISQsDQHxh9sJLyAjEvQZebMWDcNvPaAZY3LmmbVD4LX/wX8rzxCFHx4MdmPPVZ5Sj5HUK6OPgI5YAnCYItwsxN0YNHuGWNRGHArbVNa8N6bF5/YjC7uYJU1L/VEkXgGFxOQnJzGmWnM+/da7jL1FoCp7Gb3FCakb0jb25Ro6JBha86D8zVrp/Frx0UNbqlRDTa89jCR7Bhn+LVI0y0A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by PAXPR04MB8831.eurprd04.prod.outlook.com (2603:10a6:102:20e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 16:34:57 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.024; Mon, 21 Oct 2024 16:34:57 +0000 From: Frank Li To: shawnguo2@yeah.net Cc: Frank.Li@nxp.com, conor+dt@kernel.org, devicetree@vger.kernel.org, festevam@gmail.com, imx@lists.linux.dev, kernel@pengutronix.de, krzk+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robh@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org Subject: [PATCH v2 2/6] arm64: dts: imx8qxp-mek: add esai, cs42888 and related node Date: Mon, 21 Oct 2024 12:34:33 -0400 Message-Id: <20241021163437.1007507-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021163437.1007507-1-Frank.Li@nxp.com> References: <20241021163437.1007507-1-Frank.Li@nxp.com> X-ClientProxiedBy: BY5PR13CA0005.namprd13.prod.outlook.com (2603:10b6:a03:180::18) To DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|PAXPR04MB8831:EE_ X-MS-Office365-Filtering-Correlation-Id: be816fdf-549a-4d4c-b03f-08dcf1ee4ca6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|7416014|38350700014; X-Microsoft-Antispam-Message-Info: OA6Dj7E+pV7QzqYVLgckpD241pMy5q7RpDcCBxac+OCccvSjYxwoNanCRzfu2+99ylioXMbhZYAEojkpOCN9ZdnArfAHk8l5DrogtsdDzC8ysPL+3RgY+IO3h3G5do042CNaT6blgfUfNiXQ3LyjPA3f1OJ00psAkSm+XzR8mMLr8+wlY8GfAYUUN11CiR4R902+wGyT8W5GxSoC0BH14jpM0cr2Dj2W4cvOmvRhzmQ5kd4lpQmmvPCI8LAIEvRPdYrraypg8jVh4XbsaPT0CmshCiQWz8+gtMvDiXe68KlOVkcXfFq8czL5JL5M4Szf3et3ORYyqE4uollL8/1NctnhPy+C+gkr8vjggCf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V:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(7416014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5EAbMSqAQUMlKmsHk+E+WewYUfTK2aEezlYqyuG1BT97Rzsq1r43IAvEBcRSjEYyrXZHmgfTkEx8OqPv9y6YGee2hkF/5IUnqy9DLAx3AK1oC87Zp73io/p/kLL0GEwnaOSEeeKsqfnhm5hcxsnVCgUkauhJ5XQPUJEpq6MGQTg11qcGlXnyLqiUxSTe5aO1fykiXc6UmjQ2i2bg4miAc6SN7UBFNdRkJT5CgrFnEpcgb8t0glMD+CTA1lnhlN6V9jG98Nc/4Vl9jU/fJJv3OOHAC85cVYKYWJ3b1YJeYxPk1xstyO7+mC6nRAuPB9Q8iwWj2wkdDcQoOpHggdoGitAQ321hP5C5Cej1+1e18YeEtylycgPVZolBp/SBRxT6i0ujA46IhGLLSjlZ3lnWSnWNP1Xotkr6Bsdo0kLQtXLr83s+eqQR9u745JWsRg1GYxbOMitGkoclhitYs7iEIp/JCAatDpF1D7zJqkfP1PP2eEmQKGt2PtgXMWCdpI0wZNB9lzg9FRjDCgoajzxBzB8ZoPdG7H7nkv273afI2V0yN6dYaK/SboFbayy5LkGdVlPGrlAvFQI1ud2x7FUYhRVxBBitn/TOZjUMe5K3WOu6TSvcTIYuWbeHUxo7ooikD00HBdRsOCmY14xWDJOszMNbo+gokbg8tFiJ7Z7j5djjwx1cKhh16wMErzuL7u4Eoh5dsyG6ga2mCNKu2OEeJG5zIRJnA1mj0+3W0Sd74/2xCRRDc6I+3wxWFUMJP8CPUf71m/VcNvI558YU5V0mchVDi7SveocjZQOwEjhK1Ir7TWrMo2tkbimyROUMrXWbSv0vkS9soK5ZFmkyuKrTW6olbzLFSGcXCL4exuL/H3Qx2jZLv8TGYjhKwFyICsor9GE7y0hcQvPAKXPcVBitQ1kyZeEYBGMjwc7ljNcVfJByysDjTSZTZdS4YaN2p9VbIhUEvNw+8vaj/4+SXIZ035rH/ceRjaOjthnC++/ViGnDzouhv4DrFCIrqdzI3K4+/UL4T1/OGcPONISGD0m3WK5yLGnZ1Ss4LTxAKN+n0Xwp+xnTPYfNokZ78vbnJl+bfo7z66CNPf6U+M6R19PVhrhqvPzKgbPuW0N0LyhSgGGvw/RzIAobxzcu8CxdZG02Vr0UauB+II41uqUQWJboIB5q6t76NqhtB8KM7baaCOydxoG26uYjz7RwNrqTu3i7zrLaw1nJMdb+0grONE+5rUKPWVX6qy+O18SOhPJe4If+AFleLDCtLAd+HtO8XiconNd8h3rqVR0iaRid/YR9qj16tXRz7pd24Tp7r9P8p6WdUUl1/NHXEOHPE+ZR+c3zczGjFEOhvZ7lVAxKmFZIVCJ3VbC5KHoaI5fvSX2pACDcyysLi0VGa0696sTfmgckpvxXAzJs+HqQcPMsx3nFfbkyLqNMYCTjRc7q16vm3i9jgDPmgS+Nn/zAWnt1l/e+Ti4BnIAcl8GPGo9GfRsG51EtJNiuiOuFb5dtA2u1UcskNxMrznN/XYdBT4MjIRj4hr2stXt/WFxjQ0KEmu2SXZ6ALFMFTL25GiTjWG88F6Q= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: be816fdf-549a-4d4c-b03f-08dcf1ee4ca6 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9626.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 16:34:57.3770 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ErUeLrxrhwEOKAFjJ8YY0tRRH9MctI3XgaA9MfT+GNq5ScD/imF2CRWoUdX9T1gSigB3iXX3AW4n5IsqysFN1A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8831 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241021_093505_136659_89B8576F X-CRM114-Status: GOOD ( 11.19 ) 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 Add audio codec cs42888 and related node. Signed-off-by: Frank Li --- change from v1 to v2 - remove extra space - remove unnecessary status = "okay" --- arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts index d8d9e2883caf7..da8ceffdc7212 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts +++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts @@ -50,6 +50,13 @@ usb3_data_ss: endpoint { }; }; + reg_audio: regulator-audio { + compatible = "regulator-fixed"; + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3300000>; + regulator-name = "cs42888_supply"; + }; + sound-bt-sco { compatible = "simple-audio-card"; simple-audio-card,bitclock-inversion; @@ -69,6 +76,27 @@ btcpu: simple-audio-card,cpu { }; }; + sound-cs42888 { + compatible = "fsl,imx-audio-cs42888"; + audio-asrc = <&asrc0>; + audio-codec = <&cs42888>; + audio-cpu = <&esai0>; + audio-routing = + "Line Out Jack", "AOUT1L", + "Line Out Jack", "AOUT1R", + "Line Out Jack", "AOUT2L", + "Line Out Jack", "AOUT2R", + "Line Out Jack", "AOUT3L", + "Line Out Jack", "AOUT3R", + "Line Out Jack", "AOUT4L", + "Line Out Jack", "AOUT4R", + "AIN1L", "Line In Jack", + "AIN1R", "Line In Jack", + "AIN2L", "Line In Jack", + "AIN2R", "Line In Jack"; + model = "imx-cs42888"; + }; + sound-wm8960 { compatible = "fsl,imx-audio-wm8960"; model = "wm8960-audio"; @@ -86,6 +114,15 @@ sound-wm8960 { }; }; +&amix { + status = "okay"; +}; + +&asrc0 { + fsl,asrc-rate = <48000>; + status = "okay"; +}; + &dsp { memory-region = <&dsp_reserved>; status = "okay"; @@ -95,6 +132,19 @@ &dsp_reserved { status = "okay"; }; +&esai0 { + assigned-clocks = <&acm IMX_ADMA_ACM_ESAI0_MCLK_SEL>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>, + <&esai0_lpcg 0>; + assigned-clock-parents = <&aud_pll_div0_lpcg 0>; + assigned-clock-rates = <0>, <786432000>, <49152000>, <12288000>, <49152000>; + pinctrl-0 = <&pinctrl_esai0>; + pinctrl-names = "default"; + status = "okay"; +}; + &fec1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_fec1>; @@ -264,6 +314,23 @@ pca6416: gpio@20 { gpio-controller; #gpio-cells = <2>; }; + + cs42888: audio-codec@48 { + compatible = "cirrus,cs42888"; + reg = <0x48>; + clocks = <&mclkout0_lpcg 0>; + clock-names = "mclk"; + assigned-clocks = <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>, + <&mclkout0_lpcg 0>; + assigned-clock-rates = <786432000>, <49152000>, <12288000>, <12288000>; + reset-gpios = <&pca9557_b 1 GPIO_ACTIVE_LOW>; + VA-supply = <®_audio>; + VD-supply = <®_audio>; + VLC-supply = <®_audio>; + VLS-supply = <®_audio>; + }; }; &cm40_intmux { @@ -458,6 +525,21 @@ IMX8QXP_ADC_IN0_LSIO_GPIO1_IO10 0xc600004c >; }; + pinctrl_esai0: esai0grp { + fsl,pins = < + IMX8QXP_ESAI0_FSR_ADMA_ESAI0_FSR 0xc6000040 + IMX8QXP_ESAI0_FST_ADMA_ESAI0_FST 0xc6000040 + IMX8QXP_ESAI0_SCKR_ADMA_ESAI0_SCKR 0xc6000040 + IMX8QXP_ESAI0_SCKT_ADMA_ESAI0_SCKT 0xc6000040 + IMX8QXP_ESAI0_TX0_ADMA_ESAI0_TX0 0xc6000040 + IMX8QXP_ESAI0_TX1_ADMA_ESAI0_TX1 0xc6000040 + IMX8QXP_ESAI0_TX2_RX3_ADMA_ESAI0_TX2_RX3 0xc6000040 + IMX8QXP_ESAI0_TX3_RX2_ADMA_ESAI0_TX3_RX2 0xc6000040 + IMX8QXP_ESAI0_TX4_RX1_ADMA_ESAI0_TX4_RX1 0xc6000040 + IMX8QXP_ESAI0_TX5_RX0_ADMA_ESAI0_TX5_RX0 0xc6000040 + >; + }; + pinctrl_fec1: fec1grp { fsl,pins = < IMX8QXP_ENET0_MDC_CONN_ENET0_MDC 0x06000020