From patchwork Fri Mar 1 16:36:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 10835673 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 20DA5139A for ; Fri, 1 Mar 2019 16:37:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B64F2EF68 for ; Fri, 1 Mar 2019 16:37:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1CFB2FED2; Fri, 1 Mar 2019 16:37:28 +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 8C0242EF68 for ; Fri, 1 Mar 2019 16:37:28 +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=k9kqPzN9gTdqM3BAM4qO5FrL2qA28C/kLwK9sA6CQMI=; b=gyPrCifr++ofEy 3qp2UhWFF50wbew9MNtl65XE1KV61LIEOoOUP7qgRFsRfUlo+dJA+8Nzp8Ro69anFAecWQCSFVHgE i60wlfSdtiYkgnkDF1isSZEJvKwA4MaQVP6+R3FRXpy0fEs0uJas+w8Sk0sSzfPE+7N4Zk7lI2My8 1Dox4GOzd1ssD49WoljcHwIUiu4/beOnze5hIbMn0tRlxZvjLv4eSwQIhitEr48NQFE+7ykK+a9aR nRFfvZDvdfZ1ZO9Sb5sLvtj86joiO/g0UbVPanBWr0H4l/RkodoJ57/L91HiAL1wramjvEwE/nJWx hk9cBTjtfwKWYWj1hgBA==; 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 1gzlA3-0000Ng-RU; Fri, 01 Mar 2019 16:37:23 +0000 Received: from mail-eopbgr80079.outbound.protection.outlook.com ([40.107.8.79] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzl9U-0007yf-0f for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2019 16:36:56 +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=7cMcEAe4cGfX2xVIc5wvI4pEr7LwKkRv+GtyG6hvJO0=; b=inGV9vSEcUomM4o+mQNb8ATQsDkZT+J9SxL7DSyg/V7ze4Q7661jnaAHgmB4MjHzyYrm8jbLsbbsvZ2N4XxNnWayTmnBqF62rGXdKcSM8YCoYP+7rHiSWCdBG8RULWAZ4ecB1RED9p1NdSeeqtf8sGAs4M+Gf73SrpgkNT7cRB8= Received: from VI1PR0402MB3357.eurprd04.prod.outlook.com (52.134.1.18) by VI1PR0402MB3648.eurprd04.prod.outlook.com (52.134.14.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.16; Fri, 1 Mar 2019 16:36:36 +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.1665.015; Fri, 1 Mar 2019 16:36:36 +0000 From: Daniel Baluta To: "shawnguo@kernel.org" Subject: [PATCH v5 4/4] arm64: dts: imx8mq-evk: Enable audio codec wm8524 Thread-Topic: [PATCH v5 4/4] arm64: dts: imx8mq-evk: Enable audio codec wm8524 Thread-Index: AQHU0EzvmbmmBYzki0GfnU9Q6JIYFA== Date: Fri, 1 Mar 2019 16:36:36 +0000 Message-ID: <20190301163604.10618-5-daniel.baluta@nxp.com> References: <20190301163604.10618-1-daniel.baluta@nxp.com> In-Reply-To: <20190301163604.10618-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR07CA0248.eurprd07.prod.outlook.com (2603:10a6:803:b4::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: 7d786eef-b15c-49c7-4f54-08d69e641226 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:VI1PR0402MB3648; x-ms-traffictypediagnostic: VI1PR0402MB3648: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; VI1PR0402MB3648; 23:E3rGOw+5ALH8aeGPgUXb8EYdN4s08kOeJNoks?= =?iso-8859-1?q?vrbsjASDnC7nNc0lc?= =?iso-8859-1?q?SaL3ikI4IIb6bJJsgb3qTElyYnMc6cZwEM0016RAuFDnVhSGi0/ZZbjvR2Tv?= =?iso-8859-1?q?g9Eru03Zx5s9fxRyRbFjP5BqqIXa3ChEWIBSYI+Y+OPXI7K71QQZirm1T5ZQ?= =?iso-8859-1?q?aigPvV5I5o15NfLErEMXFJEL9dvUCDH14+vt1F4wgthmPwkiDXlPyVHDK720?= =?iso-8859-1?q?X8e7XsAOxxe7/khbo7mWM/JxpYLnus0SsA5Cam92M4nSw6HfHCkKArWmHbWX?= =?iso-8859-1?q?dhztIodxQQa2JdhyFCfFW2sADYmBYClI1FjwxgvRbtMxOiB/9VQzUIfeIIuq?= =?iso-8859-1?q?Igdb8QJT4FVwwS2BbyG+mnqiID7B6tCtK80fEu0aREP8Rlj6db0Y6J2aYx+8?= =?iso-8859-1?q?6AW3UzsKrBacJnV0Jn3L7VpyiNUUqSZ9znw8pKH5uRIi2rBV3OwYOd17r8wK?= =?iso-8859-1?q?G/SAGlcTOi5elw+IjPTXIOoeSLWpFv9EQ6B75tcKx80PapKOyLpTNZobakap?= =?iso-8859-1?q?kXQ+ob9fztqgIGxdPLhtQIgMUsIrONjoNsaEc+9wtuid7pRNrgMcly+aB39W?= =?iso-8859-1?q?zoKwv/ijC4OIZnUJz/EWS9L8owaSqv3+P6FKdm9RQTAlmGtTgpDSbsUGJqpe?= =?iso-8859-1?q?53HuFCb9YiA1lVXR+xQ2xrkIL1fzmWWM8i5t03Fit1BRzRL6CBKa4bnT2yp6?= =?iso-8859-1?q?KlfZs54C3Bb+GkUdgQiRliVi9N93uSNi82icBWi0NvvnaBRmJaBANT7V4MFa?= =?iso-8859-1?q?xL5Bjj0WwVTg4xzPVtHDNYHcBueeu/YSY+8luu+qWs9J9ZQLktNIUg/9L0UZ?= =?iso-8859-1?q?hwopYAB6XVL70lYSsl6v5yja3wLve12XQ7WzaUycPM184R1AJf8INMrs2yAi?= =?iso-8859-1?q?HjNC+PNOC/Bh0g+2kY3gcLAfjSRHTTkEZGU3dntweB1FudIxgX4h3MIAtJSL?= =?iso-8859-1?q?eLY9IseRPpAzhgAGSFvAjv1zTBczgY5vxRjXEtnhtjxQk6HG1MqDjRJQXKk7?= =?iso-8859-1?q?nSRVMAz3c4CqhJshX/KS9KQAbc4JJlx9ewyX2i/0jCL8f56+tYOMZPIK3GTa?= =?iso-8859-1?q?Nw/thzE4njKFLSWK8JYZ8Dp8U+R6FqFgU4B4Vz/1154fRmYTk+ruZtDQJ6EV?= =?iso-8859-1?q?WdQNo29BHK0uv889IB0ufifE4c7DasIIRjOgmotP+QLDu+/aEtIFGdMzrQh2?= =?iso-8859-1?q?2YwLQi2BtDjbI4s9alr8I0k86J7prtaVPnYUne4BOwEFWHDywb9ngoo0Pmlo?= =?iso-8859-1?q?KHVnmzPeflBUFGuc2bzftmZJLCSV8des57GQ9+Ah+9xfIQ8tQ68TLz9NIdoD?= =?iso-8859-1?q?pBlGYQtNlwBDcxodDm2Oxx5m4CYI17euGP2DLUGs/yEQPlp2Muvg=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09634B1196 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(396003)(346002)(376002)(366004)(199004)(189003)(68736007)(478600001)(76176011)(6916009)(99286004)(386003)(53936002)(66066001)(52116002)(7416002)(4326008)(2501003)(14454004)(54906003)(6512007)(106356001)(2906002)(86362001)(316002)(105586002)(256004)(11346002)(6486002)(486006)(1730700003)(186003)(476003)(102836004)(8676002)(25786009)(81166006)(6116002)(2616005)(446003)(5640700003)(3846002)(97736004)(50226002)(26005)(8936002)(71190400001)(5660300002)(6436002)(305945005)(71200400001)(2351001)(6506007)(1076003)(44832011)(7736002)(36756003)(81156014)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB3648; 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: L+oMkyueosjEuTW7hgl0BiuPFS3hGsYOr4+O1Q8H3X29SCfKcXXN9G0ksJy16jtgTFy6Gs8U/BybAVxH2mEaYE8KsLzeEnqjvJCpETYR8VBe+aRpp796YUw4FIo87xL3mDoK3LzPF7pgcUW5VzUnZPpzoHWuCa649ddssKhaZWwi0e8RmzUtk0X3CImLRE0GmZHKHIw/4zogTq5v0El1vYHgFMiicYG5HnCaJPG4jIvb72XaGwC3by3d2uynR6xYLt6zlLK06q5x2BWnBFIvnCf5hE4MAyn6QjSVZtjDe/8vx46Tm55BqFod7CjeRtCaGxr0o/5n9hprlUCIT9zVlgbyE1PbB+TLrXr7bKAqdYiNcNkHZXD8qpYYwmFh3l/Kb7WBM0U9ZMv3ocKEiK/6ZMgnPR/WK2kRXRcVHqrVJxs= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d786eef-b15c-49c7-4f54-08d69e641226 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2019 16:36:36.0644 (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: VI1PR0402MB3648 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190301_083648_839848_B171365E X-CRM114-Status: GOOD ( 11.53 ) 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 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 --- 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 54737bf1772f..8666af6bea5b 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts @@ -31,6 +31,35 @@ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>; enable-active-high; }; + + wm8524: audio-codec { + #sound-dai-cells = <0>; + compatible = "wlf,wm8524"; + clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>; + clock-names = "mclk"; + 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 +81,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 +261,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