From patchwork Mon Oct 28 22:03:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13854231 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 1D185D5B15A for ; Mon, 28 Oct 2024 22:09:19 +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: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=0fyRgYWjnckjF1PPUqUQePRkCFvkPeJF04H7NSKi/3w=; b=QJDK4LQg+6IM7Dbla6HpGpNFWs +ezlhye/a6G/NItlXc2V1SCojNK9SOIErEocVEyh0sR7sdPI+ElHqHfResBWbv+UbcWcyHzSCFkAW aDk0ZLx5vsMGR2XrI1WRSD9GPAbBgtocUByEDWDQXfYYrg2cNz9gNJpOTNQ4KhjFU74wMvmlHjqDX +iCJOcbPOFmI6fFcWD24H0GR4Iq433vO57uy2OAqCw863nTRL/yyqTd1lNNvzfDsbr140OcRsU+eZ FOGTlVltF+q4gKyZMPBwclO15ZoeTiE8RPjt54RayIhGo7CJImQp6fqfP68fuH5q0u9J00Yzrbuzp CcVnbQ6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5Xv8-0000000CTpi-0S4M; Mon, 28 Oct 2024 22:09:06 +0000 Received: from mail-westeuropeazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c201::] helo=AM0PR83CU005.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5Xq0-0000000CSpH-08nY for linux-arm-kernel@lists.infradead.org; Mon, 28 Oct 2024 22:03:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aF79/lU3FqHf+7o2cMnGlK4fVhkGc+XAEPX8NSJ34fbFIqcf2R2KCJqjbYLL8IbgsL5RbOFRA62NK7yw0lYITLnCIZ12m0VxhYxy0V1so1FLNyS1u0Yv+h+yhLsv2E2tlT7Y/Mz/ZYlHyRs9OlyEkysGgHcLw7Jd2UlF5gIvoERa2eooLInDKkwI41fn1igqDIqgXaKtTKrsAMO8j2WI+YsyOi5Ld+PM84cQZ2tLW1vzmy43G5ELltiGgkmzXWPP1koDBjitzsoKyyXHO/9E0AgKgFPXyFUct9ro4YZLB3JDcZ884vgWa123zPu4c66XUfIep5u3Sy+N4IMTCgWfGg== 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=0fyRgYWjnckjF1PPUqUQePRkCFvkPeJF04H7NSKi/3w=; b=yXK2Ob7DK7OLwUyQVXEaeF12EmxmmGlqG4AS+K5qBqhZrHYpGbZCyaKtgnSzLqhJMCUn55eJl2lR8uz5ZBSsKQjbhFGQoVnppGDj1bkUXSAJ/do7bcFnA6xtC+DeGPdVs6OEm0Zjhs0BE8aU4yLVOUGjBSsLWdwbzuQRDmBnKcGBbDmnQDAB6kzY+zcPX9vFrc5oaQNj4ZkajMGbjwF1IXFzA2SXyHquNsuwPd0PVesr1tWWN4xRUl9qfi6iGDIqZGOoW+viyN38YOlk+5TPyt8FUSezyzSB0SnYq26oAsZvsj9t7eek/F6H6++jpmg1GgJ+83RHGq15w50sfiU94A== 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=0fyRgYWjnckjF1PPUqUQePRkCFvkPeJF04H7NSKi/3w=; b=V3kpbQL17ZaYANPxQ/dY54epjV8Pj7cjTN936OmZgIs0FWnWicwaaKFUab+NS3jsOH31EABmKPMP7tdM7UFAVcmuzWnj9Bt3kHlovgX6jswOqejDtnT13EWQJE69zqUgn86CPqmTpSQlHFNflJTcAAgZXS+P7d+pOHk0EL/zGxMTBsE7SWUucLd+3DL1OAfNUaUWQDzJIJbbwxJizYA5D0zvkI41i3kRM4oAmpJkZ6by2gNSx9BkCaMDGZq/rkUp12N7Y3yEh0ooPEzQkQcFAm5L0vLsklZuNULHfCiIqkopwNt0mFD5VsoEUeZJ/O/fn0l8JGh/FNl6QlBhKdDULw== 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 DBBPR04MB7641.eurprd04.prod.outlook.com (2603:10a6:10:1f7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.27; Mon, 28 Oct 2024 22:03:35 +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.8093.021; Mon, 28 Oct 2024 22:03:34 +0000 From: Frank Li To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), imx@lists.linux.dev (open list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/1] arm64: dts: imx8qm-mek: add audio-codec cs42888 and related nodes Date: Mon, 28 Oct 2024 18:03:18 -0400 Message-Id: <20241028220318.2047870-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BYAPR05CA0090.namprd05.prod.outlook.com (2603:10b6:a03:e0::31) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DBBPR04MB7641:EE_ X-MS-Office365-Filtering-Correlation-Id: be1dcbd5-3813-4d81-008d-08dcf79c5e41 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: 0kcuuO1CIEhZYSUZId/0YsYbTQiu9KDlAkfV+CIoU0MOFaU5cnQejY6iAqtPkc5hvO2JjFHsq5y2rfD/zazrl93c/LMNvT5df7Gbf3o+BpIKxm9CiD/J1Xf+063hZNbJKhMUS4HuZKnadJ2/IH0UY5njrFwQuvbh4fhcS8phkQMVbXGDjykca68pg3JqnE/i0LkLN9oStMDPIWDKHCVC6dooFgYOd6XDhcef1jrEIVAk0+VWtuli4Q+D61oZ1Ov1o4A7ABKOWNlqh4gQNX1+SY7wPdkltFw6+bHgg5LAL/KMuXTaD/ovBHjQSbxzTfSFrial+O0ulFBdA7cES1N05yW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Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iTq17fnDDNqADuAQCgfXZIv77UXXpgYNUl8YJ6ULb1w8ip7mV4A501uGqyGLqlrM1kLgbHajyjcWArPYdDaCMdp+wNhUsGuNkP7nIbu9OzUvDbO5wHMAUc8LO722H7XHLyTyOvGVFOIWC0TI7eq7MUduuqNTPe2TIWP9VC5wF0ibW8RbjUFBbH3u2G/E31k6DxhmdnPHeH7RXLa3JkHvADi9I+StYAP76uLKxUa7zSkcTfhPAwpZDkjSuzWUiLg56ImwD1v7U6FKY82/5T7KsFovdxxN0NBTKduL0k3FcDy2ab0EnfwN6MXIg9x7Dr514KP4/p+1gDKP5MeUIQuY7hw6PJAphjknoJPDkWNAynE2YQs+iQMqR2DKeYzuPtRwHZWZuo6TgTf7n7MfPaS2HaTFx5jgnGD7lj2tjikP0Kg3QBBL+k2P8Fy/j7pGcrYqR8G4i2SHZp6RMUmu9fnv/cun2+qdl5/pQO7VQOTIcXcQ2Kla8zRVjmJjuMJuww1K2waci8dVYsyqgrAr/1Z3iMfwUc2NZo84mXzi4heP/lEDRCWFvo7DFuROfr/U5QT93CqCQFZFIcnM4rLfYy+rpgoUPj6G1yf+FcqI4NaXudGCYHZXkB2KZjtDvJcvn0Smp9kijEYTORYDX68atyPgPsLO0+ChVvNWSYZIqEYeehEH++yAHf5mfEgf/AVmB6ZzOeZTk4TFbQyKW+y2BClxyx1XHN78SI448J55aNrmrfDcHEEdIojA3BfbHbsrwVP4SK6E2poNawag0WZPuteRtc3IpjR1NpLvcvHGzs4nR6Hj3iugHXQOQrEFMZ9ETgqMJsYUfXbJ53mW2zMycL6oEepoQvwGbEHAf19ps4iKjcsQ6x/DIpXkjZCIhNrF4ajlH/zyKOyIuhbkVlxOzCjHInFfh7iN/of6g7dCdJ6+XticZUAJcmcD/TVK58ZL7qcfH/mGZ+fmkC8R/5ckyz8t0WVBh4z/6nR7lROTHBxaEH2a4y4dfpgcxDyGKjtMdrq5m6YhJrKz/5Q6wLuFt+tD5z4x+BVRH9b5jl+fP30IslzH6108zJt9HbHt0ZgEr6kUCuhJ1Reu4d1N3tW+tnyhXopaAA+clrBKvZS4Nx9KhLDHr9XDyjL0WSdsQYO9oux0G4I95PyzHNC4M09PiYC1LpDQIESZEnt0hxpSa52w6e4LkgZDJb6cfUY6LVVDTE3LPDX1h5Uf7ySgiuU0m3liIvUP8onlGxojk2Yt1ITvsWKQvAmeGc/zToSwEI7N9FpefdVxbt6SZXyS6tPM3nEOKHHYxsAWFIf0PjFBhDGxS9Q0LIKyc17t9opj4+nIMJBQLKT6Yy5EXgOpP13aW/vv4Ai8oiHrJ5aT1n98pxZV5jp6Tw7w/7y7duLV0VxGjbeQNG9b/LjqirYQRpvU0wrsUBq25KNvoN6aQARvxTiBYDKekJbe357g045G2yQztzmmQ6egCOXXXTon6NLQ+gYdQbb2ANnAcYciyhZF/+3WeRVqSYtVCMTkGU4f23TWdGLjInepPucLsXyRh9mb+DG1+1L42+tNy+rQ8LFi4kxbidSnkTTUCuIhQNdbRRm3PR75 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: be1dcbd5-3813-4d81-008d-08dcf79c5e41 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 22:03:34.9630 (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: thLlxvHWeHZ3NQ1kKPMwHdishKiPxtWnRSZOVngfHTzXv0r+rc1nQI9f3q047FflyYjdpKr3/aLpds8Mx0MZ5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7641 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_150348_156556_AF0724C2 X-CRM114-Status: UNSURE ( 9.73 ) 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 Add audio-codec cs42888, enable esai0 and asrc0. Signed-off-by: Frank Li --- arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 82 ++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts index e983633a4bb31..31cf02275ca9e 100644 --- a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts +++ b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts @@ -134,6 +134,13 @@ reg_usdhc2_vmmc: usdhc2-vmmc { enable-active-high; }; + reg_audio: regulator-audio { + compatible = "regulator-fixed"; + regulator-name = "cs42888_supply"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + reg_fec2_supply: regulator-fec2-nvcc { compatible = "regulator-fixed"; regulator-name = "fec2_nvcc"; @@ -223,6 +230,27 @@ simple-audio-card,codec { }; }; + sound-cs42888 { + compatible = "fsl,imx-audio-cs42888"; + model = "imx-cs42888"; + audio-cpu = <&esai0>; + audio-codec = <&cs42888>; + audio-asrc = <&asrc0>; + 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"; + status = "okay"; + }; + sound-wm8960 { compatible = "fsl,imx-audio-wm8960"; model = "wm8960-audio"; @@ -301,12 +329,45 @@ pca6416: gpio@20 { gpio-controller; #gpio-cells = <2>; }; + + cs42888: audio-codec@48 { + compatible = "cirrus,cs42888"; + reg = <0x48>; + clocks = <&mclkout0_lpcg IMX_LPCG_CLK_0>; + clock-names = "mclk"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_cs42888_reset>; + VA-supply = <®_audio>; + VD-supply = <®_audio>; + VLS-supply = <®_audio>; + VLC-supply = <®_audio>; + reset-gpios = <&lsio_gpio4 25 GPIO_ACTIVE_LOW>; + 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 IMX_LPCG_CLK_0>; + assigned-clock-rates = <786432000>, <49152000>, <12288000>, <12288000>; + status = "okay"; + }; }; &cm41_intmux { status = "okay"; }; +&esai0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_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 IMX_LPCG_CLK_4>; + assigned-clock-parents = <&aud_pll_div0_lpcg IMX_LPCG_CLK_0>; + assigned-clock-rates = <0>, <786432000>, <49152000>, <12288000>, <49152000>; + status = "okay"; +}; + &hsio_phy { fsl,hsio-cfg = "pciea-pcieb-sata"; fsl,refclk-pad-mode = "input"; @@ -691,6 +752,12 @@ IMX8QM_SCU_GPIO0_03_LSIO_GPIO0_IO31 0x0600004c >; }; + pinctrl_cs42888_reset: cs42888_resetgrp { + fsl,pins = < + IMX8QM_QSPI1A_DATA1_LSIO_GPIO4_IO25 0x0600004c + >; + }; + pinctrl_i2c0: i2c0grp { fsl,pins = < IMX8QM_HDMI_TX0_TS_SCL_DMA_I2C0_SCL 0x06000021 @@ -725,6 +792,21 @@ IMX8QM_M41_I2C0_SCL_M41_I2C0_SCL 0x0600004c >; }; + pinctrl_esai0: esai0grp { + fsl,pins = < + IMX8QM_ESAI0_FSR_AUD_ESAI0_FSR 0xc6000040 + IMX8QM_ESAI0_FST_AUD_ESAI0_FST 0xc6000040 + IMX8QM_ESAI0_SCKR_AUD_ESAI0_SCKR 0xc6000040 + IMX8QM_ESAI0_SCKT_AUD_ESAI0_SCKT 0xc6000040 + IMX8QM_ESAI0_TX0_AUD_ESAI0_TX0 0xc6000040 + IMX8QM_ESAI0_TX1_AUD_ESAI0_TX1 0xc6000040 + IMX8QM_ESAI0_TX2_RX3_AUD_ESAI0_TX2_RX3 0xc6000040 + IMX8QM_ESAI0_TX3_RX2_AUD_ESAI0_TX3_RX2 0xc6000040 + IMX8QM_ESAI0_TX4_RX1_AUD_ESAI0_TX4_RX1 0xc6000040 + IMX8QM_ESAI0_TX5_RX0_AUD_ESAI0_TX5_RX0 0xc6000040 + >; + }; + pinctrl_fec1: fec1grp { fsl,pins = < IMX8QM_ENET0_MDC_CONN_ENET0_MDC 0x06000020