From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796115416; b=IgRLJh1wkE1raxYTOkUxyA1nVmfy19QCa8NcFA19xXswUTI610HjWGz3hJ0PQmgOF4Bk n3xsW92eVqOeP7MmR9NzayKTCWy6NMJfI7YAc3oOdZQ0vF7LIcd/XyW4pdxtmqdmPg6YO lI+pAHEJC8fCQvAG5/8K6MZYKe4LK44d+YCFklDzyTp2nqu79TuSh/2j3/10ghaKMLNa4 6H57bpFwOSRLPDvXqKrh0zoMCOzukw0Q9WXNQlKZt4PnQBPkSUX7rUiRjB08iSuMeG/UO Rir2W44qeEmhjH53cGchO2CQq+EPIKeU6T058HaUwBeCvrU5fbo36vx0MUuXDWn7sUw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796115416; h=Received: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=Ftk8iefkVEJ+pNdoEVPSQYm39kBStvfVLnB4r71m3E4=; b=tWDbgipZ0dtQHgLEd7Jfmy24TsR8DGJhg+e3f1cD+P0kgTJw9fWJ1iIxh2wlxrsphge3 xGiXbJSiSzkByyBQ+Bg6Ch/qc33NCt3md7h7cvKQAnIElVHAkT4oRukf9VSYrK7g/e9xb WeEpzH3mG8xa0K85Wni7kQ1u2OPJFlHnIKlFDNvhBBHmEJeTlvKw3IM1/qeaP8ebtEVpg PJMOnemrJhuQkPG0oQn5RKNMH8G39EyC4YNPMKF6eYWiOb7NKs31xMDXCU/8eAhPrZa8V kdZeucmeXlpUMQqyHBQoBin0s6Igr3oKOQRsD2bf2sUPtzadOzvkuK6+yrhMZloAQAA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=L1k9rFPi; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B78DE606A6AB; Tue, 1 Dec 2026 08:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=L1k9rFPi 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=1796115416; b=LI8PBkEJmkiJ+3mW3lFTx87RZGrvj1yo9ZQ3+uyL7AnBwEGt/ejB/bAUPp4c26L/Fk9u ZGpgFMy2wAhhPpzrpiY2CZfBsVPAII/pHJFIVpfcaEeG/nIMocX5nKLAy3vFUVCQCyguU MyU9X3g5Zc1MU5XB2PVsNXRJPzanvPHkhdvXSGGklw1OSM2P1f3ORij3zsvoEj8DKRGtD 8WSXmaqnI0ASooPngKwvSiiJc7GMGRd1/CIxXRHIuytmtKtnAsmp35NTY7/Mp9tFp3Nat 03esgNz0axjsCWkS/L402fUNkhb7twjcuWjZ2TuZJ+OF4oSkQtpMCkFdgsDfSCV7A+w== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796115416; 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=Ftk8iefkVEJ+pNdoEVPSQYm39kBStvfVLnB4r71m3E4=; b=3Q7TQ5ftB2GXnFxQNvQ16AFY51GOEy63FB/10RKkBQNChw6/Jr8CORF6XcxSSqZVPXHw IPlaYXqnQb6KkF8fwaTUY6n5K8csJYiW45mtcyXWm6TJTNL9Y3EpM9d3tAruSRmY2bUWB qwMRwDcLByT/zMB2zvYltGgsOYO9TOHEtFEiqUiNCIcAHazBBjlinEOJK8KPOhVr2mamd Udy2W0w5geTLf6YVe6nHm2hbDUNb6XmKadWljShtN+vG3tMWbCFA7kSNmXhqgqmPU0DIe k+qKmwwFotqU68KIggjgV73wK+k8JbLRVQl9ZKM4JUnSSUodPBeOwqWPhg+M5c+oZkQ== 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 B13E61F0089C; Tue, 1 Dec 2026 08:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796115416; bh=Ftk8iefkVEJ+pNdoEVPSQYm39kBStvfVLnB4r71m3E4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=L1k9rFPio5lRn+PG28z7Ja/WvfCt4leRWfSwofDd0MTzj1Vo0RcaHMxMm8VeWBkoM 0eDZH9rV9Mss1+GU9wp1ialo8JfgxIOa9GkyzAjM8UlzSc9F7JriiF7mpcKYQzUEQn FmbZFuDiWVKneUt63r6hzY59+vdSm+77XjnEzuuUVNzR7O63PblzwO3uWP680SlfKG leDk+dSeYncryk+egxk691upCT+yEdo0WgTuDnKViHzoRAQ+mLWod0W1gUeEGxACJ5 vv4ckcYwlxZV75bLojrcJxYR2rI2W8Czqp0SuEtNKYaVsW2Cnu3OH9LGxIfL3vVTIr w09pkrK9t0z+Q== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 4724A4EC9E; Tue, 1 Dec 2026 08:56:42 +0000 (UTC) From: Jian Hu via B4 Relay Date: Tue, 01 Dec 2026 16:56:21 +0800 Subject: [PATCH RFC RFT v3 08/13] clk: meson: g12a: Model the PLL pre-divider as a divider clock X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261201-meson_refactor_n-v3-8-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=17661; i=jian.hu@amlogic.com; s=20260415; h=from:subject:message-id; bh=9gyxzbC5PPcUY6rnE+V/SH65czur4le/7rploOOCfmI=; b=EaLdS9rg99+SsViQSdLxZghAX1WEaTajDRHcRsHm1Gd4Z28G1d/eTmfUJH4TFq/cOTuyksH1+ Bn7LG49mq8HA/j+L1XMOGFSBj3pStITIygoaJDcCnOl79l9QLc9HvUe 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 Reply-To: jian.hu@amlogic.com Content-Transfer-Encoding: 7bit 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/g12a.c | 275 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 217 insertions(+), 58 deletions(-) diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index beed610e4a82..09eb842e0b1a 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -137,6 +137,30 @@ #define HHI_SYS1_PLL_CNTL5 0x394 #define HHI_SYS1_PLL_CNTL6 0x398 +static struct clk_regmap g12a_fixed_prediv = { + .data = &(struct clk_regmap_div_data){ + .offset = HHI_FIX_PLL_CNTL0, + .shift = 10, + .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. + * The same applies below. + */ + .flags = CLK_DIVIDER_ONE_BASED, + }, + .hw.init = &(struct clk_init_data){ + .name = "fixed_prediv", + .ops = &clk_regmap_divider_ro_ops, + .parent_data = &(const struct clk_parent_data) { + .fw_name = "xtal", + }, + .num_parents = 1, + }, +}; + static struct clk_regmap g12a_fixed_pll_dco = { .data = &(struct meson_clk_pll_data){ .en = { @@ -149,11 +173,6 @@ static struct clk_regmap g12a_fixed_pll_dco = { .shift = 0, .width = 8, }, - .n = { - .reg_off = HHI_FIX_PLL_CNTL0, - .shift = 10, - .width = 5, - }, .frac = { .reg_off = HHI_FIX_PLL_CNTL1, .shift = 0, @@ -173,8 +192,8 @@ static struct clk_regmap g12a_fixed_pll_dco = { .hw.init = &(struct clk_init_data){ .name = "fixed_pll_dco", .ops = &meson_clk_pll_ro_ops, - .parent_data = &(const struct clk_parent_data) { - .fw_name = "xtal", + .parent_hws = (const struct clk_hw *[]) { + &g12a_fixed_prediv.hw }, .num_parents = 1, }, @@ -201,6 +220,34 @@ static struct clk_regmap g12a_fixed_pll = { }, }; +/* Force the pre-divider at 1 to minimize PLL jitter */ +static const struct clk_div_table g12a_pll_prediv_div_table[] = { + { .val = 1, .div = 1 }, + { /* sentinel */ } +}; + +static struct clk_regmap g12a_sys_prediv = { + .data = &(struct clk_regmap_div_data){ + .offset = HHI_SYS_PLL_CNTL0, + .shift = 10, + .width = 5, + .table = g12a_pll_prediv_div_table, + /* + * CLK_DIVIDER_INVALID_ZERO to report 0 Hz during registration. + * The same applies below. + */ + .flags = CLK_DIVIDER_INVALID_ZERO, + }, + .hw.init = &(struct clk_init_data){ + .name = "sys_prediv", + .ops = &clk_regmap_divider_ops, + .parent_data = &(const struct clk_parent_data) { + .fw_name = "xtal", + }, + .num_parents = 1, + }, +}; + static const struct pll_mult_range g12a_sys_pll_mult_range = { .min = 128, .max = 250, @@ -218,11 +265,6 @@ static struct clk_regmap g12a_sys_pll_dco = { .shift = 0, .width = 8, }, - .n = { - .reg_off = HHI_SYS_PLL_CNTL0, - .shift = 10, - .width = 5, - }, .l = { .reg_off = HHI_SYS_PLL_CNTL0, .shift = 31, @@ -238,12 +280,12 @@ static struct clk_regmap g12a_sys_pll_dco = { .hw.init = &(struct clk_init_data){ .name = "sys_pll_dco", .ops = &meson_clk_pll_ops, - .parent_data = &(const struct clk_parent_data) { - .fw_name = "xtal", + .parent_hws = (const struct clk_hw *[]) { + &g12a_sys_prediv.hw }, .num_parents = 1, /* This clock feeds the CPU, avoid disabling it */ - .flags = CLK_IS_CRITICAL, + .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, }, }; @@ -265,6 +307,24 @@ static struct clk_regmap g12a_sys_pll = { }, }; +static struct clk_regmap g12b_sys1_prediv = { + .data = &(struct clk_regmap_div_data){ + .offset = HHI_SYS1_PLL_CNTL0, + .shift = 10, + .width = 5, + .table = g12a_pll_prediv_div_table, + .flags = CLK_DIVIDER_INVALID_ZERO, + }, + .hw.init = &(struct clk_init_data){ + .name = "sys1_prediv", + .ops = &clk_regmap_divider_ops, + .parent_data = &(const struct clk_parent_data) { + .fw_name = "xtal", + }, + .num_parents = 1, + }, +}; + static struct clk_regmap g12b_sys1_pll_dco = { .data = &(struct meson_clk_pll_data){ .en = { @@ -277,11 +337,6 @@ static struct clk_regmap g12b_sys1_pll_dco = { .shift = 0, .width = 8, }, - .n = { - .reg_off = HHI_SYS1_PLL_CNTL0, - .shift = 10, - .width = 5, - }, .l = { .reg_off = HHI_SYS1_PLL_CNTL0, .shift = 31, @@ -297,12 +352,12 @@ static struct clk_regmap g12b_sys1_pll_dco = { .hw.init = &(struct clk_init_data){ .name = "sys1_pll_dco", .ops = &meson_clk_pll_ops, - .parent_data = &(const struct clk_parent_data) { - .fw_name = "xtal", + .parent_hws = (const struct clk_hw *[]) { + &g12b_sys1_prediv.hw }, .num_parents = 1, /* This clock feeds the CPU, avoid disabling it */ - .flags = CLK_IS_CRITICAL, + .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, }, }; @@ -386,6 +441,24 @@ static struct clk_fixed_factor g12b_sys1_pll_div16 = { }, }; +static struct clk_regmap g12a_gp0_prediv = { + .data = &(struct clk_regmap_div_data){ + .offset = HHI_GP0_PLL_CNTL0, + .shift = 10, + .width = 5, + .table = g12a_pll_prediv_div_table, + .flags = CLK_DIVIDER_INVALID_ZERO, + }, + .hw.init = &(struct clk_init_data){ + .name = "gp0_prediv", + .ops = &clk_regmap_divider_ops, + .parent_data = &(const struct clk_parent_data) { + .fw_name = "xtal", + }, + .num_parents = 1, + }, +}; + static const struct pll_mult_range g12a_gp0_pll_mult_range = { .min = 125, .max = 255, @@ -415,11 +488,6 @@ static struct clk_regmap g12a_gp0_pll_dco = { .shift = 0, .width = 8, }, - .n = { - .reg_off = HHI_GP0_PLL_CNTL0, - .shift = 10, - .width = 5, - }, .frac = { .reg_off = HHI_GP0_PLL_CNTL1, .shift = 0, @@ -442,10 +510,11 @@ static struct clk_regmap g12a_gp0_pll_dco = { .hw.init = &(struct clk_init_data){ .name = "gp0_pll_dco", .ops = &meson_clk_pll_ops, - .parent_data = &(const struct clk_parent_data) { - .fw_name = "xtal", + .parent_hws = (const struct clk_hw *[]) { + &g12a_gp0_prediv.hw }, .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, }, }; @@ -468,6 +537,23 @@ static struct clk_regmap g12a_gp0_pll = { }, }; +static struct clk_regmap sm1_gp1_prediv = { + .data = &(struct clk_regmap_div_data){ + .offset = HHI_GP1_PLL_CNTL0, + .shift = 10, + .width = 5, + .flags = CLK_DIVIDER_ONE_BASED, + }, + .hw.init = &(struct clk_init_data){ + .name = "gp1_prediv", + .ops = &clk_regmap_divider_ro_ops, + .parent_data = &(const struct clk_parent_data) { + .fw_name = "xtal", + }, + .num_parents = 1, + }, +}; + static struct clk_regmap sm1_gp1_pll_dco = { .data = &(struct meson_clk_pll_data){ .en = { @@ -480,11 +566,6 @@ static struct clk_regmap sm1_gp1_pll_dco = { .shift = 0, .width = 8, }, - .n = { - .reg_off = HHI_GP1_PLL_CNTL0, - .shift = 10, - .width = 5, - }, .frac = { .reg_off = HHI_GP1_PLL_CNTL1, .shift = 0, @@ -504,8 +585,8 @@ static struct clk_regmap sm1_gp1_pll_dco = { .hw.init = &(struct clk_init_data){ .name = "gp1_pll_dco", .ops = &meson_clk_pll_ro_ops, - .parent_data = &(const struct clk_parent_data) { - .fw_name = "xtal", + .parent_hws = (const struct clk_hw *[]) { + &sm1_gp1_prediv.hw }, .num_parents = 1, /* This clock feeds the DSU, avoid disabling it */ @@ -531,6 +612,24 @@ static struct clk_regmap sm1_gp1_pll = { }, }; +static struct clk_regmap g12a_hifi_prediv = { + .data = &(struct clk_regmap_div_data){ + .offset = HHI_HIFI_PLL_CNTL0, + .shift = 10, + .width = 5, + .table = g12a_pll_prediv_div_table, + .flags = CLK_DIVIDER_INVALID_ZERO, + }, + .hw.init = &(struct clk_init_data){ + .name = "hifi_prediv", + .ops = &clk_regmap_divider_ops, + .parent_data = &(const struct clk_parent_data) { + .fw_name = "xtal", + }, + .num_parents = 1, + }, +}; + /* * Internal hifi pll emulation configuration parameters */ @@ -555,11 +654,6 @@ static struct clk_regmap g12a_hifi_pll_dco = { .shift = 0, .width = 8, }, - .n = { - .reg_off = HHI_HIFI_PLL_CNTL0, - .shift = 10, - .width = 5, - }, .frac = { .reg_off = HHI_HIFI_PLL_CNTL1, .shift = 0, @@ -583,10 +677,11 @@ static struct clk_regmap g12a_hifi_pll_dco = { .hw.init = &(struct clk_init_data){ .name = "hifi_pll_dco", .ops = &meson_clk_pll_ops, - .parent_data = &(const struct clk_parent_data) { - .fw_name = "xtal", + .parent_hws = (const struct clk_hw *[]) { + &g12a_hifi_prediv.hw }, .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, }, }; @@ -609,6 +704,32 @@ static struct clk_regmap g12a_hifi_pll = { }, }; +static struct clk_regmap g12a_pcie_prediv = { + .data = &(struct clk_regmap_div_data){ + .offset = HHI_PCIE_PLL_CNTL0, + .shift = 10, + .width = 5, + .table = g12a_pll_prediv_div_table, + .flags = CLK_DIVIDER_INVALID_ZERO, + }, + .hw.init = &(struct clk_init_data){ + .name = "pcie_prediv", + .ops = &clk_regmap_divider_ops, + .parent_data = &(const struct clk_parent_data) { + .fw_name = "xtal", + }, + .num_parents = 1, + /* + * The PCIe prediv register reads zero on power-on. + * CLK_DIVIDER_INVALID_ZERO makes the first rate return 0 Hz, + * which gets cached by CCF. The PCIe PLL enable callback + * later writes a valid non-zero divider value. Use + * CLK_GET_RATE_NOCACHE to avoid stale cached rate. + */ + .flags = CLK_GET_RATE_NOCACHE, + }, +}; + /* * The Meson G12A PCIE PLL is fined tuned to deliver a very precise * 100MHz reference clock for the PCIe Analog PHY, and thus requires @@ -647,11 +768,6 @@ static struct clk_regmap g12a_pcie_pll_dco = { .shift = 0, .width = 8, }, - .n = { - .reg_off = HHI_PCIE_PLL_CNTL0, - .shift = 10, - .width = 5, - }, .frac = { .reg_off = HHI_PCIE_PLL_CNTL1, .shift = 0, @@ -674,10 +790,11 @@ static struct clk_regmap g12a_pcie_pll_dco = { .hw.init = &(struct clk_init_data){ .name = "pcie_pll_dco", .ops = &meson_clk_pcie_pll_ops, - .parent_data = &(const struct clk_parent_data) { - .fw_name = "xtal", + .parent_hws = (const struct clk_hw *[]) { + &g12a_pcie_prediv.hw }, .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, }, }; @@ -729,6 +846,33 @@ static struct clk_fixed_factor g12a_pcie_pll = { }, }; +static struct clk_regmap g12a_hdmi_prediv = { + .data = &(struct clk_regmap_div_data){ + .offset = HHI_HDMI_PLL_CNTL0, + .shift = 10, + .width = 5, + /* + * The pre-divider register reads zero until the display driver + * programs the HDMI PLL, so a zero divisor is not a fault here: + * treat it as a bypass instead of warning at registration. + */ + .flags = CLK_DIVIDER_ONE_BASED | CLK_DIVIDER_ALLOW_ZERO, + }, + .hw.init = &(struct clk_init_data){ + .name = "hdmi_prediv", + .ops = &clk_regmap_divider_ro_ops, + .parent_data = &(const struct clk_parent_data) { + .fw_name = "xtal", + }, + .num_parents = 1, + /* + * Display directly handle hdmi pll registers ATM, we need + * NOCACHE to keep our view of the clock as accurate as possible + */ + .flags = CLK_GET_RATE_NOCACHE, + }, +}; + static struct clk_regmap g12a_hdmi_pll_dco = { .data = &(struct meson_clk_pll_data){ .en = { @@ -741,11 +885,6 @@ static struct clk_regmap g12a_hdmi_pll_dco = { .shift = 0, .width = 8, }, - .n = { - .reg_off = HHI_HDMI_PLL_CNTL0, - .shift = 10, - .width = 5, - }, .frac = { .reg_off = HHI_HDMI_PLL_CNTL1, .shift = 0, @@ -765,8 +904,8 @@ static struct clk_regmap g12a_hdmi_pll_dco = { .hw.init = &(struct clk_init_data){ .name = "hdmi_pll_dco", .ops = &meson_clk_pll_ro_ops, - .parent_data = &(const struct clk_parent_data) { - .fw_name = "xtal", + .parent_hws = (const struct clk_hw *[]) { + &g12a_hdmi_prediv.hw }, .num_parents = 1, /* @@ -4594,9 +4733,13 @@ static struct clk_hw *g12a_hw_clks[] = { [CLKID_VCLK2_VENCLMMC] = &g12a_vclk2_venclmmc.hw, [CLKID_VCLK2_VENCL] = &g12a_vclk2_vencl.hw, [CLKID_VCLK2_OTHER1] = &g12a_vclk2_other1.hw, + [CLKID_FIXED_PREDIV] = &g12a_fixed_prediv.hw, [CLKID_FIXED_PLL_DCO] = &g12a_fixed_pll_dco.hw, + [CLKID_SYS_PREDIV] = &g12a_sys_prediv.hw, [CLKID_SYS_PLL_DCO] = &g12a_sys_pll_dco.hw, + [CLKID_GP0_PREDIV] = &g12a_gp0_prediv.hw, [CLKID_GP0_PLL_DCO] = &g12a_gp0_pll_dco.hw, + [CLKID_HIFI_PREDIV] = &g12a_hifi_prediv.hw, [CLKID_HIFI_PLL_DCO] = &g12a_hifi_pll_dco.hw, [CLKID_DMA] = &g12a_dma.hw, [CLKID_EFUSE] = &g12a_efuse.hw, @@ -4619,6 +4762,7 @@ static struct clk_hw *g12a_hw_clks[] = { [CLKID_VAPB_1] = &g12a_vapb_1.hw, [CLKID_VAPB_SEL] = &g12a_vapb_sel.hw, [CLKID_VAPB] = &g12a_vapb.hw, + [CLKID_HDMI_PREDIV] = &g12a_hdmi_prediv.hw, [CLKID_HDMI_PLL_DCO] = &g12a_hdmi_pll_dco.hw, [CLKID_HDMI_PLL_OD] = &g12a_hdmi_pll_od.hw, [CLKID_HDMI_PLL_OD2] = &g12a_hdmi_pll_od2.hw, @@ -4694,6 +4838,7 @@ static struct clk_hw *g12a_hw_clks[] = { [CLKID_CPU_CLK_AXI] = &g12a_cpu_clk_axi.hw, [CLKID_CPU_CLK_TRACE_DIV] = &g12a_cpu_clk_trace_div.hw, [CLKID_CPU_CLK_TRACE] = &g12a_cpu_clk_trace.hw, + [CLKID_PCIE_PREDIV] = &g12a_pcie_prediv.hw, [CLKID_PCIE_PLL_DCO] = &g12a_pcie_pll_dco.hw, [CLKID_PCIE_PLL_DCO_DIV2] = &g12a_pcie_pll_dco_div2.hw, [CLKID_PCIE_PLL_OD] = &g12a_pcie_pll_od.hw, @@ -4821,9 +4966,13 @@ static struct clk_hw *g12b_hw_clks[] = { [CLKID_VCLK2_VENCLMMC] = &g12a_vclk2_venclmmc.hw, [CLKID_VCLK2_VENCL] = &g12a_vclk2_vencl.hw, [CLKID_VCLK2_OTHER1] = &g12a_vclk2_other1.hw, + [CLKID_FIXED_PREDIV] = &g12a_fixed_prediv.hw, [CLKID_FIXED_PLL_DCO] = &g12a_fixed_pll_dco.hw, + [CLKID_SYS_PREDIV] = &g12a_sys_prediv.hw, [CLKID_SYS_PLL_DCO] = &g12a_sys_pll_dco.hw, + [CLKID_GP0_PREDIV] = &g12a_gp0_prediv.hw, [CLKID_GP0_PLL_DCO] = &g12a_gp0_pll_dco.hw, + [CLKID_HIFI_PREDIV] = &g12a_hifi_prediv.hw, [CLKID_HIFI_PLL_DCO] = &g12a_hifi_pll_dco.hw, [CLKID_DMA] = &g12a_dma.hw, [CLKID_EFUSE] = &g12a_efuse.hw, @@ -4846,6 +4995,7 @@ static struct clk_hw *g12b_hw_clks[] = { [CLKID_VAPB_1] = &g12a_vapb_1.hw, [CLKID_VAPB_SEL] = &g12a_vapb_sel.hw, [CLKID_VAPB] = &g12a_vapb.hw, + [CLKID_HDMI_PREDIV] = &g12a_hdmi_prediv.hw, [CLKID_HDMI_PLL_DCO] = &g12a_hdmi_pll_dco.hw, [CLKID_HDMI_PLL_OD] = &g12a_hdmi_pll_od.hw, [CLKID_HDMI_PLL_OD2] = &g12a_hdmi_pll_od2.hw, @@ -4921,6 +5071,7 @@ static struct clk_hw *g12b_hw_clks[] = { [CLKID_CPU_CLK_AXI] = &g12a_cpu_clk_axi.hw, [CLKID_CPU_CLK_TRACE_DIV] = &g12a_cpu_clk_trace_div.hw, [CLKID_CPU_CLK_TRACE] = &g12a_cpu_clk_trace.hw, + [CLKID_PCIE_PREDIV] = &g12a_pcie_prediv.hw, [CLKID_PCIE_PLL_DCO] = &g12a_pcie_pll_dco.hw, [CLKID_PCIE_PLL_DCO_DIV2] = &g12a_pcie_pll_dco_div2.hw, [CLKID_PCIE_PLL_OD] = &g12a_pcie_pll_od.hw, @@ -4936,6 +5087,7 @@ static struct clk_hw *g12b_hw_clks[] = { [CLKID_VDEC_HEVCF] = &g12a_vdec_hevcf.hw, [CLKID_TS_DIV] = &g12a_ts_div.hw, [CLKID_TS] = &g12a_ts.hw, + [CLKID_SYS1_PREDIV] = &g12b_sys1_prediv.hw, [CLKID_SYS1_PLL_DCO] = &g12b_sys1_pll_dco.hw, [CLKID_SYS1_PLL] = &g12b_sys1_pll.hw, [CLKID_SYS1_PLL_DIV16_EN] = &g12b_sys1_pll_div16_en.hw, @@ -5089,9 +5241,13 @@ static struct clk_hw *sm1_hw_clks[] = { [CLKID_VCLK2_VENCLMMC] = &g12a_vclk2_venclmmc.hw, [CLKID_VCLK2_VENCL] = &g12a_vclk2_vencl.hw, [CLKID_VCLK2_OTHER1] = &g12a_vclk2_other1.hw, + [CLKID_FIXED_PREDIV] = &g12a_fixed_prediv.hw, [CLKID_FIXED_PLL_DCO] = &g12a_fixed_pll_dco.hw, + [CLKID_SYS_PREDIV] = &g12a_sys_prediv.hw, [CLKID_SYS_PLL_DCO] = &g12a_sys_pll_dco.hw, + [CLKID_GP0_PREDIV] = &g12a_gp0_prediv.hw, [CLKID_GP0_PLL_DCO] = &g12a_gp0_pll_dco.hw, + [CLKID_HIFI_PREDIV] = &g12a_hifi_prediv.hw, [CLKID_HIFI_PLL_DCO] = &g12a_hifi_pll_dco.hw, [CLKID_DMA] = &g12a_dma.hw, [CLKID_EFUSE] = &g12a_efuse.hw, @@ -5114,6 +5270,7 @@ static struct clk_hw *sm1_hw_clks[] = { [CLKID_VAPB_1] = &g12a_vapb_1.hw, [CLKID_VAPB_SEL] = &g12a_vapb_sel.hw, [CLKID_VAPB] = &g12a_vapb.hw, + [CLKID_HDMI_PREDIV] = &g12a_hdmi_prediv.hw, [CLKID_HDMI_PLL_DCO] = &g12a_hdmi_pll_dco.hw, [CLKID_HDMI_PLL_OD] = &g12a_hdmi_pll_od.hw, [CLKID_HDMI_PLL_OD2] = &g12a_hdmi_pll_od2.hw, @@ -5189,6 +5346,7 @@ static struct clk_hw *sm1_hw_clks[] = { [CLKID_CPU_CLK_AXI] = &g12a_cpu_clk_axi.hw, [CLKID_CPU_CLK_TRACE_DIV] = &g12a_cpu_clk_trace_div.hw, [CLKID_CPU_CLK_TRACE] = &g12a_cpu_clk_trace.hw, + [CLKID_PCIE_PREDIV] = &g12a_pcie_prediv.hw, [CLKID_PCIE_PLL_DCO] = &g12a_pcie_pll_dco.hw, [CLKID_PCIE_PLL_DCO_DIV2] = &g12a_pcie_pll_dco_div2.hw, [CLKID_PCIE_PLL_OD] = &g12a_pcie_pll_od.hw, @@ -5205,6 +5363,7 @@ static struct clk_hw *sm1_hw_clks[] = { [CLKID_TS_DIV] = &g12a_ts_div.hw, [CLKID_TS] = &g12a_ts.hw, [CLKID_GP1_PLL_DCO] = &sm1_gp1_pll_dco.hw, + [CLKID_GP1_PREDIV] = &sm1_gp1_prediv.hw, [CLKID_GP1_PLL] = &sm1_gp1_pll.hw, [CLKID_DSU_CLK_DYN0_SEL] = &sm1_dsu_clk_dyn0_sel.hw, [CLKID_DSU_CLK_DYN0_DIV] = &sm1_dsu_clk_dyn0_div.hw, -- 2.47.1