mbox series

[V2,0/4] clk: qcom: Introduce clocks drivers for X1E80100

Message ID 20231117092737.28362-1-quic_sibis@quicinc.com
Headers show
Series clk: qcom: Introduce clocks drivers for X1E80100 | expand

Message

Sibi Sankar Nov. 17, 2023, 9:27 a.m. UTC
This series adds initial clock support for the Qualcomm X1E80100 platform,
aka Snapdragon X Elite.

Our v1 post of the patchsets adding support for Snapdragon X Elite SoC had
the part number sc8380xp which is now updated to the new part number x1e80100
based on the new branding scheme and refers to the exact same SoC.

v2:
* Update the part number from sc8380xp to x1e80100.
* Use shared ops in the x1e80100 gcc driver [Bryan].
* Inline clock names [Konrad]
* Fix Kconfig [Krzysztof]
* Pick-up Rbs from the list.

Dependencies: None
Release Link: https://www.qualcomm.com/news/releases/2023/10/qualcomm-unleashes-snapdragon-x-elite--the-ai-super-charged-plat

Rajendra Nayak (4):
  dt-bindings: clock: qcom: Add X1E80100 GCC clocks
  clk: qcom: Add Global Clock controller (GCC) driver for X1E80100
  dt-bindings: clock: qcom-rpmhcc: Add RPMHCC bindings for X1E80100
  clk: qcom: rpmh: Add support for X1E80100 rpmh clocks

 .../bindings/clock/qcom,rpmhcc.yaml           |    1 +
 .../bindings/clock/qcom,x1e80100-gcc.yaml     |   72 +
 drivers/clk/qcom/Kconfig                      |   10 +
 drivers/clk/qcom/Makefile                     |    1 +
 drivers/clk/qcom/clk-rpmh.c                   |   26 +
 drivers/clk/qcom/gcc-x1e80100.c               | 6807 +++++++++++++++++
 include/dt-bindings/clock/qcom,x1e80100-gcc.h |  485 ++
 7 files changed, 7402 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,x1e80100-gcc.yaml
 create mode 100644 drivers/clk/qcom/gcc-x1e80100.c
 create mode 100644 include/dt-bindings/clock/qcom,x1e80100-gcc.h

Comments

Bryan O'Donoghue Nov. 17, 2023, 8:50 p.m. UTC | #1
On 17/11/2023 09:27, Sibi Sankar wrote:
> * Use shared ops in the x1e80100 gcc driver [Bryan].

This looks better to me now / more consistent with what we have in 
sc8280xp - where we do try to hit suspend and => retention/parking matters.

Could you give a bit more detail on why SDCC* doesn't warrant parking on 
X1E80100 as on SC8280XP though ?

---
bod
Konrad Dybcio Nov. 18, 2023, 12:01 a.m. UTC | #2
On 17.11.2023 10:27, Sibi Sankar wrote:
> From: Rajendra Nayak <quic_rjendra@quicinc.com>
> 
> Add support for the global clock controller found on X1E80100
> based devices.
> 
> Co-developed-by: Abel Vesa <abel.vesa@linaro.org>
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> Signed-off-by: Rajendra Nayak <quic_rjendra@quicinc.com>
> Co-developed-by: Sibi Sankar <quic_sibis@quicinc.com>
> Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
Konrad Dybcio Nov. 18, 2023, 12:06 a.m. UTC | #3
On 17.11.2023 21:50, Bryan O'Donoghue wrote:
> On 17/11/2023 09:27, Sibi Sankar wrote:
>> * Use shared ops in the x1e80100 gcc driver [Bryan].
> 
> This looks better to me now / more consistent with what we have in sc8280xp - where we do try to hit suspend and => retention/parking matters.
Parking the clock is separate from putting the system to sleep.

IIUC we usually use shared ops on clocks that may have different users
(e.g. not only controlled by Linux) and/or that are crucial to the
functioning of hardware (like AXI clocks, which if gated would make
the system crash on any access attempt, from any subsystem, unless
turned on beforehand)

Perhaps Dmitry can use some clearer wording than me..

