Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp454285ybj; Wed, 6 May 2020 23:07:47 -0700 (PDT) X-Google-Smtp-Source: APiQypL+qgm61Wne5AolahQkGkHlgkbL7NjYFQJRcxLa2k8+colwum60mRfDcwOSJ3HspZ/m9wWc X-Received: by 2002:aa7:d894:: with SMTP id u20mr9677555edq.205.1588831667341; Wed, 06 May 2020 23:07:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1588831667; cv=pass; d=google.com; s=arc-20160816; b=KQdVDg5/XkLjoagJNUGawoCJW65Tgb3rtXLpqobVFTPm2jlwUkq7iEkEpv9uaruUQd 8p0OTgNUqLTZ0m/Ywbs5jqfvQcL2xcRGshDJQThckvxM3p3JpZxgJuxsVQlmFiP3u43q yOkTTwKZ4MztnB7Y4XewJWC93QDIWMKi8X06tDqtR/4rcClUNN8IygoXfeJvLeuadhI+ jdV6p3yXKtVBOOaUDjEhByfb+ZGmGVFfq+eWN+M2LOTYqsnw3r1MzgOb/AyXg2d8LGjL gSTpc39wkSe0bbTo9+epcA9vsOTfzRNkgDdq3Y10CT3+aPCnNyn3rq6l/Qrz56s9lsx6 xQ9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=B/OZCDdrVPC3hceCIYS6Usz6hzbGmjO1xHhmfCuqNs8=; b=Ad7w2fsZQfdEuIWEb9NmSvy3ofXGI5AYj/4X0+MnNtKfNGmjNK0KleXQ/Mir2agzZh ca5cZNVgJChnZg9/6ju9yv1zI1Q9VSptxgXCy8IM17Vlt3BfXXANYc4++SCHt2mhBr5u 1ByQLMe4EduZmNxvPKZRR0hSE8X5SBnd8iAlyEYsFBIiws4564k8MHQTohtw18QXCcGd n9b2PKfG5Wor0iU1YtOeF+J8c8YU+UJLp/HyYOIBLVT8A+gl2qwp+QADdk6gdOHRYVWK 7JrPbKNGgozvfe+GHzYAjsr/RdXzckz8infqEEyj1ENj+whUecFXfvhw6dT1iJhkQz9Z XXrA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Df2I4nua; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id rv13si2572693ejb.115.2020.05.06.23.07.24; Wed, 06 May 2020 23:07:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Df2I4nua; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726610AbgEGGF4 (ORCPT + 99 others); Thu, 7 May 2020 02:05:56 -0400 Received: from mail-eopbgr70054.outbound.protection.outlook.com ([40.107.7.54]:22990 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725763AbgEGGFy (ORCPT ); Thu, 7 May 2020 02:05:54 -0400 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 Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, Anson.Huang@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Peng Fan 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> Content-Type: text/plain 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 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. 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); -- 2.16.4