From patchwork Fri Mar 8 12:02:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 10844567 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 2594E139A for ; Fri, 8 Mar 2019 12:03:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09C8029E9C for ; Fri, 8 Mar 2019 12:03:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDFEA2E2D6; Fri, 8 Mar 2019 12:03:20 +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=BAD_ENC_HEADER,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 8F68E29E9C for ; Fri, 8 Mar 2019 12:03:20 +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=I/OdkJGIa6eHXpxYvSMMXFwvHb0RvhqyU4N6kbtPcO8=; b=U+Br2NoFWFIfnp 2YGrS+G/9I3RdzSOIRedc/h4TZqGiNoloCImFEw5pIEHQvu9vwgi33xffs+PlmK47+e8KKqSgFR5j lf+tftUmE8oj5bD55U/fnvl70n+sZXzqz96rLgF730q0Q47O3qrpbpvyEfV4tOEvNccyB/fEDZ7+A mwS9Pbg1JJjaDmiOwoYRxfXka2P9e0zhZ+IOk06zDRwO+IM8FFantVpLe6MyHUZxRGn6UT1FLknQb dztmU5ix7v5qHHxL0mffrOUm9R1ZOf4uH4yDzcLAj/OOnHDseqIHC7CC9B8Frz0sO10yAJuRdrbor 2JSdyGj2DCXXs5TAuNaA==; 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 1h2EDe-0003u5-4x; Fri, 08 Mar 2019 12:03:18 +0000 Received: from mail-eopbgr10072.outbound.protection.outlook.com ([40.107.1.72] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2ED1-0002vD-5Y for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2019 12:02:46 +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=vjG+0k7Qow+0agG3gKHAsujYM4ULaatQT/oqcCPPYoc=; b=YZxNePbQEWjWSIpsRwkXYdPF9cR0pI0NWjcXdpbiNDCCfo862Mo3waBjNGtjVIkAvcxYiNBnFZpmBLuWnCNHpT0LGHqrHF/aSZovt5Vj/3EuZMcnqadEUdg3ktNVBl6HIqbTeqaBnVYftf4JtymQ3O++P1AA282lcfYNbXL0+S0= Received: from VI1PR0402MB3357.eurprd04.prod.outlook.com (52.134.1.18) by VI1PR0402MB3776.eurprd04.prod.outlook.com (52.134.15.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Fri, 8 Mar 2019 12:02:28 +0000 Received: from VI1PR0402MB3357.eurprd04.prod.outlook.com ([fe80::f80e:d03f:57bc:aced]) by VI1PR0402MB3357.eurprd04.prod.outlook.com ([fe80::f80e:d03f:57bc:aced%2]) with mapi id 15.20.1686.019; Fri, 8 Mar 2019 12:02:28 +0000 From: Daniel Baluta To: "shawnguo@kernel.org" Subject: [PATCH v6 4/4] arm64: dts: imx8mq-evk: Enable audio codec wm8952 Thread-Topic: [PATCH v6 4/4] arm64: dts: imx8mq-evk: Enable audio codec wm8952 Thread-Index: AQHU1abNCvGak2t96k+HL/cDqxo+9Q== Date: Fri, 8 Mar 2019 12:02:28 +0000 Message-ID: <20190308120141.3698-5-daniel.baluta@nxp.com> References: <20190308120141.3698-1-daniel.baluta@nxp.com> In-Reply-To: <20190308120141.3698-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P193CA0074.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::15) 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: [95.76.156.53] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fa45062f-dca9-47b5-ec0a-08d6a3bdefa9 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:VI1PR0402MB3776; x-ms-traffictypediagnostic: VI1PR0402MB3776: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; VI1PR0402MB3776; 23:1shrATQmfit/yk0bkkske2T1tH5U2v6eEtH3s?= =?iso-8859-1?q?wVjLIPYGy5++42YVK?= =?iso-8859-1?q?kLx27yU33v4q4f6PQOSJ8UMZgPmGQO9iTUSde4UUXXVGGVhJP3NWCeFhIf5W?= =?iso-8859-1?q?NP2zuXCOhGRptDAicrWtn5lwTWwNwGJ1k7hb7wiofgSyKgSwWoRw/rcrna37?= =?iso-8859-1?q?0XyoX3VyImKN2DX6WzEOfwr9vyN3jICzc1PngOp2Welq23KTo2IYpQvCCFo+?= =?iso-8859-1?q?hdjxdd+7KWvxZc6IhTtnWbsNiadFO+gECAIqaHcBLJor6EZTV1TW09RAaJef?= =?iso-8859-1?q?Sm3ys/60R4VTM9cvVr6H4bEh5sV1Fol+UoQpNpRDHV0NWar3TpzsHuxUsAy2?= =?iso-8859-1?q?uxjYlONasBRolsyWpMvTjPEoczDpob3Vc+UviBOQgdFXl5LWJEhMCoBaQJJA?= =?iso-8859-1?q?8fSXiZXkVkeZKI0HRdFh45sA/qtmSb8ifounL0bVxD+PsB4o7hq9wkWICJH/?= =?iso-8859-1?q?lUe3oYMOftimfF5q6JZRDvIHQ4Zp0HHtjlesDZdGxzq1ljBCVp8lNt7WXQxm?= =?iso-8859-1?q?4DWGdHwhZuVBfU+/iF/ch1q/IbdPj1RoMSL8q0x5hMLxE6LmmveMM0mM2/4v?= =?iso-8859-1?q?h7mMmxpx3wU5/e2Uqmo88QTXZ/zLg49RDkGGaMckU/fTwdDKRSKY5++kFCYd?= =?iso-8859-1?q?5g1dSoHEEWJsC/mNC5cSCWbZy/I/pZd2bPVZLUrAC0yt4mBIVmVT6HInWotY?= =?iso-8859-1?q?+L4SrVyisvWWEWDk6p87ySC3nN32cTukUDzrYczOO0qG2MT416s26+nRdAKc?= =?iso-8859-1?q?j1rhF0x1nGQ23w0iMU3xc8ofKDmIgmKJujpRO1ZW/VqaYOpMWL9bcR90cRYx?= =?iso-8859-1?q?bVGf4HEl9XdPcVxx8cpWl3YIFVeeAwEg6dYNkBxYpQQM8ey251wRFTPlyMZu?= =?iso-8859-1?q?35LO6V70RJnwmlmOHu57TjbAj0Kz898Ttx7AShtp7LOU7AZTPIcgCY8tcsK/?= =?iso-8859-1?q?GQej9DNuxYIhkLIyTwrDSjzXhUD1jX7ezLCTZKr1oGWZppSUq4+2zJpY7Yrs?= =?iso-8859-1?q?ThoSt7DJaN/5+SZjjrPWFESWsVlrvx+F80vfGuOjYa0PVoNEgwxgn6tNJr7U?= =?iso-8859-1?q?5WTPctBomUKIr7jaJaH/uSeBfZT6j/ERKGZSgoP/gd2Yyoarak1QKwn2AkDy?= =?iso-8859-1?q?wEBrOYiZFevWIugPmPMro8wXv1KgR0LJErUYaGJ+noNC4VyNg6GeT6+wW5q9?= =?iso-8859-1?q?EOlYUvYL2+zKc7OMahPmX2ryO69bpAdlQfD4IUNpnAlHc86aJdpK6dN5GxnQ?= =?iso-8859-1?q?+YihTR5Hhp8um9rXwfCmFhktHiCbfKVY4e15cnjuQd1WSivo82QHr6oNIDr1?= =?iso-8859-1?q?dopAy37JZ2LWG/8CZQEkCWss/JtiZ067ZVqT8HNWtBfccF9iAqkw=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 0970508454 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(396003)(366004)(376002)(136003)(39860400002)(199004)(189003)(36756003)(52116002)(2906002)(68736007)(6436002)(25786009)(7736002)(478600001)(305945005)(105586002)(1076003)(14454004)(2351001)(81166006)(106356001)(256004)(6486002)(8676002)(8936002)(50226002)(6916009)(4326008)(102836004)(54906003)(3846002)(6506007)(26005)(66066001)(386003)(6116002)(316002)(486006)(1730700003)(81156014)(97736004)(44832011)(6512007)(476003)(186003)(446003)(7416002)(86362001)(5640700003)(11346002)(71200400001)(71190400001)(99286004)(2616005)(53936002)(2501003)(5660300002)(76176011)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB3776; 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: NZK5lAjCLy8anfQN/ooozBjxlJvLdmUa1kdqQQE8bS1IPwi+RPqRsBQkbxloYhP7uTf6t9QPv3PmC9OiWTcyG7Pe3o02R9hCBir8fk8kvimL8jRSQPO82AYgtGkXN+RCFjNrsB0NF6LwSUy+RQKwOEF4kDEov+9RXrMhZ1ZKdrZimrTh5JGECmr9rwBpAwdNM1itTgWwYaWF9Zzg+6IXdYHSsz1P9HCNV2bMMwGBaVn6cFbPl5xnN3202fhIOMG2b0aVrqk7E4HH8GYHkgTkngTzam3ZvubiXx4OWZFmKjQWM9tG0gSKT5CmV4cQ+G+gBIFAc+QyPVnJqXEuyNzjSYrq46IY+Ga5sKBPoa4v9+OwZdWbqyH0m9EZSSWWXqmE9jkh50tkI/uA8o7SCFChcvUU5RIT49Ejmdis0EZIAcM= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa45062f-dca9-47b5-ec0a-08d6a3bdefa9 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2019 12:02:28.8023 (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: VI1PR0402MB3776 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190308_040239_267342_67CB4DE5 X-CRM114-Status: GOOD ( 11.76 ) 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" , Abel Vesa , "kuninori.morimoto.gx@renesas.com" , "ccaione@baylibre.com" , "spencercw@gmail.com" , "S.j. Wang" , "angus@akkea.ca" , "linux-kernel@vger.kernel.org" , Daniel Baluta , "robh+dt@kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , Aisheng Dong , "agx@sigxcpu.org" , "festevam@gmail.com" , "s.hauer@pengutronix.de" , "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 wm8952. The EVK provides the MCLK to wm8952. Digital interface is SAI2 which includes three signals: SYNC_CLK, BCLK and DACDAT. This patch sets: * SAI2 pinctrl configuration * clock hierarchy * wm8960 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 | 46 ++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts index 54737bf1772f..09000ee34757 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts @@ -31,6 +31,33 @@ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>; enable-active-high; }; + + 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>; + }; + }; }; &fec1 { @@ -52,6 +79,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"; @@ -223,6 +259,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_i2c1: i2c1grp { fsl,pins = < MX8MQ_IOMUXC_I2C1_SCL_I2C1_SCL 0x4000007f