From patchwork Tue Sep 3 09:12:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13788348 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 3C8CDCD3420 for ; Tue, 3 Sep 2024 09:17:33 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1uJRT9w6VzFZ43zEIq8MJXYGvGTADZRg7pm2/OMaHvY=; b=pmrylu+0YHfFH5hdHgdWdcp0gX TT9e6JCcjAYj9OXSak2qEx8ekjI6qhDBvPbw4kgsOn0JpTst03BfpKrxVIr8P6Bu9XNW9IF0mAJDn TiXGuK81V5AIoxcg+yNQOtJbCWAt+myGC1y4+x881EDKbX2AuGmZ6NTv5UoDL4GyXq179Ezrx6Q7g 6Gvyj3BD9ZBPj5uLVJD4Ce2+3VKgUL1secstfqhwYeqZGoQVkEEFs5urtnIrelk/W8RYKarm+Ef16 ulvfx2G6fa2HUtZ5sazK0/Svhyte93C8u2Wg837GRwpS088iD8W8KZltJb9/ks7bId7DqlYOEmhwq CwZa0Gew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slPf9-0000000H6DN-0qvF; Tue, 03 Sep 2024 09:17:23 +0000 Received: from mail11.truemail.it ([2001:4b7e:0:8::81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slPag-0000000H5Bj-1tpk for linux-arm-kernel@lists.infradead.org; Tue, 03 Sep 2024 09:12:49 +0000 Received: from francesco-nb.corp.toradex.com (31-10-206-125.static.upc.ch [31.10.206.125]) by mail11.truemail.it (Postfix) with ESMTPA id 8F69422A40; Tue, 3 Sep 2024 11:12:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1725354765; bh=1uJRT9w6VzFZ43zEIq8MJXYGvGTADZRg7pm2/OMaHvY=; h=From:To:Subject; b=NEou14+1AVnFtYn8HyoB8jVDAYsnOLhQtcFTT3NAtLDCbHqmr2HzIKvyPIClinkYb vscA/o5FsTfUh6hMnNIxfrLXhAyq3St9Shr434pnWeOig94WvbpK8VUKj6uTYsCJcU vY36MlqTDp3UTKgguTdV7n6lFB4ySPP6GDPOoXn46ganP9bXROHQXb+8Iiv6lxZ6LM J8NA2tVfXQH2iB/v7f4Mlz6deC+Z0kj4y0egz31BeRSj8wYy0WqhxA2RndvjwciUaV 68rQvEJK3tL/y95idlmjW2vRlTQyVtZ+S7E0qOYXfyFafI4vdSyAiDxEmoC8KcKev/ rArVtjJ67sKcg== From: Francesco Dolcini To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Hiago De Franco , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v2 4/5] arm64: dts: imx8-apalis: Add nau8822 audio-codec to apalis eval v1.2 Date: Tue, 3 Sep 2024 11:12:30 +0200 Message-Id: <20240903091231.20035-5-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903091231.20035-1-francesco@dolcini.it> References: <20240903091231.20035-1-francesco@dolcini.it> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240903_021246_683608_247DCB56 X-CRM114-Status: UNSURE ( 9.49 ) 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 From: Hiago De Franco Add support for audio-codec NAU88C22 present on the Apalis Evaluation Board v1.2 carrier board. Signed-off-by: Hiago De Franco Signed-off-by: Francesco Dolcini --- v2: no changes --- .../dts/freescale/imx8-apalis-eval-v1.2.dtsi | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-eval-v1.2.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-eval-v1.2.dtsi index f5c6a0164f36..5862b24fb764 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-eval-v1.2.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-eval-v1.2.dtsi @@ -51,6 +51,40 @@ reg_can2: regulator-can2 { regulator-name = "5V_SW_CAN2"; startup-delay-us = <10000>; }; + + sound-carrier { + compatible = "simple-audio-card"; + simple-audio-card,bitclock-master = <&codec_dai>; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&codec_dai>; + simple-audio-card,name = "apalis-nau8822"; + simple-audio-card,routing = + "Headphones", "LHP", + "Headphones", "RHP", + "Speaker", "LSPK", + "Speaker", "RSPK", + "Line Out", "AUXOUT1", + "Line Out", "AUXOUT2", + "LAUX", "Line In", + "RAUX", "Line In", + "LMICP", "Mic In", + "RMICP", "Mic In"; + simple-audio-card,widgets = + "Headphones", "Headphones", + "Line Out", "Line Out", + "Speaker", "Speaker", + "Microphone", "Mic In", + "Line", "Line In"; + + codec_dai: simple-audio-card,codec { + sound-dai = <&nau8822_1a>; + system-clock-frequency = <12288000>; + }; + + simple-audio-card,cpu { + sound-dai = <&sai0>; + }; + }; }; /* Apalis CAN1 */ @@ -69,6 +103,13 @@ &flexcan2 { &i2c2 { status = "okay"; + /* Audio Codec */ + nau8822_1a: audio-codec@1a { + compatible = "nuvoton,nau8822"; + reg = <0x1a>; + #sound-dai-cells = <0>; + }; + /* Power/Current Measurement Sensor */ hwmon@40 { compatible = "ti,ina219"; @@ -87,6 +128,18 @@ eeprom@57 { }; }; +&sai0 { + 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>, + <&sai0_lpcg IMX_LPCG_CLK_0>; + assigned-clock-rates = <786432000>, <49152000>, <12288000>, <49152000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai0>; + #sound-dai-cells = <0>; + status = "okay"; +}; + /* Apalis MMC1 */ &usdhc2 { pinctrl-0 = <&pinctrl_usdhc2_4bit>, <&pinctrl_mmc1_cd>; @@ -105,6 +158,15 @@ &usdhc3 { }; &iomuxc { + pinctrl-0 = <&pinctrl_cam1_gpios>, + <&pinctrl_esai0_gpios>, <&pinctrl_fec2_gpios>, + <&pinctrl_gpio3>, <&pinctrl_gpio4>, <&pinctrl_gpio_keys>, + <&pinctrl_gpio_usbh_oc_n>, <&pinctrl_lpuart1ctrl>, + <&pinctrl_lvds0_i2c0_gpio>, <&pinctrl_lvds1_i2c0_gpios>, + <&pinctrl_mipi_dsi_0_1_en>, <&pinctrl_mipi_dsi1_gpios>, + <&pinctrl_mlb_gpios>, <&pinctrl_qspi1a_gpios>, + <&pinctrl_sata1_act>, <&pinctrl_sim0_gpios>, + <&pinctrl_usdhc1_gpios>; pinctrl_enable_3v3_mmc: enable3v3mmcgrp { fsl,pins = ; /* MXM3_148 */ @@ -121,4 +183,11 @@ pinctrl_enable_can1_power: enablecan1powergrp { pinctrl_enable_can2_power: enablecan2powergrp { fsl,pins = ; /* MXM3_156 */ }; + + pinctrl_sai0: sai0grp { + fsl,pins = , /* MXM3_196 */ + , /* MXM3_200 */ + , /* MXM3_202 */ + ; /* MXM3_204 */ + }; };