Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp263942rwl; Thu, 23 Mar 2023 16:02:06 -0700 (PDT) X-Google-Smtp-Source: AKy350aT+xA+rx3TjkAyFtAqQQ4sEkpo0sP4k4XOC0Zpk6m+5K9w8Rhscd1QmjYtVejp1BnTc/sr X-Received: by 2002:a17:906:49ca:b0:878:545b:e540 with SMTP id w10-20020a17090649ca00b00878545be540mr662588ejv.51.1679612525916; Thu, 23 Mar 2023 16:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679612525; cv=none; d=google.com; s=arc-20160816; b=qE+8pchetpeZ6IWdTCXZ9D3ntbqJbnEdhzp6mLpWoAP/R5tjh/gqwlzAVC2jFtsviQ 3kBSZiD0Z2BnZ9IIjMquVQwkQ7TZlTM5pWBWjO28jUxd2e/LpeDFz1L//WlKSf7E01Dp XznaMMSo8vo1x5R4YakxtJy28xV23Xsacmxg9aRXlhBu/Gs57DaAZ+RNKWGFbANgN1yy t968BWEzP/L0iy1Ttj4zlF5fAzeY9V9dmqvmsFYGMJMgsmwgRRJuPpamgWqtNMQk4zRt vZw9QIyDqOfm4TbG2aqmX8l2oGeJQaVHyJAYv4omhedc7d9THMI6ZstsXp2lC9Yyh/3Y DWSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZKi3A+dV0/tXsD8Az45Lpy5Jn7qD/QNBqF2DDHsjptI=; b=tkQ92opTM2Ws5DCaaHt7JdajL4HH0vCYHXNEirAlAK9fm5Y3Xcl+cZ9PkxD81VxcJh unvkYRE8RHeBsP/QHYXJrKIdKxY38DMeZZL9Sz2pTYH6KKMPCSyRsGIXxnkNzS/LIOAX r6wQiarVPH4sBBOEBXdToPOnwgq63eZ1zWHFYEN6oj/KkR3PdJ5AhqQmMrog+9cW6Gcs ZekqRG8s9SQQtEODeePuHfn5LRxqyyxfw4tFVejaEDoE+TTCKELWWy/JehptP8Rjc+Ft aj87/t55ZeIpbGTfHJTz06fJXcL0u6DwN1NUbr63K1kuCrtVC+5knsz88kFhVMnDjw2+ 2H4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="QfPT/4WC"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g23-20020a170906c19700b009301df0b15asi19283724ejz.62.2023.03.23.16.01.37; Thu, 23 Mar 2023 16:02:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="QfPT/4WC"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231800AbjCWWwO (ORCPT + 99 others); Thu, 23 Mar 2023 18:52:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbjCWWvy (ORCPT ); Thu, 23 Mar 2023 18:51:54 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4ACE19F29; Thu, 23 Mar 2023 15:51:48 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id o14so94984ioa.3; Thu, 23 Mar 2023 15:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679611907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZKi3A+dV0/tXsD8Az45Lpy5Jn7qD/QNBqF2DDHsjptI=; b=QfPT/4WC2X7jAlRT8+IvfxWvlZP2CfXyeSDJhl2CLaGv7cLC63TYcDVvkLq3fSd/4M S0bK5xy52t+Caul4cIxBgxke5dHP5MlaSRQFzw+3a9DcxBW+Xd3fafrKWRYTzLbrmZ1K 87tQmanCExpFaNxGFfAaBcwdlQgXSAhKFY4Pmnq7ZXKGk0XpJCJEy9O4VVrWlyT9E+ND wj3iu2OGd+IvAfIGscKux4PLc9s9jUrK6q6FjSPcjalick5Mo/3dSBybpMbjZuChWlmZ vRsb6R0t0sunpVtesgjO6Ec9sKSOfrAnW2olOmdIRhju0z5+PyN9qNMmvlkhgqb8Kte2 cw0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679611907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZKi3A+dV0/tXsD8Az45Lpy5Jn7qD/QNBqF2DDHsjptI=; b=lgwHNOwaRzkByujmIibOwf5tUVaM+yw/9zKXHZbWsFIL6Z7zeePhVZ/0JjCOQRDYMa K9R5QHG+PNA/nQN/zZ6qiyG59HerXWvzTJBSBCGRq8oim0CPx6YHdXY8qtN3EOgEr2wv 1zpmRAZ7feaqHSk+5WpD0VPLUS5NcmYfH84sAgg0HAjXeF5i5XGHyn+u/KztIj3ZeeVC cxQXqMTt05kHIEZCRj2szpnEAdtDHF/XRx3ThbXfVlAXXVDqUbRTpNfpL03QnzONYfBF FTgeHSDXERrvrLJXZrOH29ZVUQFrzewiQi0vDzB1RKgLDI+p4gf6qt1favYacSR2yI7H j37Q== X-Gm-Message-State: AO0yUKUo8XavNFfKtzHs+F0/YM4eC7CYAYEigadqXi/NzIXeu0lAgtbY mQYu6yeo/ELSRdfvJdMzbW71tov88Nc= X-Received: by 2002:a05:6602:1415:b0:74d:ad9:d4f9 with SMTP id t21-20020a056602141500b0074d0ad9d4f9mr4342557iov.10.1679611907638; Thu, 23 Mar 2023 15:51:47 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:447:d001:897f:f38d:f05d:4666:1249]) by smtp.gmail.com with ESMTPSA id f102-20020a0284ef000000b0040631e8bf89sm6266988jai.38.2023.03.23.15.51.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 15:51:47 -0700 (PDT) From: Adam Ford To: linux-clk@vger.kernel.org Cc: aford@beaconembedded.com, Adam Ford , Fabio Estevam , Abel Vesa , Peng Fan , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 4/4] clk: imx: Let IMX8MN_CLK_DISP_PIXEL set parent rate Date: Thu, 23 Mar 2023 17:51:28 -0500 Message-Id: <20230323225128.117061-5-aford173@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230323225128.117061-1-aford173@gmail.com> References: <20230323225128.117061-1-aford173@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org By default the display pixel clock needs to be evenly divide down from the video_pll_out clock which rules out a significant number of resolution and refresh rates. The current clock tree looks something like: video_pll 594000000 video_pll_bypass 594000000 video_pll_out 594000000 disp_pixel 148500000 disp_pixel_clk 148500000 Now that composite-8m supports determine_rate, we can allow disp_pixel to set the parent rate which then switches every clock in the chain to a new frequency when disp_pixel cannot evenly divide from video_pll_out. Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index a042ed3a9d6c..4b23a4648600 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -470,7 +470,7 @@ static int imx8mn_clocks_probe(struct platform_device *pdev) hws[IMX8MN_CLK_DRAM_ALT] = imx8m_clk_hw_fw_managed_composite("dram_alt", imx8mn_dram_alt_sels, base + 0xa000); hws[IMX8MN_CLK_DRAM_APB] = imx8m_clk_hw_fw_managed_composite_critical("dram_apb", imx8mn_dram_apb_sels, base + 0xa080); - hws[IMX8MN_CLK_DISP_PIXEL] = imx8m_clk_hw_composite("disp_pixel", imx8mn_disp_pixel_sels, base + 0xa500); + hws[IMX8MN_CLK_DISP_PIXEL] = imx8m_clk_hw_composite_flags("disp_pixel", imx8mn_disp_pixel_sels, base + 0xa500, CLK_SET_RATE_PARENT); hws[IMX8MN_CLK_SAI2] = imx8m_clk_hw_composite("sai2", imx8mn_sai2_sels, base + 0xa600); hws[IMX8MN_CLK_SAI3] = imx8m_clk_hw_composite("sai3", imx8mn_sai3_sels, base + 0xa680); hws[IMX8MN_CLK_SAI5] = imx8m_clk_hw_composite("sai5", imx8mn_sai5_sels, base + 0xa780); -- 2.34.1