From nobody Fri Dec 19 21:51:50 2025 Received: from cpanel.siel.si (cpanel.siel.si [46.19.9.99]) (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 B68812144B6; Tue, 22 Apr 2025 10:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.19.9.99 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745319428; cv=none; b=DnnhzAVyl62NEvKWXrM8UtSHuNVO1P+Bnb8elKW0H+Udp2WoRHkcybq5/0g7pTHKUxHtaqQjvfxuLSiIl7jGYQnlrdUXlLL5hC28vSJrtmD1QbddLqtE/0y0SO0ioK+nPOdoCe+hj0czhlPEVO0GoT8gcbK8gGxaXk1ADzQQSEw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745319428; c=relaxed/simple; bh=4rk8ZjJXSdfnDpcAN2tiAnxnWPbcYbDQyMD2sbmMyCo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nNuH6PBJRmvcOOR6zTcXQCQF7rRbYY67kfknf4huZjSyNViV1E+RLlq+GsC7aQQT0Xo1hYN19yxrzlxbaztqJR1uOMaNO4TlAJqSb5CxaKRpfnoSdq3SlcTM697fngQISfP6cgaP2NV5BcBcn3mzwlFHZQWd3sWKWmhjCzIHw6U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=norik.com; spf=pass smtp.mailfrom=norik.com; dkim=pass (2048-bit key) header.d=norik.com header.i=@norik.com header.b=i4PGnYv3; arc=none smtp.client-ip=46.19.9.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=norik.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=norik.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=norik.com header.i=@norik.com header.b="i4PGnYv3" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=norik.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ndA5tE1Ke7DiZcyoW8ITRVTl+fv8+uLlzHEH+GwX2XE=; b=i4PGnYv3FAB29va/76rrrxOHWn u2lBw1u6rvoRu7bfM/AcdDEA7ZhzFudswKVpz7kCf9X+UpxrMjbSLXPl8Nqhgw23OD6xzYw08+M4Y BCF0OXMSxsikGQVUXwnkzakYfzx2sNJpNbp/F6X4RUky96h37sT2TCXwCd4EKP6aurcjPOSbrSbEe Pvw65NcyiK+KhyLt15JmyxToP7mIczBL5oE5IBijLTt/R0ruyiVSN0UmUAYK4+evQw+c9WruujF+f P9fk3CfecxfNtLHYcC79hn+pwtF9p2HJcmtuYUp9XY1ll9tC6VTkalFMBDcHntF6pFjA6ybcsQSR5 UomfiuqA==; Received: from [89.212.21.243] (port=36562 helo=localhost.localdomain) by cpanel.siel.si with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1u7BJI-008kyr-0i; Tue, 22 Apr 2025 12:57:04 +0200 From: Primoz Fiser To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, upstream@lists.phytec.de Subject: [PATCH v4 13/15] arm64: dts: freescale: imx93-phyboard-segin: Add I2S audio Date: Tue, 22 Apr 2025 12:56:42 +0200 Message-Id: <20250422105644.2725168-14-primoz.fiser@norik.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250422105644.2725168-1-primoz.fiser@norik.com> References: <20250422105644.2725168-1-primoz.fiser@norik.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel.siel.si X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - norik.com X-Get-Message-Sender-Via: cpanel.siel.si: authenticated_id: primoz.fiser@norik.com X-Authenticated-Sender: cpanel.siel.si: primoz.fiser@norik.com X-Source: X-Source-Args: X-Source-Dir: Content-Type: text/plain; charset="utf-8" Add support for I2S audio found on phyBOARD-Segin-i.MX93. Audio codec TLV320AIC3007 is connected to SAI1 interface as a DAI master. MCLK is provided from the SAI's internal audio PLL (19.2 MHz). Signed-off-by: Primoz Fiser Reviewed-by: Frank Li Reviewed-by: Daniel Baluta --- Changes in v4: - no changes .../dts/freescale/imx93-phyboard-segin.dts | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts b/arch/= arm64/boot/dts/freescale/imx93-phyboard-segin.dts index e4f959f665b2..54e084e69706 100644 --- a/arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts +++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts @@ -35,6 +35,20 @@ flexcan1_tc: can-phy0 { enable-gpios =3D <&gpio4 16 GPIO_ACTIVE_HIGH>; }; =20 + reg_sound_1v8: regulator-sound-1v8 { + compatible =3D "regulator-fixed"; + regulator-max-microvolt =3D <1800000>; + regulator-min-microvolt =3D <1800000>; + regulator-name =3D "VCC1V8_AUDIO"; + }; + + reg_sound_3v3: regulator-sound-3v3 { + compatible =3D "regulator-fixed"; + regulator-max-microvolt =3D <3300000>; + regulator-min-microvolt =3D <3300000>; + regulator-name =3D "VCC3V3_ANALOG"; + }; + reg_usdhc2_vmmc: regulator-usdhc2 { compatible =3D "regulator-fixed"; enable-active-high; @@ -45,6 +59,34 @@ reg_usdhc2_vmmc: regulator-usdhc2 { regulator-max-microvolt =3D <3300000>; regulator-name =3D "VCC_SD"; }; + + sound: sound { + compatible =3D "simple-audio-card"; + simple-audio-card,name =3D "phyBOARD-Segin-TLV320AIC3007"; + simple-audio-card,format =3D "i2s"; + simple-audio-card,bitclock-master =3D <&dailink_master>; + simple-audio-card,frame-master =3D <&dailink_master>; + simple-audio-card,widgets =3D + "Line", "Line In", + "Line", "Line Out", + "Speaker", "Speaker"; + simple-audio-card,routing =3D + "Line Out", "LLOUT", + "Line Out", "RLOUT", + "Speaker", "SPOP", + "Speaker", "SPOM", + "LINE1L", "Line In", + "LINE1R", "Line In"; + + simple-audio-card,cpu { + sound-dai =3D <&sai1>; + }; + + dailink_master: simple-audio-card,codec { + sound-dai =3D <&audio_codec>; + clocks =3D <&clk IMX93_CLK_SAI1>; + }; + }; }; =20 /* CAN */ @@ -62,6 +104,17 @@ &lpi2c2 { pinctrl-0 =3D <&pinctrl_lpi2c2>; status =3D "okay"; =20 + /* Codec */ + audio_codec: audio-codec@18 { + compatible =3D "ti,tlv320aic3007"; + reg =3D <0x18>; + #sound-dai-cells =3D <0>; + AVDD-supply =3D <®_sound_3v3>; + IOVDD-supply =3D <®_sound_3v3>; + DRVDD-supply =3D <®_sound_3v3>; + DVDD-supply =3D <®_sound_1v8>; + }; + /* RTC */ i2c_rtc: rtc@68 { compatible =3D "microcrystal,rv4162"; @@ -80,6 +133,17 @@ &lpuart1 { status =3D "okay"; }; =20 +/* Audio */ +&sai1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_sai1>; + assigned-clocks =3D <&clk IMX93_CLK_SAI1>; + assigned-clock-parents =3D <&clk IMX93_CLK_AUDIO_PLL>; + assigned-clock-rates =3D <19200000>; + fsl,sai-mclk-direction-output; + status =3D "okay"; +}; + /* USB */ &usbotg1 { disable-over-current; @@ -148,6 +212,16 @@ MX93_PAD_ENET2_RD2__GPIO4_IO26 0x31e >; }; =20 + pinctrl_sai1: sai1grp { + fsl,pins =3D < + MX93_PAD_UART2_RXD__SAI1_MCLK 0x1202 + MX93_PAD_SAI1_TXFS__SAI1_TX_SYNC 0x1202 + MX93_PAD_SAI1_TXC__SAI1_TX_BCLK 0x1202 + MX93_PAD_SAI1_TXD0__SAI1_TX_DATA00 0x1402 + MX93_PAD_SAI1_RXD0__SAI1_RX_DATA00 0x1402 + >; + }; + pinctrl_usdhc2_cd: usdhc2cdgrp { fsl,pins =3D < MX93_PAD_SD2_CD_B__GPIO3_IO00 0x31e --=20 2.34.1