From patchwork Sat Apr 20 09:12:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 10910097 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 C73C31390 for ; Sat, 20 Apr 2019 09:13:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE8FD28D32 for ; Sat, 20 Apr 2019 09:13:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FCAF28D78; Sat, 20 Apr 2019 09:13:07 +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 970AB28D32 for ; Sat, 20 Apr 2019 09:13:06 +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: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:In-Reply-To:References: List-Owner; bh=d25VB/UeFIGA6Ss4DPdqZV3qsiJoFM2SgzkOktKdMN4=; b=aNjKms39qiz7aq rp4LgpbYOfZFghB3GEvdY8dCLz1wLCK92Sl2kgjFIc4X9KscLMnXER6s+Yq9smv37zGxBe2pV/7R+ 5KVsmcgYezdFDA/+EMqhferV3cocV8kMlLAVmHt49XwVULQG7Z34ZkimE2vLR0hZGfCwML+XvGGca +Ingo340x6WzH0/aQBr85iciq5cUtWVXM2vpuF+IzOUVKpOmHwUnCesNz/NWOTEWPqGANZGBstPnA nWYYnOD+rRGKPYoN1MYVlIcziCcdWzTNu7JtzvO9m9x++r5goBWWI1dKCxMawVPMfIng4Dhz7rmnf 3Q6wBbGVt1p/A5OGOwhQ==; 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 1hHm3S-0000wI-6F; Sat, 20 Apr 2019 09:13:02 +0000 Received: from mail-eopbgr70043.outbound.protection.outlook.com ([40.107.7.43] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHm3O-0000vu-Oj for linux-arm-kernel@lists.infradead.org; Sat, 20 Apr 2019 09:13:00 +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=oPgVZdLPF06Qa9k9xuk14H/NCyok7cRiuYVxIU5wZPc=; b=YY0ZZheEDTK/MTO5DmqzO+LrwjsOsgYQKw8VJATaG3ir+AZtA9qZClxMxS6iu2IGWjxslcwsNG+djmTv18ISnPPWsKv5vbOHp9SZJDA/BYT5xiYe51MsgZRoijFGtA7H+XwA6TCYXVc7ck/mJ21lYBkZVvKTRqeAtCxgSJXyd5g= Received: from VI1PR0402MB3357.eurprd04.prod.outlook.com (52.134.1.18) by VI1PR0402MB3872.eurprd04.prod.outlook.com (52.134.16.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Sat, 20 Apr 2019 09:12:52 +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; Sat, 20 Apr 2019 09:12:52 +0000 From: Daniel Baluta To: "shawnguo@kernel.org" Subject: [PATCH] ARM: dts: imx: Add mclk0 clock for SAI Thread-Topic: [PATCH] ARM: dts: imx: Add mclk0 clock for SAI Thread-Index: AQHU91k7cr861jj9f0mUUu5r+kT9Cw== Date: Sat, 20 Apr 2019 09:12:52 +0000 Message-ID: <20190420091239.3793-1-daniel.baluta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR07CA0275.eurprd07.prod.outlook.com (2603:10a6:803:b4::42) 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: 14fcbe1e-7b38-455d-b2a0-08d6c5705dec 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:VI1PR0402MB3872; x-ms-traffictypediagnostic: VI1PR0402MB3872: x-microsoft-antispam-prvs: x-forefront-prvs: 0013079544 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(346002)(136003)(396003)(366004)(189003)(199004)(14454004)(102836004)(386003)(53936002)(3846002)(186003)(81166006)(305945005)(6506007)(6512007)(26005)(5640700003)(2616005)(2351001)(476003)(54906003)(478600001)(486006)(316002)(52116002)(99286004)(50226002)(8936002)(1730700003)(8676002)(6916009)(6486002)(6436002)(7736002)(6116002)(2906002)(5660300002)(66066001)(68736007)(86362001)(1076003)(2501003)(66556008)(81156014)(14444005)(256004)(97736004)(44832011)(36756003)(73956011)(66446008)(71200400001)(71190400001)(64756008)(4326008)(66476007)(66946007)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB3872; 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: UEhXnS0NTu0FXZpUMPl1Es2b8b9pxqvwONy0aHrGbIiTXKP7rSM5ya3IpYr/4T3QvHSoznAhig//P1GSey/aisSfCw70r8U1/ftelCyq6p3c05i+9bj+EpQygbpZDKd7Y564l9aqdXE7eMjI7Db329gDcgukN/eY1yyUcgcW1mJ5r7K2Z1zwgoE+PqFscAwYAq3nuADTKs6Kx21KopzI2RGuYAreZo/eAMz5bKARwqN3HTcWwVpHA9AGsDhBOsiShrONIlMZp4GiKADRMeQzQNn9zOy8NBaPqrWl5eBGCAuE9z+GG95+DUDJRTj7AZiksEvo0X9Bq2+6kfkCQtBhS3MgjbZVJE8At5Fq71bbnWEj/OK6BoURSNIaSA9pL6u4pAcuzQ/M14RNW/J7UJRGOgexMjQfgEkjAdypT0CkYWQ= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14fcbe1e-7b38-455d-b2a0-08d6c5705dec X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2019 09:12:52.5448 (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: VI1PR0402MB3872 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190420_021258_935901_14A16094 X-CRM114-Status: GOOD ( 13.31 ) 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 From: Shengjiu Wang SAI has 4 clock sources, which can be selected using MSEL bit of SAI TCR2 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 0b01109ac0a9..693b88e37799 100644 --- a/arch/arm/boot/dts/imx7s.dtsi +++ b/arch/arm/boot/dts/imx7s.dtsi @@ -884,10 +884,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"; @@ -899,10 +900,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"; @@ -914,10 +916,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";