From patchwork Mon Apr 22 19:36:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 10911589 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 2AA431575 for ; Mon, 22 Apr 2019 19:36:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B5D127FB3 for ; Mon, 22 Apr 2019 19:36:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FB28287E3; Mon, 22 Apr 2019 19:36:30 +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 9DC4527FB3 for ; Mon, 22 Apr 2019 19:36:29 +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=aaLNZiw0aC/gHtI/5paNTfSFAMKQo+pqBGwjtNfECeI=; b=SIim5HLXChINVN HweQmqEGK2uJUsw8xQtIwNxbtZI2FJSFZ3/ZfPDi+h7SMC7fo9G5hi9dwWQt2lp+05dId52fVlWlx 0bbSRE+KqDe9Ol6XZBCQ8WcXsYlgWJg/soiOtGZ9cq0BpOyizwvdCrWG3rtaeLAFXwe2nXDcBRwRh YEnjmCyGNCzDh4n8ONabY3y+y7hPL1egTJk8Xw8ggayZ46Pc5/qqeC4CSG265CbXW8I608NI2q5Ww SjRP1G2x4AhZeC2T++Vf7h8zp1PCIxteDRkSrgbVQsznMIGTr/nxJ4+c4q0+UWZ/B8Fj1MHDsteXs sf6xdbwxDkCo48uu0tXg==; 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 1hIejp-0006TL-RC; Mon, 22 Apr 2019 19:36:25 +0000 Received: from mail-ve1eur03on0611.outbound.protection.outlook.com ([2a01:111:f400:fe09::611] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIejY-00067J-IY for linux-arm-kernel@lists.infradead.org; Mon, 22 Apr 2019 19:36:10 +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=803L7SlD8aY7/wbrmMqaS5xgmwRF2TASNhHJ6qX5+fw=; b=lCvoVtmo9HZBTr1RrKdqP9s6/egx50ucFYDQ+E7Zdn86uBM8eANfMDqj3cGwJHFByGE7MK1j3eOuoFTeoWS0EojmY/aZYvicxrG+IoxTXsQ2q/MGKx9OSvICfKBcdeo1cwpFqfmOttalFTuOYuXMS70TtP8/lyLFSlEX8iqYhkE= Received: from VI1PR0402MB3357.eurprd04.prod.outlook.com (52.134.1.18) by VI1PR0402MB2861.eurprd04.prod.outlook.com (10.175.23.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.12; Mon, 22 Apr 2019 19:36:00 +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.017; Mon, 22 Apr 2019 19:36:00 +0000 From: Daniel Baluta To: "shawnguo@kernel.org" Subject: [PATCH v2 2/2] arm64: dts: imx8mm-evk: Enable audio codec wm8524 Thread-Topic: [PATCH v2 2/2] arm64: dts: imx8mm-evk: Enable audio codec wm8524 Thread-Index: AQHU+UKd3f/INs87BEebFb8olMJ7/A== Date: Mon, 22 Apr 2019 19:36:00 +0000 Message-ID: <20190422193542.2853-3-daniel.baluta@nxp.com> References: <20190422193542.2853-1-daniel.baluta@nxp.com> In-Reply-To: <20190422193542.2853-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR06CA0109.eurprd06.prod.outlook.com (2603:10a6:803:8c::38) 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: 93fe9129-1c19-4196-af1d-08d6c759bfde 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:VI1PR0402MB2861; x-ms-traffictypediagnostic: VI1PR0402MB2861: x-microsoft-antispam-prvs: x-forefront-prvs: 00159D1518 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(136003)(346002)(376002)(396003)(199004)(189003)(102836004)(6116002)(3846002)(54906003)(2616005)(11346002)(446003)(386003)(2906002)(6506007)(476003)(25786009)(4326008)(97736004)(26005)(186003)(44832011)(36756003)(73956011)(5660300002)(2501003)(5640700003)(1076003)(71190400001)(71200400001)(66946007)(86362001)(66476007)(66066001)(64756008)(66446008)(66556008)(99286004)(478600001)(7736002)(68736007)(6436002)(52116002)(6486002)(76176011)(6916009)(256004)(14444005)(53936002)(6512007)(486006)(316002)(14454004)(305945005)(8676002)(2351001)(81166006)(81156014)(50226002)(1730700003)(8936002)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB2861; 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: nfVQE67q9WR/6N5hx2B7W20fL+4cTstWwjXaxLTE2LPIOvCdUG+tnHgtr38Bc9X20Som08/aucntGf6XWKpKaWBzuskSmHHC6KXONOFLKckz5Un+eGFL120X0lpwKIUhfe0x7xiZ/nOObanfwFrOjxEeSfVS/kwyn7/UK52tCO5uuuB1Pzv0QCidLeeIbUttA4IQW5dfrc1ZyrKXPyXSp1PtvMKcwWz/3qHzXyxX6FINW6g6VWSkD55tAvqV75mj3t3kH0wT2B71tA6nqFnnvzzpxvSYtH5dPPGi0CGgSu+RRFbxPtEVxjeoZZmax07U4rImGltCWnX8wdrqz2dGLJPPYG5HpO3YrAzbV7d63yXiyTzrNOgsgQY58B53mf96F48zOHXuTwO/bCRJaNMMnTuwE0wJ8VrSV3++J/uqO5U= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93fe9129-1c19-4196-af1d-08d6c759bfde X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Apr 2019 19:36:00.7354 (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: VI1PR0402MB2861 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190422_123608_720202_C6F8367E X-CRM114-Status: GOOD ( 12.68 ) 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" , Aisheng Dong , Peng Fan , Anson Huang , "devicetree@vger.kernel.org" , Daniel Baluta , "s.hauer@pengutronix.de" , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , "festevam@gmail.com" , "S.j. Wang" , "linux-arm-kernel@lists.infradead.org" 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 i.MX8MM 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