From patchwork Tue Oct 22 05:29:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengjiu Wang X-Patchwork-Id: 13845104 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2061.outbound.protection.outlook.com [40.107.103.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4853513B58F for ; Tue, 22 Oct 2024 05:19:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729574381; cv=fail; b=TRty93g8rxkEA3DHbUhm5iL3A0PLSuOxBc9zqQrwRAdPDNwiPeM+rsZ6F5X08xKgXOjSTKbJ4lAAIMmuWDqREF4trg4FlnglioV6yjKnzXb/hkO4ALgxYeZ5MY9WntENCVCQksSL+su/EgEdMeWvUrX7+pU/4+oGMJxf6aKjdG4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729574381; c=relaxed/simple; bh=Te3L1RQ5DewJWd1Z3e2P5wkvR0V2l67blCbbLb58RjQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=uvKbTtVpX4FSM3hUzP3VY3a7bB8SsNo0NdM+55kwClVg+G8zs2kVLwpg4kb9bO1kqAtLbaFoRGOJpJQj8ah6JFGefyuFwM/uVyi700SnfOzzRlV/ge0b6QNrHd9FsBUF3V3J/AeV54sBPrJnmwo72sZWjE0/8CdQUeSIW73V7to= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=X4Okmezg; arc=fail smtp.client-ip=40.107.103.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="X4Okmezg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DfNNKMLyNa+D8OXxRyo2gvC9QK9x25QtigU4LQw2eV/GQsc5jM9NdNoiEXazbflJL2Nr4C9gZU7glSfwjo6jW+NQYFhjlErP/xUovNRQw+Qg+bpkDrXgXtwP+xCEuhtTA8pp4Zioegiy9MiOBuiUzBpEj7VB5jHwz3KV1+ZmFIzC2WvsavlbYtI5A0FVrBtkAkfTPXajU5Z3aCx19uxSrzJ8OcwfpQXr1xKSONkMDO7KCw1c12lrVEMmUJs45Vy7cjZ9c+38czX5R03gkrLlZ5v7g6uRGyzxSerjmlKeEtwxO+gew/BxWo1/33+wuY6CcekevgPeeD5h2LUlnn7kpw== 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=JVyCKPSHYrkFONMOlHz3pUEMSfbfPA4T4nlZqPZLYXA=; b=wImKm7cQ2s/77bz4Gopzre9hcYvAppbUTIwATpdAr+aUa9DKHXeSV63mYr6gep+7wMe3re1dct2mDiHXa+iSYBJkkiH71ufra1icRnE8zf5741UctxISZVGcAIxReI3wIG74Dc9ZuGXxzfg3msFTPHzAgH1xTeKoz2xGYCWrTLZZt+Tbutki4QmA2HcCnYH2aACVy84RXLntmjgyWX9gFIg9sBCtUNI64kCP6xacAVawiPnOO/7pyOtRjdk7r1eu0rnqzzlJalQD8wd7WKR1K2F3/IwLruuccc/RccdwbHxkg201p0wt5CoorG0rAnXmOdlLF1T9MsE80nwp37H2qw== 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=JVyCKPSHYrkFONMOlHz3pUEMSfbfPA4T4nlZqPZLYXA=; b=X4Okmezgfa76ZOaLT80Hq+6r8fLjFfUcWFBQG+gxLInpn58j9P7A8K4Cl4uSfb2A8hQMkoRDxvYy3ICa0coT9e50fgqvw+Df6uC5qXwfZPhpX7Ns46KInpsWczMNBmPQmmhuWTQp9RBQPeXMNTOI3TF/19clqLF1Pdd85ZZkI+iezd8j8PzGy83KRId6y1l3nnwlzd0G8h3Cx257XR6ekOXvIzciSweoA0mvZKHmnzT8M0J9afH1UWfVuWNfD8pnOQpuTcf+YdZWAp+OhxWqud8jgpnW9PACsGu535QSk19iZHQreMltu7G0mNe5gnVoPXUJuL+uMz5JI92/z8+/6g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB7044.eurprd04.prod.outlook.com (2603:10a6:208:191::20) by AM7PR04MB6853.eurprd04.prod.outlook.com (2603:10a6:20b:107::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27; Tue, 22 Oct 2024 05:19:36 +0000 Received: from AM0PR04MB7044.eurprd04.prod.outlook.com ([fe80::7be0:296:768c:e891]) by AM0PR04MB7044.eurprd04.prod.outlook.com ([fe80::7be0:296:768c:e891%6]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 05:19:36 +0000 From: Shengjiu Wang To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, shengjiu.wang@gmail.com Subject: [PATCH v2 3/3] arm64: dts: imx8ulp-evk: Add spdif sound card support Date: Tue, 22 Oct 2024 13:29:19 +0800 Message-Id: <20241022052919.1946074-4-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241022052919.1946074-1-shengjiu.wang@nxp.com> References: <20241022052919.1946074-1-shengjiu.wang@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To VI1PR04MB7055.eurprd04.prod.outlook.com (2603:10a6:800:123::21) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB7044:EE_|AM7PR04MB6853:EE_ X-MS-Office365-Filtering-Correlation-Id: 716478fd-21ea-47c2-b907-08dcf2591e8b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|7416014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: 3wThhAl4poG/Go6wt9TWpGApxErifRVAPf9xGL1WxLMTgBRI4+rjCYaaM0H7atvapoPQk2tM5Q+jD4tT/FDYKP3l1FwvQsWQtL0pZv/BKZ7UlKkNqGE9/GMu4ygKzdcR08Wae2Fm0VHJuBN8F8W2g/g0HewPXLrbg+fmTpG/u/xofm6dvi4oqH9h2VS+l5mlTUa+B365MSz2LcicgyACjlNc5asr6wClJykztpBQiaXU046JZm8UX6y83g0YsN81ndovzo+ummG16gGQUzMX8YdYp09eDt9AXIrSjf0/uqDoNKl5X2Vl+6ClC7g1rPVMxmJd93n4wv6etmNZlhBZ/OvcBVGaMbR1+NaNHD3/WV7sAiyAW5hc4Gq6vdyOh+z9D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:NSPM;H:AM0PR04MB7044.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(376014)(7416014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: funrG5nK3U8G0ePLdbQ83cW5JNvZ2DmJQ+a4C/gDazgrhSGmEDIP/ZJskRpLTX1atlULHi2a5kO4wgp26P9VjJtiSjxhbDtP6ZTWhYqWaru5aSQvFtDIzGUn7QpGVDydzku9qCroaukUtI+F0/gPgqjH4/LzhIbIUkz4IeWI1HakUrspy+bH2YdO1NVNC5RWj+wm/ty4A2Rd7eg3EZT/3hW1xh1VEqxprtc8XbLydtMH4od/Xq+FpRmSiSr2eJuMUR4G6kzdZFNRzTKvClD6Oq3fdbmq0aWn8AjSSYUXDdzfpwQopMq48aYfKtkGS075vV9ymK/LK9TbLMMuNNu/iqMA9XiFcBG0G0B+hxFc8TIRdfRcxtddb3Efyo0X95SrOIsiF6qZJvAaH3z5dmBiTHy9LN6qP2UNpNlKe9ianQB2CU4deY2JT3fbS2sr2GsQSBC7GPiebDVCUmstkX6V4ygZ6yDsvnynXeG1ffPqu/tU0pUFT4/UPAgkg0ekoUNoouTsjjTRHAw6MJ7zdWokakBg0y83ue4ZD4ChcQtbrCDRqrCG1DmCF7sew6alJFkzSnyKztj1pI/PfAcgIT51LnKLSqJ67JwUv78caju/udz7IFcKmJQaQK+5BqUZnwgEUHgg0oT2rvGG/lKvTWoqg6UrXz15DzMewuQdawnpejH3qYRzZL1YMrKWxA6i9WFetktOfnq/H+lHJjBkBUzbYVsXORDLOtzOgiq8CHeBNGjOGeI/ChlQyFfgX+54LAsaQ5FckVpPFv4WgX4GmKrFRqteVkg98nCSvhf2yH5IH3P57GlnUzGb0Te0EsKG0J/ARmXVgZhze5qpdMVFIbOtI7fZIVabuZ/1EkYzWvctGhoImVL5ogxlxl0iOCZ6rtmeen58oE6vrDvG1UHKQ6JHshvnclS46vjLJ5bsCj4CnOyxNg4i7hUYEKs6ZNknmCREAkmfYhJ+7J+xSJWiH2w0wyHKBNqJVCNLZDG2B3OMW2tMTMQcFDwckMi6JLzy/071fqLEeq0qfXRk1W8xxv+MPdEIVFMWg9UrSkGdtIqefaWg5y2i98CNEaer2XJVPaiM95zVgyfv0ZdowLvayXMEKEfFLg6UxLceF+gwe+rlA/yY46OubB85RH50NybJyyQ/6QoHdn5xXW8vkyznmnAHxAMCm9/YVfZTZPrQKI8sQOEqe5XkN0TUX7MlMLmnZ0PZk128VOngAEREhpKFpixUa/LkrYjkbXYw4ihVRxZdVmU7U9TtOb5iPXs1MRnrUCgOKs4Op4KL2a3+bgS00143H7sGw3IV2hOO5yfhZSEb6s0/nFnfJ7D/Y1yu7lz+5DCwXS5rymz9ypWkdyg4w7ClKC7jZEXG00BpSGzG2T9o6hH0lSaRPqK74Z9kWS5yn8Frs9yx2fzeS9UG5zFUEdyHxL1xhi0Qv82kKuL32rtR0SA6zdkqD1n/etxtHNSx8k5o7VXkESPR1tGjU25MgawrEopNoCPA4/GrIYXna/VosRVXdXEebQq+Y50AU80QpSdeqIfBAQUx9NViT8nkW+5uPF2H+JWRL9D8Le7ivzUTQdrIJtpm5QG5RONMaPD9lU0A X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 716478fd-21ea-47c2-b907-08dcf2591e8b X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB7055.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 05:19:36.2171 (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: nVkq/a0BHs8R/6jYHcq/gnl1fpd0fpPjLvQRFENWaakHGxgRVNqVac667OTOdE9nIgq0b40tWL9kLP2K8GZE3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6853 Add spdif sound card support, configure the pinmux. This sound card supports only playback sound through HDMI interface. Signed-off-by: Shengjiu Wang --- arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts index 7d6d332fa779..290a49bea2f7 100644 --- a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts @@ -107,6 +107,18 @@ simple-audio-card,codec { sound-dai = <&bt_sco_codec 1>; }; }; + + sound-spdif { + compatible = "fsl,imx-audio-spdif"; + model = "imx-spdif"; + audio-cpu = <&spdif>; + audio-codec = <&spdif_out>; + }; + + spdif_out: spdif-out { + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + }; }; &cm33 { @@ -187,6 +199,15 @@ &sai5 { status = "okay"; }; +&spdif { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&pinctrl_spdif>; + pinctrl-1 = <&pinctrl_spdif>; + assigned-clocks = <&cgc2 IMX8ULP_CLK_SPDIF_SEL>; + assigned-clock-parents = <&cgc1 IMX8ULP_CLK_SPLL3_PFD1_DIV1>; + status = "okay"; +}; + &usbotg1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1>; @@ -325,6 +346,12 @@ MX8ULP_PAD_PTF24__I2S5_RXD3 0x43 >; }; + pinctrl_spdif: spdifgrp { + fsl,pins = < + MX8ULP_PAD_PTF25__SPDIF_OUT1 0x43 + >; + }; + pinctrl_typec1: typec1grp { fsl,pins = < MX8ULP_PAD_PTF3__PTF3 0x3