From patchwork Thu Mar 23 23:01:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13186144 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B192CC7619A for ; Thu, 23 Mar 2023 23:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d8DRONv98VoykfJRyFVuI1b86tgVElQ3mi3IpPNil8s=; b=KOpkl6qu+aYNP3 7IVQr5w92fBiJxQvu2Rq+OC4ZN+Qxg4ogt2JAymy2kmTnUwUx0qNjuUAWItrsQ3YRY69eXsJQiryO KBwjsidqBe/bTmfY2UgsjlNEEuUFzE2Hz5NrGInQjj4wc87wA1hALT6B9/+MoSUqBmxNQp9X8SvvG WGvn5LkRd06wrKiWwPvPdveqombzmwfnj+RbnTJqKuPjuAXZNiR3JITI2oDNCoIFaDKDvcem5jY6V VqrlSWV798D5WXdty3pRzgUiYPIpUMJZtOSIHj8PmRkwlKul3MEgIa+Or/Nukkv0/WZzEyfC1OSZe YLqD1KM/phBWTQg73M8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pfTwO-0039Jc-0v; Thu, 23 Mar 2023 23:01:52 +0000 Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pfTw8-0039Fz-0f for linux-arm-kernel@lists.infradead.org; Thu, 23 Mar 2023 23:01:38 +0000 Received: by mail-il1-x12d.google.com with SMTP id u8so117873ilb.2 for ; Thu, 23 Mar 2023 16:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679612494; 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=g/Q6xa6hn+k+lfvS3cph2ZGvXNMdvP6vRrG80AxIr6U=; b=PvnomUgwJhFFGVd77ArauD7bqMvzE1OYSjS9WYvf8/bzz9nXv12fSe+z9+pR4ncTJA hiq2WqRoiJ3etczBYlNNUzckpD74VJbCWJZJXNEkBGaUjZcw4mbrYUr+SQ4c7uKseN4U H5T+m7AHTZmN00OUqUNnUgRziFRiNCJRzjfaEu7jRdWBttETEPtUsu3kJ6o5fOnPzxU1 Tb8xPYcwP+3xhL9b4tfCDZGpbSh7GAWBKWI9oGwP8fU4WMaRgRgzbVaf243v/Y0EzCpc SOCCxzK23qu1blumomrhdEr9Wmfm8Qz3ez0lwfacVogdBZzB07fd4PjkJIDvbydRprmZ EG9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679612494; 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=g/Q6xa6hn+k+lfvS3cph2ZGvXNMdvP6vRrG80AxIr6U=; b=lXuQd4M2r13+nPAaR2lkwvPqDiKIf81sdrtebNYKI4XlKyUGAqnpd5SvuXDqiYfNCS F/4ecbF0iLHsFyJlLKKSLfM0jyyovP0p5h2G6+nQGuqqHzYFUpcEponIrKkJG9ZjxBN7 vsckh6Zk+a5yuWnaLRTm0AMe/tMYvmd0cI8O8vqZJZ2PdRRoaJMOqH4tQycQQDdhPuRV LTS59QYwr9nJqb//FjtC4VepeNoGldcGxopdE5PJu9mFU9GWeKITNSsEmMIG40Y79/Ft 6jdtDUdHVq1TB6x0NaT4cJyIDNGTf9U9wVTry2xUVp2yu+l/1U50fce6gJj4OsO9bQb5 20Dw== X-Gm-Message-State: AAQBX9fAvc0ZdQJUZiyAuDRH0JMsnwjDAoFN9si/fVXSl0uyCQe9no7L KyDaTKixbChSo/4pcGDIMSo= X-Google-Smtp-Source: AKy350Zu7vFYu8YnzXAXL+VgxNGS+TQ/V7MzyBfsmY5bmH5svzZC3FbmUUPldLCXwQJFji1aQJQLGw== X-Received: by 2002:a92:4b0d:0:b0:323:ec3:49b7 with SMTP id m13-20020a924b0d000000b003230ec349b7mr908478ilg.11.1679612494427; Thu, 23 Mar 2023 16:01:34 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:447:d001:897f:f38d:f05d:4666:1249]) by smtp.gmail.com with ESMTPSA id w20-20020a056e0213f400b00314201bcbdfsm5405492ilj.3.2023.03.23.16.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 16:01:34 -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 V4 3/4] clk: imx8mm: Let IMX8MM_CLK_LCDIF_PIXEL set parent rate Date: Thu, 23 Mar 2023 18:01:26 -0500 Message-Id: <20230323230127.120883-4-aford173@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230323230127.120883-1-aford173@gmail.com> References: <20230323230127.120883-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230323_160136_269108_770F6B24 X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org By default the display pixel clock needs to be evenly divide down from 594MHz which rules out a significant number of resolution and refresh rates. The current clock tree looks something like: video_pll1 594000000 video_pll1_bypass 594000000 video_pll1_out 594000000 lcdif_pixel 148500000 Now that composite-8m supports determine_rate, we can allow lcdif_pixel to set the parent rate which then switches every clock in the chain to a new frequency when lcdif_pixel cannot evenly divide from video_pll1_out. Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c index b618892170f2..075f643e3f35 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -468,7 +468,7 @@ static int imx8mm_clocks_probe(struct platform_device *pdev) hws[IMX8MM_CLK_PCIE1_PHY] = imx8m_clk_hw_composite("pcie1_phy", imx8mm_pcie1_phy_sels, base + 0xa380); hws[IMX8MM_CLK_PCIE1_AUX] = imx8m_clk_hw_composite("pcie1_aux", imx8mm_pcie1_aux_sels, base + 0xa400); hws[IMX8MM_CLK_DC_PIXEL] = imx8m_clk_hw_composite("dc_pixel", imx8mm_dc_pixel_sels, base + 0xa480); - hws[IMX8MM_CLK_LCDIF_PIXEL] = imx8m_clk_hw_composite("lcdif_pixel", imx8mm_lcdif_pixel_sels, base + 0xa500); + hws[IMX8MM_CLK_LCDIF_PIXEL] = imx8m_clk_hw_composite_flags("lcdif_pixel", imx8mm_lcdif_pixel_sels, base + 0xa500, CLK_SET_RATE_PARENT); hws[IMX8MM_CLK_SAI1] = imx8m_clk_hw_composite("sai1", imx8mm_sai1_sels, base + 0xa580); hws[IMX8MM_CLK_SAI2] = imx8m_clk_hw_composite("sai2", imx8mm_sai2_sels, base + 0xa600); hws[IMX8MM_CLK_SAI3] = imx8m_clk_hw_composite("sai3", imx8mm_sai3_sels, base + 0xa680);