Konrad
Bryan O'Donoghue Nov. 18, 2023, 1:52 a.m. UTC | #4
On 18/11/2023 00:06, Konrad Dybcio wrote:
> On 17.11.2023 21:50, Bryan O'Donoghue wrote:
>> On 17/11/2023 09:27, Sibi Sankar wrote:
>>> * Use shared ops in the x1e80100 gcc driver [Bryan].
>>
>> This looks better to me now / more consistent with what we have in sc8280xp - where we do try to hit suspend and => retention/parking matters.
> Parking the clock is separate from putting the system to sleep.

Yes but several of our clocks want to be parked, not switched off.. 
which obviously does matter in suspend.

> IIUC we usually use shared ops on clocks that may have different users
> (e.g. not only controlled by Linux) and/or that are crucial to the
> functioning of hardware (like AXI clocks, which if gated would make
> the system crash on any access attempt, from any subsystem, unless
> turned on beforehand)

My question here for Sibi, is why sdcc2_apss_clk_src differs here from 
sc8280xp?

Is it wrong on sc8280xp or if correct sc8280xp then why is it not 
replicated here ?

https://lore.kernel.org/linux-arm-msm/e857c853-51ef-8314-2a21-fa6fd25162ca@quicinc.com/

Also @Sibi I realise alot of this code is autogenerated - it would be 
worthwhile finding/fixing the script that does the generation to plug in 
shared_ops instead of floor_ops if the input material has the necessary 
flags.

---
bod
Sibi Sankar Nov. 20, 2023, 6:42 a.m. UTC | #5
On 11/18/23 07:22, Bryan O'Donoghue wrote:
> On 18/11/2023 00:06, Konrad Dybcio wrote:
>> On 17.11.2023 21:50, Bryan O'Donoghue wrote:
>>> On 17/11/2023 09:27, Sibi Sankar wrote:
>>>> * Use shared ops in the x1e80100 gcc driver [Bryan].
>>>
>>> This looks better to me now / more consistent with what we have in 
>>> sc8280xp - where we do try to hit suspend and => retention/parking 
>>> matters.
>> Parking the clock is separate from putting the system to sleep.
> 
> Yes but several of our clocks want to be parked, not switched off.. 
> which obviously does matter in suspend.
> 
>> IIUC we usually use shared ops on clocks that may have different users
>> (e.g. not only controlled by Linux) and/or that are crucial to the
>> functioning of hardware (like AXI clocks, which if gated would make
>> the system crash on any access attempt, from any subsystem, unless
>> turned on beforehand)
> 
> My question here for Sibi, is why sdcc2_apss_clk_src differs here from 
> sc8280xp?
> 
> Is it wrong on sc8280xp or if correct sc8280xp then why is it not 
> replicated here ?
> 
> https://lore.kernel.org/linux-arm-msm/e857c853-51ef-8314-2a21-fa6fd25162ca@quicinc.com/

Bryan,

5e4b7e82d497 ("clk: qcom: gcc-sdm845: Use floor ops for sdcc clks")

The floor_ops was introduced in sdm845 ^^ and later propagated to all
other QC SoCs later on. It makes sense to do the same for sc8280xp as
well.

> 
> Also @Sibi I realise alot of this code is autogenerated - it would be 
> worthwhile finding/fixing the script that does the generation to plug in 
> shared_ops instead of floor_ops if the input material has the necessary 
> flags.

floor_ops part isn't auto-generated (it comes out as shared_ops,
but like you said it might make sense to include it as part of the
generation process itself.

-Sibi

> 
> ---
> bod
Bryan O'Donoghue Nov. 20, 2023, 11:02 a.m. UTC | #6
On 20/11/2023 06:42, Sibi Sankar wrote:
> Bryan,
> 
> 5e4b7e82d497 ("clk: qcom: gcc-sdm845: Use floor ops for sdcc clks")
> 
> The floor_ops was introduced in sdm845 ^^ and later propagated to all
> other QC SoCs later on. It makes sense to do the same for sc8280xp as
> well.

OK good enough.