From patchwork Sun Sep 17 22:40:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Bara X-Patchwork-Id: 13388745 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A65BCD3427 for ; Sun, 17 Sep 2023 22:41:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234562AbjIQWlE (ORCPT ); Sun, 17 Sep 2023 18:41:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237519AbjIQWks (ORCPT ); Sun, 17 Sep 2023 18:40:48 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78294130; Sun, 17 Sep 2023 15:40:43 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40472f9db24so38546595e9.2; Sun, 17 Sep 2023 15:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694990442; x=1695595242; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dQJrC2vG5It4Q7jqZ1TqS/6dJhYmmMKtvWU2Ye0A1e0=; b=bKt6lnL5RYEGk0CZ5w0ebgl6p26PmUKjHG6i2TvfaCbONA4aV7vA25yUon31DZ6hxb 9ON0RKtvLy6bERnr2JKWA613UYyHmYiuLenpZlYGlpVBPsq7U7/K2l66rkLRMghl9f33 iF+MZLFQoGmAA2/tqahNRcRTmHTykldjvMEn638+0FnrEIkAliLfp/zbP+jJ7l/pF3au 427MYWTQINTXTUmu+ZkbZWzFxQn8w2a+/u73A/F0yRPpUHBvdsPoPbXMBuwv+Mzk0mif 3ASCcIesnzSxGZIiOqkSqBTuElg8PzvId3CDdieS47gYW3t9x01H6TLWeR1tCkl7R/Df Y/YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694990442; x=1695595242; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dQJrC2vG5It4Q7jqZ1TqS/6dJhYmmMKtvWU2Ye0A1e0=; b=M2sFkCBPcNEleRye7f9GIcAaw5X2JX4uhnZERvCcR3JuAdL4ekL8ejmf5tf2Do2g1n KJZeeKdbj1xhQcZuR/cnSColoW+Wru47QVra1pTAK456cJArcAMneZfCYsVOusMEvLec xsq0VN7Z++keW98XOqer2o9wwKMAwmmmFkyXMeIswmrwnLj2veOWGPpvx/yyLvM7i2a5 e8C3UcDDN5E04TPa7jadOwerWJrzaBNSmqKFuoDMjJePJ5pLiII2YmtueTwPXg169Dg9 IKMmVDllSJG11uoemGP3q3uPHqiYs+A6ZvdVi9avXO+ilTEwa02/3mI6FLWUq/QLVwqU F8mA== X-Gm-Message-State: AOJu0Yw9Vpd0PguUb9IX7JCnr9nnaoE2IKeFDhIVDtbEF1/6HA6WJDD3 v0AKRjg381BstA5nxaBRKxA= X-Google-Smtp-Source: AGHT+IEMN4Y0RtC3E0hFzpJCX/PfrE3WOd7fkLRSAZR+Pe5gBDiWN4mI0PGB+DeHlwh5xtWtJzNbAw== X-Received: by 2002:a1c:771a:0:b0:3fe:ba7:f200 with SMTP id t26-20020a1c771a000000b003fe0ba7f200mr6071299wmi.20.1694990441886; Sun, 17 Sep 2023 15:40:41 -0700 (PDT) Received: from [127.0.1.1] ([91.230.2.244]) by smtp.gmail.com with ESMTPSA id x14-20020a1c7c0e000000b003fe2b081661sm13642931wmc.30.2023.09.17.15.40.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 15:40:41 -0700 (PDT) From: Benjamin Bara Date: Mon, 18 Sep 2023 00:40:08 +0200 Subject: [PATCH 12/13] clk: imx: imx8mp: allow LVDS clocks to set parent rate MIME-Version: 1.0 Message-Id: <20230918-imx8mp-dtsi-v1-12-1d008b3237c0@skidata.com> References: <20230918-imx8mp-dtsi-v1-0-1d008b3237c0@skidata.com> In-Reply-To: <20230918-imx8mp-dtsi-v1-0-1d008b3237c0@skidata.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Michael Turquette , Stephen Boyd , Russell King , Abel Vesa , Peng Fan Cc: Frank Oltmanns , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Benjamin Bara X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org From: Benjamin Bara As composit-8m are now ready to dynamically propagate the required clock rate and pll14xx is able to keep its children in the configured state, allow media_ldb and media_disp2_pix to set the rate of their parent (which is usually video_pll for both). Signed-off-by: Benjamin Bara --- drivers/clk/imx/clk-imx8mp.c | 4 ++-- drivers/clk/imx/clk.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c index 670aa2bab301..fbc63012dab9 100644 --- a/drivers/clk/imx/clk-imx8mp.c +++ b/drivers/clk/imx/clk-imx8mp.c @@ -547,7 +547,7 @@ static int imx8mp_clocks_probe(struct platform_device *pdev) hws[IMX8MP_CLK_AHB] = imx8m_clk_hw_composite_bus_critical("ahb_root", imx8mp_ahb_sels, ccm_base + 0x9000); hws[IMX8MP_CLK_AUDIO_AHB] = imx8m_clk_hw_composite_bus("audio_ahb", imx8mp_audio_ahb_sels, ccm_base + 0x9100); hws[IMX8MP_CLK_MIPI_DSI_ESC_RX] = imx8m_clk_hw_composite_bus("mipi_dsi_esc_rx", imx8mp_mipi_dsi_esc_rx_sels, ccm_base + 0x9200); - hws[IMX8MP_CLK_MEDIA_DISP2_PIX] = imx8m_clk_hw_composite_bus("media_disp2_pix", imx8mp_media_disp_pix_sels, ccm_base + 0x9300); + hws[IMX8MP_CLK_MEDIA_DISP2_PIX] = imx8m_clk_hw_composite_bus_flags("media_disp2_pix", imx8mp_media_disp_pix_sels, ccm_base + 0x9300, CLK_SET_RATE_PARENT); hws[IMX8MP_CLK_IPG_ROOT] = imx_clk_hw_divider2("ipg_root", "ahb_root", ccm_base + 0x9080, 0, 1); @@ -611,7 +611,7 @@ static int imx8mp_clocks_probe(struct platform_device *pdev) hws[IMX8MP_CLK_MEDIA_MIPI_PHY1_REF] = imx8m_clk_hw_composite("media_mipi_phy1_ref", imx8mp_media_mipi_phy1_ref_sels, ccm_base + 0xbd80); hws[IMX8MP_CLK_MEDIA_DISP1_PIX] = imx8m_clk_hw_composite("media_disp1_pix", imx8mp_media_disp_pix_sels, ccm_base + 0xbe00); hws[IMX8MP_CLK_MEDIA_CAM2_PIX] = imx8m_clk_hw_composite("media_cam2_pix", imx8mp_media_cam2_pix_sels, ccm_base + 0xbe80); - hws[IMX8MP_CLK_MEDIA_LDB] = imx8m_clk_hw_composite("media_ldb", imx8mp_media_ldb_sels, ccm_base + 0xbf00); + hws[IMX8MP_CLK_MEDIA_LDB] = imx8m_clk_hw_composite_flags("media_ldb", imx8mp_media_ldb_sels, ccm_base + 0xbf00, CLK_SET_RATE_PARENT); hws[IMX8MP_CLK_MEMREPAIR] = imx8m_clk_hw_composite_critical("mem_repair", imx8mp_memrepair_sels, ccm_base + 0xbf80); hws[IMX8MP_CLK_MEDIA_MIPI_TEST_BYTE] = imx8m_clk_hw_composite("media_mipi_test_byte", imx8mp_media_mipi_test_byte_sels, ccm_base + 0xc100); hws[IMX8MP_CLK_ECSPI3] = imx8m_clk_hw_composite("ecspi3", imx8mp_ecspi3_sels, ccm_base + 0xc180); diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index adb7ad649a0d..aa5202f284f3 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -442,6 +442,10 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name, _imx8m_clk_hw_composite(name, parent_names, reg, \ IMX_COMPOSITE_BUS, IMX_COMPOSITE_CLK_FLAGS_DEFAULT) +#define imx8m_clk_hw_composite_bus_flags(name, parent_names, reg, flags) \ + _imx8m_clk_hw_composite(name, parent_names, reg, \ + IMX_COMPOSITE_BUS, IMX_COMPOSITE_CLK_FLAGS_DEFAULT | flags) + #define imx8m_clk_hw_composite_bus_critical(name, parent_names, reg) \ _imx8m_clk_hw_composite(name, parent_names, reg, \ IMX_COMPOSITE_BUS, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)