From patchwork Sun Sep 1 15:57:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13786531 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 A408FC54FC6 for ; Sun, 1 Sep 2024 16:00:37 +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:Content-Transfer-Encoding: Content-Type:MIME-Version: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=KovUm7gxradhL47FySE0BJ+erGrrKC+Oq0JDZl3e670=; b=u8jZd2/dhr8zRvH6duVb21zuLw 9hzD1Z/XA5CCZFfSvrCIJ6CayGvVhvdGrBfv/K1xqFh7hWdrAVXnNARdGSroi3sAJ5nCQ66f8YFLF Awa8LZProG28sY8SMRFRBcAdlTGuQCV8BztWVbYN6ukXb8pYFNt/WLNq/zH6+rKP5LAl9hL4Oi1U7 wdOd989ZryfBzOErHH3Tddg322RpFXuNhPWk435FcPljkdmwWQ9UUOnk/Q4WLXXfW3HGToR8jOG2m 94CGZxS3XlvCmJ0f5hFVQsIZPIPfWYLkNW4MjovCP2ecMKcDw99vQ80xISy640AFNgt7f6YKkC4Yh Uv38FFDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skn05-0000000BtSS-2HMK; Sun, 01 Sep 2024 16:00:25 +0000 Received: from mail11.truemail.it ([217.194.8.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1skmxS-0000000BsjM-13Fr for linux-arm-kernel@lists.infradead.org; Sun, 01 Sep 2024 15:57:45 +0000 Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id DC7EB1FA59; Sun, 1 Sep 2024 17:57:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1725206258; bh=KovUm7gxradhL47FySE0BJ+erGrrKC+Oq0JDZl3e670=; h=From:To:Subject; b=RPwhOCUPP40Pf7kjkF91XyIZ83X4ws79yzffJiGSWVmpSVldprSMhgdfqsVv1+WlS 3HpToBp+jH/O2CfbvOkHcLhHHeEAanXADugjdw4UaTvQCLz1WhjyNjlt8y/+RcEK5R fRucT5LrsWNV1BoCEJA+KRCcYhgRK1dhjuVe7CwkO1bpZ9lYKH/01pIoj1DgR3ARUR LZJpsnfUi8NHSMTY3LbtPLC26xaIhKefydvBKpZo/fmRzVMcDelz//BELZc625UTpz y+425xP3ExcuG2jI8X6LuNBX5qOmTwpQ1OOU+BsEjwJbWFPh/t7h+GZcAlgd409Sla b8OWZ8j3nl1pw== From: Francesco Dolcini To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: =?utf-8?q?Jo=C3=A3o_Paulo_Gon=C3=A7alves?= , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v2 04/10] arm64: dts: colibri-imx8x: Add sound card Date: Sun, 1 Sep 2024 17:57:15 +0200 Message-Id: <20240901155721.7912-5-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240901155721.7912-1-francesco@dolcini.it> References: <20240901155721.7912-1-francesco@dolcini.it> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240901_085743_062494_314E0EDF X-CRM114-Status: GOOD ( 10.43 ) 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: João Paulo Gonçalves Add audio support for Colibri-iMX8X sound card. Signed-off-by: João Paulo Gonçalves Signed-off-by: Francesco Dolcini --- v2: sort i2c nodes by address fixup sound card --- .../boot/dts/freescale/imx8x-colibri.dtsi | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi b/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi index 210db574b425..60cf4e400052 100644 --- a/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi @@ -38,6 +38,13 @@ reg_module_3v3: regulator-module-3v3 { regulator-max-microvolt = <3300000>; }; + reg_module_3v3_avdd: regulator-module-3v3-avdd { + compatible = "regulator-fixed"; + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3300000>; + regulator-name = "+V3.3_AVDD_AUDIO"; + }; + reg_module_vref_1v8: regulator-module-vref-1v8 { compatible = "regulator-fixed"; regulator-max-microvolt = <1800000>; @@ -55,6 +62,23 @@ reg_usbh_vbus: regulator-usbh-vbus { regulator-min-microvolt = <5000000>; regulator-name = "usbh_vbus"; }; + + sound-card { + compatible = "simple-audio-card"; + simple-audio-card,bitclock-master = <&dailink_master>; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&dailink_master>; + simple-audio-card,name = "colibri-imx8x"; + + dailink_master: simple-audio-card,codec { + clocks = <&mclkout0_lpcg IMX_LPCG_CLK_0>; + sound-dai = <&sgtl5000_a>; + }; + + simple-audio-card,cpu { + sound-dai = <&sai0>; + }; + }; }; /* Colibri Analogue Inputs */ @@ -91,6 +115,21 @@ &i2c0 { pinctrl-0 = <&pinctrl_i2c0>, <&pinctrl_sgtl5000_usb_clk>; status = "okay"; + sgtl5000_a: audio-codec@a { + compatible = "fsl,sgtl5000"; + reg = <0xa>; + #sound-dai-cells = <0>; + 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>, <12000000>, <12000000>; + clocks = <&mclkout0_lpcg IMX_LPCG_CLK_0>; + VDDA-supply = <®_module_3v3_avdd>; + VDDD-supply = <®_module_vref_1v8>; + VDDIO-supply = <®_module_3v3>; + }; + /* Touch controller */ touchscreen@2c { compatible = "adi,ad7879-1"; @@ -373,7 +412,13 @@ &lsio_pwm2 { /* TODO on-module PCIe for Wi-Fi */ -/* TODO On-module i2s / Audio */ +/* On-module I2S */ +&sai0 { + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai0>; + status = "okay"; +}; &usbotg1 { adp-disable;