Add RPMH Clocks for the SM8650 platform.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
drivers/clk/qcom/clk-rpmh.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index 5d853fd43294..ea175c2dae95 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -372,6 +372,8 @@ DEFINE_CLK_RPMH_VRM(clk3, _a1, "clka3", 1);
DEFINE_CLK_RPMH_VRM(clk4, _a1, "clka4", 1);
DEFINE_CLK_RPMH_VRM(clk5, _a1, "clka5", 1);
+DEFINE_CLK_RPMH_VRM(clk4, _a2, "clka4", 2);
+DEFINE_CLK_RPMH_VRM(clk5, _a2, "clka5", 2);
DEFINE_CLK_RPMH_VRM(clk6, _a2, "clka6", 2);
DEFINE_CLK_RPMH_VRM(clk7, _a2, "clka7", 2);
DEFINE_CLK_RPMH_VRM(clk8, _a2, "clka8", 2);
@@ -630,6 +632,32 @@ static const struct clk_rpmh_desc clk_rpmh_sm8550 = {
.num_clks = ARRAY_SIZE(sm8550_rpmh_clocks),
};
+static struct clk_hw *sm8650_rpmh_clocks[] = {
+ [RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div2.hw,
+ [RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div2_ao.hw,
+ [RPMH_LN_BB_CLK1] = &clk_rpmh_clk6_a2.hw,
+ [RPMH_LN_BB_CLK1_A] = &clk_rpmh_clk6_a2_ao.hw,
+ [RPMH_LN_BB_CLK2] = &clk_rpmh_clk7_a2.hw,
+ [RPMH_LN_BB_CLK2_A] = &clk_rpmh_clk7_a2_ao.hw,
+ [RPMH_LN_BB_CLK3] = &clk_rpmh_clk8_a2.hw,
+ [RPMH_LN_BB_CLK3_A] = &clk_rpmh_clk8_a2_ao.hw,
+ [RPMH_RF_CLK1] = &clk_rpmh_clk1_a1.hw,
+ [RPMH_RF_CLK1_A] = &clk_rpmh_clk1_a1_ao.hw,
+ [RPMH_RF_CLK2] = &clk_rpmh_clk2_a1.hw,
+ [RPMH_RF_CLK2_A] = &clk_rpmh_clk2_a1_ao.hw,
+ /* missing RPMh resource address for clka3 */
+ [RPMH_RF_CLK4] = &clk_rpmh_clk4_a2.hw,
+ [RPMH_RF_CLK4_A] = &clk_rpmh_clk4_a2_ao.hw,
+ [RPMH_RF_CLK5] = &clk_rpmh_clk5_a2.hw,
+ [RPMH_RF_CLK5_A] = &clk_rpmh_clk5_a2_ao.hw,
+ [RPMH_IPA_CLK] = &clk_rpmh_ipa.hw,
+};
+
+static const struct clk_rpmh_desc clk_rpmh_sm8650 = {
+ .clks = sm8650_rpmh_clocks,
+ .num_clks = ARRAY_SIZE(sm8650_rpmh_clocks),
+};
+
static struct clk_hw *sc7280_rpmh_clocks[] = {
[RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div4.hw,
[RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div4_ao.hw,
@@ -837,6 +865,7 @@ static const struct of_device_id clk_rpmh_match_table[] = {
{ .compatible = "qcom,sm8350-rpmh-clk", .data = &clk_rpmh_sm8350},
{ .compatible = "qcom,sm8450-rpmh-clk", .data = &clk_rpmh_sm8450},
{ .compatible = "qcom,sm8550-rpmh-clk", .data = &clk_rpmh_sm8550},
+ { .compatible = "qcom,sm8650-rpmh-clk", .data = &clk_rpmh_sm8650},
{ .compatible = "qcom,sc7280-rpmh-clk", .data = &clk_rpmh_sc7280},
{ }
};
--
2.34.1
On 10/25/23 09:32, Neil Armstrong wrote:
> Add RPMH Clocks for the SM8650 platform.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
[...]
> +static struct clk_hw *sm8650_rpmh_clocks[] = {
> + [RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div2.hw,
> + [RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div2_ao.hw,
> + [RPMH_LN_BB_CLK1] = &clk_rpmh_clk6_a2.hw,
> + [RPMH_LN_BB_CLK1_A] = &clk_rpmh_clk6_a2_ao.hw,
> + [RPMH_LN_BB_CLK2] = &clk_rpmh_clk7_a2.hw,
> + [RPMH_LN_BB_CLK2_A] = &clk_rpmh_clk7_a2_ao.hw,
> + [RPMH_LN_BB_CLK3] = &clk_rpmh_clk8_a2.hw,
> + [RPMH_LN_BB_CLK3_A] = &clk_rpmh_clk8_a2_ao.hw,
> + [RPMH_RF_CLK1] = &clk_rpmh_clk1_a1.hw,
> + [RPMH_RF_CLK1_A] = &clk_rpmh_clk1_a1_ao.hw,
> + [RPMH_RF_CLK2] = &clk_rpmh_clk2_a1.hw,
> + [RPMH_RF_CLK2_A] = &clk_rpmh_clk2_a1_ao.hw,
> + /* missing RPMh resource address for clka3 */
So, the downstream driver suggested it's there but CMD-DB disagrees?
Can we get a confirmation whether it should be there?
Konrad
On 25/10/2023 10:47, Konrad Dybcio wrote:
>
>
> On 10/25/23 09:32, Neil Armstrong wrote:
>> Add RPMH Clocks for the SM8650 platform.
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
> [...]
>
>> +static struct clk_hw *sm8650_rpmh_clocks[] = {
>> + [RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div2.hw,
>> + [RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div2_ao.hw,
>> + [RPMH_LN_BB_CLK1] = &clk_rpmh_clk6_a2.hw,
>> + [RPMH_LN_BB_CLK1_A] = &clk_rpmh_clk6_a2_ao.hw,
>> + [RPMH_LN_BB_CLK2] = &clk_rpmh_clk7_a2.hw,
>> + [RPMH_LN_BB_CLK2_A] = &clk_rpmh_clk7_a2_ao.hw,
>> + [RPMH_LN_BB_CLK3] = &clk_rpmh_clk8_a2.hw,
>> + [RPMH_LN_BB_CLK3_A] = &clk_rpmh_clk8_a2_ao.hw,
>> + [RPMH_RF_CLK1] = &clk_rpmh_clk1_a1.hw,
>> + [RPMH_RF_CLK1_A] = &clk_rpmh_clk1_a1_ao.hw,
>> + [RPMH_RF_CLK2] = &clk_rpmh_clk2_a1.hw,
>> + [RPMH_RF_CLK2_A] = &clk_rpmh_clk2_a1_ao.hw,
>> + /* missing RPMh resource address for clka3 */
> So, the downstream driver suggested it's there but CMD-DB disagrees?
>
> Can we get a confirmation whether it should be there?
There's a clka3 on the PMK8550, but it's undeclared in CMD-DB since
unused/unconnected on the MTP & QRD platforms.
Neil
>
> Konrad
Quoting Neil Armstrong (2023-10-25 05:00:54)
> On 25/10/2023 10:47, Konrad Dybcio wrote:
> >
> >
> > On 10/25/23 09:32, Neil Armstrong wrote:
> >> Add RPMH Clocks for the SM8650 platform.
> >>
> >> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> >> ---
> > [...]
> >
> >> +static struct clk_hw *sm8650_rpmh_clocks[] = {
> >> + [RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div2.hw,
> >> + [RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div2_ao.hw,
> >> + [RPMH_LN_BB_CLK1] = &clk_rpmh_clk6_a2.hw,
> >> + [RPMH_LN_BB_CLK1_A] = &clk_rpmh_clk6_a2_ao.hw,
> >> + [RPMH_LN_BB_CLK2] = &clk_rpmh_clk7_a2.hw,
> >> + [RPMH_LN_BB_CLK2_A] = &clk_rpmh_clk7_a2_ao.hw,
> >> + [RPMH_LN_BB_CLK3] = &clk_rpmh_clk8_a2.hw,
> >> + [RPMH_LN_BB_CLK3_A] = &clk_rpmh_clk8_a2_ao.hw,
> >> + [RPMH_RF_CLK1] = &clk_rpmh_clk1_a1.hw,
> >> + [RPMH_RF_CLK1_A] = &clk_rpmh_clk1_a1_ao.hw,
> >> + [RPMH_RF_CLK2] = &clk_rpmh_clk2_a1.hw,
> >> + [RPMH_RF_CLK2_A] = &clk_rpmh_clk2_a1_ao.hw,
> >> + /* missing RPMh resource address for clka3 */
> > So, the downstream driver suggested it's there but CMD-DB disagrees?
> >
> > Can we get a confirmation whether it should be there?
>
> There's a clka3 on the PMK8550, but it's undeclared in CMD-DB since
> unused/unconnected on the MTP & QRD platforms.
Can you add that comment here so we know why the resource is missing and
not just that it is missing?
On 25/10/2023 23:47, Stephen Boyd wrote:
> Quoting Neil Armstrong (2023-10-25 05:00:54)
>> On 25/10/2023 10:47, Konrad Dybcio wrote:
>>>
>>>
>>> On 10/25/23 09:32, Neil Armstrong wrote:
>>>> Add RPMH Clocks for the SM8650 platform.
>>>>
>>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>>> ---
>>> [...]
>>>
>>>> +static struct clk_hw *sm8650_rpmh_clocks[] = {
>>>> + [RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div2.hw,
>>>> + [RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div2_ao.hw,
>>>> + [RPMH_LN_BB_CLK1] = &clk_rpmh_clk6_a2.hw,
>>>> + [RPMH_LN_BB_CLK1_A] = &clk_rpmh_clk6_a2_ao.hw,
>>>> + [RPMH_LN_BB_CLK2] = &clk_rpmh_clk7_a2.hw,
>>>> + [RPMH_LN_BB_CLK2_A] = &clk_rpmh_clk7_a2_ao.hw,
>>>> + [RPMH_LN_BB_CLK3] = &clk_rpmh_clk8_a2.hw,
>>>> + [RPMH_LN_BB_CLK3_A] = &clk_rpmh_clk8_a2_ao.hw,
>>>> + [RPMH_RF_CLK1] = &clk_rpmh_clk1_a1.hw,
>>>> + [RPMH_RF_CLK1_A] = &clk_rpmh_clk1_a1_ao.hw,
>>>> + [RPMH_RF_CLK2] = &clk_rpmh_clk2_a1.hw,
>>>> + [RPMH_RF_CLK2_A] = &clk_rpmh_clk2_a1_ao.hw,
>>>> + /* missing RPMh resource address for clka3 */
>>> So, the downstream driver suggested it's there but CMD-DB disagrees?
>>>
>>> Can we get a confirmation whether it should be there?
>>
>> There's a clka3 on the PMK8550, but it's undeclared in CMD-DB since
>> unused/unconnected on the MTP & QRD platforms.
>
> Can you add that comment here so we know why the resource is missing and
> not just that it is missing?
Done,
Thanks,
Neil
On Wed, 25 Oct 2023 at 10:40, Neil Armstrong <neil.armstrong@linaro.org> wrote: > > Add RPMH Clocks for the SM8650 platform. > > Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> > --- > drivers/clk/qcom/clk-rpmh.c | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> -- With best wishes Dmitry
© 2016 - 2025 Red Hat, Inc.