Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp350176ybf; Thu, 27 Feb 2020 22:46:15 -0800 (PST) X-Google-Smtp-Source: APXvYqxGqiA1Ppc2WfvrMouW+EqZZNLkyBpfVSJWSfUw+GZtI7ZveQvrZf/AdcOitCsLyTrWSL74 X-Received: by 2002:a9d:7c99:: with SMTP id q25mr2164713otn.105.1582872374866; Thu, 27 Feb 2020 22:46:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1582872374; cv=pass; d=google.com; s=arc-20160816; b=oMdNDjRcTR3GpvQx6gJuqZohlp9d/Q5rVxDEyJJ065GndfQKcsh9MVg7RCbIPYoS+k g6iGnY4/WU0RcKIsjB1tVaaEPvOvf26FlPujGWWhjiVV4NHZaPfXGBvQkCfIWpKDVRJb QZdVGRSdNIAgPDs/LBi2WIZfbcEAZmC0izL94lR91kK/3yDcW014FqJadSpN+7GRhrWy qMv6ud0jkvBIVlBHxkvghyBtEMtFIWQhMiBu2hs18biEJIi1wIi/jCAY+FRoIpZhgk7R TzgB3IYUtU8H6FvIY+WWTdwoAQefVWTHHb8eqdRlc/331L8p/M28gYQ4v++xp+3dUlWL 04RA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=rKk+32uxcc5YoqAq1DxLlfO40QKeNJu2PFmfjm/50kU=; b=aNBL1c5ANVDmkdKpJd8Od1ZK+tPCw5vHddN6lsjq3hpPUnkM+i2Gkn/sRzcLV9f9Yn s5uXfR8mrR1D/rvKmcOrBvtvnqqomxmQBFDDHMCTcLNzCqJ7dPzjQm+BM7sd34sGbadT tGil2Qkm+PsYo7K+ETQj8P/Q0Hq4Stwa62w2769Ba9RfdSGmx0Y3gulGxgzwfPBYGNTu COJQoaoqkLa5FScOAACWRFSrhwRrQdgvmcB6q7G3wozo7gsh239ogFEN5SVkRLt+XvG/ LOLEDf8jXRUehmpGX09GiYdRbP3M4FKazvZ1QtivKwtpRYx11xnMhY7K5nhV4Ui3B00F cNsw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=mq+al6rT; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d26si983762otc.6.2020.02.27.22.46.00; Thu, 27 Feb 2020 22:46:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=mq+al6rT; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726751AbgB1Gpv (ORCPT + 99 others); Fri, 28 Feb 2020 01:45:51 -0500 Received: from mail-eopbgr30042.outbound.protection.outlook.com ([40.107.3.42]:35478 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725911AbgB1Gpv (ORCPT ); Fri, 28 Feb 2020 01:45:51 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cUE2uJ2mhLfNr49q9f0/IFZxeR5vXOJdzezRAvQBOltjOecOlv1GClnbz+Ka0RGgbPEwIiakZ7986ELoUf0q+pGbVnu6QdjESO4njFXg7Q9AWpUcjnugN2SXYY49BHz70rwEovHlscki4BHFrHW6IHS4vLWSPtZWsHiuWzKu5RloRVzZF0eClgd6zJS4uMXXbQw8YFJDEMV/4GuAtlU2hkbr1RfyMCOoQ0jsY7hoDIhIZ6N1kyyAVdOdP8C1PTLzST1Ja0QQ7lhhpy3/m66pnsNyhpx7wwWzawX6FyKWgza+iW67DtHJ2iusSA4VO0WcpuBzkKPnuiNNjEM7hYUryQ== 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=rKk+32uxcc5YoqAq1DxLlfO40QKeNJu2PFmfjm/50kU=; b=SNmiXRc2EyuPJHHTpJCm1IpdFnvliVgIOmdSkbrEp/9ve8T5JjzCDq4RDHT8jefdDpJAmLQeH4wmkt3YefTO+EPPpjEeEjQkmLO8qq5ZEpElKMi/oh8fd+3o1UqD2Ywx7z5GDaE1eRE8epGryX8r0siTeI1fX3KcFtdiF8b4hZOu+F9Qa2qYPjc/yfsPqbdiu8FZOZfkuxX92b42+IoqcI+4MHDWxzo5dGDSCjeswQmM+L4Iqd0KslYG0X4kQOoT0YrnYwVOFAP9WPaoePJDdASkoCj0ZbWCzSFlLpnEKsENvu0wYRAh8YnyYBQ7Pdk9dMt8Kw5zhu6lXki2YVJWTg== 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=rKk+32uxcc5YoqAq1DxLlfO40QKeNJu2PFmfjm/50kU=; b=mq+al6rT0lBHqwTCDajXphY79SekhzW8Gtmm71jhh5xH2LZmKQzRGISs+ejUM5lkVGxr3pumHhsr2HGqot7Iyi8eolhYF5Ak2qLU5p8Vr3dkcko9MnYoiaWVLSTqhf0tQTgFG09T2VuW47SoXZbbApLV5Pu1Vv9l/n9/Go/oB3Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB6354.eurprd04.prod.outlook.com (20.179.255.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14; Fri, 28 Feb 2020 06:45:47 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::91e2:17:b3f4:d422]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::91e2:17:b3f4:d422%3]) with mapi id 15.20.2772.012; Fri, 28 Feb 2020 06:45:47 +0000 From: peng.fan@nxp.com To: sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, abel.vesa@nxp.com, leonard.crestez@nxp.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, aisheng.dong@nxp.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, anson.huang@nxp.com, ping.bai@nxp.com, l.stach@pengutronix.de, Peng Fan Subject: [PATCH V2 1/3] clk: imx: imx8mp: fix pll mux bit Date: Fri, 28 Feb 2020 14:39:40 +0800 Message-Id: <1582871982-29662-1-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0028.apcprd02.prod.outlook.com (2603:1096:3:18::16) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR02CA0028.apcprd02.prod.outlook.com (2603:1096:3:18::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2772.15 via Frontend Transport; Fri, 28 Feb 2020 06:45:42 +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: f96d6492-6987-4900-f8be-08d7bc19d71e X-MS-TrafficTypeDiagnostic: AM0PR04MB6354:|AM0PR04MB6354: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-Forefront-PRVS: 0327618309 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(396003)(39860400002)(136003)(376002)(346002)(366004)(199004)(189003)(2906002)(81166006)(5660300002)(956004)(66946007)(16526019)(186003)(478600001)(4326008)(66476007)(66556008)(26005)(2616005)(69590400007)(316002)(8676002)(36756003)(8936002)(6506007)(81156014)(86362001)(6486002)(6512007)(9686003)(52116002)(32563001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB6354;H:AM0PR04MB4481.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: BCL:0; X-Microsoft-Antispam-Message-Info: XXOdhnjThP/lERKhqPVaSaiUROfaxuVx5fcJ8ihWq3md4MD+HwwnsjZ3YI+WKVd+B5wJ0xTsx9owYiglGsPvj1aWOofgqfLaACk+fqVZ2tPSlZtiTkNVyvp7Zjf6gNUDnbpcLG9iskMyCqD82mi6aXJ85N2LfW9zUjl5fNTYGdlZCyQ0WY8WN4pYBpymadpetLtxarGY8R9C3bctB9l8lSdBhFNSeAiNkFoP4ZvupehugLl8UH5E+t/Gri1KzE3KeDIoUvCsNyGqlht8TAOKoVlOjQnnbq2qy66ycYkxuVhx0j/y+7v8Fe1afuZ8f0JYTANb1AWjZwLwHS+3CmXPrASckcOb2/cPGXDLsOEHpMs9qQ1XZrF5XXkaA7Due9L55jSCwdoLFOE/Sfn+U+m/2hEZcmcCA4rJ6+lhovF0Xa1D5xVhU1kY8r/cNgLW/4BZB849wGl3UmalZU6v6BZU55fIIhH9tcXvwdg10tPbWJWxdz58QqFoMy0IDU5hhArC57UpuSxB1sY43gmWO97/Vw== X-MS-Exchange-AntiSpam-MessageData: CV9TC3sI7gQzmKyykXyw8ZAsgdBg2sO/wUaU44NEno7Prm9sGwTuAEjMCnQNSaluL+4SLmbQBQesdbiarA8Tk6LKwIYNvVGsOvY8F5a0WrsfkKT34KjtwMpwOIxmf7ePCLa+JNN50m27dypZ4DXZOA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f96d6492-6987-4900-f8be-08d7bc19d71e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2020 06:45:47.2626 (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: kiphgUg/q3Wv4M65ntejkqlLrGpGJD33hjG1Vxhs6oMqU1jRH9S6wlTLW4C/73MgazfA4tbL5ooKvSz+wVyOyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6354 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. Signed-off-by: Peng Fan --- V2: None 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 7d558d6334eb..a85039cfdbf1 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); -- 2.16.4