From patchwork Thu Feb 22 06:17:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengjiu Wang X-Patchwork-Id: 204575 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp68519dyb; Wed, 21 Feb 2024 22:38:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWpJLBuS4hpqVkqpDi3ZVh3ZQbmIXlZKArDi5Fh6cZ00uyra3kTQnBYb7/s8z/DJVu1QqFT8GU1OGPfNv5iAw7Lc2KBAg== X-Google-Smtp-Source: AGHT+IE4REKlqn9C9jEgI8I5keGZbAWzCMV1qLbXMQuur+ON2AZncuFJbWhc96H8ZQsYb5B8p94+ X-Received: by 2002:a05:6402:556:b0:565:9a3:9f44 with SMTP id i22-20020a056402055600b0056509a39f44mr1609251edx.8.1708583902775; Wed, 21 Feb 2024 22:38:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708583902; cv=pass; d=google.com; s=arc-20160816; b=oc6eWDiQrvP3BO5e+lvtF0OF2nc25TR6vuPmHTTVOMWIlUgYMnrgFglIC1UYYV9VFV pFKXMqy5Yq+Wg9R7yVrRet2sGmfmzOSH4LrSAtrDdSz9JD/qFTp5Uw50LQOcp+d7K3sX jxswybZHEfdoFwVVG/6n5/H+z14C0Hk4gJHFhfrStl87z4Yu+keoMm1KPSGT2+Lb/LhD DfeZpYbkXGUoNDNvOZdoS80GTFzw3f9JJautlD6LNX8wiAasy4RNjuqoO4c9CbLEGeYH oGo45XMLD45ecBA8q56sklU9CicFD7ER/3Asf3TmKVGBdUt9+q6U3IQ+11Ng/pPKtZYG JjVg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:to:from; bh=Oj6cF4Qj6BjQbV3N2pBjVStdCuV20/S8+kMEvbf46oc=; fh=d5f3EXzsmthvcpx3zpkwgZAhaM0ZXQ4GdqhIv+XDcVo=; b=aCfXeS/dBIvv5eud1Ja4dAcsXLexOrhmBrE092KfhJB/hcU7rit86Co3TQzIjv13XR iek4a6HNFzMAvCu++HxQqq8OzopsIQLH2NFm4Z5dGjQBuAAsliUNT3qxUE6g79Agnc3r 7fNCn5nOf5nNjNaWdSiY+/DWTdLlky+JFS81p6oiuijSPZXalhpKw0p1TnkuXIbIwZnr uzJ0bGmUEy+a6zHT+RtXWKGnfujD2w4VaHZneKBzMEAZ7+jcSEbGC8dyPTusG/BJs/Y/ LFLu5wh0HvnZG3kABpA5wp0cAXQM/0bXAT1hsUDMNyw4eRnj8V6J2nZFWdku5rC9ifqc 9zXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-75983-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75983-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z3-20020a50eb43000000b00564d7b135b3si1832354edp.661.2024.02.21.22.38.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 22:38:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75983-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-75983-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75983-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 48D401F23241 for ; Thu, 22 Feb 2024 06:38:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5FAC175B5; Thu, 22 Feb 2024 06:38:06 +0000 (UTC) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) (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 C804917981; Thu, 22 Feb 2024 06:38:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.121.34.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708583885; cv=none; b=JFVwZjKBEHRNH30LndHeOGiMTVukBqu5WZEsto3L29v75RO+CsFouW+CFmvgI8qWoUx7yEnyn5P/4+hNRYD7XK5TmolZtkv7E0K7AfYDzTvhUT8UEFERBtKAABG/ZGXUqjg+S94d/UixG5VjB1bFG6lAo2hQwFpsRqwQRQBSKgE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708583885; c=relaxed/simple; bh=OcVV1einNzUPldfyyWwLLlbDtP3dTcDDAic0h4gOn70=; h=From:To:Subject:Date:Message-Id; b=Ho4RCSloeEM6yM92dJ8fydEBxsDEpwR7K/JPJRWx01v5Xa70CbxeFhlz/DnytfwWwbBx4iS/MsR36mfT4lCj6Qxqj9a6y8FPMs6l+6qoif7XgKIA9H37WojjlfZJHwb7FPbsLbznlvLVcr5RETE0njdhNAQJk6ys0OByyEYQw14= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; arc=none smtp.client-ip=92.121.34.21 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 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 996C4202368; Thu, 22 Feb 2024 07:32:21 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6173820050F; Thu, 22 Feb 2024 07:32:21 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id B11591820F59; Thu, 22 Feb 2024 14:32:19 +0800 (+08) From: Shengjiu Wang To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, shengjiu.wang@gmail.com Subject: [PATCH] arm64: dts: imx8mm-evk: Add spdif sound card support Date: Thu, 22 Feb 2024 14:17:13 +0800 Message-Id: <1708582633-6969-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791580074386725776 X-GMAIL-MSGID: 1791580074386725776 Add spdif sound card support, configure the pinmux. This sound card supports recording and playing sound through spdif interface. Signed-off-by: Shengjiu Wang --- arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi index 9b39458f3fa5..bd5b365867fd 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi @@ -165,6 +165,14 @@ cpu { }; }; }; + + sound-spdif { + compatible = "fsl,imx-audio-spdif"; + model = "imx-spdif"; + spdif-controller = <&spdif1>; + spdif-out; + spdif-in; + }; }; &A53_0 { @@ -533,6 +541,24 @@ &snvs_pwrkey { status = "okay"; }; +&spdif1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spdif1>; + assigned-clocks = <&clk IMX8MM_CLK_SPDIF1>; + assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; + assigned-clock-rates = <24576000>; + clocks = <&clk IMX8MM_CLK_AUDIO_AHB>, <&clk IMX8MM_CLK_24M>, + <&clk IMX8MM_CLK_SPDIF1>, <&clk IMX8MM_CLK_DUMMY>, + <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>, + <&clk IMX8MM_CLK_AUDIO_AHB>, <&clk IMX8MM_CLK_DUMMY>, + <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>, + <&clk IMX8MM_AUDIO_PLL1_OUT>, <&clk IMX8MM_AUDIO_PLL2_OUT>; + clock-names = "core", "rxtx0", "rxtx1", "rxtx2", "rxtx3", + "rxtx4", "rxtx5", "rxtx6", "rxtx7", "spba", + "pll8k", "pll11k"; + status = "okay"; +}; + &uart2 { /* console */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart2>; @@ -702,6 +728,13 @@ MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6 >; }; + pinctrl_spdif1: spdif1grp { + fsl,pins = < + MX8MM_IOMUXC_SPDIF_TX_SPDIF1_OUT 0xd6 + MX8MM_IOMUXC_SPDIF_RX_SPDIF1_IN 0xd6 + >; + }; + pinctrl_typec1: typec1grp { fsl,pins = < MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11 0x159