Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8180131rwp; Wed, 19 Jul 2023 06:25:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlHvrG49ztR3vMwMr+HdTvdTOeUfixMUHaZ8o3AWVo5L9twFx0/6gzMSQMnSz4DMR9SQRrIT X-Received: by 2002:a05:6e02:12c5:b0:345:6e49:30d2 with SMTP id i5-20020a056e0212c500b003456e4930d2mr6127285ilm.10.1689773148048; Wed, 19 Jul 2023 06:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689773148; cv=none; d=google.com; s=arc-20160816; b=vza9aulrq0mxz+YbZUrK8QJJ3PUP38/bJqaifzGEiOXtsLkM4sm0StNwhqTYCgAywR u81HlSkFDBF1rkbzbMmAQZf2Q9nlJzumWgoVjOcGdn2IaTcK+6+ePwOdAR1jxtAO1OHz cXHNxp8y6a9o570wcxzKiKCF8cwWoIBC0FI8X8SayovVC/K3NhF8KFe7StsF/yPiO/u2 UFjc77Onrbslh7lBEdkadeEgbtxbVLIPb42LhK1CS4BRkzMlZZcG/A6ax0a5uTXn78b9 wOst7jHsGwJ6zCTfKjI6x9Z5ei7L+P95b1vfGuikuyGJMx65uVo7tinWaJE8ZbKXPfgT qTcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YOmTcBGQ+9xf7w9GP6U4v7Lt8NaDsJMrOEQrr/5Mm/c=; fh=qgq+kCNF42FP1PeJcKT3BSSZNc2+/PNS7qKHZ1wB8Ug=; b=zl/+ZALlQkArBOz8q718Rr9jh2Wy2/Z+qIBObtj21vupoPcoJKRSwKnCIMIuxB2rii B116gtXbCZjuJ5/q0NtnBFAdQ+SkEUyqgXj1yBjSt91cBh0/xB2aVNSFHJ9lffb58WOl b+olUjPwt14j1xY+UDWfgX0GlzgDg9LyGim4PXGoprn9sFd3eJD6i7eofdIWb8IWZpef tfVwIRYxRSdqoUcQqMeDPLlVkadCQCZkHekPGQVHteaPggroS+LADmESylchQ7D/HHES u/N8ASmraNgvxdRyxcR0thI3RKSsVXPtPsO1A2U1HDwccyf9RpwOKFAePgxOhRPxPywl Y+9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e23-20020a17090a9a9700b0025eae2cef4bsi661074pjp.1.2023.07.19.06.25.28; Wed, 19 Jul 2023 06:25:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229937AbjGSMyl (ORCPT + 99 others); Wed, 19 Jul 2023 08:54:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjGSMyj (ORCPT ); Wed, 19 Jul 2023 08:54:39 -0400 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 306C010B; Wed, 19 Jul 2023 05:54:38 -0700 (PDT) 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 109AB209AC; Wed, 19 Jul 2023 14:54:36 +0200 (CEST) From: Francesco Dolcini To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Francesco Dolcini , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Mark Brown Subject: [PATCH v1 2/2] arm64: dts: freescale: verdin-imx8mp: dev: add sound card Date: Wed, 19 Jul 2023 14:54:30 +0200 Message-Id: <20230719125430.249644-3-francesco@dolcini.it> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230719125430.249644-1-francesco@dolcini.it> References: <20230719125430.249644-1-francesco@dolcini.it> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Francesco Dolcini Add NAU8822 based analog sound card to Development carrier board. Signed-off-by: Francesco Dolcini --- .../boot/dts/freescale/imx8mp-verdin-dev.dtsi | 55 +++++++++++++++++-- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi index bdfdd4c782f1..a509b2b7fa85 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi @@ -4,8 +4,6 @@ */ / { - /* TODO: Audio Codec */ - reg_eth2phy: regulator-eth2phy { compatible = "regulator-fixed"; enable-active-high; @@ -17,6 +15,41 @@ reg_eth2phy: regulator-eth2phy { startup-delay-us = <200000>; vin-supply = <®_3p3v>; }; + + sound { + 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,mclk-fs = <256>; + simple-audio-card,name = "imx8mp-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 { + clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>; + sound-dai = <&nau8822_1a>; + }; + + simple-audio-card,cpu { + sound-dai = <&sai1>; + }; + }; }; &backlight { @@ -88,7 +121,14 @@ &i2c3 { &i2c4 { status = "okay"; - /* TODO: Audio Codec */ + /* Audio Codec */ + nau8822_1a: audio-codec@1a { + compatible = "nuvoton,nau8822"; + reg = <0x1a>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai1>; + #sound-dai-cells = <0>; + }; }; /* Verdin PCIE_1 */ @@ -119,7 +159,14 @@ ®_usdhc2_vmmc { vin-supply = <®_3p3v>; }; -/* TODO: Verdin I2C_1 with Audio Codec */ +/* Verdin I2S_1 */ +&sai1 { + assigned-clocks = <&clk IMX8MP_CLK_SAI1>; + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; + assigned-clock-rates = <24576000>; + fsl,sai-mclk-direction-output; + status = "okay"; +}; /* Verdin UART_1, connector X50 through RS485 transceiver */ &uart1 { -- 2.25.1