From patchwork Thu May 7 05:56:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11532515 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A23F8159A for ; Thu, 7 May 2020 06:06:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 506852075E for ; Thu, 7 May 2020 06:06:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="s4aJrke/"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Df2I4nua" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 506852075E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:References:In-Reply-To: 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=7JCoqoPE5Hb/u9xCc8Z9o5uVQgRsfRFJq1Le8BtVDVA=; b=s4aJrke/WFqSYI XQCVFRj6EPMJyNn35JK7vXv/c6KAyKLoLQhtbqpeBz3D/z33TaeG0Z11XiIKCybzCrNLea5vPhVim qfrMFdAjladEVsd+PJU3pRgYNTTI9WpyrcC/AO7nDdb/r6IS+ZeYfttaxOCU3NfY60jSlGSuJHXnZ lrTRSRNrZJ2yEKB+xf4pAYpJ7JTZFZM9d6lHL78mFLVQuvkXFA8I/AoELpL1Wf+BWuxcw/wbJ44NF A6gPr66v++YDFIzKsIpt54oogE61Q71UTzLJEGCJy0J4KD/pwg8x1Jd5jXFgcH90G9gCqVEmoC5za /Q30YZHUCIGvIUb8kttw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWZg9-0005Pw-DX; Thu, 07 May 2020 06:06:41 +0000 Received: from mail-eopbgr140082.outbound.protection.outlook.com ([40.107.14.82] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWZfL-0004bn-AD for linux-arm-kernel@lists.infradead.org; Thu, 07 May 2020 06:05:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AGWHBOGHHbfelvWlUOrlnnbskMkmf+FSd89AoXXK3zG5mGV5NfNwWKvzWD8vGdFfvVATgcw7A3iXpLamCNx8qQI7U6mudzXRXbHgxG6w1UIDTesNnrs2mX34ltghdjB5dX9rYEahiEPEckPOqExjGfeljuQi2gFn1Z5ZPhlaMOZaSEHBOWXWJ5P8cSmthzu7FWevvfnX+6JRWNDLwEZx7adrQsZujwP4KwvWIt3CqKyvpa8ub0RajRD606Tv5iHuwbi/HQBP5tQnjttrgu0Ul5U9/YxS330Qn34f+5QlaldVI4xsFOEERFOxVmqjL0ahv35XC2U8GN/jdD+U+gHqOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B/OZCDdrVPC3hceCIYS6Usz6hzbGmjO1xHhmfCuqNs8=; b=Qu+C9Hscq09N83F7rvsDjdws6LRAsgc7dIl8tCpkMv1uY/qfuMm1z4shHCjPpX+qFl2h2a+QvRQJKHcemV9nnJMV2ubjhKgaKy+ln+wH6deMHMzHqXCaWUAHBYBwnIRd31fFzEdH7wcSZmRvGRAFISLskI/MSp8WwsoKBwWUfetGAz2FASyN2fJ5D+4vTcwvUyQ2DPXxN0Q8RZa2rsWgAvc2RL8ILqdWsDcAiQCwfWP5b8ew29CQREMgwg+nHivITriAHIztb6X16dYLK2pJLQGic+KoPyH5RvEWday0/9YJzCtOQXGbgvDaVlr82y92s54XXeAt3mig89/dGr+aTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none 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=B/OZCDdrVPC3hceCIYS6Usz6hzbGmjO1xHhmfCuqNs8=; b=Df2I4nuaS4uPsmTaIW5JIISMyjDP1s15SzPKocDYma33YgK4gWvBG4KjO4qRWzrz3HlEBcXHf9GGHPRn0EClAAuF5cHNQXvi2d77MqrZgpx6xr13Bzs9GAd95zNr+DRZizFtA6PmTFVra7U/Zg8ddQjuvXXaoWKpx9+rN0iumoA= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR0402MB2710.eurprd04.prod.outlook.com (2603:10a6:4:95::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Thu, 7 May 2020 06:05:48 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871%6]) with mapi id 15.20.2979.028; Thu, 7 May 2020 06:05:48 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, leonard.crestez@nxp.com, abel.vesa@nxp.com, aisheng.dong@nxp.com Subject: [PATCH V3 03/10] clk: imx: imx8mp: fix pll mux bit Date: Thu, 7 May 2020 13:56:12 +0800 Message-Id: <1588830979-11586-4-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588830979-11586-1-git-send-email-peng.fan@nxp.com> References: <1588830979-11586-1-git-send-email-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR01CA0147.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::27) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR01CA0147.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.28 via Frontend Transport; Thu, 7 May 2020 06:05:44 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c5e02c2d-8bd9-46c2-ebc7-08d7f24cb01a X-MS-TrafficTypeDiagnostic: DB6PR0402MB2710:|DB6PR0402MB2710: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-Forefront-PRVS: 03965EFC76 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BhGEbSIowOJ6b1D7+9BnhNqyXlrIocEl0TJmDXILzouWH1j+WQIy0EvyCecbfd1LQFUF0ide3edKbnu/F8QKlksJmfncVBfjLBQIYd3s69l4sh+vt9hGCQaDzESgBT5NDoCpkOws3nKjMEi8xhSJ4OiJ7XcNwGEJGP1Lh99970fH8Nd/GgZZ8dDROEQZffYW42bAixdky8eztDkJj29L0C7eZWvJhoqLlRwaVZJf6UcjfDs3Es1qt5cgfQpAsiGXyukrC/mXmCJRQrwongP81JZ+4HBnwz7hzYx2nsehA1oBCD2EbyvhoKSxUG7SPQClhxEgq3TR9qHTuy4+VdNGz2Iv3txyPe+st8f65g+6nbNEx62fwdGbOuOAR5hX09zNsu5vrjf/FW7m61B9ZkaFkmic8MsBPk5xRPty/mlvRAz5JhLh53gDftTtg+Fv1/ettlktX9UXQjaLMtvOOOd5bsq0gRhX0/qh7n8xahKeSDlpipKYImlJlLHQg0xiy173iBn48EbZdzLK9Zh4QbeMIe1+SrbNvlilTUJ9LQdI0O1UxhlZ0BDi6VvvotaFghAz6lCOVTFnMkLGHn/u08qQ3Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(376002)(346002)(136003)(39860400002)(396003)(33430700001)(316002)(33440700001)(478600001)(2616005)(16526019)(69590400007)(6666004)(4326008)(66476007)(66946007)(86362001)(2906002)(66556008)(956004)(6486002)(52116002)(36756003)(8676002)(26005)(6506007)(8936002)(5660300002)(186003)(6512007)(9686003)(83320400001)(83280400001)(83300400001)(83310400001)(83290400001)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: xDsM0YvxC80lYorKL33q3XCrU6wD1Zvk03EPAtpSw1v0CTSfI1LFK/OkvAtFXTghH7Bv3CBISu6S0FALclJfUzoEsLmDC0gT8RSK9m8Hcl1PY7cVKa+cmAd4VtwZCTIqEYoi2WmzYI9ZXZnPZo6pcTING4iutiNmkY9+hhkUWvC4lVzs0i3PNvc6U67mqtbzx02370BTWzBg9A659ao6CXOe2YZeyco/FQqSlRbGGtVzzKVLuWS+24J2HOw5jk06BCJd6Ux5M/voPFLyPvDkK0OP7QMRyK94o05iDkt0f1CjPAC/sNQ/2Itbb8GADcPlpE5LY1HFJJaKAtFr6iUI66MK4odl8B+uMxLkhESKNx4YaNOKY+Em3jfgICGMvAhXEV0erlVusfOsylbTPT7ymbw1MWNygD/hZi9FE1pxIIMvdXXZrNtUvFrMBn7OjKYBhmfy647naaQNnDN4rl81+XoBflH9Gr2ttyuV/qMYPnx/Npnb2EZmq1NTqo1gsrIsTngz/vbhxN/8uAptm6pya+ui/SKT8OdT0cd7dihrad7igdvawGSK803NROEeMV/NJ/Z/glDjesbUNDkMWngO3bC0SQdJcTRv6UL7pLTi9iF5PC+Zump67fqw454MaoBTLPHJ+8xQLaTieJV66VqkKhxGfNHJMagAGVKqqQcilLEfYppq3F8BAt479B/9tmzIPV1Qi1qKWs/UUq3Shf7VAlixGV/sx0AvGy5CNXOnDTD5iZ6IA3mJ0hrUAYh7q1/gBSLPqcpPQAsfmBjbrtRsQx9GX3Tmgpy7MuqwKNWrmzc= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5e02c2d-8bd9-46c2-ebc7-08d7f24cb01a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2020 06:05:48.4334 (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: 9TPhm8xpias3vEiyO4C4S+/A4GBh9PM6wvh8pFVcEg/DaW+/28eRpPW9u7zfQLJAtpHylBIrER1Nb0f61eevhw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2710 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200506_230551_425334_A728A3A1 X-CRM114-Status: GOOD ( 10.17 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.14.82 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.14.82 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , Anson.Huang@nxp.com, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-clk@vger.kernel.org, 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 From: Peng Fan Same to i.MX8MN/i.MX8MM, pll BYPASS bit should be kept inside pll driver for glitchless freq setting following spec. If exposing the bit, that means pll driver and clk driver has two paths to touch this bit, which is wrong. So use EXT_BYPASS bit here. Reviewed-by: Dong Aisheng Reviewed-by: Leonard Crestez Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mp.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c index e05ec56df285..e9ed8a188031 100644 --- a/drivers/clk/imx/clk-imx8mp.c +++ b/drivers/clk/imx/clk-imx8mp.c @@ -486,16 +486,16 @@ static int imx8mp_clocks_probe(struct platform_device *pdev) hws[IMX8MP_SYS_PLL2] = imx_clk_hw_pll14xx("sys_pll2", "sys_pll2_ref_sel", anatop_base + 0x104, &imx_1416x_pll); hws[IMX8MP_SYS_PLL3] = imx_clk_hw_pll14xx("sys_pll3", "sys_pll3_ref_sel", anatop_base + 0x114, &imx_1416x_pll); - hws[IMX8MP_AUDIO_PLL1_BYPASS] = imx_clk_hw_mux_flags("audio_pll1_bypass", anatop_base, 4, 1, audio_pll1_bypass_sels, ARRAY_SIZE(audio_pll1_bypass_sels), CLK_SET_RATE_PARENT); - hws[IMX8MP_AUDIO_PLL2_BYPASS] = imx_clk_hw_mux_flags("audio_pll2_bypass", anatop_base + 0x14, 4, 1, audio_pll2_bypass_sels, ARRAY_SIZE(audio_pll2_bypass_sels), CLK_SET_RATE_PARENT); - hws[IMX8MP_VIDEO_PLL1_BYPASS] = imx_clk_hw_mux_flags("video_pll1_bypass", anatop_base + 0x28, 4, 1, video_pll1_bypass_sels, ARRAY_SIZE(video_pll1_bypass_sels), CLK_SET_RATE_PARENT); - hws[IMX8MP_DRAM_PLL_BYPASS] = imx_clk_hw_mux_flags("dram_pll_bypass", anatop_base + 0x50, 4, 1, dram_pll_bypass_sels, ARRAY_SIZE(dram_pll_bypass_sels), CLK_SET_RATE_PARENT); - hws[IMX8MP_GPU_PLL_BYPASS] = imx_clk_hw_mux_flags("gpu_pll_bypass", anatop_base + 0x64, 4, 1, gpu_pll_bypass_sels, ARRAY_SIZE(gpu_pll_bypass_sels), CLK_SET_RATE_PARENT); - hws[IMX8MP_VPU_PLL_BYPASS] = imx_clk_hw_mux_flags("vpu_pll_bypass", anatop_base + 0x74, 4, 1, vpu_pll_bypass_sels, ARRAY_SIZE(vpu_pll_bypass_sels), CLK_SET_RATE_PARENT); - hws[IMX8MP_ARM_PLL_BYPASS] = imx_clk_hw_mux_flags("arm_pll_bypass", anatop_base + 0x84, 4, 1, arm_pll_bypass_sels, ARRAY_SIZE(arm_pll_bypass_sels), CLK_SET_RATE_PARENT); - hws[IMX8MP_SYS_PLL1_BYPASS] = imx_clk_hw_mux_flags("sys_pll1_bypass", anatop_base + 0x94, 4, 1, sys_pll1_bypass_sels, ARRAY_SIZE(sys_pll1_bypass_sels), CLK_SET_RATE_PARENT); - hws[IMX8MP_SYS_PLL2_BYPASS] = imx_clk_hw_mux_flags("sys_pll2_bypass", anatop_base + 0x104, 4, 1, sys_pll2_bypass_sels, ARRAY_SIZE(sys_pll2_bypass_sels), CLK_SET_RATE_PARENT); - hws[IMX8MP_SYS_PLL3_BYPASS] = imx_clk_hw_mux_flags("sys_pll3_bypass", anatop_base + 0x114, 4, 1, sys_pll3_bypass_sels, ARRAY_SIZE(sys_pll3_bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_AUDIO_PLL1_BYPASS] = imx_clk_hw_mux_flags("audio_pll1_bypass", anatop_base, 16, 1, audio_pll1_bypass_sels, ARRAY_SIZE(audio_pll1_bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_AUDIO_PLL2_BYPASS] = imx_clk_hw_mux_flags("audio_pll2_bypass", anatop_base + 0x14, 16, 1, audio_pll2_bypass_sels, ARRAY_SIZE(audio_pll2_bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_VIDEO_PLL1_BYPASS] = imx_clk_hw_mux_flags("video_pll1_bypass", anatop_base + 0x28, 16, 1, video_pll1_bypass_sels, ARRAY_SIZE(video_pll1_bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_DRAM_PLL_BYPASS] = imx_clk_hw_mux_flags("dram_pll_bypass", anatop_base + 0x50, 16, 1, dram_pll_bypass_sels, ARRAY_SIZE(dram_pll_bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_GPU_PLL_BYPASS] = imx_clk_hw_mux_flags("gpu_pll_bypass", anatop_base + 0x64, 28, 1, gpu_pll_bypass_sels, ARRAY_SIZE(gpu_pll_bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_VPU_PLL_BYPASS] = imx_clk_hw_mux_flags("vpu_pll_bypass", anatop_base + 0x74, 28, 1, vpu_pll_bypass_sels, ARRAY_SIZE(vpu_pll_bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_ARM_PLL_BYPASS] = imx_clk_hw_mux_flags("arm_pll_bypass", anatop_base + 0x84, 28, 1, arm_pll_bypass_sels, ARRAY_SIZE(arm_pll_bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_SYS_PLL1_BYPASS] = imx_clk_hw_mux_flags("sys_pll1_bypass", anatop_base + 0x94, 28, 1, sys_pll1_bypass_sels, ARRAY_SIZE(sys_pll1_bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_SYS_PLL2_BYPASS] = imx_clk_hw_mux_flags("sys_pll2_bypass", anatop_base + 0x104, 28, 1, sys_pll2_bypass_sels, ARRAY_SIZE(sys_pll2_bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_SYS_PLL3_BYPASS] = imx_clk_hw_mux_flags("sys_pll3_bypass", anatop_base + 0x114, 28, 1, sys_pll3_bypass_sels, ARRAY_SIZE(sys_pll3_bypass_sels), CLK_SET_RATE_PARENT); hws[IMX8MP_AUDIO_PLL1_OUT] = imx_clk_hw_gate("audio_pll1_out", "audio_pll1_bypass", anatop_base, 13); hws[IMX8MP_AUDIO_PLL2_OUT] = imx_clk_hw_gate("audio_pll2_out", "audio_pll2_bypass", anatop_base + 0x14, 13);