From patchwork Tue Nov 12 01:36:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13871625 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3426433BE; Tue, 12 Nov 2024 01:37:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.214.62.61 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731375454; cv=none; b=SCLSB5Zz8KobUn75CgJyrmmfOomVo4IeI9tXLjnFH0ZmR/g+ePgnZb+z1n35gwuIA/+1QE5crxY831pg9azAMbEExDNfKhAhStKXTaK4p8sEoLjO3lGFEnZTwm5dYLxQX7u+I4Q+f6EfX84Rxw0gO79TI+y6JszQ6fcBKFYptM8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731375454; c=relaxed/simple; bh=HIgYYaeXQVvfdrNEpArLvKEnMdajcrPZ1Fs/KNvbxs8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gHuZvNbuaiZo6+ljenLw3YBHzG0mPiyuniY8hC4OL1RTgtzIx/cWWOVlv0eT6SpkMI4yMziTR8fs+9FWMjMXHmFaXhsnSYbBYBLRYkcVpyZW3AQz6mT5+7iAJSmcxYp1IzP6I77RUyjtK5igvjh/YnvrNuf+34Kz4SuksuKIc1g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=denx.de; spf=pass smtp.mailfrom=denx.de; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.b=APeOs4BR; arc=none smtp.client-ip=85.214.62.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=denx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.b="APeOs4BR" Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 533D1888BE; Tue, 12 Nov 2024 02:37:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1731375450; bh=1V9WH+DyLUcU+r3wjFZYx81aDw/BBbmglNYljS7XZXY=; h=From:To:Cc:Subject:Date:From; b=APeOs4BRK+oTajJ/ndjoXPaCY0LZG5Ser4UuL6BDZlIaFuQpZSabT36qkZuc1+a+/ ne03tioLGJJKXWz9tVrj2+HDL5Plp7oDnE0izrIn2MkQjZDAplqiOAasqMWLvQSdZx eK8DNqWz9aspEfBquo+Z5PtbHX02oCfQO3MX5A0XQgKy9UKegkhZzV03OKjnMD9fJ2 6hMbwSJMtbrk3fBXtdYKGlDRLHXdHnyRq5A28Wiuf15280kXudeLY6xDCIwp5FqbFt 2O7bkEAWTOYC4odUfcUQEvhjcTcWfEIQUltCqhmqpknuVY/Fz1JI/BqGTCFQCsv77a k/EwPbEgXfSPQ== From: Marek Vasut To: linux-clk@vger.kernel.org Cc: Marek Vasut , Abel Vesa , Fabio Estevam , Michael Turquette , Peng Fan , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Stephen Boyd , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org Subject: [PATCH] clk: imx8mp: Fix clkout1/2 support Date: Tue, 12 Nov 2024 02:36:54 +0100 Message-ID: <20241112013718.333771-1-marex@denx.de> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The CLKOUTn may be fed from PLL1/2/3, but the PLL1/2/3 has to be enabled first by setting PLL_CLKE bit 11 in CCM_ANALOG_SYS_PLLn_GEN_CTRL register. The CCM_ANALOG_SYS_PLLn_GEN_CTRL bit 11 is modeled by plln_out clock. Fix the clock tree and place the clkout1/2 under plln_sel instead of plain plln to let the clock subsystem correctly control the bit 11 and enable the PLL in case the CLKOUTn is supplied by PLL1/2/3. Fixes: 43896f56b59e ("clk: imx8mp: add clkout1/2 support") Signed-off-by: Marek Vasut Reviewed-by: Peng Fan --- Cc: Abel Vesa Cc: Fabio Estevam Cc: Michael Turquette Cc: Peng Fan Cc: Pengutronix Kernel Team Cc: Sascha Hauer Cc: Shawn Guo Cc: Stephen Boyd Cc: imx@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org Cc: linux-clk@vger.kernel.org Cc: stable@vger.kernel.org # v5.18+ --- drivers/clk/imx/clk-imx8mp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c index 516dbd170c8a3..fb18f507f1213 100644 --- a/drivers/clk/imx/clk-imx8mp.c +++ b/drivers/clk/imx/clk-imx8mp.c @@ -399,8 +399,9 @@ static const char * const imx8mp_dram_core_sels[] = {"dram_pll_out", "dram_alt_r static const char * const imx8mp_clkout_sels[] = {"audio_pll1_out", "audio_pll2_out", "video_pll1_out", "dummy", "dummy", "gpu_pll_out", "vpu_pll_out", - "arm_pll_out", "sys_pll1", "sys_pll2", "sys_pll3", - "dummy", "dummy", "osc_24m", "dummy", "osc_32k"}; + "arm_pll_out", "sys_pll1_out", "sys_pll2_out", + "sys_pll3_out", "dummy", "dummy", "osc_24m", + "dummy", "osc_32k"}; static struct clk_hw **hws; static struct clk_hw_onecell_data *clk_hw_data;