From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B31C606A333 for ; Tue, 1 Dec 2026 08:56:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=4wdtjYet; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cwg6jAKB 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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=fSPZYdzSxOnRA3Vu1p1uItF9CWL3oFkaHG+2v6vcrbU=; b=4wdtjYetOU3IU0Ps5r9d8G2rPn 5GJSon5GaF3fUSO15O4APWIAP3rVMi096nTlWVUsGHwA1Rw/Nqdl3r6wNQWru5TkHetmkJYOBUmeu OJ+TDAtboySW/TuDRxrvSpqNVzWkxdGBK2mJJUHgAkCBg2M8+qCcYbReVKRiWBQseQ8/CCoNo5CkU GFkKY61P8KgOqbYYLDylATeRyQ4rgOKW0cYTDChjOfdNC0NrO1PYhT2hr635TR3ICGh5U+J3c+pzK hcW6/VeX69uLGCIneuRRv04H+jPSn+ELlZAnVCOgmjfRudAIIgDuYLN9UfzR5jNfkSvGjQ9AOY0N/ smG/o7CQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYJfP-000000075rr-3AMI; Tue, 01 Dec 2026 08:56:51 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYJfO-000000075pM-1zeS; Tue, 01 Dec 2026 08:56:50 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 366DF41863; Tue, 1 Dec 2026 08:56:50 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796115410; b=Y6tC3LA497W8Pfe/k1UxhZh5/QpRoUJFcK3jgESld+t2c5NqMepLq2/WoPFaqPGMLZix 9AlisaMkMhdunc47gUKISwqt7CsqQcFh7Uyz5Av2u0BQbbaDIaZoGlmMp8G6uyfAvBRwd 7vtmcvWvupv7yILRB2GiSDQU5jsWAn0/Zf2T7gNdTC7nGWPWkU6SN6p7yv5ZsYTy063sm 5DTmL+lCHVir3h/bsFXhQ78Lb3mStmQRgZo9Xv5Lu5ovQC3L46fFr6nnQ49ez9Esz6eMw aFY3emNvO5Zfps5cCLEhv9q/ShTC/Gp5ltDNnKSTNu+lpxYMJjPElNOaNKuRnF4E8xg== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796115410; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=/O9tmGWWdgMLh2fs5uhIZYTLJhBPLISvLCcxylqXps0=; b=BKiv/ealUAnwoXxTNxGBrUxdfObNROEC5je6SMlqeL6KFdxTmP3xVFqEbl0jSqEPqANY 3tbwSkkrbXIQplu9CK4Sxa0GyunSxq47tJ/JKaJ+lf4GZiIul9l5pWZ2L8y3k79VkIhGG bGMBH76Chbvm3T53ZS+XhRB4sKWcDQlcu2ECa68Sv1nxGyyeY3Ki562LEciYjV9pMMOV0 2LtHcGGAVAxNkjrfUa+N6t2F/rnNZdh3Xjr1HTJZnfY/8pwAiRMmwSnhFziZoemTz/ZIj cGYC1eO0+bB5SUbBIKZGrTQkM2oDAWkSRwzetZCNXEkoGzWCQTvsUrb7U5oUAiqdXMQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 020A41F00936; Tue, 1 Dec 2026 08:56:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796115409; bh=/O9tmGWWdgMLh2fs5uhIZYTLJhBPLISvLCcxylqXps0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=cwg6jAKBcN5ps4wOp8TAwjh4bxvykYIxcfPjEMj+2n8oIsF8gLKArogAdcfQzyEo/ wryT9xsMNox0Aecpq933DGVxpkP5K/TQhSt1pAKgRf4AmJZGySV/whYvquUkjQxSpI AKNqejyykbf8+CWYavsVMyiGgfdbUU8Fks9d9cLO8uhrDOXtiVFGEJbPkLFOvL2ku9 eLkMk59Vk9k/zim80EbYwde/gdNImw8q5ZcJi2UvKWlHbLLHUrixzfXCLS+7gviotU cnTMf77dvtO5S/066g9KpNz9afHW0lxis319zmgOWzws5+ON869r+emFAB6Qi+FBpm aEIJeTKYfWHQA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id B18494ECAA; Tue, 1 Dec 2026 08:56:42 +0000 (UTC) From: Jian Hu via B4 Relay Date: Tue, 01 Dec 2026 16:56:24 +0800 Subject: [PATCH RFC RFT v3 11/13] clk: meson: s7: Model the PLL pre-divider as a divider clock X-Archived-By: MIME-Version: 1.0 Message-Id: <20261201-meson_refactor_n-v3-11-f85a4460fd80@amlogic.com> References: <20261201-meson_refactor_n-v3-0-f85a4460fd80@amlogic.com> In-Reply-To: <20261201-meson_refactor_n-v3-0-f85a4460fd80@amlogic.com> To: Stephen Boyd , Brian Masney , Jerome Brunet , Neil Armstrong , Jerome Brunet , Kevin Hilman , Martin Blumenstingl , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Carlo Caione , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Jian Hu X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796115399; l=2369; i=jian.hu@amlogic.com; s=20260415; h=from:subject:message-id; bh=o0l+/fnDryyRjdZCA6+R8C9Z9w2NGeYTGIvSulWPX/w=; b=LUJke78iUCoVqXDYv3QAdjEEVUFg+uHV/d9ppCafwBv4AD85OALIyqa6+kYc3KE8G6/3OfXt2 nebsLYMsAuhBSYaB6Ls0dN2oCYL4Fk6XMCpgtvljW7y+S1ToVqodccJ X-Developer-Key: i=jian.hu@amlogic.com; a=ed25519; pk=zHUE+rNtH9z+Sb8au1/elWknjFQmy5QDVkBoxleuOIA= X-Endpoint-Received: by B4 Relay for jian.hu@amlogic.com/20260415 with auth_id=735 X-Original-From: Jian Hu X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: jian.hu@amlogic.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Jian Hu The pre-divider is currently described by a dedicated n parameter, although it is a plain divider between the input clock and the DCO. Model it as a regular divider clock and make it the parent of the DCO. Signed-off-by: Jian Hu --- drivers/clk/meson/s7-pll.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/drivers/clk/meson/s7-pll.c b/drivers/clk/meson/s7-pll.c index 5b115c3ff35e..0387c25082ac 100644 --- a/drivers/clk/meson/s7-pll.c +++ b/drivers/clk/meson/s7-pll.c @@ -38,6 +38,29 @@ #define HDMIPLL_CTRL3 0x1cc #define HDMIPLL_STS 0x1dc +static struct clk_regmap s7_fixed_pll_prediv = { + .data = &(struct clk_regmap_div_data) { + .offset = FIXPLL_CTRL0, + .shift = 11, + .width = 5, + /* + * CLK_DIVIDER_ONE_BASED: the register value is the divisor + * itself, so a value of 1 gives a divisor of 1 and the PLL + * input is not divided. The hardware keeps this pre-divider + * at 1, which minimizes the PLL jitter. + */ + .flags = CLK_DIVIDER_ONE_BASED, + }, + .hw.init = &(struct clk_init_data) { + .name = "fixed_pll_prediv", + .ops = &clk_regmap_divider_ro_ops, + .parent_data = &(const struct clk_parent_data) { + .fw_name = "fix", + }, + .num_parents = 1, + }, +}; + static struct clk_regmap s7_fixed_pll_vco = { .data = &(struct meson_clk_pll_data) { .en = { @@ -50,11 +73,6 @@ static struct clk_regmap s7_fixed_pll_vco = { .shift = 0, .width = 9, }, - .n = { - .reg_off = FIXPLL_CTRL0, - .shift = 11, - .width = 5, - }, .l = { .reg_off = FIXPLL_STS, .shift = 31, @@ -69,8 +87,8 @@ static struct clk_regmap s7_fixed_pll_vco = { .hw.init = &(struct clk_init_data) { .name = "fixed_pll_vco", .ops = &meson_clk_pll_ro_ops, - .parent_data = &(const struct clk_parent_data) { - .fw_name = "fix", + .parent_hws = (const struct clk_hw *[]) { + &s7_fixed_pll_prediv.hw }, .num_parents = 1, }, @@ -631,6 +649,7 @@ static struct clk_regmap s7_hdmi_pll_pix = { }; static struct clk_hw *s7_pll_hws[] = { + [CLKID_FIXED_PLL_PREDIV] = &s7_fixed_pll_prediv.hw, [CLKID_FIXED_PLL_VCO] = &s7_fixed_pll_vco.hw, [CLKID_FIXED_PLL] = &s7_fixed_pll.hw, [CLKID_FCLK_DIV2_DIV] = &s7_fclk_div2_div.hw, -- 2.47.1 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic