From patchwork Fri Apr 19 20:20:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 1088202 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="hPPQTx5w"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44m6mm6hhSz9s6w for ; Sat, 20 Apr 2019 06:20:56 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727061AbfDSUUw (ORCPT ); Fri, 19 Apr 2019 16:20:52 -0400 Received: from mail-eopbgr60077.outbound.protection.outlook.com ([40.107.6.77]:27715 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725817AbfDSUUv (ORCPT ); Fri, 19 Apr 2019 16:20:51 -0400 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=K8t4Z2B0HxQ84uDbmdFEnLjkX7+aloEp8achwIls+xw=; b=hPPQTx5wahogBI2aUcdOND4+GuHONqiI2Sf7r9Y0ClIUqWlntljBuDd1mDddNH1lwm80iVOX5nb/nj95dglujlKmdbshcHzjgHKU2SN+5UPyHymFw+S4CnhWLiSVNfTdnPtUsBs7esO9bNvJQax844yhaWA1I5NsyL7uFFJSG3M= Received: from VI1PR0402MB3357.eurprd04.prod.outlook.com (52.134.1.18) by VI1PR0402MB3392.eurprd04.prod.outlook.com (52.134.1.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Fri, 19 Apr 2019 20:20:42 +0000 Received: from VI1PR0402MB3357.eurprd04.prod.outlook.com ([fe80::c16b:662d:9299:6be6]) by VI1PR0402MB3357.eurprd04.prod.outlook.com ([fe80::c16b:662d:9299:6be6%6]) with mapi id 15.20.1813.013; Fri, 19 Apr 2019 20:20:42 +0000 From: Daniel Baluta To: "shawnguo@kernel.org" CC: "mark.rutland@arm.com" , "robh+dt@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , Aisheng Dong , Anson Huang , Daniel Baluta , Peng Fan , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "S.j. Wang" Subject: [PATCH 2/2] arm64: dts: imx8mm-evk: Enable audio codec wm8524 Thread-Topic: [PATCH 2/2] arm64: dts: imx8mm-evk: Enable audio codec wm8524 Thread-Index: AQHU9u1belSuPjg9j0eSzCLrjjl2TQ== Date: Fri, 19 Apr 2019 20:20:40 +0000 Message-ID: <20190419202024.27314-3-daniel.baluta@nxp.com> References: <20190419202024.27314-1-daniel.baluta@nxp.com> In-Reply-To: <20190419202024.27314-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR09CA0076.eurprd09.prod.outlook.com (2603:10a6:802:29::20) 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: 2c1f26bc-0de4-418a-35dc-08d6c5047ddf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR0402MB3392; x-ms-traffictypediagnostic: VI1PR0402MB3392: x-microsoft-antispam-prvs: x-forefront-prvs: 0012E6D357 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(366004)(39860400002)(346002)(136003)(396003)(189003)(199004)(81166006)(68736007)(1730700003)(8936002)(81156014)(44832011)(1076003)(2501003)(50226002)(71200400001)(54906003)(4326008)(52116002)(71190400001)(25786009)(8676002)(99286004)(316002)(76176011)(66066001)(5660300002)(305945005)(7736002)(53936002)(86362001)(6436002)(6486002)(73956011)(5640700003)(14454004)(36756003)(6916009)(97736004)(102836004)(66556008)(66476007)(66446008)(386003)(64756008)(6512007)(478600001)(3846002)(256004)(6116002)(26005)(2906002)(66946007)(446003)(11346002)(6506007)(2616005)(486006)(476003)(2351001)(14444005)(186003)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB3392; H:VI1PR0402MB3357.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: sH4CVlyJTFzRAH43r4ZHMbMJ5QxrOI1Vmfm7U8IBILIPjK5hjvm4Zpzf/f8x66q7Wp6LHf89Yo3pweBS/dZEGolCzREJ+tuQGPX/FpWTS0GHPua7hiDQ+3glYI44Kv+YmJD66qwkol6zg8HaMxXfIhLe9+T1mqnOMjgutePsoGTx0ZnhTe7IZJg2GHYfU28nt5ENqnBtlw6JtworRzmJDRgRjsIgbUfpW3V2lFaOTClCBKIRJ/uk0b+rIoW6p99EaJL+5hA/75/vVsHbtdplfBUmNxej3V/jpeSFt4bNPovtILqQkQBuXrT422J0wznnlmGM0wXuEuIGMPWVPr5Z2JmDo21e9q2zdtsH8KXIlQvQqH2PLYOW5F7TnaiWUe6ZfMdv725XXg65n06zxRdXmahN2/0lbPFPwog30l3MCHE= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c1f26bc-0de4-418a-35dc-08d6c5047ddf X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2019 20:20:40.5377 (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: VI1PR0402MB3392 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org i.MX8MM EVK has one wm8524 audio codec connected with SAI3 digital audio interface. This patch uses simple-card machine driver in order to enable wm8524 codec. We need to set: * SAI3 pinctrl configuration * clock hierarchy * codec node * simple-card configuration Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 48 ++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts index 2d5d89475b76..207b13266a96 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts @@ -37,6 +37,35 @@ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>; enable-active-high; }; + + wm8524: audio-codec { + #sound-dai-cells = <0>; + compatible = "wlf,wm8524"; + wlf,mute-gpios = <&gpio5 21 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 = <&sai3>; + }; + + link_codec: simple-audio-card,codec { + sound-dai = <&wm8524>; + clocks = <&clk IMX8MM_CLK_SAI3_ROOT>; + }; + }; }; &fec1 { @@ -61,6 +90,15 @@ }; }; +&sai3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai3>; + assigned-clocks = <&clk IMX8MM_CLK_SAI3>; + assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; + assigned-clock-rates = <24576000>; + status = "okay"; +}; + &uart2 { /* console */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart2>; @@ -130,6 +168,16 @@ >; }; + pinctrl_sai3: sai3grp { + fsl,pins = < + MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6 + MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6 + MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6 + MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6 + MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21 0xd6 + >; + }; + pinctrl_uart2: uart2grp { fsl,pins = < MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140