Re: [PATCH v2 2/4] clk: qcom: apss-ipq5424: Add ipq5424 apss clock controller

From: Konrad Dybcio
Date: Wed Jul 23 2025 - 09:14:32 EST


On 7/23/25 1:08 PM, Varadarajan Narayanan wrote:
> From: Sricharan Ramabadhran <quic_srichara@xxxxxxxxxxx>
>
> CPU on Qualcomm ipq5424 is clocked by huayra PLL with RCG support.
> Add support for the APSS PLL, RCG and clock enable for ipq5424.
> The PLL, RCG register space are clubbed. Hence adding new APSS driver
> for both PLL and RCG/CBC control. Also the L3 cache has a separate pll
> and needs to be scaled along with the CPU and is modeled as an ICC clock.
>
> Co-developed-by: Md Sadre Alam <quic_mdalam@xxxxxxxxxxx>
> Signed-off-by: Md Sadre Alam <quic_mdalam@xxxxxxxxxxx>
> Signed-off-by: Sricharan Ramabadhran <quic_srichara@xxxxxxxxxxx>
> [ Removed clock notifier, moved L3 pll to icc-clk, used existing
> alpha pll structure ]
> Signed-off-by: Varadarajan Narayanan <quic_varada@xxxxxxxxxxx>
> ---
> v2: Model L3 pll as ICC clock and add relevant structures
> Use CLK_ALPHA_PLL_TYPE_HUAYRA_2290 register offsets instead
> of duplicate ipq5424_pll_offsets definition.
> Inline clock rates.
> Fix MODULE_LICENSE
> ---

[...]

Since the last time this was posted, we got some additional infra code..

> +static int apss_ipq5424_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct regmap *regmap;
> + void __iomem *base;
> + int ret;
> +
> + base = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(base))
> + return PTR_ERR(base);
> +
> + regmap = devm_regmap_init_mmio(dev, base, &apss_ipq5424_regmap_config);
> + if (!regmap)
> + return PTR_ERR(regmap);
> +
> + clk_alpha_pll_configure(&ipq5424_l3_pll, regmap, &l3_pll_config);
> +
> + clk_alpha_pll_configure(&ipq5424_apss_pll, regmap, &apss_pll_config);
> +
> + ret = qcom_cc_really_probe(dev, &apss_ipq5424_desc, regmap);
> + if (!ret)
> + dev_dbg(&pdev->dev, "Registered APSS & L3 clock provider\n");
> +
> + return ret;

You can now replace the entirety of this function with qcom_cc_driver_data

Konrad