From patchwork Tue Mar 19 17:48:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 10860101 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4CD7D922 for ; Tue, 19 Mar 2019 17:49:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FA75291D0 for ; Tue, 19 Mar 2019 17:49:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 134B9292A6; Tue, 19 Mar 2019 17:49:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AAF25291D0 for ; Tue, 19 Mar 2019 17:49:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NP2U5SdAO3hHOk32UDlrW1L/VBkIswNtjXsGO7/D0/Y=; b=eZDkli6F32Vx1u S/c6OY/qENhIwcCUqCGrivDmZuZK2jL7qG+ukZi/r4DzSXTXWVRN8uhAHZdAs67XQDxAljQfTsCca yFBbvB0f333fIn/642wM/9Pljv8P9MAFUCp6YIn6eMV/TQcl/9c7n7oSlGhIiSrrR+yKD+HExx8rv r2Hd1+0y+nWKD+hvDRnk7zYksHxmext43qFCRsz0VX/MuaDxR0IH0SroEVo+swe9gS0Ps8IiEs4Bi rHyX4hCQ6t3MWPXjj23ud//EnB+z7wVo0O6TLs5QNlhbvw9Nc9+mh6VoPjIxQujpAI7meIu7oolko 0ynRxJCRu2cy3chWbzEw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6Irk-0006up-RY; Tue, 19 Mar 2019 17:49:32 +0000 Received: from mail-eopbgr40078.outbound.protection.outlook.com ([40.107.4.78] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6Ir3-0005tJ-VQ for linux-arm-kernel@lists.infradead.org; Tue, 19 Mar 2019 17:48:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F6aSuDmOIyD8TfTuRd5cvoTwOP0X42DCZwY7jDA2Wo0=; b=FwERJQ8fc4y3nQYbSEtQbe3El+MTyWAc4QdPNBmTZ/cnh2LEgnE5ppxMTutEI4LemHn16qXZTnqKdBogMKJINqRKWNu8ZTMPNq8tRkGz8YyVXSlWAXxcmv9l7/DCkmIn7K5KgZcSST74+c/n6aLp0AyX7j4qzz+RysLdSOxaSoo= Received: from VI1PR0402MB3357.eurprd04.prod.outlook.com (52.134.1.18) by VI1SPR01MB025.eurprd04.prod.outlook.com (52.134.2.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Tue, 19 Mar 2019 17:48:41 +0000 Received: from VI1PR0402MB3357.eurprd04.prod.outlook.com ([fe80::ddb1:9613:3e6d:eac5]) by VI1PR0402MB3357.eurprd04.prod.outlook.com ([fe80::ddb1:9613:3e6d:eac5%3]) with mapi id 15.20.1709.015; Tue, 19 Mar 2019 17:48:41 +0000 From: Daniel Baluta To: "S.j. Wang" , "shawnguo@kernel.org" Subject: [PATCH v7 4/4] arm64: dts: imx8mq-evk: Enable audio codec wm8524 Thread-Topic: [PATCH v7 4/4] arm64: dts: imx8mq-evk: Enable audio codec wm8524 Thread-Index: AQHU3nv9zNj885nj2EaiynwBXWQ+Ig== Date: Tue, 19 Mar 2019 17:48:41 +0000 Message-ID: <20190319174823.29467-5-daniel.baluta@nxp.com> References: <20190319174823.29467-1-daniel.baluta@nxp.com> In-Reply-To: <20190319174823.29467-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1P189CA0003.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::16) To VI1PR0402MB3357.eurprd04.prod.outlook.com (2603:10a6:803:2::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=daniel.baluta@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [212.146.100.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7f6c66fe-fbb4-4aab-ab5d-08d6ac931fab x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1SPR01MB025; x-ms-traffictypediagnostic: VI1SPR01MB025: x-microsoft-antispam-prvs: x-forefront-prvs: 0981815F2F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(396003)(366004)(376002)(39860400002)(199004)(189003)(36756003)(8936002)(6506007)(102836004)(305945005)(52116002)(76176011)(6116002)(97736004)(26005)(2501003)(7736002)(68736007)(386003)(3846002)(99286004)(25786009)(476003)(486006)(2616005)(186003)(66066001)(44832011)(1076003)(106356001)(86362001)(50226002)(105586002)(2906002)(81166006)(81156014)(6436002)(11346002)(446003)(14454004)(6486002)(478600001)(6512007)(54906003)(53936002)(71190400001)(110136005)(316002)(256004)(8676002)(4326008)(5660300002)(71200400001)(7416002)(32563001)(473944003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1SPR01MB025; H:VI1PR0402MB3357.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 00BLqQSLxiqbU+ZVPej2TTqw9l7OWSRuZjdyexopdYYvXHY4ThrwltFMGoYJsdg9HZltuIWR7F4lm/tIpPcRe2cf+su5jbZYq/hx5aW8A4WYy9LLjUdW4t57hHwivmw9XhjoLYZnSG+Go1C/2T9jpd8htdCHaEPJ0aNx4RqgJDyT+KSbV36fGt92zpAeH2379BOhxLlKbJ2q//qmkkw0SlMCS34Dbw1hVyOtX41RELIiYBZGrg0ahoNyxo5GcVGtnkaKNUki3xBiVCmX57AVIt1nSGaJJq4LKpo5xs40+bxxI7G+Y5iX/v0BU9tp92NNFNRI0plIJaAc7AX+DI6r7neniU0ssUTnQy5DXGfFQe/9jXWluDosc0IEHQher1GQEK0k9FSIZ5yo6KET7K2KNCs3kJRokRfIVmLOF7n3DX4= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f6c66fe-fbb4-4aab-ab5d-08d6ac931fab X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2019 17:48:41.3209 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1SPR01MB025 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190319_104850_430315_318F288E X-CRM114-Status: GOOD ( 11.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , "baruch@tkos.co.il" , "kuninori.morimoto.gx@renesas.com" , "ccaione@baylibre.com" , "spencercw@gmail.com" , "s.hauer@pengutronix.de" , "angus@akkea.ca" , "linux-kernel@vger.kernel.org" , Daniel Baluta , "robh+dt@kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , Aisheng Dong , "festevam@gmail.com" , "agx@sigxcpu.org" , "linux-arm-kernel@lists.infradead.org" , "l.stach@pengutronix.de" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The main Audio DAC used on the EVK board is wm8524 The EVK provides the MCLK to wm8524. Digital interface is SAI2 which includes three signals: SYNC_CLK, BCLK and DACDAT. This patch sets: * SAI2 pinctrl configuration * clock hierarchy * wm8524 codec Then uses simple-card machine driver to connect them into a sound card. Signed-off-by: Daniel Baluta Reviewed-by: Fabio Estevam --- arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 48 ++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts index afea110b70a3..304c28034ddf 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts @@ -43,6 +43,35 @@ states = <1000000 0x0 900000 0x1>; }; + + wm8524: audio-codec { + #sound-dai-cells = <0>; + compatible = "wlf,wm8524"; + wlf,mute-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + }; + + sound-wm8524 { + compatible = "simple-audio-card"; + simple-audio-card,name = "wm8524-audio"; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&cpudai>; + simple-audio-card,bitclock-master = <&cpudai>; + simple-audio-card,widgets = + "Line", "Left Line Out Jack", + "Line", "Right Line Out Jack"; + simple-audio-card,routing = + "Left Line Out Jack", "LINEVOUTL", + "Right Line Out Jack", "LINEVOUTR"; + + cpudai: simple-audio-card,cpu { + sound-dai = <&sai2>; + }; + + link_codec: simple-audio-card,codec { + sound-dai = <&wm8524>; + clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>; + }; + }; }; &A53_0 { @@ -80,6 +109,15 @@ }; }; +&sai2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai2>; + assigned-clocks = <&clk IMX8MQ_CLK_SAI2>; + assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>; + assigned-clock-rates = <24576000>; + status = "okay"; +}; + &i2c1 { clock-frequency = <100000>; pinctrl-names = "default"; @@ -283,6 +321,16 @@ >; }; + pinctrl_sai2: sai2grp { + fsl,pins = < + MX8MQ_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC 0xd6 + MX8MQ_IOMUXC_SAI2_TXC_SAI2_TX_BCLK 0xd6 + MX8MQ_IOMUXC_SAI2_MCLK_SAI2_MCLK 0xd6 + MX8MQ_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0 0xd6 + MX8MQ_IOMUXC_GPIO1_IO08_GPIO1_IO8 0xd6 + >; + }; + pinctrl_uart1: uart1grp { fsl,pins = < MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX 0x49