From patchwork Tue May 28 13:21: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: 10964985 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 A1FA96C5 for ; Tue, 28 May 2019 13:47:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E46128733 for ; Tue, 28 May 2019 13:47:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 772E728433; Tue, 28 May 2019 13:47:49 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 740891FF65 for ; Tue, 28 May 2019 13:47:47 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B959C17F0; Tue, 28 May 2019 15:22:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B959C17F0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1559049775; bh=vo836AfuDvAzKejVfkgJXjpMKKwhpjRx0iVNj6Wsdm4=; h=From:To:Date:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FvC4BxmY9clYzB9roP840x1aoTy8xAdFuuhslh7H5SH1nm835+QhevR7Lcvd8uucq 4PaVKjo5oTO6Waq1Vrye8+U3/Z6sZxorO8FxQ5sLtd7TXueUQzlN/T0xe/pbd4lpF1 J8+8vUCdHG5NQLfaY4ouwk5prAtHO8QUqmV1ToYQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 31C67F89719; Tue, 28 May 2019 15:21:23 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id A3D02F89708; Tue, 28 May 2019 15:21:07 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10042.outbound.protection.outlook.com [40.107.1.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A7528F896B8 for ; Tue, 28 May 2019 15:21:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A7528F896B8 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="m6apjXKm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BKUF/38t3JvrhBzQwWyGv1OYkinZkbHKvfd5nsuppKU=; b=m6apjXKmn0nvswGpreEZZyHpsCTqwQ1dt44xZ7FyBe4xRV4lDoLJxsvc7akBBCbjC7mtwUSg9CcO0qyd6iqTe60TDUndqfzfCbx7zMsWkYk0ItdvAeyKn2BSsAO3L358ia5n0U+lNjA4V2O9FhBdUNmqxBG8VVHx4vDg7B477aw= Received: from AM6PR04MB5207.eurprd04.prod.outlook.com (20.177.35.159) by AM6PR04MB4261.eurprd04.prod.outlook.com (52.135.168.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.15; Tue, 28 May 2019 13:21:01 +0000 Received: from AM6PR04MB5207.eurprd04.prod.outlook.com ([fe80::fd2a:e078:f9d7:cb6b]) by AM6PR04MB5207.eurprd04.prod.outlook.com ([fe80::fd2a:e078:f9d7:cb6b%7]) with mapi id 15.20.1922.021; Tue, 28 May 2019 13:21:01 +0000 From: Daniel Baluta To: "robh+dt@kernel.org" , "shawnguo@kernel.org" , "timur@kernel.org" , "nicoleotsuka@gmail.com" , "broonie@kernel.org" Thread-Topic: [PATCH 1/3] ARM: dts: imx: Add mclk0 clock for SAI Thread-Index: AQHVFVgwyNst+ZOF4kWBUcHYo9G8SQ== Date: Tue, 28 May 2019 13:21:00 +0000 Message-ID: <20190528132034.3908-2-daniel.baluta@nxp.com> References: <20190528132034.3908-1-daniel.baluta@nxp.com> In-Reply-To: <20190528132034.3908-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR09CA0114.eurprd09.prod.outlook.com (2603:10a6:803:78::37) To AM6PR04MB5207.eurprd04.prod.outlook.com (2603:10a6:20b:e::31) 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: [89.37.124.34] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f7504bd8-91ea-4145-3933-08d6e36f4c48 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM6PR04MB4261; x-ms-traffictypediagnostic: AM6PR04MB4261: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-forefront-prvs: 00514A2FE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(39860400002)(396003)(346002)(376002)(199004)(189003)(66066001)(71190400001)(305945005)(71200400001)(8676002)(81156014)(102836004)(2906002)(386003)(2501003)(6116002)(3846002)(7416002)(478600001)(53936002)(68736007)(50226002)(5660300002)(81166006)(7736002)(1076003)(14454004)(8936002)(86362001)(256004)(186003)(26005)(6512007)(486006)(446003)(11346002)(476003)(2616005)(54906003)(110136005)(44832011)(73956011)(64756008)(66946007)(66556008)(66476007)(66446008)(316002)(52116002)(25786009)(36756003)(6506007)(99286004)(6486002)(76176011)(14444005)(6436002)(4326008)(2201001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB4261; H:AM6PR04MB5207.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: O6zim8eacVvwS6STlB1/12H1kAyDvoa3ZgoqGMa/VPZPU+CmlVRZTxe0XrjlNuFbVXjAE8O8RbCGFMOHqeZYWEfWkk0NcKihfIc/sAqiXWjUV9BF2Ux+NPA2ehYh2AscUe5lRpqtkF6wwZlvemfGlWN50LOxA8qcfYcXUs/W8neWAoLFdBm5fU9cQKie8bVRTPjZ8qotkAyqoUdUbz7Sxne3EmTZ8DtbFnb0e3fP4rKdXc88KoXgMaJQCc/9Peo+K4cTmwlyJjy2DJEsmKFZtrZR/hxzCKqGQ/ROPSt8SPf+hrEZZzBl0y2KNZvsvwVZx4HOpNMf+1HSeSXQvHaT0vti97PqyyxFK+qGiDXP18tTuxiBTPZ8UxO87QNNdihNPUel+kGzUkiiu7lONyaMCAogJigdXvUbmtoR49cymJs= Content-ID: <20D3443DBB6CC84981BDDFDA2756471E@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7504bd8-91ea-4145-3933-08d6e36f4c48 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 May 2019 13:21:00.0763 (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-CrossTenant-userprincipalname: daniel.baluta@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4261 Cc: "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , "alsa-devel@alsa-project.org" , "Xiubo.Lee@gmail.com" , Daniel Baluta , "s.hauer@pengutronix.de" , "tiwai@suse.com" , "linux-kernel@vger.kernel.org" , "lgirdwood@gmail.com" , dl-linux-imx , "kernel@pengutronix.de" , "festevam@gmail.com" , "S.j. Wang" , "linux-arm-kernel@lists.infradead.org" Subject: [alsa-devel] [PATCH 1/3] ARM: dts: imx: Add mclk0 clock for SAI X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Shengjiu Wang Audio MCLK source option is selected with a 4:1 MUX controller using MCLK Select bits in SAI xCR2 register. On imx6/7 mclk0 and mclk1 always point to the same clock source. Anyhow, this is no longer true for imx8. For this reason, we need to add mclk0 and handle it in a generic way in SAI driver. Signed-off-by: Shengjiu Wang Signed-off-by: Daniel Baluta --- arch/arm/boot/dts/imx6sx.dtsi | 6 ++++-- arch/arm/boot/dts/imx6ul.dtsi | 9 ++++++--- arch/arm/boot/dts/imx7s.dtsi | 9 ++++++--- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index b16a123990a2..682207b5d868 100644 --- a/arch/arm/boot/dts/imx6sx.dtsi +++ b/arch/arm/boot/dts/imx6sx.dtsi @@ -1071,9 +1071,10 @@ reg = <0x021d4000 0x4000>; interrupts = ; clocks = <&clks IMX6SX_CLK_SAI1_IPG>, + <&clks IMX6SX_CLK_SAI1>, <&clks IMX6SX_CLK_SAI1>, <&clks 0>, <&clks 0>; - clock-names = "bus", "mclk1", "mclk2", "mclk3"; + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; dma-names = "rx", "tx"; dmas = <&sdma 31 24 0>, <&sdma 32 24 0>; status = "disabled"; @@ -1090,9 +1091,10 @@ reg = <0x021dc000 0x4000>; interrupts = ; clocks = <&clks IMX6SX_CLK_SAI2_IPG>, + <&clks IMX6SX_CLK_SAI2>, <&clks IMX6SX_CLK_SAI2>, <&clks 0>, <&clks 0>; - clock-names = "bus", "mclk1", "mclk2", "mclk3"; + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; dma-names = "rx", "tx"; dmas = <&sdma 33 24 0>, <&sdma 34 24 0>; status = "disabled"; diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm/boot/dts/imx6ul.dtsi index bbf010c73336..e9691306f557 100644 --- a/arch/arm/boot/dts/imx6ul.dtsi +++ b/arch/arm/boot/dts/imx6ul.dtsi @@ -304,9 +304,10 @@ reg = <0x02028000 0x4000>; interrupts = ; clocks = <&clks IMX6UL_CLK_SAI1_IPG>, + <&clks IMX6UL_CLK_SAI1>, <&clks IMX6UL_CLK_SAI1>, <&clks IMX6UL_CLK_DUMMY>, <&clks IMX6UL_CLK_DUMMY>; - clock-names = "bus", "mclk1", "mclk2", "mclk3"; + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; dmas = <&sdma 35 24 0>, <&sdma 36 24 0>; dma-names = "rx", "tx"; @@ -319,9 +320,10 @@ reg = <0x0202c000 0x4000>; interrupts = ; clocks = <&clks IMX6UL_CLK_SAI2_IPG>, + <&clks IMX6UL_CLK_SAI2>, <&clks IMX6UL_CLK_SAI2>, <&clks IMX6UL_CLK_DUMMY>, <&clks IMX6UL_CLK_DUMMY>; - clock-names = "bus", "mclk1", "mclk2", "mclk3"; + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; dmas = <&sdma 37 24 0>, <&sdma 38 24 0>; dma-names = "rx", "tx"; @@ -334,9 +336,10 @@ reg = <0x02030000 0x4000>; interrupts = ; clocks = <&clks IMX6UL_CLK_SAI3_IPG>, + <&clks IMX6UL_CLK_SAI3>, <&clks IMX6UL_CLK_SAI3>, <&clks IMX6UL_CLK_DUMMY>, <&clks IMX6UL_CLK_DUMMY>; - clock-names = "bus", "mclk1", "mclk2", "mclk3"; + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; dmas = <&sdma 39 24 0>, <&sdma 40 24 0>; dma-names = "rx", "tx"; diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 106711d2c01b..c345a2e6d824 100644 --- a/arch/arm/boot/dts/imx7s.dtsi +++ b/arch/arm/boot/dts/imx7s.dtsi @@ -886,10 +886,11 @@ reg = <0x308a0000 0x10000>; interrupts = ; clocks = <&clks IMX7D_SAI1_IPG_CLK>, + <&clks IMX7D_SAI1_ROOT_CLK>, <&clks IMX7D_SAI1_ROOT_CLK>, <&clks IMX7D_CLK_DUMMY>, <&clks IMX7D_CLK_DUMMY>; - clock-names = "bus", "mclk1", "mclk2", "mclk3"; + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; dma-names = "rx", "tx"; dmas = <&sdma 8 24 0>, <&sdma 9 24 0>; status = "disabled"; @@ -901,10 +902,11 @@ reg = <0x308b0000 0x10000>; interrupts = ; clocks = <&clks IMX7D_SAI2_IPG_CLK>, + <&clks IMX7D_SAI2_ROOT_CLK>, <&clks IMX7D_SAI2_ROOT_CLK>, <&clks IMX7D_CLK_DUMMY>, <&clks IMX7D_CLK_DUMMY>; - clock-names = "bus", "mclk1", "mclk2", "mclk3"; + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; dma-names = "rx", "tx"; dmas = <&sdma 10 24 0>, <&sdma 11 24 0>; status = "disabled"; @@ -916,10 +918,11 @@ reg = <0x308c0000 0x10000>; interrupts = ; clocks = <&clks IMX7D_SAI3_IPG_CLK>, + <&clks IMX7D_SAI3_ROOT_CLK>, <&clks IMX7D_SAI3_ROOT_CLK>, <&clks IMX7D_CLK_DUMMY>, <&clks IMX7D_CLK_DUMMY>; - clock-names = "bus", "mclk1", "mclk2", "mclk3"; + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; dma-names = "rx", "tx"; dmas = <&sdma 12 24 0>, <&sdma 13 24 0>; status = "disabled"; From patchwork Tue May 28 13:21:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 10964993 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 5504B6C5 for ; Tue, 28 May 2019 14:02:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4395920072 for ; Tue, 28 May 2019 14:02:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 379402889E; Tue, 28 May 2019 14:02:49 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D45E028872 for ; Tue, 28 May 2019 14:02:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9F24D17F2; Tue, 28 May 2019 15:23:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9F24D17F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1559049830; bh=xE7iJlzbx2UdPjyY/Exy9MTGrXV6FwZI/USSF95pNn0=; h=From:To:Date:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mVlOi80mjFjpKF3NhyQR2xbpBLFRJB6UHb9dxNhWtIPqOZuAeHZFsIo6rhdHxnVoJ MIxfCAi53iXB3qHDNm8m9qThV1x+kL2FpOPma159tBwGDXvjr0TEqbiJr2dmCpbLaj ohOKFu/oR8vMU0WLqm2s9V049XyRxaWrSA8Q6OC4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1D4BDF89731; Tue, 28 May 2019 15:21:30 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8E8BEF89708; Tue, 28 May 2019 15:21:08 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10042.outbound.protection.outlook.com [40.107.1.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F27F7F896EB for ; Tue, 28 May 2019 15:21:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F27F7F896EB Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="kV1PQwjb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n8HZyeQUmEnnZoWkR+RFUxGAioO30YMQTQ4qC0+mvSQ=; b=kV1PQwjbpALH8JZu0FGDByMfYMvmYQJTsXi9UmhQqPtddcYXRRVZwv4rsiNVVOh5KrLA8T2PC1GnSubQvdlzNMM1tsCFK1kJLWDVKFZQUQUNKJQU1MuJCiBu6m8ebrtwBs9ilN7kp3VWr+Q2VnSLJ+4mIeTeqQuZEwUjNadOA1Y= Received: from AM6PR04MB5207.eurprd04.prod.outlook.com (20.177.35.159) by AM6PR04MB4261.eurprd04.prod.outlook.com (52.135.168.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.15; Tue, 28 May 2019 13:21:02 +0000 Received: from AM6PR04MB5207.eurprd04.prod.outlook.com ([fe80::fd2a:e078:f9d7:cb6b]) by AM6PR04MB5207.eurprd04.prod.outlook.com ([fe80::fd2a:e078:f9d7:cb6b%7]) with mapi id 15.20.1922.021; Tue, 28 May 2019 13:21:02 +0000 From: Daniel Baluta To: "robh+dt@kernel.org" , "shawnguo@kernel.org" , "timur@kernel.org" , "nicoleotsuka@gmail.com" , "broonie@kernel.org" Thread-Topic: [PATCH 2/3] dt-bindings: sound: Clarify the usage of clocks in SAI Thread-Index: AQHVFVgyY86a0UnI1EGu57KmugJ41Q== Date: Tue, 28 May 2019 13:21:01 +0000 Message-ID: <20190528132034.3908-3-daniel.baluta@nxp.com> References: <20190528132034.3908-1-daniel.baluta@nxp.com> In-Reply-To: <20190528132034.3908-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR09CA0114.eurprd09.prod.outlook.com (2603:10a6:803:78::37) To AM6PR04MB5207.eurprd04.prod.outlook.com (2603:10a6:20b:e::31) 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: [89.37.124.34] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9f21236b-89c4-458d-d7a8-08d6e36f5420 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM6PR04MB4261; x-ms-traffictypediagnostic: AM6PR04MB4261: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 00514A2FE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(366004)(136003)(39860400002)(396003)(346002)(376002)(199004)(189003)(66066001)(71190400001)(305945005)(71200400001)(8676002)(81156014)(102836004)(2906002)(386003)(2501003)(6116002)(3846002)(7416002)(478600001)(53936002)(68736007)(50226002)(5660300002)(81166006)(7736002)(1076003)(14454004)(8936002)(86362001)(256004)(186003)(26005)(6512007)(486006)(446003)(11346002)(476003)(2616005)(54906003)(110136005)(44832011)(73956011)(64756008)(66946007)(66556008)(66476007)(66446008)(316002)(52116002)(25786009)(36756003)(6506007)(99286004)(6486002)(76176011)(14444005)(6436002)(4326008)(2201001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB4261; H:AM6PR04MB5207.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: DaS2mgdhkrdva4ZWagbUgG7kFcexk0zKnT9gRHpO4by81gkM9CsaDC4RWkaUwZOBiGnrYxgzxzT94W/gJEdm323PKn6h9/hLqSrhdkKh8vjPU575GGqDaxIaWCEqJlrKg/5nCQGijd22UF2T5/lC3caeS6rheb0YrPPXrYrLYHrQmbmcqgZ8uYNKVvRlOcQeFiYvkV8Wm2G0ybibugM1k7p8UXRynDzwMeN4q2gYK0VqFgDFymIncAa6trhHlOpw03Bw89c/0gXeTQ7qLA8O9fOnKyn78ZFRgcLKoNWgOpvZSt42rqw9zHflsUPWeudL1XLfaC/ILHfteU5q2UuN6fV7WZf+/S8BYTo+dBY7mOXy4h1wxASASnUs2hcwTCE3aKs+2KJyn/bgeym37UlksMxW9YGpglutJTfaS9Evie8= Content-ID: MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f21236b-89c4-458d-d7a8-08d6e36f5420 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 May 2019 13:21:02.0712 (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-CrossTenant-userprincipalname: daniel.baluta@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4261 Cc: "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , "alsa-devel@alsa-project.org" , "Xiubo.Lee@gmail.com" , Daniel Baluta , "s.hauer@pengutronix.de" , "tiwai@suse.com" , "linux-kernel@vger.kernel.org" , "lgirdwood@gmail.com" , dl-linux-imx , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-arm-kernel@lists.infradead.org" Subject: [alsa-devel] [PATCH 2/3] dt-bindings: sound: Clarify the usage of clocks in SAI X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP SAI might have up to 4 clock sources selected by an internal CLK mux. On imx6/7 mclk0/mclk1 are the same, while on imx8 mclk0 and mclk1 are coming from different sources. Signed-off-by: Daniel Baluta Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/sound/fsl-sai.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt index 2e726b983845..db0497d1920a 100644 --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt @@ -15,8 +15,9 @@ Required properties: - clocks : Must contain an entry for each entry in clock-names. - clock-names : Must include the "bus" for register access and - "mclk1", "mclk2", "mclk3" for bit clock and frame - clock providing. + "mclk0", "mclk1", "mclk2", "mclk3" the four clock + sources of the SAI clock MUX selecting a clock + for bit clock and frame clock providing. - dmas : Generic dma devicetree binding as described in Documentation/devicetree/bindings/dma/dma.txt. From patchwork Tue May 28 13:21:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 10964995 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 C540492A for ; Tue, 28 May 2019 14:02:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B469D2837E for ; Tue, 28 May 2019 14:02:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CD451FFBD; Tue, 28 May 2019 14:02:50 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D470F28571 for ; Tue, 28 May 2019 14:02:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 33A8E180D; Tue, 28 May 2019 15:23:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 33A8E180D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1559049870; bh=qOncJGCVOtq1wKUa3Gu+50fRXWHSY66448PFpzwLK+k=; h=From:To:Date:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pzdaXC/jULHcsLLI6lf48vqy2SzJG9VVSwTOzXBIxVMB84d6mrVNMteWu0KRoImHR GIYAu1Dqm+KDOzO+UBSnYzJN4tG+qo0hbVgHnm24y7M6AUpUGlXdxP2Js0LFpuxABk rEYafTkBAaqpQaeqdia8Tm7k8f8qD0WokPCp/a6A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 37C44F89737; Tue, 28 May 2019 15:21:31 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id D2765F89706; Tue, 28 May 2019 15:21:09 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10042.outbound.protection.outlook.com [40.107.1.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 45649F8065A for ; Tue, 28 May 2019 15:21:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 45649F8065A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="MOn6Oyea" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Co7Jm2h4oL68ga5ZwIr9sUECtpmKpFb+qaK5QULStRw=; b=MOn6Oyeaw6MR1Za+LSHwzSDwpFUuOStsg5+y3kpa61LDp+OBN5aliU2HsWOe+Qo52gVu3X1NqZzgQ8QQWNqVwvtIpUX98+ZVfEh3FyK5f4Tq+SAi8Nv46XatuRVYx0XebqX2RmMJ4FjUE2oPNLrtqH6e9HfpJlA+e+Aszzj+G+U= Received: from AM6PR04MB5207.eurprd04.prod.outlook.com (20.177.35.159) by AM6PR04MB4261.eurprd04.prod.outlook.com (52.135.168.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.15; Tue, 28 May 2019 13:21:04 +0000 Received: from AM6PR04MB5207.eurprd04.prod.outlook.com ([fe80::fd2a:e078:f9d7:cb6b]) by AM6PR04MB5207.eurprd04.prod.outlook.com ([fe80::fd2a:e078:f9d7:cb6b%7]) with mapi id 15.20.1922.021; Tue, 28 May 2019 13:21:04 +0000 From: Daniel Baluta To: "robh+dt@kernel.org" , "shawnguo@kernel.org" , "timur@kernel.org" , "nicoleotsuka@gmail.com" , "broonie@kernel.org" Thread-Topic: [PATCH 3/3] ASoC: fsl_sai: Read SAI clock source 0 from DT Thread-Index: AQHVFVgzSnk/md+rr0q1nXIifh2ZzQ== Date: Tue, 28 May 2019 13:21:03 +0000 Message-ID: <20190528132034.3908-4-daniel.baluta@nxp.com> References: <20190528132034.3908-1-daniel.baluta@nxp.com> In-Reply-To: <20190528132034.3908-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR09CA0114.eurprd09.prod.outlook.com (2603:10a6:803:78::37) To AM6PR04MB5207.eurprd04.prod.outlook.com (2603:10a6:20b:e::31) 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: [89.37.124.34] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 72fb9d2d-dcb8-4d18-2b25-08d6e36f5559 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM6PR04MB4261; x-ms-traffictypediagnostic: AM6PR04MB4261: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:655; x-forefront-prvs: 00514A2FE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(39860400002)(396003)(346002)(376002)(199004)(189003)(66066001)(71190400001)(305945005)(71200400001)(8676002)(81156014)(102836004)(2906002)(386003)(2501003)(6116002)(3846002)(7416002)(478600001)(53936002)(68736007)(50226002)(5660300002)(81166006)(7736002)(1076003)(14454004)(8936002)(86362001)(256004)(186003)(26005)(6512007)(486006)(446003)(11346002)(476003)(2616005)(54906003)(110136005)(44832011)(73956011)(64756008)(66946007)(66556008)(66476007)(66446008)(316002)(52116002)(25786009)(36756003)(6506007)(99286004)(6486002)(76176011)(6436002)(4326008)(2201001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB4261; H:AM6PR04MB5207.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: tBKbRRAi9fhHlxY6ppIw+FwtYMaf1kkjCOZ1ql6LG5QDN98H1jixhGXkhn6rrvyeruroxjK9QW6gLdZiPJ7yusgbM1csqNvmzNXw7IRfKmtuq7eXv5n0yTO7Gv7Q4dEEtJ+G0zBlNnqU2Zaca51Kg5AqBURzNaqnDVK8wnaaKn//ZrZaOCuwmCf0TIGlZYSDkUL4opM3qimk0orLkHvi4fheXtn1+/a9vthgTuKUwVe8GKUDdox9hTr4oLSeAEAffBUrz4g4WEgVEmNSGi6j0eJ26776ai0dAk2jcrLHmii2RWLPxzPo22CEl8SyGnHw6Lm7A4jUz0uqtYNm4bo8c1ao1ulPmPKM8AimVyyZEEbGAu+MW9Bbmy3Bu7g09D7ohPJzf7S41EverZB+EiE1dL7GwmL87Nd8Std/F/RCn6E= Content-ID: MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72fb9d2d-dcb8-4d18-2b25-08d6e36f5559 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 May 2019 13:21:03.5234 (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-CrossTenant-userprincipalname: daniel.baluta@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4261 Cc: "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , "alsa-devel@alsa-project.org" , "Xiubo.Lee@gmail.com" , Daniel Baluta , "s.hauer@pengutronix.de" , "tiwai@suse.com" , "linux-kernel@vger.kernel.org" , "lgirdwood@gmail.com" , dl-linux-imx , "kernel@pengutronix.de" , "festevam@gmail.com" , "S.j. Wang" , "linux-arm-kernel@lists.infradead.org" Subject: [alsa-devel] [PATCH 3/3] ASoC: fsl_sai: Read SAI clock source 0 from DT X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP SAI provide multiple master clock source options selectable via bit MSEL of TCR2/RCR2. All possible master clock sources are stored in sai->mclk_clk array. Current implementation assumes that MCLK0 source is always busclk, but this is wrong! For example, on i.MX8QM we have: 00b - Bus Clock selected. 01b - Master Clock (MCLK) 1 option selected. 10b - Master Clock (MCLK) 2 option selected. 11b - Master Clock (MCLK) 3 option selected. while on i.MX6SX we have: 00b - Master Clock (MCLK) 1 option selected. 01b - Master Clock (MCLK) 1 option selected. 10b - Master Clock (MCLK) 2 option selected. 11b - Master Clock (MCLK) 3 option selected. So, this patch will read mclk0 source clock from device tree. Signed-off-by: Shengjiu Wang Signed-off-by: Daniel Baluta --- sound/soc/fsl/fsl_sai.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index db9e0872f73d..b563004fb89f 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -826,8 +826,7 @@ static int fsl_sai_probe(struct platform_device *pdev) sai->bus_clk = NULL; } - sai->mclk_clk[0] = sai->bus_clk; - for (i = 1; i < FSL_SAI_MCLK_MAX; i++) { + for (i = 0; i < FSL_SAI_MCLK_MAX; i++) { sprintf(tmp, "mclk%d", i); sai->mclk_clk[i] = devm_clk_get(&pdev->dev, tmp); if (IS_ERR(sai->mclk_clk[i])) {