* [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe
@ 2025-05-30 13:20 Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain Jagadeesh Kona
` (20 more replies)
0 siblings, 21 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Dmitry Baryshkov, Konrad Dybcio, Dmitry Baryshkov
In recent QCOM chipsets, PLLs require more than one power domain to be
kept ON to configure the PLL. But the current code doesn't enable all
the required power domains while configuring the PLLs, this leads to
functional issues due to suboptimal settings of PLLs.
To address this, add support for handling runtime power management,
configuring plls and enabling critical clocks from qcom_cc_really_probe.
The clock controller can specify PLLs, critical clocks, and runtime PM
requirements using the descriptor data. The code in qcom_cc_really_probe()
ensures all necessary power domains are enabled before configuring PLLs
or critical clocks.
This series fixes the below warning reported in SM8550 venus testing due
to video_cc_pll0 not properly getting configured during videocc probe
[ 46.535132] Lucid PLL latch failed. Output may be unstable!
The patch adding support to configure the PLLs from common code is
picked from below series and updated it.
https://lore.kernel.org/all/20250113-support-pll-reconfigure-v1-0-1fae6bc1062d@quicinc.com/
This series is dependent on bindings patch in below Vladimir's series, hence
included the Vladimir's series patches also in this series and updated them.
https://lore.kernel.org/all/20250303225521.1780611-1-vladimir.zapolskiy@linaro.org/
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
Changes in v5:
- Reversed order of patches 2 & 3 to add MXC support in SM8450
camcc bindings first and then moved SC8280XP camcc to SA8775P
camcc to have single power domain support for it.
- Added return code for qcom_cc_clk_pll_configure() and
returned -EINVAL in case if PLL config or registers is
NULL in patch 6 [Bryan]
- Added separate CBCR's list for SM8650 videocc and
updated clk_cbcrs list based on compatible in patch 8[Konrad]
- Added R-By tags received on v4
- Link to v4: https://lore.kernel.org/r/20250515-videocc-pll-multi-pd-voting-v4-0-571c63297d01@quicinc.com
Changes in v4:
- Updated the SC8280XP camcc bindings patch to fix the
required-opps warning reported by kernel bot
- Updated the description of power-domains, required-opps of SM8450 camcc
bindings as per review comments on v3 [Bryan]
- Moved the PLL config checks to calling function code [Dmitry]
- Removed qcom_clk_reg_setting struct and regmap_update_bits() code.
Added a .clk_regs_configure() callback that clock drivers can implement
if they require to update some misc register settings [Dmitry]
- Moved the PLLs and CBCRs data to a separate qcom_cc_driver_data
struct to avoid bloating up the CC descriptor structure
- Updated the videocc and camcc driver patches to incorporate above
qcom_cc_driver_data change
- Updated the commit text of DT patches [Bryan]
- Added the R-By, T-By tags received on v3
- Link to v3: https://lore.kernel.org/r/20250327-videocc-pll-multi-pd-voting-v3-0-895fafd62627@quicinc.com
Changes in v3:
- Updated the videocc bindings patch to add required-opps for MXC power domain [Dmitry]
and added Bryan & Rob R/A-By tags received for this patch on v1.
- Included the Vladimir's bindings patch for SM8450 camcc bindings to
add multiple PD support and updated them to fix the bot warnings.
- Moved SC8280XP camcc bindings to SA8775P camcc since SC8280XP only
require single MMCX power domain
- Split runtime PM and PLL configuration to separate patches [Dmitry]
- Removed direct regmap_update_bits to configure clock CBCR's and
using clock helpers to configure the CBCR registers [Dmitry, Bryan]
- Added new helpers to configure all PLLs & update misc clock
register settings from common code [Dmitry, Bryan]
- Updated the name of qcom_clk_cfg structure to qcom_clk_reg_setting [Konrad]
- Updated the fields in structure from unsigned int to u32 and added
val field to this structure [Konrad]
- Added a new u32 array for cbcr branch clocks & num_clk_cbcrs fields
to maintain the list of critical clock cbcrs in clock controller
descriptor [Konrad]
- Updated the plls field to alpha_plls in descriptor structure [Konrad]
- Added WARN() in PLL configure function if PLL type passed is not
supported. The suggestion is to use BUG(), but updated it to
WARN() to avoid checkpatch warning. [Bjorn]
- Moved the pll configure and helper macros to PLL code from common code [Bjorn]
- Updated camcc drivers for SM8450, SM8550, SM8650 and X1E80100 targets
with support to configure PLLs from common code and added MXC power
domain in corresponding camcc DT nodes. [Bryan]
- Added Dmitry and Bryan R-By tags received on videocc DT node changes in v1
- Link to v2: https://lore.kernel.org/r/20250306-videocc-pll-multi-pd-voting-v2-0-0cd00612bc0e@quicinc.com
Changes in v2:
- Added support to handle rpm, PLL configuration and enable critical
clocks from qcom_cc_really_probe() in common code as per v1 commments
from Bryan, Konrad and Dmitry
- Added patches to configure PLLs from common code
- Updated the SM8450, SM8550 videocc patches to use the newly
added support to handle rpm, configure PLLs from common code
- Split the DT change for each target separately as per
Dmitry comments
- Added R-By and A-By tags received on v1
- Link to v1: https://lore.kernel.org/r/20250218-videocc-pll-multi-pd-voting-v1-0-cfe6289ea29b@quicinc.com
---
Jagadeesh Kona (15):
dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain
dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc
clk: qcom: common: Handle runtime power management in qcom_cc_really_probe
clk: qcom: common: Add support to configure clk regs in qcom_cc_really_probe
clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe
clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
clk: qcom: camcc-sm8450: Move PLL & clk configuration to really probe
clk: qcom: camcc-sm8550: Move PLL & clk configuration to really probe
clk: qcom: camcc-sm8650: Move PLL & clk configuration to really probe
clk: qcom: camcc-x1e80100: Move PLL & clk configuration to really probe
arm64: dts: qcom: sm8450: Additionally manage MXC power domain in videocc
arm64: dts: qcom: sm8550: Additionally manage MXC power domain in videocc
arm64: dts: qcom: sm8650: Additionally manage MXC power domain in videocc
arm64: dts: qcom: sm8450: Additionally manage MXC power domain in camcc
arm64: dts: qcom: sm8650: Additionally manage MXC power domain in camcc
Taniya Das (1):
clk: qcom: clk-alpha-pll: Add support for common PLL configuration function
Vladimir Zapolskiy (2):
dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains
arm64: dts: qcom: sm8550: Additionally manage MXC power domain in camcc
.../bindings/clock/qcom,sa8775p-camcc.yaml | 15 ++++
.../bindings/clock/qcom,sm8450-camcc.yaml | 20 +++--
.../bindings/clock/qcom,sm8450-videocc.yaml | 18 +++--
arch/arm64/boot/dts/qcom/sm8450.dtsi | 12 ++-
arch/arm64/boot/dts/qcom/sm8550.dtsi | 12 ++-
arch/arm64/boot/dts/qcom/sm8650.dtsi | 6 +-
drivers/clk/qcom/camcc-sm8450.c | 89 +++++++++++-----------
drivers/clk/qcom/camcc-sm8550.c | 85 +++++++++++----------
drivers/clk/qcom/camcc-sm8650.c | 83 ++++++++++----------
drivers/clk/qcom/camcc-x1e80100.c | 67 ++++++++--------
drivers/clk/qcom/clk-alpha-pll.c | 57 ++++++++++++++
drivers/clk/qcom/clk-alpha-pll.h | 3 +
drivers/clk/qcom/common.c | 81 +++++++++++++++++---
drivers/clk/qcom/common.h | 10 +++
drivers/clk/qcom/videocc-sm8450.c | 58 ++++++--------
drivers/clk/qcom/videocc-sm8550.c | 66 ++++++++--------
16 files changed, 421 insertions(+), 261 deletions(-)
---
base-commit: 138cfc44b3c4a5fb800388c6e27be169970fb9f7
change-id: 20250218-videocc-pll-multi-pd-voting-d614dce910e7
Best regards,
--
Jagadeesh Kona <quic_jkona@quicinc.com>
^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCH v5 01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 02/18] dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains Jagadeesh Kona
` (19 subsequent siblings)
20 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue
To configure the video PLLs and enable the video GDSCs on SM8450,
SM8475, SM8550 and SM8650 platforms, the MXC rail must be ON along
with MMCX. Therefore, update the videocc bindings to include
the MXC power domain on these platforms.
Fixes: 1e910b2ba0ed ("dt-bindings: clock: qcom: Add SM8450 video clock controller")
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
---
.../devicetree/bindings/clock/qcom,sm8450-videocc.yaml | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
index 62714fa54db82491a7a108f7f18a253d737f8d61..0d99178332cb99d3f02f50605e19b9b26e3ec807 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-videocc.yaml
@@ -32,14 +32,18 @@ properties:
- description: Video AHB clock from GCC
power-domains:
- maxItems: 1
description:
- MMCX power domain.
+ Power domains required for the clock controller to operate
+ items:
+ - description: MMCX power domain
+ - description: MXC power domain
required-opps:
- maxItems: 1
description:
- A phandle to an OPP node describing required MMCX performance point.
+ OPP nodes that describe required performance points on power domains
+ items:
+ - description: MMCX performance point
+ - description: MXC performance point
required:
- compatible
@@ -72,8 +76,10 @@ examples:
reg = <0x0aaf0000 0x10000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_VIDEO_AHB_CLK>;
- power-domains = <&rpmhpd RPMHPD_MMCX>;
- required-opps = <&rpmhpd_opp_low_svs>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>,
+ <&rpmhpd RPMHPD_MXC>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 02/18] dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc Jagadeesh Kona
` (18 subsequent siblings)
20 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue
From: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
To configure the camera PLLs and enable the camera GDSCs on SM8450, SM8475,
SM8550 and SM8650 platforms, the MXC rail must be ON along with MMCX.
Therefore, update the camcc bindings to include the MXC power domain on
these platforms.
Fixes: 9cbc64745fc6 ("dt-bindings: clock: qcom: Add SM8550 camera clock controller")
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
.../devicetree/bindings/clock/qcom,sm8450-camcc.yaml | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml
index 9e79f8fec437b9aecb5103092f6ff2ad1cd42626..3fded6aa712fc1920c4c4a923545901ba804c42f 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml
@@ -37,14 +37,18 @@ properties:
- description: Sleep clock source
power-domains:
- maxItems: 1
description:
- A phandle and PM domain specifier for the MMCX power domain.
+ Power domains required for the clock controller to operate
+ items:
+ - description: MMCX power domain
+ - description: MXC power domain
required-opps:
- maxItems: 1
description:
- A phandle to an OPP node describing required MMCX performance point.
+ OPP nodes that describe required performance points on power domains
+ items:
+ - description: MMCX performance point
+ - description: MXC performance point
reg:
maxItems: 1
@@ -82,8 +86,10 @@ examples:
<&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>;
- power-domains = <&rpmhpd RPMHPD_MMCX>;
- required-opps = <&rpmhpd_opp_low_svs>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>,
+ <&rpmhpd RPMHPD_MXC>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 02/18] dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-06-03 7:04 ` Krzysztof Kozlowski
2025-05-30 13:20 ` [PATCH v5 04/18] clk: qcom: clk-alpha-pll: Add support for common PLL configuration function Jagadeesh Kona
` (17 subsequent siblings)
20 siblings, 1 reply; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Dmitry Baryshkov
SC8280XP camcc only requires the MMCX power domain, unlike SM8450 camcc
which now supports both MMCX and MXC power domains. Hence move SC8280XP
camcc from SM8450 to SA8775P camcc, to have single power domain support.
SA8775P camcc doesn't support required-opps property currently but SC8280XP
camcc need that property, so add required-opps based on SC8280XP camcc
conditional check in SA8775P camcc bindings.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
.../devicetree/bindings/clock/qcom,sa8775p-camcc.yaml | 15 +++++++++++++++
.../devicetree/bindings/clock/qcom,sm8450-camcc.yaml | 2 --
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,sa8775p-camcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sa8775p-camcc.yaml
index 81623f59d11d73839e5c551411a52427e2f28415..f42ccb6627a387ee0d0238ebd1fcd1cdf64c5676 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sa8775p-camcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sa8775p-camcc.yaml
@@ -17,12 +17,14 @@ description: |
See also:
include/dt-bindings/clock/qcom,qcs8300-camcc.h
include/dt-bindings/clock/qcom,sa8775p-camcc.h
+ include/dt-bindings/clock/qcom,sc8280xp-camcc.h
properties:
compatible:
enum:
- qcom,qcs8300-camcc
- qcom,sa8775p-camcc
+ - qcom,sc8280xp-camcc
clocks:
items:
@@ -35,6 +37,11 @@ properties:
maxItems: 1
description: MMCX power domain
+ required-opps:
+ description:
+ OPP node describing required MMCX performance point.
+ maxItems: 1
+
required:
- compatible
- clocks
@@ -43,6 +50,14 @@ required:
allOf:
- $ref: qcom,gcc.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: qcom,sc8280xp-camcc
+ then:
+ required:
+ - required-opps
unevaluatedProperties: false
diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml
index 3fded6aa712fc1920c4c4a923545901ba804c42f..c1e06f39431e68a3cd2f6c2dba84be2a3c143bb1 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml
@@ -15,7 +15,6 @@ description: |
domains on SM8450.
See also:
- include/dt-bindings/clock/qcom,sc8280xp-camcc.h
include/dt-bindings/clock/qcom,sm8450-camcc.h
include/dt-bindings/clock/qcom,sm8550-camcc.h
include/dt-bindings/clock/qcom,sm8650-camcc.h
@@ -23,7 +22,6 @@ description: |
properties:
compatible:
enum:
- - qcom,sc8280xp-camcc
- qcom,sm8450-camcc
- qcom,sm8475-camcc
- qcom,sm8550-camcc
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 04/18] clk: qcom: clk-alpha-pll: Add support for common PLL configuration function
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (2 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 05/18] clk: qcom: common: Handle runtime power management in qcom_cc_really_probe Jagadeesh Kona
` (16 subsequent siblings)
20 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Dmitry Baryshkov
From: Taniya Das <quic_tdas@quicinc.com>
To properly configure the PLLs on recent chipsets, it often requires more
than one power domain to be kept ON. The support to enable multiple power
domains is being added in qcom_cc_really_probe() and PLLs should be
configured post all the required power domains are enabled.
Hence integrate PLL configuration into clk_alpha_pll structure and add
support for qcom_clk_alpha_pll_configure() function which can be called
from qcom_cc_really_probe() to configure the clock controller PLLs after
all required power domains are enabled.
Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
drivers/clk/qcom/clk-alpha-pll.c | 57 ++++++++++++++++++++++++++++++++++++++++
drivers/clk/qcom/clk-alpha-pll.h | 3 +++
2 files changed, 60 insertions(+)
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
index cec0afea8e446010f0d4140d4ef63121706dde47..d8e1cd1263317814da2d0414600988de4b87c56f 100644
--- a/drivers/clk/qcom/clk-alpha-pll.c
+++ b/drivers/clk/qcom/clk-alpha-pll.c
@@ -63,6 +63,8 @@
#define PLL_OPMODE(p) ((p)->offset + (p)->regs[PLL_OFF_OPMODE])
#define PLL_FRAC(p) ((p)->offset + (p)->regs[PLL_OFF_FRAC])
+#define GET_PLL_TYPE(pll) (((pll)->regs - clk_alpha_pll_regs[0]) / PLL_OFF_MAX_REGS)
+
const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = {
[CLK_ALPHA_PLL_TYPE_DEFAULT] = {
[PLL_OFF_L_VAL] = 0x04,
@@ -2960,3 +2962,58 @@ const struct clk_ops clk_alpha_pll_regera_ops = {
.set_rate = clk_zonda_pll_set_rate,
};
EXPORT_SYMBOL_GPL(clk_alpha_pll_regera_ops);
+
+void qcom_clk_alpha_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap)
+{
+ const struct clk_init_data *init = pll->clkr.hw.init;
+
+ switch (GET_PLL_TYPE(pll)) {
+ case CLK_ALPHA_PLL_TYPE_LUCID_OLE:
+ clk_lucid_ole_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_LUCID_EVO:
+ clk_lucid_evo_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_TAYCAN_ELU:
+ clk_taycan_elu_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_RIVIAN_EVO:
+ clk_rivian_evo_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_TRION:
+ clk_trion_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_HUAYRA_2290:
+ clk_huayra_2290_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_FABIA:
+ clk_fabia_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_AGERA:
+ clk_agera_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_PONGO_ELU:
+ clk_pongo_elu_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_ZONDA:
+ case CLK_ALPHA_PLL_TYPE_ZONDA_OLE:
+ clk_zonda_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_STROMER:
+ case CLK_ALPHA_PLL_TYPE_STROMER_PLUS:
+ clk_stromer_pll_configure(pll, regmap, pll->config);
+ break;
+ case CLK_ALPHA_PLL_TYPE_DEFAULT:
+ case CLK_ALPHA_PLL_TYPE_DEFAULT_EVO:
+ case CLK_ALPHA_PLL_TYPE_HUAYRA:
+ case CLK_ALPHA_PLL_TYPE_HUAYRA_APSS:
+ case CLK_ALPHA_PLL_TYPE_BRAMMO:
+ case CLK_ALPHA_PLL_TYPE_BRAMMO_EVO:
+ clk_alpha_pll_configure(pll, regmap, pll->config);
+ break;
+ default:
+ WARN(1, "%s: invalid pll type\n", init->name);
+ break;
+ }
+}
+EXPORT_SYMBOL_GPL(qcom_clk_alpha_pll_configure);
diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h
index 79aca8525262211ae5295245427d4540abf1e09a..7f35aaa7a35d88411beb11fd2be5d5dd5bfbe066 100644
--- a/drivers/clk/qcom/clk-alpha-pll.h
+++ b/drivers/clk/qcom/clk-alpha-pll.h
@@ -81,6 +81,7 @@ struct pll_vco {
* struct clk_alpha_pll - phase locked loop (PLL)
* @offset: base address of registers
* @regs: alpha pll register map (see @clk_alpha_pll_regs)
+ * @config: array of pll settings
* @vco_table: array of VCO settings
* @num_vco: number of VCO settings in @vco_table
* @flags: bitmask to indicate features supported by the hardware
@@ -90,6 +91,7 @@ struct clk_alpha_pll {
u32 offset;
const u8 *regs;
+ const struct alpha_pll_config *config;
const struct pll_vco *vco_table;
size_t num_vco;
#define SUPPORTS_OFFLINE_REQ BIT(0)
@@ -237,5 +239,6 @@ void clk_stromer_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
const struct alpha_pll_config *config);
void clk_regera_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
const struct alpha_pll_config *config);
+void qcom_clk_alpha_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap);
#endif
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 05/18] clk: qcom: common: Handle runtime power management in qcom_cc_really_probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (3 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 04/18] clk: qcom: clk-alpha-pll: Add support for common PLL configuration function Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 06/18] clk: qcom: common: Add support to configure clk regs " Jagadeesh Kona
` (15 subsequent siblings)
20 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Dmitry Baryshkov
Add support for runtime power management in qcom_cc_really_probe() to
commonize it across all the clock controllers. The runtime power management
is not required for all clock controllers, hence handle the rpm based on
use_rpm flag in clock controller descriptor.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
drivers/clk/qcom/common.c | 37 ++++++++++++++++++++++++++++---------
drivers/clk/qcom/common.h | 1 +
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index 9e3380fd718198c9fe63d7361615a91c3ecb3d60..9cbf1c5296dad3ee5477a2f5a445488707663b9d 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -9,6 +9,7 @@
#include <linux/platform_device.h>
#include <linux/clk-provider.h>
#include <linux/interconnect-clk.h>
+#include <linux/pm_runtime.h>
#include <linux/reset-controller.h>
#include <linux/of.h>
@@ -304,6 +305,16 @@ int qcom_cc_really_probe(struct device *dev,
if (ret < 0 && ret != -EEXIST)
return ret;
+ if (desc->use_rpm) {
+ ret = devm_pm_runtime_enable(dev);
+ if (ret)
+ return ret;
+
+ ret = pm_runtime_resume_and_get(dev);
+ if (ret)
+ return ret;
+ }
+
reset = &cc->reset;
reset->rcdev.of_node = dev->of_node;
reset->rcdev.ops = &qcom_reset_ops;
@@ -314,23 +325,25 @@ int qcom_cc_really_probe(struct device *dev,
ret = devm_reset_controller_register(dev, &reset->rcdev);
if (ret)
- return ret;
+ goto put_rpm;
if (desc->gdscs && desc->num_gdscs) {
scd = devm_kzalloc(dev, sizeof(*scd), GFP_KERNEL);
- if (!scd)
- return -ENOMEM;
+ if (!scd) {
+ ret = -ENOMEM;
+ goto put_rpm;
+ }
scd->dev = dev;
scd->scs = desc->gdscs;
scd->num = desc->num_gdscs;
scd->pd_list = cc->pd_list;
ret = gdsc_register(scd, &reset->rcdev, regmap);
if (ret)
- return ret;
+ goto put_rpm;
ret = devm_add_action_or_reset(dev, qcom_cc_gdsc_unregister,
scd);
if (ret)
- return ret;
+ goto put_rpm;
}
cc->rclks = rclks;
@@ -341,7 +354,7 @@ int qcom_cc_really_probe(struct device *dev,
for (i = 0; i < num_clk_hws; i++) {
ret = devm_clk_hw_register(dev, clk_hws[i]);
if (ret)
- return ret;
+ goto put_rpm;
}
for (i = 0; i < num_clks; i++) {
@@ -350,14 +363,20 @@ int qcom_cc_really_probe(struct device *dev,
ret = devm_clk_register_regmap(dev, rclks[i]);
if (ret)
- return ret;
+ goto put_rpm;
}
ret = devm_of_clk_add_hw_provider(dev, qcom_cc_clk_hw_get, cc);
if (ret)
- return ret;
+ goto put_rpm;
+
+ ret = qcom_cc_icc_register(dev, desc);
+
+put_rpm:
+ if (desc->use_rpm)
+ pm_runtime_put(dev);
- return qcom_cc_icc_register(dev, desc);
+ return ret;
}
EXPORT_SYMBOL_GPL(qcom_cc_really_probe);
diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h
index 7ace5d7f5836aa81431153ba92d8f14f2ffe8147..9c10bc8c197cd7dfa25ccd245763ad6acb081523 100644
--- a/drivers/clk/qcom/common.h
+++ b/drivers/clk/qcom/common.h
@@ -38,6 +38,7 @@ struct qcom_cc_desc {
const struct qcom_icc_hws_data *icc_hws;
size_t num_icc_hws;
unsigned int icc_first_node_id;
+ bool use_rpm;
};
/**
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 06/18] clk: qcom: common: Add support to configure clk regs in qcom_cc_really_probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (4 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 05/18] clk: qcom: common: Handle runtime power management in qcom_cc_really_probe Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-05-30 23:00 ` Konrad Dybcio
2025-05-30 13:20 ` [PATCH v5 07/18] clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe Jagadeesh Kona
` (14 subsequent siblings)
20 siblings, 1 reply; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Dmitry Baryshkov
Add support to configure PLLS and clk registers in qcom_cc_really_probe().
This ensures all required power domains are enabled and kept ON by runtime
PM code in qcom_cc_really_probe() before configuring the PLLS or clock
registers.
Add support for qcom_cc_driver_data struct to maintain the clock
controllers PLLs and CBCRs data, and a pointer of it can be stored in
clock descriptor structure. If any clock controller driver requires to
program some additional misc register settings, it can register the
clk_regs_configure() callback in the driver data.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
drivers/clk/qcom/common.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
drivers/clk/qcom/common.h | 9 +++++++++
2 files changed, 53 insertions(+)
diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index 9cbf1c5296dad3ee5477a2f5a445488707663b9d..b3838d885db25f183979576e5c685c07dc6a7049 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -14,6 +14,8 @@
#include <linux/of.h>
#include "common.h"
+#include "clk-alpha-pll.h"
+#include "clk-branch.h"
#include "clk-rcg.h"
#include "clk-regmap.h"
#include "reset.h"
@@ -285,6 +287,40 @@ static int qcom_cc_icc_register(struct device *dev,
desc->num_icc_hws, icd);
}
+static int qcom_cc_clk_pll_configure(const struct qcom_cc_driver_data *data,
+ struct regmap *regmap)
+{
+ const struct clk_init_data *init;
+ struct clk_alpha_pll *pll;
+ int i;
+
+ for (i = 0; i < data->num_alpha_plls; i++) {
+ pll = data->alpha_plls[i];
+ init = pll->clkr.hw.init;
+
+ if (!pll->config || !pll->regs) {
+ pr_err("%s: missing pll config or regs\n", init->name);
+ return -EINVAL;
+ }
+
+ qcom_clk_alpha_pll_configure(pll, regmap);
+ }
+
+ return 0;
+}
+
+static void qcom_cc_clk_regs_configure(struct device *dev, const struct qcom_cc_driver_data *data,
+ struct regmap *regmap)
+{
+ int i;
+
+ for (i = 0; i < data->num_clk_cbcrs; i++)
+ qcom_branch_set_clk_en(regmap, data->clk_cbcrs[i]);
+
+ if (data->clk_regs_configure)
+ data->clk_regs_configure(dev, regmap);
+}
+
int qcom_cc_really_probe(struct device *dev,
const struct qcom_cc_desc *desc, struct regmap *regmap)
{
@@ -315,6 +351,14 @@ int qcom_cc_really_probe(struct device *dev,
return ret;
}
+ if (desc->driver_data) {
+ ret = qcom_cc_clk_pll_configure(desc->driver_data, regmap);
+ if (ret)
+ goto put_rpm;
+
+ qcom_cc_clk_regs_configure(dev, desc->driver_data, regmap);
+ }
+
reset = &cc->reset;
reset->rcdev.of_node = dev->of_node;
reset->rcdev.ops = &qcom_reset_ops;
diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h
index 9c10bc8c197cd7dfa25ccd245763ad6acb081523..0f4b2d40c65cf94de694226f63ca30f4181d0ce5 100644
--- a/drivers/clk/qcom/common.h
+++ b/drivers/clk/qcom/common.h
@@ -25,6 +25,14 @@ struct qcom_icc_hws_data {
int clk_id;
};
+struct qcom_cc_driver_data {
+ struct clk_alpha_pll **alpha_plls;
+ size_t num_alpha_plls;
+ u32 *clk_cbcrs;
+ size_t num_clk_cbcrs;
+ void (*clk_regs_configure)(struct device *dev, struct regmap *regmap);
+};
+
struct qcom_cc_desc {
const struct regmap_config *config;
struct clk_regmap **clks;
@@ -39,6 +47,7 @@ struct qcom_cc_desc {
size_t num_icc_hws;
unsigned int icc_first_node_id;
bool use_rpm;
+ struct qcom_cc_driver_data *driver_data;
};
/**
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 07/18] clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (5 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 06/18] clk: qcom: common: Add support to configure clk regs " Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 08/18] clk: qcom: videocc-sm8550: " Jagadeesh Kona
` (13 subsequent siblings)
20 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Dmitry Baryshkov, Konrad Dybcio
Video PLLs on SM8450/SM8475 require both MMCX and MXC rails to be kept ON
to configure the PLLs properly. Hence move runtime power management, PLL
configuration and enable critical clocks to qcom_cc_really_probe() which
ensures all required power domains are in enabled state before configuring
the PLLs or enabling the clocks.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
drivers/clk/qcom/videocc-sm8450.c | 58 +++++++++++++++++----------------------
1 file changed, 25 insertions(+), 33 deletions(-)
diff --git a/drivers/clk/qcom/videocc-sm8450.c b/drivers/clk/qcom/videocc-sm8450.c
index 2e11dcffb6646d47b298c27ef68635a465dd728e..d53182f001262324d8f54b0c6a5e73541eb32190 100644
--- a/drivers/clk/qcom/videocc-sm8450.c
+++ b/drivers/clk/qcom/videocc-sm8450.c
@@ -7,7 +7,6 @@
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <dt-bindings/clock/qcom,sm8450-videocc.h>
@@ -63,6 +62,7 @@ static const struct alpha_pll_config sm8475_video_cc_pll0_config = {
static struct clk_alpha_pll video_cc_pll0 = {
.offset = 0x0,
+ .config = &video_cc_pll0_config,
.vco_table = lucid_evo_vco,
.num_vco = ARRAY_SIZE(lucid_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
@@ -106,6 +106,7 @@ static const struct alpha_pll_config sm8475_video_cc_pll1_config = {
static struct clk_alpha_pll video_cc_pll1 = {
.offset = 0x1000,
+ .config = &video_cc_pll1_config,
.vco_table = lucid_evo_vco,
.num_vco = ARRAY_SIZE(lucid_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
@@ -407,6 +408,17 @@ static const struct qcom_reset_map video_cc_sm8450_resets[] = {
[VIDEO_CC_MVS1C_CLK_ARES] = { .reg = 0x808c, .bit = 2, .udelay = 1000 },
};
+static struct clk_alpha_pll *video_cc_sm8450_plls[] = {
+ &video_cc_pll0,
+ &video_cc_pll1,
+};
+
+static u32 video_cc_sm8450_critical_cbcrs[] = {
+ 0x80e4, /* VIDEO_CC_AHB_CLK */
+ 0x8114, /* VIDEO_CC_XO_CLK */
+ 0x8130, /* VIDEO_CC_SLEEP_CLK */
+};
+
static const struct regmap_config video_cc_sm8450_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
@@ -415,6 +427,13 @@ static const struct regmap_config video_cc_sm8450_regmap_config = {
.fast_io = true,
};
+static struct qcom_cc_driver_data video_cc_sm8450_driver_data = {
+ .alpha_plls = video_cc_sm8450_plls,
+ .num_alpha_plls = ARRAY_SIZE(video_cc_sm8450_plls),
+ .clk_cbcrs = video_cc_sm8450_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(video_cc_sm8450_critical_cbcrs),
+};
+
static const struct qcom_cc_desc video_cc_sm8450_desc = {
.config = &video_cc_sm8450_regmap_config,
.clks = video_cc_sm8450_clocks,
@@ -423,6 +442,8 @@ static const struct qcom_cc_desc video_cc_sm8450_desc = {
.num_resets = ARRAY_SIZE(video_cc_sm8450_resets),
.gdscs = video_cc_sm8450_gdscs,
.num_gdscs = ARRAY_SIZE(video_cc_sm8450_gdscs),
+ .use_rpm = true,
+ .driver_data = &video_cc_sm8450_driver_data,
};
static const struct of_device_id video_cc_sm8450_match_table[] = {
@@ -434,23 +455,6 @@ MODULE_DEVICE_TABLE(of, video_cc_sm8450_match_table);
static int video_cc_sm8450_probe(struct platform_device *pdev)
{
- struct regmap *regmap;
- int ret;
-
- ret = devm_pm_runtime_enable(&pdev->dev);
- if (ret)
- return ret;
-
- ret = pm_runtime_resume_and_get(&pdev->dev);
- if (ret)
- return ret;
-
- regmap = qcom_cc_map(pdev, &video_cc_sm8450_desc);
- if (IS_ERR(regmap)) {
- pm_runtime_put(&pdev->dev);
- return PTR_ERR(regmap);
- }
-
if (of_device_is_compatible(pdev->dev.of_node, "qcom,sm8475-videocc")) {
/* Update VideoCC PLL0 */
video_cc_pll0.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE];
@@ -458,23 +462,11 @@ static int video_cc_sm8450_probe(struct platform_device *pdev)
/* Update VideoCC PLL1 */
video_cc_pll1.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE];
- clk_lucid_ole_pll_configure(&video_cc_pll0, regmap, &sm8475_video_cc_pll0_config);
- clk_lucid_ole_pll_configure(&video_cc_pll1, regmap, &sm8475_video_cc_pll1_config);
- } else {
- clk_lucid_evo_pll_configure(&video_cc_pll0, regmap, &video_cc_pll0_config);
- clk_lucid_evo_pll_configure(&video_cc_pll1, regmap, &video_cc_pll1_config);
+ video_cc_pll0.config = &sm8475_video_cc_pll0_config;
+ video_cc_pll1.config = &sm8475_video_cc_pll1_config;
}
- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0x80e4); /* VIDEO_CC_AHB_CLK */
- qcom_branch_set_clk_en(regmap, 0x8130); /* VIDEO_CC_SLEEP_CLK */
- qcom_branch_set_clk_en(regmap, 0x8114); /* VIDEO_CC_XO_CLK */
-
- ret = qcom_cc_really_probe(&pdev->dev, &video_cc_sm8450_desc, regmap);
-
- pm_runtime_put(&pdev->dev);
-
- return ret;
+ return qcom_cc_probe(pdev, &video_cc_sm8450_desc);
}
static struct platform_driver video_cc_sm8450_driver = {
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 08/18] clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (6 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 07/18] clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-05-30 22:57 ` Konrad Dybcio
2025-06-03 8:02 ` Bryan O'Donoghue
2025-05-30 13:20 ` [PATCH v5 09/18] clk: qcom: camcc-sm8450: " Jagadeesh Kona
` (12 subsequent siblings)
20 siblings, 2 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Dmitry Baryshkov
Video PLLs on SM8550/SM8650 require both MMCX and MXC rails to be kept ON
to configure the PLLs properly. Hence move runtime power management, PLL
configuration and enable critical clocks to qcom_cc_really_probe() which
ensures all required power domains are in enabled state before configuring
the PLLs or enabling the clocks.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
drivers/clk/qcom/videocc-sm8550.c | 66 +++++++++++++++++++--------------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/drivers/clk/qcom/videocc-sm8550.c b/drivers/clk/qcom/videocc-sm8550.c
index fcfe0cade6d0a95e749aabbc2af1174e5a70f0db..3e5891b43ee404edc6c99bbf8f2583cb44df9e37 100644
--- a/drivers/clk/qcom/videocc-sm8550.c
+++ b/drivers/clk/qcom/videocc-sm8550.c
@@ -7,7 +7,6 @@
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <dt-bindings/clock/qcom,sm8650-videocc.h>
@@ -51,6 +50,7 @@ static struct alpha_pll_config video_cc_pll0_config = {
static struct clk_alpha_pll video_cc_pll0 = {
.offset = 0x0,
+ .config = &video_cc_pll0_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -82,6 +82,7 @@ static struct alpha_pll_config video_cc_pll1_config = {
static struct clk_alpha_pll video_cc_pll1 = {
.offset = 0x1000,
+ .config = &video_cc_pll1_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -511,6 +512,23 @@ static const struct qcom_reset_map video_cc_sm8550_resets[] = {
[VIDEO_CC_XO_CLK_ARES] = { .reg = 0x8124, .bit = 2, .udelay = 100 },
};
+static struct clk_alpha_pll *video_cc_sm8550_plls[] = {
+ &video_cc_pll0,
+ &video_cc_pll1,
+};
+
+static u32 video_cc_sm8550_critical_cbcrs[] = {
+ 0x80f4, /* VIDEO_CC_AHB_CLK */
+ 0x8124, /* VIDEO_CC_XO_CLK */
+ 0x8140, /* VIDEO_CC_SLEEP_CLK */
+};
+
+static u32 video_cc_sm8650_critical_cbcrs[] = {
+ 0x80f4, /* VIDEO_CC_AHB_CLK */
+ 0x8124, /* VIDEO_CC_XO_CLK */
+ 0x8150, /* VIDEO_CC_SLEEP_CLK */
+};
+
static const struct regmap_config video_cc_sm8550_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
@@ -519,6 +537,13 @@ static const struct regmap_config video_cc_sm8550_regmap_config = {
.fast_io = true,
};
+static struct qcom_cc_driver_data video_cc_sm8550_driver_data = {
+ .alpha_plls = video_cc_sm8550_plls,
+ .num_alpha_plls = ARRAY_SIZE(video_cc_sm8550_plls),
+ .clk_cbcrs = video_cc_sm8550_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(video_cc_sm8550_critical_cbcrs),
+};
+
static const struct qcom_cc_desc video_cc_sm8550_desc = {
.config = &video_cc_sm8550_regmap_config,
.clks = video_cc_sm8550_clocks,
@@ -527,6 +552,8 @@ static const struct qcom_cc_desc video_cc_sm8550_desc = {
.num_resets = ARRAY_SIZE(video_cc_sm8550_resets),
.gdscs = video_cc_sm8550_gdscs,
.num_gdscs = ARRAY_SIZE(video_cc_sm8550_gdscs),
+ .use_rpm = true,
+ .driver_data = &video_cc_sm8550_driver_data,
};
static const struct of_device_id video_cc_sm8550_match_table[] = {
@@ -538,26 +565,7 @@ MODULE_DEVICE_TABLE(of, video_cc_sm8550_match_table);
static int video_cc_sm8550_probe(struct platform_device *pdev)
{
- struct regmap *regmap;
- int ret;
- u32 sleep_clk_offset = 0x8140;
-
- ret = devm_pm_runtime_enable(&pdev->dev);
- if (ret)
- return ret;
-
- ret = pm_runtime_resume_and_get(&pdev->dev);
- if (ret)
- return ret;
-
- regmap = qcom_cc_map(pdev, &video_cc_sm8550_desc);
- if (IS_ERR(regmap)) {
- pm_runtime_put(&pdev->dev);
- return PTR_ERR(regmap);
- }
-
if (of_device_is_compatible(pdev->dev.of_node, "qcom,sm8650-videocc")) {
- sleep_clk_offset = 0x8150;
video_cc_pll0_config.l = 0x1e;
video_cc_pll0_config.alpha = 0xa000;
video_cc_pll1_config.l = 0x2b;
@@ -569,21 +577,13 @@ static int video_cc_sm8550_probe(struct platform_device *pdev)
video_cc_sm8550_clocks[VIDEO_CC_MVS1_SHIFT_CLK] = &video_cc_mvs1_shift_clk.clkr;
video_cc_sm8550_clocks[VIDEO_CC_MVS1C_SHIFT_CLK] = &video_cc_mvs1c_shift_clk.clkr;
video_cc_sm8550_clocks[VIDEO_CC_XO_CLK_SRC] = &video_cc_xo_clk_src.clkr;
- }
-
- clk_lucid_ole_pll_configure(&video_cc_pll0, regmap, &video_cc_pll0_config);
- clk_lucid_ole_pll_configure(&video_cc_pll1, regmap, &video_cc_pll1_config);
- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0x80f4); /* VIDEO_CC_AHB_CLK */
- qcom_branch_set_clk_en(regmap, sleep_clk_offset); /* VIDEO_CC_SLEEP_CLK */
- qcom_branch_set_clk_en(regmap, 0x8124); /* VIDEO_CC_XO_CLK */
-
- ret = qcom_cc_really_probe(&pdev->dev, &video_cc_sm8550_desc, regmap);
-
- pm_runtime_put(&pdev->dev);
+ video_cc_sm8550_driver_data.clk_cbcrs = video_cc_sm8650_critical_cbcrs;
+ video_cc_sm8550_driver_data.num_clk_cbcrs =
+ ARRAY_SIZE(video_cc_sm8650_critical_cbcrs);
+ }
- return ret;
+ return qcom_cc_probe(pdev, &video_cc_sm8550_desc);
}
static struct platform_driver video_cc_sm8550_driver = {
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 09/18] clk: qcom: camcc-sm8450: Move PLL & clk configuration to really probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (7 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 08/18] clk: qcom: videocc-sm8550: " Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-06-03 8:05 ` Bryan O'Donoghue
2025-05-30 13:20 ` [PATCH v5 10/18] clk: qcom: camcc-sm8550: " Jagadeesh Kona
` (11 subsequent siblings)
20 siblings, 1 reply; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Dmitry Baryshkov, Konrad Dybcio
Camera PLLs on SM8450/SM8475 require both MMCX and MXC rails to be
kept ON to configure the PLLs properly. Hence move runtime power
management, PLL configuration and enable critical clocks to
qcom_cc_really_probe() which ensures all required power domains are in
enabled state before configuring the PLLs or enabling the clocks.
This change also removes the modelling for cam_cc_gdsc_clk and keeps it
always ON from probe since using CLK_IS_CRITICAL will prevent the clock
controller associated power domains from collapsing due to clock framework
invoking clk_pm_runtime_get() during prepare.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
drivers/clk/qcom/camcc-sm8450.c | 89 ++++++++++++++++++++---------------------
1 file changed, 44 insertions(+), 45 deletions(-)
diff --git a/drivers/clk/qcom/camcc-sm8450.c b/drivers/clk/qcom/camcc-sm8450.c
index 08982737e4901c0703e19f8dd2d302e24748210c..4dd8be8cc9881c890d2e7c3a12f12816a9ab47dc 100644
--- a/drivers/clk/qcom/camcc-sm8450.c
+++ b/drivers/clk/qcom/camcc-sm8450.c
@@ -86,6 +86,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll0_config = {
static struct clk_alpha_pll cam_cc_pll0 = {
.offset = 0x0,
+ .config = &cam_cc_pll0_config,
.vco_table = lucid_evo_vco,
.num_vco = ARRAY_SIZE(lucid_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
@@ -191,6 +192,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll1_config = {
static struct clk_alpha_pll cam_cc_pll1 = {
.offset = 0x1000,
+ .config = &cam_cc_pll1_config,
.vco_table = lucid_evo_vco,
.num_vco = ARRAY_SIZE(lucid_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
@@ -257,6 +259,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll2_config = {
static struct clk_alpha_pll cam_cc_pll2 = {
.offset = 0x2000,
+ .config = &cam_cc_pll2_config,
.vco_table = rivian_evo_vco,
.num_vco = ARRAY_SIZE(rivian_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO],
@@ -296,6 +299,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll3_config = {
static struct clk_alpha_pll cam_cc_pll3 = {
.offset = 0x3000,
+ .config = &cam_cc_pll3_config,
.vco_table = lucid_evo_vco,
.num_vco = ARRAY_SIZE(lucid_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
@@ -368,6 +372,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll4_config = {
static struct clk_alpha_pll cam_cc_pll4 = {
.offset = 0x4000,
+ .config = &cam_cc_pll4_config,
.vco_table = lucid_evo_vco,
.num_vco = ARRAY_SIZE(lucid_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
@@ -440,6 +445,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll5_config = {
static struct clk_alpha_pll cam_cc_pll5 = {
.offset = 0x5000,
+ .config = &cam_cc_pll5_config,
.vco_table = lucid_evo_vco,
.num_vco = ARRAY_SIZE(lucid_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
@@ -512,6 +518,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll6_config = {
static struct clk_alpha_pll cam_cc_pll6 = {
.offset = 0x6000,
+ .config = &cam_cc_pll6_config,
.vco_table = lucid_evo_vco,
.num_vco = ARRAY_SIZE(lucid_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
@@ -584,6 +591,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll7_config = {
static struct clk_alpha_pll cam_cc_pll7 = {
.offset = 0x7000,
+ .config = &cam_cc_pll7_config,
.vco_table = lucid_evo_vco,
.num_vco = ARRAY_SIZE(lucid_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
@@ -656,6 +664,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll8_config = {
static struct clk_alpha_pll cam_cc_pll8 = {
.offset = 0x8000,
+ .config = &cam_cc_pll8_config,
.vco_table = lucid_evo_vco,
.num_vco = ARRAY_SIZE(lucid_evo_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
@@ -1476,24 +1485,6 @@ static struct clk_rcg2 cam_cc_xo_clk_src = {
},
};
-static struct clk_branch cam_cc_gdsc_clk = {
- .halt_reg = 0x1320c,
- .halt_check = BRANCH_HALT,
- .clkr = {
- .enable_reg = 0x1320c,
- .enable_mask = BIT(0),
- .hw.init = &(const struct clk_init_data) {
- .name = "cam_cc_gdsc_clk",
- .parent_hws = (const struct clk_hw*[]) {
- &cam_cc_xo_clk_src.clkr.hw,
- },
- .num_parents = 1,
- .flags = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct clk_branch cam_cc_bps_ahb_clk = {
.halt_reg = 0x1004c,
.halt_check = BRANCH_HALT,
@@ -2819,7 +2810,6 @@ static struct clk_regmap *cam_cc_sm8450_clocks[] = {
[CAM_CC_CSIPHY4_CLK] = &cam_cc_csiphy4_clk.clkr,
[CAM_CC_CSIPHY5_CLK] = &cam_cc_csiphy5_clk.clkr,
[CAM_CC_FAST_AHB_CLK_SRC] = &cam_cc_fast_ahb_clk_src.clkr,
- [CAM_CC_GDSC_CLK] = &cam_cc_gdsc_clk.clkr,
[CAM_CC_ICP_AHB_CLK] = &cam_cc_icp_ahb_clk.clkr,
[CAM_CC_ICP_CLK] = &cam_cc_icp_clk.clkr,
[CAM_CC_ICP_CLK_SRC] = &cam_cc_icp_clk_src.clkr,
@@ -2913,6 +2903,22 @@ static const struct qcom_reset_map cam_cc_sm8450_resets[] = {
[CAM_CC_SFE_1_BCR] = { 0x13094 },
};
+static struct clk_alpha_pll *cam_cc_sm8450_plls[] = {
+ &cam_cc_pll0,
+ &cam_cc_pll1,
+ &cam_cc_pll2,
+ &cam_cc_pll3,
+ &cam_cc_pll4,
+ &cam_cc_pll5,
+ &cam_cc_pll6,
+ &cam_cc_pll7,
+ &cam_cc_pll8,
+};
+
+static u32 cam_cc_sm8450_critical_cbcrs[] = {
+ 0x1320c, /* CAM_CC_GDSC_CLK */
+};
+
static const struct regmap_config cam_cc_sm8450_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
@@ -3021,6 +3027,13 @@ static struct gdsc *cam_cc_sm8450_gdscs[] = {
[TITAN_TOP_GDSC] = &titan_top_gdsc,
};
+static struct qcom_cc_driver_data cam_cc_sm8450_driver_data = {
+ .alpha_plls = cam_cc_sm8450_plls,
+ .num_alpha_plls = ARRAY_SIZE(cam_cc_sm8450_plls),
+ .clk_cbcrs = cam_cc_sm8450_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(cam_cc_sm8450_critical_cbcrs),
+};
+
static const struct qcom_cc_desc cam_cc_sm8450_desc = {
.config = &cam_cc_sm8450_regmap_config,
.clks = cam_cc_sm8450_clocks,
@@ -3029,6 +3042,8 @@ static const struct qcom_cc_desc cam_cc_sm8450_desc = {
.num_resets = ARRAY_SIZE(cam_cc_sm8450_resets),
.gdscs = cam_cc_sm8450_gdscs,
.num_gdscs = ARRAY_SIZE(cam_cc_sm8450_gdscs),
+ .use_rpm = true,
+ .driver_data = &cam_cc_sm8450_driver_data,
};
static const struct of_device_id cam_cc_sm8450_match_table[] = {
@@ -3040,12 +3055,6 @@ MODULE_DEVICE_TABLE(of, cam_cc_sm8450_match_table);
static int cam_cc_sm8450_probe(struct platform_device *pdev)
{
- struct regmap *regmap;
-
- regmap = qcom_cc_map(pdev, &cam_cc_sm8450_desc);
- if (IS_ERR(regmap))
- return PTR_ERR(regmap);
-
if (of_device_is_compatible(pdev->dev.of_node, "qcom,sm8475-camcc")) {
/* Update CAMCC PLL0 */
cam_cc_pll0.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE];
@@ -3092,28 +3101,18 @@ static int cam_cc_sm8450_probe(struct platform_device *pdev)
cam_cc_pll8_out_even.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE];
cam_cc_pll8_out_even.clkr.hw.init = &sm8475_cam_cc_pll8_out_even_init;
- clk_lucid_ole_pll_configure(&cam_cc_pll0, regmap, &sm8475_cam_cc_pll0_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll1, regmap, &sm8475_cam_cc_pll1_config);
- clk_rivian_evo_pll_configure(&cam_cc_pll2, regmap, &sm8475_cam_cc_pll2_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll3, regmap, &sm8475_cam_cc_pll3_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll4, regmap, &sm8475_cam_cc_pll4_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll5, regmap, &sm8475_cam_cc_pll5_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll6, regmap, &sm8475_cam_cc_pll6_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll7, regmap, &sm8475_cam_cc_pll7_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll8, regmap, &sm8475_cam_cc_pll8_config);
- } else {
- clk_lucid_evo_pll_configure(&cam_cc_pll0, regmap, &cam_cc_pll0_config);
- clk_lucid_evo_pll_configure(&cam_cc_pll1, regmap, &cam_cc_pll1_config);
- clk_rivian_evo_pll_configure(&cam_cc_pll2, regmap, &cam_cc_pll2_config);
- clk_lucid_evo_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config);
- clk_lucid_evo_pll_configure(&cam_cc_pll4, regmap, &cam_cc_pll4_config);
- clk_lucid_evo_pll_configure(&cam_cc_pll5, regmap, &cam_cc_pll5_config);
- clk_lucid_evo_pll_configure(&cam_cc_pll6, regmap, &cam_cc_pll6_config);
- clk_lucid_evo_pll_configure(&cam_cc_pll7, regmap, &cam_cc_pll7_config);
- clk_lucid_evo_pll_configure(&cam_cc_pll8, regmap, &cam_cc_pll8_config);
+ cam_cc_pll0.config = &sm8475_cam_cc_pll0_config;
+ cam_cc_pll1.config = &sm8475_cam_cc_pll1_config;
+ cam_cc_pll2.config = &sm8475_cam_cc_pll2_config;
+ cam_cc_pll3.config = &sm8475_cam_cc_pll3_config;
+ cam_cc_pll4.config = &sm8475_cam_cc_pll4_config;
+ cam_cc_pll5.config = &sm8475_cam_cc_pll5_config;
+ cam_cc_pll6.config = &sm8475_cam_cc_pll6_config;
+ cam_cc_pll7.config = &sm8475_cam_cc_pll7_config;
+ cam_cc_pll8.config = &sm8475_cam_cc_pll8_config;
}
- return qcom_cc_really_probe(&pdev->dev, &cam_cc_sm8450_desc, regmap);
+ return qcom_cc_probe(pdev, &cam_cc_sm8450_desc);
}
static struct platform_driver cam_cc_sm8450_driver = {
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 10/18] clk: qcom: camcc-sm8550: Move PLL & clk configuration to really probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (8 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 09/18] clk: qcom: camcc-sm8450: " Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-06-03 8:06 ` Bryan O'Donoghue
2025-05-30 13:20 ` [PATCH v5 11/18] clk: qcom: camcc-sm8650: " Jagadeesh Kona
` (10 subsequent siblings)
20 siblings, 1 reply; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Dmitry Baryshkov, Konrad Dybcio
Camera PLLs on SM8550 require both MMCX and MXC rails to be kept ON to
configure the PLLs properly. Hence move runtime power management, PLL
configuration and enabling critical clocks to qcom_cc_really_probe() which
ensures all required power domains are in enabled state before configuring
the PLLs or enabling the clocks.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
drivers/clk/qcom/camcc-sm8550.c | 85 +++++++++++++++++++++--------------------
1 file changed, 44 insertions(+), 41 deletions(-)
diff --git a/drivers/clk/qcom/camcc-sm8550.c b/drivers/clk/qcom/camcc-sm8550.c
index 871155783c798fd9245d735642272eae2a2d3465..63aed9e4c362d523093409f74ef4e57f292ddf90 100644
--- a/drivers/clk/qcom/camcc-sm8550.c
+++ b/drivers/clk/qcom/camcc-sm8550.c
@@ -7,7 +7,6 @@
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <dt-bindings/clock/qcom,sm8550-camcc.h>
@@ -74,6 +73,7 @@ static const struct alpha_pll_config cam_cc_pll0_config = {
static struct clk_alpha_pll cam_cc_pll0 = {
.offset = 0x0,
+ .config = &cam_cc_pll0_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -151,6 +151,7 @@ static const struct alpha_pll_config cam_cc_pll1_config = {
static struct clk_alpha_pll cam_cc_pll1 = {
.offset = 0x1000,
+ .config = &cam_cc_pll1_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -201,6 +202,7 @@ static const struct alpha_pll_config cam_cc_pll2_config = {
static struct clk_alpha_pll cam_cc_pll2 = {
.offset = 0x2000,
+ .config = &cam_cc_pll2_config,
.vco_table = rivian_ole_vco,
.num_vco = ARRAY_SIZE(rivian_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO],
@@ -232,6 +234,7 @@ static const struct alpha_pll_config cam_cc_pll3_config = {
static struct clk_alpha_pll cam_cc_pll3 = {
.offset = 0x3000,
+ .config = &cam_cc_pll3_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -286,6 +289,7 @@ static const struct alpha_pll_config cam_cc_pll4_config = {
static struct clk_alpha_pll cam_cc_pll4 = {
.offset = 0x4000,
+ .config = &cam_cc_pll4_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -340,6 +344,7 @@ static const struct alpha_pll_config cam_cc_pll5_config = {
static struct clk_alpha_pll cam_cc_pll5 = {
.offset = 0x5000,
+ .config = &cam_cc_pll5_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -394,6 +399,7 @@ static const struct alpha_pll_config cam_cc_pll6_config = {
static struct clk_alpha_pll cam_cc_pll6 = {
.offset = 0x6000,
+ .config = &cam_cc_pll6_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -448,6 +454,7 @@ static const struct alpha_pll_config cam_cc_pll7_config = {
static struct clk_alpha_pll cam_cc_pll7 = {
.offset = 0x7000,
+ .config = &cam_cc_pll7_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -502,6 +509,7 @@ static const struct alpha_pll_config cam_cc_pll8_config = {
static struct clk_alpha_pll cam_cc_pll8 = {
.offset = 0x8000,
+ .config = &cam_cc_pll8_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -556,6 +564,7 @@ static const struct alpha_pll_config cam_cc_pll9_config = {
static struct clk_alpha_pll cam_cc_pll9 = {
.offset = 0x9000,
+ .config = &cam_cc_pll9_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -610,6 +619,7 @@ static const struct alpha_pll_config cam_cc_pll10_config = {
static struct clk_alpha_pll cam_cc_pll10 = {
.offset = 0xa000,
+ .config = &cam_cc_pll10_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -664,6 +674,7 @@ static const struct alpha_pll_config cam_cc_pll11_config = {
static struct clk_alpha_pll cam_cc_pll11 = {
.offset = 0xb000,
+ .config = &cam_cc_pll11_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -718,6 +729,7 @@ static const struct alpha_pll_config cam_cc_pll12_config = {
static struct clk_alpha_pll cam_cc_pll12 = {
.offset = 0xc000,
+ .config = &cam_cc_pll12_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -3479,6 +3491,27 @@ static const struct qcom_reset_map cam_cc_sm8550_resets[] = {
[CAM_CC_SFE_1_BCR] = { 0x133dc },
};
+static struct clk_alpha_pll *cam_cc_sm8550_plls[] = {
+ &cam_cc_pll0,
+ &cam_cc_pll1,
+ &cam_cc_pll2,
+ &cam_cc_pll3,
+ &cam_cc_pll4,
+ &cam_cc_pll5,
+ &cam_cc_pll6,
+ &cam_cc_pll7,
+ &cam_cc_pll8,
+ &cam_cc_pll9,
+ &cam_cc_pll10,
+ &cam_cc_pll11,
+ &cam_cc_pll12,
+};
+
+static u32 cam_cc_sm8550_critical_cbcrs[] = {
+ 0x1419c, /* CAM_CC_GDSC_CLK */
+ 0x142cc, /* CAM_CC_SLEEP_CLK */
+};
+
static const struct regmap_config cam_cc_sm8550_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
@@ -3487,6 +3520,13 @@ static const struct regmap_config cam_cc_sm8550_regmap_config = {
.fast_io = true,
};
+static struct qcom_cc_driver_data cam_cc_sm8550_driver_data = {
+ .alpha_plls = cam_cc_sm8550_plls,
+ .num_alpha_plls = ARRAY_SIZE(cam_cc_sm8550_plls),
+ .clk_cbcrs = cam_cc_sm8550_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(cam_cc_sm8550_critical_cbcrs),
+};
+
static const struct qcom_cc_desc cam_cc_sm8550_desc = {
.config = &cam_cc_sm8550_regmap_config,
.clks = cam_cc_sm8550_clocks,
@@ -3495,6 +3535,8 @@ static const struct qcom_cc_desc cam_cc_sm8550_desc = {
.num_resets = ARRAY_SIZE(cam_cc_sm8550_resets),
.gdscs = cam_cc_sm8550_gdscs,
.num_gdscs = ARRAY_SIZE(cam_cc_sm8550_gdscs),
+ .use_rpm = true,
+ .driver_data = &cam_cc_sm8550_driver_data,
};
static const struct of_device_id cam_cc_sm8550_match_table[] = {
@@ -3505,46 +3547,7 @@ MODULE_DEVICE_TABLE(of, cam_cc_sm8550_match_table);
static int cam_cc_sm8550_probe(struct platform_device *pdev)
{
- struct regmap *regmap;
- int ret;
-
- ret = devm_pm_runtime_enable(&pdev->dev);
- if (ret)
- return ret;
-
- ret = pm_runtime_resume_and_get(&pdev->dev);
- if (ret)
- return ret;
-
- regmap = qcom_cc_map(pdev, &cam_cc_sm8550_desc);
- if (IS_ERR(regmap)) {
- pm_runtime_put(&pdev->dev);
- return PTR_ERR(regmap);
- }
-
- clk_lucid_ole_pll_configure(&cam_cc_pll0, regmap, &cam_cc_pll0_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll1, regmap, &cam_cc_pll1_config);
- clk_rivian_evo_pll_configure(&cam_cc_pll2, regmap, &cam_cc_pll2_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll4, regmap, &cam_cc_pll4_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll5, regmap, &cam_cc_pll5_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll6, regmap, &cam_cc_pll6_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll7, regmap, &cam_cc_pll7_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll8, regmap, &cam_cc_pll8_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll9, regmap, &cam_cc_pll9_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll10, regmap, &cam_cc_pll10_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll11, regmap, &cam_cc_pll11_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll12, regmap, &cam_cc_pll12_config);
-
- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0x1419c); /* CAM_CC_GDSC_CLK */
- qcom_branch_set_clk_en(regmap, 0x142cc); /* CAM_CC_SLEEP_CLK */
-
- ret = qcom_cc_really_probe(&pdev->dev, &cam_cc_sm8550_desc, regmap);
-
- pm_runtime_put(&pdev->dev);
-
- return ret;
+ return qcom_cc_probe(pdev, &cam_cc_sm8550_desc);
}
static struct platform_driver cam_cc_sm8550_driver = {
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 11/18] clk: qcom: camcc-sm8650: Move PLL & clk configuration to really probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (9 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 10/18] clk: qcom: camcc-sm8550: " Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-06-03 8:07 ` Bryan O'Donoghue
2025-05-30 13:20 ` [PATCH v5 12/18] clk: qcom: camcc-x1e80100: " Jagadeesh Kona
` (9 subsequent siblings)
20 siblings, 1 reply; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Konrad Dybcio, Dmitry Baryshkov
Camera PLLs on SM8650 require both MMCX and MXC rails to be kept ON
to configure the PLLs properly. Hence move runtime power management,
PLL configuration and enabling critical clocks to qcom_cc_really_probe()
which ensures all required power domains are in enabled state before
configuring the PLLs or enabling the clocks.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
drivers/clk/qcom/camcc-sm8650.c | 83 +++++++++++++++++++++--------------------
1 file changed, 42 insertions(+), 41 deletions(-)
diff --git a/drivers/clk/qcom/camcc-sm8650.c b/drivers/clk/qcom/camcc-sm8650.c
index 0ccd6de8ba78a3493f8f853a4330d2676b5743d4..8b388904f56fc3b3f77a43a09f735ace24b9fcf7 100644
--- a/drivers/clk/qcom/camcc-sm8650.c
+++ b/drivers/clk/qcom/camcc-sm8650.c
@@ -7,7 +7,6 @@
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <dt-bindings/clock/qcom,sm8650-camcc.h>
@@ -72,6 +71,7 @@ static const struct alpha_pll_config cam_cc_pll0_config = {
static struct clk_alpha_pll cam_cc_pll0 = {
.offset = 0x0,
+ .config = &cam_cc_pll0_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -149,6 +149,7 @@ static const struct alpha_pll_config cam_cc_pll1_config = {
static struct clk_alpha_pll cam_cc_pll1 = {
.offset = 0x1000,
+ .config = &cam_cc_pll1_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -199,6 +200,7 @@ static const struct alpha_pll_config cam_cc_pll2_config = {
static struct clk_alpha_pll cam_cc_pll2 = {
.offset = 0x2000,
+ .config = &cam_cc_pll2_config,
.vco_table = rivian_ole_vco,
.num_vco = ARRAY_SIZE(rivian_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO],
@@ -230,6 +232,7 @@ static const struct alpha_pll_config cam_cc_pll3_config = {
static struct clk_alpha_pll cam_cc_pll3 = {
.offset = 0x3000,
+ .config = &cam_cc_pll3_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -284,6 +287,7 @@ static const struct alpha_pll_config cam_cc_pll4_config = {
static struct clk_alpha_pll cam_cc_pll4 = {
.offset = 0x4000,
+ .config = &cam_cc_pll4_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -338,6 +342,7 @@ static const struct alpha_pll_config cam_cc_pll5_config = {
static struct clk_alpha_pll cam_cc_pll5 = {
.offset = 0x5000,
+ .config = &cam_cc_pll5_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -392,6 +397,7 @@ static const struct alpha_pll_config cam_cc_pll6_config = {
static struct clk_alpha_pll cam_cc_pll6 = {
.offset = 0x6000,
+ .config = &cam_cc_pll6_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -446,6 +452,7 @@ static const struct alpha_pll_config cam_cc_pll7_config = {
static struct clk_alpha_pll cam_cc_pll7 = {
.offset = 0x7000,
+ .config = &cam_cc_pll7_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -500,6 +507,7 @@ static const struct alpha_pll_config cam_cc_pll8_config = {
static struct clk_alpha_pll cam_cc_pll8 = {
.offset = 0x8000,
+ .config = &cam_cc_pll8_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -554,6 +562,7 @@ static const struct alpha_pll_config cam_cc_pll9_config = {
static struct clk_alpha_pll cam_cc_pll9 = {
.offset = 0x9000,
+ .config = &cam_cc_pll9_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -631,6 +640,7 @@ static const struct alpha_pll_config cam_cc_pll10_config = {
static struct clk_alpha_pll cam_cc_pll10 = {
.offset = 0xa000,
+ .config = &cam_cc_pll10_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -3509,6 +3519,27 @@ static const struct qcom_reset_map cam_cc_sm8650_resets[] = {
[CAM_CC_SFE_2_BCR] = { 0x130f4 },
};
+static struct clk_alpha_pll *cam_cc_sm8650_plls[] = {
+ &cam_cc_pll0,
+ &cam_cc_pll1,
+ &cam_cc_pll2,
+ &cam_cc_pll3,
+ &cam_cc_pll4,
+ &cam_cc_pll5,
+ &cam_cc_pll6,
+ &cam_cc_pll7,
+ &cam_cc_pll8,
+ &cam_cc_pll9,
+ &cam_cc_pll10,
+};
+
+static u32 cam_cc_sm8650_critical_cbcrs[] = {
+ 0x132ec, /* CAM_CC_GDSC_CLK */
+ 0x13308, /* CAM_CC_SLEEP_CLK */
+ 0x13314, /* CAM_CC_DRV_XO_CLK */
+ 0x13318, /* CAM_CC_DRV_AHB_CLK */
+};
+
static const struct regmap_config cam_cc_sm8650_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
@@ -3517,6 +3548,13 @@ static const struct regmap_config cam_cc_sm8650_regmap_config = {
.fast_io = true,
};
+static struct qcom_cc_driver_data cam_cc_sm8650_driver_data = {
+ .alpha_plls = cam_cc_sm8650_plls,
+ .num_alpha_plls = ARRAY_SIZE(cam_cc_sm8650_plls),
+ .clk_cbcrs = cam_cc_sm8650_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(cam_cc_sm8650_critical_cbcrs),
+};
+
static const struct qcom_cc_desc cam_cc_sm8650_desc = {
.config = &cam_cc_sm8650_regmap_config,
.clks = cam_cc_sm8650_clocks,
@@ -3525,6 +3563,8 @@ static const struct qcom_cc_desc cam_cc_sm8650_desc = {
.num_resets = ARRAY_SIZE(cam_cc_sm8650_resets),
.gdscs = cam_cc_sm8650_gdscs,
.num_gdscs = ARRAY_SIZE(cam_cc_sm8650_gdscs),
+ .use_rpm = true,
+ .driver_data = &cam_cc_sm8650_driver_data,
};
static const struct of_device_id cam_cc_sm8650_match_table[] = {
@@ -3535,46 +3575,7 @@ MODULE_DEVICE_TABLE(of, cam_cc_sm8650_match_table);
static int cam_cc_sm8650_probe(struct platform_device *pdev)
{
- struct regmap *regmap;
- int ret;
-
- ret = devm_pm_runtime_enable(&pdev->dev);
- if (ret)
- return ret;
-
- ret = pm_runtime_resume_and_get(&pdev->dev);
- if (ret)
- return ret;
-
- regmap = qcom_cc_map(pdev, &cam_cc_sm8650_desc);
- if (IS_ERR(regmap)) {
- pm_runtime_put(&pdev->dev);
- return PTR_ERR(regmap);
- }
-
- clk_lucid_ole_pll_configure(&cam_cc_pll0, regmap, &cam_cc_pll0_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll1, regmap, &cam_cc_pll1_config);
- clk_rivian_evo_pll_configure(&cam_cc_pll2, regmap, &cam_cc_pll2_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll4, regmap, &cam_cc_pll4_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll5, regmap, &cam_cc_pll5_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll6, regmap, &cam_cc_pll6_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll7, regmap, &cam_cc_pll7_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll8, regmap, &cam_cc_pll8_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll9, regmap, &cam_cc_pll9_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll10, regmap, &cam_cc_pll10_config);
-
- /* Keep clocks always enabled */
- qcom_branch_set_clk_en(regmap, 0x13318); /* CAM_CC_DRV_AHB_CLK */
- qcom_branch_set_clk_en(regmap, 0x13314); /* CAM_CC_DRV_XO_CLK */
- qcom_branch_set_clk_en(regmap, 0x132ec); /* CAM_CC_GDSC_CLK */
- qcom_branch_set_clk_en(regmap, 0x13308); /* CAM_CC_SLEEP_CLK */
-
- ret = qcom_cc_really_probe(&pdev->dev, &cam_cc_sm8650_desc, regmap);
-
- pm_runtime_put(&pdev->dev);
-
- return ret;
+ return qcom_cc_probe(pdev, &cam_cc_sm8650_desc);
}
static struct platform_driver cam_cc_sm8650_driver = {
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 12/18] clk: qcom: camcc-x1e80100: Move PLL & clk configuration to really probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (10 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 11/18] clk: qcom: camcc-sm8650: " Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 13/18] arm64: dts: qcom: sm8450: Additionally manage MXC power domain in videocc Jagadeesh Kona
` (8 subsequent siblings)
20 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Konrad Dybcio, Dmitry Baryshkov
Camera PLLs on X1E80100 require both MMCX and MXC rails to be kept ON
to configure the PLLs properly. Hence move runtime power management,
PLL configuration and enabling critical clocks to qcom_cc_really_probe()
which ensures all required power domains are in enabled state before
configuring the PLLs or enabling the clocks.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # Dell Inspiron
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
drivers/clk/qcom/camcc-x1e80100.c | 67 +++++++++++++++++++--------------------
1 file changed, 32 insertions(+), 35 deletions(-)
diff --git a/drivers/clk/qcom/camcc-x1e80100.c b/drivers/clk/qcom/camcc-x1e80100.c
index b73524ae64b1b2b1ee94ceca88b5f3b46143f20b..cbcc1c9fcb341e51272f5595f574f9cb7ef2b52e 100644
--- a/drivers/clk/qcom/camcc-x1e80100.c
+++ b/drivers/clk/qcom/camcc-x1e80100.c
@@ -7,7 +7,6 @@
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <dt-bindings/clock/qcom,x1e80100-camcc.h>
@@ -67,6 +66,7 @@ static const struct alpha_pll_config cam_cc_pll0_config = {
static struct clk_alpha_pll cam_cc_pll0 = {
.offset = 0x0,
+ .config = &cam_cc_pll0_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -144,6 +144,7 @@ static const struct alpha_pll_config cam_cc_pll1_config = {
static struct clk_alpha_pll cam_cc_pll1 = {
.offset = 0x1000,
+ .config = &cam_cc_pll1_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -194,6 +195,7 @@ static const struct alpha_pll_config cam_cc_pll2_config = {
static struct clk_alpha_pll cam_cc_pll2 = {
.offset = 0x2000,
+ .config = &cam_cc_pll2_config,
.vco_table = rivian_ole_vco,
.num_vco = ARRAY_SIZE(rivian_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO],
@@ -225,6 +227,7 @@ static const struct alpha_pll_config cam_cc_pll3_config = {
static struct clk_alpha_pll cam_cc_pll3 = {
.offset = 0x3000,
+ .config = &cam_cc_pll3_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -279,6 +282,7 @@ static const struct alpha_pll_config cam_cc_pll4_config = {
static struct clk_alpha_pll cam_cc_pll4 = {
.offset = 0x4000,
+ .config = &cam_cc_pll4_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -333,6 +337,7 @@ static const struct alpha_pll_config cam_cc_pll6_config = {
static struct clk_alpha_pll cam_cc_pll6 = {
.offset = 0x6000,
+ .config = &cam_cc_pll6_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -387,6 +392,7 @@ static const struct alpha_pll_config cam_cc_pll8_config = {
static struct clk_alpha_pll cam_cc_pll8 = {
.offset = 0x8000,
+ .config = &cam_cc_pll8_config,
.vco_table = lucid_ole_vco,
.num_vco = ARRAY_SIZE(lucid_ole_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
@@ -2418,6 +2424,21 @@ static const struct qcom_reset_map cam_cc_x1e80100_resets[] = {
[CAM_CC_SFE_0_BCR] = { 0x1327c },
};
+static struct clk_alpha_pll *cam_cc_x1e80100_plls[] = {
+ &cam_cc_pll0,
+ &cam_cc_pll1,
+ &cam_cc_pll2,
+ &cam_cc_pll3,
+ &cam_cc_pll4,
+ &cam_cc_pll6,
+ &cam_cc_pll8,
+};
+
+static u32 cam_cc_x1e80100_critical_cbcrs[] = {
+ 0x13a9c, /* CAM_CC_GDSC_CLK */
+ 0x13ab8, /* CAM_CC_SLEEP_CLK */
+};
+
static const struct regmap_config cam_cc_x1e80100_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
@@ -2426,6 +2447,13 @@ static const struct regmap_config cam_cc_x1e80100_regmap_config = {
.fast_io = true,
};
+static struct qcom_cc_driver_data cam_cc_x1e80100_driver_data = {
+ .alpha_plls = cam_cc_x1e80100_plls,
+ .num_alpha_plls = ARRAY_SIZE(cam_cc_x1e80100_plls),
+ .clk_cbcrs = cam_cc_x1e80100_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(cam_cc_x1e80100_critical_cbcrs),
+};
+
static const struct qcom_cc_desc cam_cc_x1e80100_desc = {
.config = &cam_cc_x1e80100_regmap_config,
.clks = cam_cc_x1e80100_clocks,
@@ -2434,6 +2462,8 @@ static const struct qcom_cc_desc cam_cc_x1e80100_desc = {
.num_resets = ARRAY_SIZE(cam_cc_x1e80100_resets),
.gdscs = cam_cc_x1e80100_gdscs,
.num_gdscs = ARRAY_SIZE(cam_cc_x1e80100_gdscs),
+ .use_rpm = true,
+ .driver_data = &cam_cc_x1e80100_driver_data,
};
static const struct of_device_id cam_cc_x1e80100_match_table[] = {
@@ -2444,40 +2474,7 @@ MODULE_DEVICE_TABLE(of, cam_cc_x1e80100_match_table);
static int cam_cc_x1e80100_probe(struct platform_device *pdev)
{
- struct regmap *regmap;
- int ret;
-
- ret = devm_pm_runtime_enable(&pdev->dev);
- if (ret)
- return ret;
-
- ret = pm_runtime_resume_and_get(&pdev->dev);
- if (ret)
- return ret;
-
- regmap = qcom_cc_map(pdev, &cam_cc_x1e80100_desc);
- if (IS_ERR(regmap)) {
- pm_runtime_put(&pdev->dev);
- return PTR_ERR(regmap);
- }
-
- clk_lucid_ole_pll_configure(&cam_cc_pll0, regmap, &cam_cc_pll0_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll1, regmap, &cam_cc_pll1_config);
- clk_rivian_evo_pll_configure(&cam_cc_pll2, regmap, &cam_cc_pll2_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll4, regmap, &cam_cc_pll4_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll6, regmap, &cam_cc_pll6_config);
- clk_lucid_ole_pll_configure(&cam_cc_pll8, regmap, &cam_cc_pll8_config);
-
- /* Keep clocks always enabled */
- qcom_branch_set_clk_en(regmap, 0x13a9c); /* CAM_CC_GDSC_CLK */
- qcom_branch_set_clk_en(regmap, 0x13ab8); /* CAM_CC_SLEEP_CLK */
-
- ret = qcom_cc_really_probe(&pdev->dev, &cam_cc_x1e80100_desc, regmap);
-
- pm_runtime_put(&pdev->dev);
-
- return ret;
+ return qcom_cc_probe(pdev, &cam_cc_x1e80100_desc);
}
static struct platform_driver cam_cc_x1e80100_driver = {
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 13/18] arm64: dts: qcom: sm8450: Additionally manage MXC power domain in videocc
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (11 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 12/18] clk: qcom: camcc-x1e80100: " Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 14/18] arm64: dts: qcom: sm8550: " Jagadeesh Kona
` (7 subsequent siblings)
20 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Konrad Dybcio, Dmitry Baryshkov
Videocc requires both MMCX and MXC rails to be powered ON to configure
the video PLLs on SM8450 platform. Hence add MXC power domain to videocc
node on SM8450.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
arch/arm64/boot/dts/qcom/sm8450.dtsi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 0b36f4cd4497ecffe0a15cd6102e9d9ac62a7425..36a67c679fbaed944d7590528b696635c306da5d 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -3198,8 +3198,10 @@ videocc: clock-controller@aaf0000 {
reg = <0 0x0aaf0000 0 0x10000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_VIDEO_AHB_CLK>;
- power-domains = <&rpmhpd RPMHPD_MMCX>;
- required-opps = <&rpmhpd_opp_low_svs>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>,
+ <&rpmhpd RPMHPD_MXC>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 14/18] arm64: dts: qcom: sm8550: Additionally manage MXC power domain in videocc
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (12 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 13/18] arm64: dts: qcom: sm8450: Additionally manage MXC power domain in videocc Jagadeesh Kona
@ 2025-05-30 13:20 ` Jagadeesh Kona
2025-05-30 13:21 ` [PATCH v5 15/18] arm64: dts: qcom: sm8650: " Jagadeesh Kona
` (6 subsequent siblings)
20 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:20 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Konrad Dybcio, Dmitry Baryshkov
Videocc requires both MMCX and MXC rails to be powered ON to configure
the video PLLs on SM8550 platform. Hence add MXC power domain to videocc
node on SM8550.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
arch/arm64/boot/dts/qcom/sm8550.dtsi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index f78d5292c5dd5ec88c8deb0ca6e5078511ac52b7..92017caedbbbea12eb2e43f2e9f5bcad0c0ee40c 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -3225,8 +3225,10 @@ videocc: clock-controller@aaf0000 {
reg = <0 0x0aaf0000 0 0x10000>;
clocks = <&bi_tcxo_div2>,
<&gcc GCC_VIDEO_AHB_CLK>;
- power-domains = <&rpmhpd RPMHPD_MMCX>;
- required-opps = <&rpmhpd_opp_low_svs>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>,
+ <&rpmhpd RPMHPD_MXC>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 15/18] arm64: dts: qcom: sm8650: Additionally manage MXC power domain in videocc
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (13 preceding siblings ...)
2025-05-30 13:20 ` [PATCH v5 14/18] arm64: dts: qcom: sm8550: " Jagadeesh Kona
@ 2025-05-30 13:21 ` Jagadeesh Kona
2025-05-30 13:21 ` [PATCH v5 16/18] arm64: dts: qcom: sm8450: Additionally manage MXC power domain in camcc Jagadeesh Kona
` (5 subsequent siblings)
20 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Konrad Dybcio, Dmitry Baryshkov
Videocc requires both MMCX and MXC rails to be powered ON to configure
the video PLLs on SM8650 platform. Hence add MXC power domain to videocc
node on SM8650.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
arch/arm64/boot/dts/qcom/sm8650.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index 818db6ba3b3be99c187512ea4acf2004422f6a18..ad60596b71d25bb0198b26660dc41195a1210a23 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -4959,7 +4959,8 @@ videocc: clock-controller@aaf0000 {
reg = <0 0x0aaf0000 0 0x10000>;
clocks = <&bi_tcxo_div2>,
<&gcc GCC_VIDEO_AHB_CLK>;
- power-domains = <&rpmhpd RPMHPD_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>,
+ <&rpmhpd RPMHPD_MXC>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 16/18] arm64: dts: qcom: sm8450: Additionally manage MXC power domain in camcc
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (14 preceding siblings ...)
2025-05-30 13:21 ` [PATCH v5 15/18] arm64: dts: qcom: sm8650: " Jagadeesh Kona
@ 2025-05-30 13:21 ` Jagadeesh Kona
2025-06-03 8:08 ` Bryan O'Donoghue
2025-05-30 13:21 ` [PATCH v5 17/18] arm64: dts: qcom: sm8550: " Jagadeesh Kona
` (4 subsequent siblings)
20 siblings, 1 reply; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Konrad Dybcio, Dmitry Baryshkov
Camcc requires both MMCX and MXC rails to be powered ON to configure
the camera PLLs on SM8450 platform. Hence add MXC power domain to
camcc node on SM8450.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
arch/arm64/boot/dts/qcom/sm8450.dtsi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 36a67c679fbaed944d7590528b696635c306da5d..624190c07c59f3e6714f296f1b264d2a88135116 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -3292,8 +3292,10 @@ camcc: clock-controller@ade0000 {
<&rpmhcc RPMH_CXO_CLK>,
<&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>;
- power-domains = <&rpmhpd RPMHPD_MMCX>;
- required-opps = <&rpmhpd_opp_low_svs>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>,
+ <&rpmhpd RPMHPD_MXC>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 17/18] arm64: dts: qcom: sm8550: Additionally manage MXC power domain in camcc
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (15 preceding siblings ...)
2025-05-30 13:21 ` [PATCH v5 16/18] arm64: dts: qcom: sm8450: Additionally manage MXC power domain in camcc Jagadeesh Kona
@ 2025-05-30 13:21 ` Jagadeesh Kona
2025-06-03 8:09 ` Bryan O'Donoghue
2025-05-30 13:21 ` [PATCH v5 18/18] arm64: dts: qcom: sm8650: " Jagadeesh Kona
` (3 subsequent siblings)
20 siblings, 1 reply; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Konrad Dybcio, Dmitry Baryshkov
From: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Camcc requires both MMCX and MXC rails to be powered ON to configure
the camera PLLs on SM8550 platform. Hence add MXC power domain to
camcc node on SM8550. While at it, update SM8550_MMCX macro to RPMHPD_MMCX
to align towards common macros.
Fixes: e271b59e39a6f ("arm64: dts: qcom: sm8550: Add camera clock controller")
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Reviewed-by: Taniya Das <quic_tdas@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
arch/arm64/boot/dts/qcom/sm8550.dtsi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index 92017caedbbbea12eb2e43f2e9f5bcad0c0ee40c..e9bb077aa9f0b8be28608d4a0345aae7df8cd167 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -3333,8 +3333,10 @@ camcc: clock-controller@ade0000 {
<&bi_tcxo_div2>,
<&bi_tcxo_ao_div2>,
<&sleep_clk>;
- power-domains = <&rpmhpd SM8550_MMCX>;
- required-opps = <&rpmhpd_opp_low_svs>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>,
+ <&rpmhpd RPMHPD_MXC>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH v5 18/18] arm64: dts: qcom: sm8650: Additionally manage MXC power domain in camcc
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (16 preceding siblings ...)
2025-05-30 13:21 ` [PATCH v5 17/18] arm64: dts: qcom: sm8550: " Jagadeesh Kona
@ 2025-05-30 13:21 ` Jagadeesh Kona
2025-06-03 8:09 ` Bryan O'Donoghue
2025-06-03 8:09 ` [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Bryan O'Donoghue
` (2 subsequent siblings)
20 siblings, 1 reply; 38+ messages in thread
From: Jagadeesh Kona @ 2025-05-30 13:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Jagadeesh Kona, Bryan O'Donoghue,
Konrad Dybcio, Dmitry Baryshkov
Camcc requires both MMCX and MXC rails to be powered ON to configure
the camera PLLs on SM8650 platform. Hence add MXC power domain to
camcc node on SM8650.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
---
arch/arm64/boot/dts/qcom/sm8650.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index ad60596b71d25bb0198b26660dc41195a1210a23..a2b3d97abc7f799810e20131d7231608c8757859 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -5072,7 +5072,8 @@ camcc: clock-controller@ade0000 {
<&bi_tcxo_div2>,
<&bi_tcxo_ao_div2>,
<&sleep_clk>;
- power-domains = <&rpmhpd RPMHPD_MMCX>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>,
+ <&rpmhpd RPMHPD_MXC>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCH v5 08/18] clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
2025-05-30 13:20 ` [PATCH v5 08/18] clk: qcom: videocc-sm8550: " Jagadeesh Kona
@ 2025-05-30 22:57 ` Konrad Dybcio
2025-06-03 8:02 ` Bryan O'Donoghue
1 sibling, 0 replies; 38+ messages in thread
From: Konrad Dybcio @ 2025-05-30 22:57 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov
On 5/30/25 3:20 PM, Jagadeesh Kona wrote:
> Video PLLs on SM8550/SM8650 require both MMCX and MXC rails to be kept ON
> to configure the PLLs properly. Hence move runtime power management, PLL
> configuration and enable critical clocks to qcom_cc_really_probe() which
> ensures all required power domains are in enabled state before configuring
> the PLLs or enabling the clocks.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 06/18] clk: qcom: common: Add support to configure clk regs in qcom_cc_really_probe
2025-05-30 13:20 ` [PATCH v5 06/18] clk: qcom: common: Add support to configure clk regs " Jagadeesh Kona
@ 2025-05-30 23:00 ` Konrad Dybcio
0 siblings, 0 replies; 38+ messages in thread
From: Konrad Dybcio @ 2025-05-30 23:00 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov
On 5/30/25 3:20 PM, Jagadeesh Kona wrote:
> Add support to configure PLLS and clk registers in qcom_cc_really_probe().
> This ensures all required power domains are enabled and kept ON by runtime
> PM code in qcom_cc_really_probe() before configuring the PLLS or clock
> registers.
>
> Add support for qcom_cc_driver_data struct to maintain the clock
> controllers PLLs and CBCRs data, and a pointer of it can be stored in
> clock descriptor structure. If any clock controller driver requires to
> program some additional misc register settings, it can register the
> clk_regs_configure() callback in the driver data.
>
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc
2025-05-30 13:20 ` [PATCH v5 03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc Jagadeesh Kona
@ 2025-06-03 7:04 ` Krzysztof Kozlowski
0 siblings, 0 replies; 38+ messages in thread
From: Krzysztof Kozlowski @ 2025-06-03 7:04 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov
On 30/05/2025 15:20, Jagadeesh Kona wrote:
> SC8280XP camcc only requires the MMCX power domain, unlike SM8450 camcc
> which now supports both MMCX and MXC power domains. Hence move SC8280XP
> camcc from SM8450 to SA8775P camcc, to have single power domain support.
>
> SA8775P camcc doesn't support required-opps property currently but SC8280XP
> camcc need that property, so add required-opps based on SC8280XP camcc
> conditional check in SA8775P camcc bindings.
>
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 08/18] clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
2025-05-30 13:20 ` [PATCH v5 08/18] clk: qcom: videocc-sm8550: " Jagadeesh Kona
2025-05-30 22:57 ` Konrad Dybcio
@ 2025-06-03 8:02 ` Bryan O'Donoghue
1 sibling, 0 replies; 38+ messages in thread
From: Bryan O'Donoghue @ 2025-06-03 8:02 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov
On 30/05/2025 14:20, Jagadeesh Kona wrote:
> Video PLLs on SM8550/SM8650 require both MMCX and MXC rails to be kept ON
> to configure the PLLs properly. Hence move runtime power management, PLL
> configuration and enable critical clocks to qcom_cc_really_probe() which
> ensures all required power domains are in enabled state before configuring
> the PLLs or enabling the clocks.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
> drivers/clk/qcom/videocc-sm8550.c | 66 +++++++++++++++++++--------------------
> 1 file changed, 33 insertions(+), 33 deletions(-)
>
> diff --git a/drivers/clk/qcom/videocc-sm8550.c b/drivers/clk/qcom/videocc-sm8550.c
> index fcfe0cade6d0a95e749aabbc2af1174e5a70f0db..3e5891b43ee404edc6c99bbf8f2583cb44df9e37 100644
> --- a/drivers/clk/qcom/videocc-sm8550.c
> +++ b/drivers/clk/qcom/videocc-sm8550.c
> @@ -7,7 +7,6 @@
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> #include <linux/platform_device.h>
> -#include <linux/pm_runtime.h>
> #include <linux/regmap.h>
>
> #include <dt-bindings/clock/qcom,sm8650-videocc.h>
> @@ -51,6 +50,7 @@ static struct alpha_pll_config video_cc_pll0_config = {
>
> static struct clk_alpha_pll video_cc_pll0 = {
> .offset = 0x0,
> + .config = &video_cc_pll0_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -82,6 +82,7 @@ static struct alpha_pll_config video_cc_pll1_config = {
>
> static struct clk_alpha_pll video_cc_pll1 = {
> .offset = 0x1000,
> + .config = &video_cc_pll1_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -511,6 +512,23 @@ static const struct qcom_reset_map video_cc_sm8550_resets[] = {
> [VIDEO_CC_XO_CLK_ARES] = { .reg = 0x8124, .bit = 2, .udelay = 100 },
> };
>
> +static struct clk_alpha_pll *video_cc_sm8550_plls[] = {
> + &video_cc_pll0,
> + &video_cc_pll1,
> +};
> +
> +static u32 video_cc_sm8550_critical_cbcrs[] = {
> + 0x80f4, /* VIDEO_CC_AHB_CLK */
> + 0x8124, /* VIDEO_CC_XO_CLK */
> + 0x8140, /* VIDEO_CC_SLEEP_CLK */
> +};
> +
> +static u32 video_cc_sm8650_critical_cbcrs[] = {
> + 0x80f4, /* VIDEO_CC_AHB_CLK */
> + 0x8124, /* VIDEO_CC_XO_CLK */
> + 0x8150, /* VIDEO_CC_SLEEP_CLK */
> +};
> +
> static const struct regmap_config video_cc_sm8550_regmap_config = {
> .reg_bits = 32,
> .reg_stride = 4,
> @@ -519,6 +537,13 @@ static const struct regmap_config video_cc_sm8550_regmap_config = {
> .fast_io = true,
> };
>
> +static struct qcom_cc_driver_data video_cc_sm8550_driver_data = {
> + .alpha_plls = video_cc_sm8550_plls,
> + .num_alpha_plls = ARRAY_SIZE(video_cc_sm8550_plls),
> + .clk_cbcrs = video_cc_sm8550_critical_cbcrs,
> + .num_clk_cbcrs = ARRAY_SIZE(video_cc_sm8550_critical_cbcrs),
> +};
> +
> static const struct qcom_cc_desc video_cc_sm8550_desc = {
> .config = &video_cc_sm8550_regmap_config,
> .clks = video_cc_sm8550_clocks,
> @@ -527,6 +552,8 @@ static const struct qcom_cc_desc video_cc_sm8550_desc = {
> .num_resets = ARRAY_SIZE(video_cc_sm8550_resets),
> .gdscs = video_cc_sm8550_gdscs,
> .num_gdscs = ARRAY_SIZE(video_cc_sm8550_gdscs),
> + .use_rpm = true,
> + .driver_data = &video_cc_sm8550_driver_data,
> };
>
> static const struct of_device_id video_cc_sm8550_match_table[] = {
> @@ -538,26 +565,7 @@ MODULE_DEVICE_TABLE(of, video_cc_sm8550_match_table);
>
> static int video_cc_sm8550_probe(struct platform_device *pdev)
> {
> - struct regmap *regmap;
> - int ret;
> - u32 sleep_clk_offset = 0x8140;
> -
> - ret = devm_pm_runtime_enable(&pdev->dev);
> - if (ret)
> - return ret;
> -
> - ret = pm_runtime_resume_and_get(&pdev->dev);
> - if (ret)
> - return ret;
> -
> - regmap = qcom_cc_map(pdev, &video_cc_sm8550_desc);
> - if (IS_ERR(regmap)) {
> - pm_runtime_put(&pdev->dev);
> - return PTR_ERR(regmap);
> - }
> -
> if (of_device_is_compatible(pdev->dev.of_node, "qcom,sm8650-videocc")) {
> - sleep_clk_offset = 0x8150;
> video_cc_pll0_config.l = 0x1e;
> video_cc_pll0_config.alpha = 0xa000;
> video_cc_pll1_config.l = 0x2b;
> @@ -569,21 +577,13 @@ static int video_cc_sm8550_probe(struct platform_device *pdev)
> video_cc_sm8550_clocks[VIDEO_CC_MVS1_SHIFT_CLK] = &video_cc_mvs1_shift_clk.clkr;
> video_cc_sm8550_clocks[VIDEO_CC_MVS1C_SHIFT_CLK] = &video_cc_mvs1c_shift_clk.clkr;
> video_cc_sm8550_clocks[VIDEO_CC_XO_CLK_SRC] = &video_cc_xo_clk_src.clkr;
> - }
> -
> - clk_lucid_ole_pll_configure(&video_cc_pll0, regmap, &video_cc_pll0_config);
> - clk_lucid_ole_pll_configure(&video_cc_pll1, regmap, &video_cc_pll1_config);
>
> - /* Keep some clocks always-on */
> - qcom_branch_set_clk_en(regmap, 0x80f4); /* VIDEO_CC_AHB_CLK */
> - qcom_branch_set_clk_en(regmap, sleep_clk_offset); /* VIDEO_CC_SLEEP_CLK */
> - qcom_branch_set_clk_en(regmap, 0x8124); /* VIDEO_CC_XO_CLK */
> -
> - ret = qcom_cc_really_probe(&pdev->dev, &video_cc_sm8550_desc, regmap);
> -
> - pm_runtime_put(&pdev->dev);
> + video_cc_sm8550_driver_data.clk_cbcrs = video_cc_sm8650_critical_cbcrs;
> + video_cc_sm8550_driver_data.num_clk_cbcrs =
> + ARRAY_SIZE(video_cc_sm8650_critical_cbcrs);
> + }
>
> - return ret;
> + return qcom_cc_probe(pdev, &video_cc_sm8550_desc);
> }
>
> static struct platform_driver video_cc_sm8550_driver = {
>
> --
> 2.34.1
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 09/18] clk: qcom: camcc-sm8450: Move PLL & clk configuration to really probe
2025-05-30 13:20 ` [PATCH v5 09/18] clk: qcom: camcc-sm8450: " Jagadeesh Kona
@ 2025-06-03 8:05 ` Bryan O'Donoghue
0 siblings, 0 replies; 38+ messages in thread
From: Bryan O'Donoghue @ 2025-06-03 8:05 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov,
Konrad Dybcio
On 30/05/2025 14:20, Jagadeesh Kona wrote:
> Camera PLLs on SM8450/SM8475 require both MMCX and MXC rails to be
> kept ON to configure the PLLs properly. Hence move runtime power
> management, PLL configuration and enable critical clocks to
> qcom_cc_really_probe() which ensures all required power domains are in
> enabled state before configuring the PLLs or enabling the clocks.
>
> This change also removes the modelling for cam_cc_gdsc_clk and keeps it
> always ON from probe since using CLK_IS_CRITICAL will prevent the clock
> controller associated power domains from collapsing due to clock framework
> invoking clk_pm_runtime_get() during prepare.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
> drivers/clk/qcom/camcc-sm8450.c | 89 ++++++++++++++++++++---------------------
> 1 file changed, 44 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/clk/qcom/camcc-sm8450.c b/drivers/clk/qcom/camcc-sm8450.c
> index 08982737e4901c0703e19f8dd2d302e24748210c..4dd8be8cc9881c890d2e7c3a12f12816a9ab47dc 100644
> --- a/drivers/clk/qcom/camcc-sm8450.c
> +++ b/drivers/clk/qcom/camcc-sm8450.c
> @@ -86,6 +86,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll0_config = {
>
> static struct clk_alpha_pll cam_cc_pll0 = {
> .offset = 0x0,
> + .config = &cam_cc_pll0_config,
> .vco_table = lucid_evo_vco,
> .num_vco = ARRAY_SIZE(lucid_evo_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
> @@ -191,6 +192,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll1_config = {
>
> static struct clk_alpha_pll cam_cc_pll1 = {
> .offset = 0x1000,
> + .config = &cam_cc_pll1_config,
> .vco_table = lucid_evo_vco,
> .num_vco = ARRAY_SIZE(lucid_evo_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
> @@ -257,6 +259,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll2_config = {
>
> static struct clk_alpha_pll cam_cc_pll2 = {
> .offset = 0x2000,
> + .config = &cam_cc_pll2_config,
> .vco_table = rivian_evo_vco,
> .num_vco = ARRAY_SIZE(rivian_evo_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO],
> @@ -296,6 +299,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll3_config = {
>
> static struct clk_alpha_pll cam_cc_pll3 = {
> .offset = 0x3000,
> + .config = &cam_cc_pll3_config,
> .vco_table = lucid_evo_vco,
> .num_vco = ARRAY_SIZE(lucid_evo_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
> @@ -368,6 +372,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll4_config = {
>
> static struct clk_alpha_pll cam_cc_pll4 = {
> .offset = 0x4000,
> + .config = &cam_cc_pll4_config,
> .vco_table = lucid_evo_vco,
> .num_vco = ARRAY_SIZE(lucid_evo_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
> @@ -440,6 +445,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll5_config = {
>
> static struct clk_alpha_pll cam_cc_pll5 = {
> .offset = 0x5000,
> + .config = &cam_cc_pll5_config,
> .vco_table = lucid_evo_vco,
> .num_vco = ARRAY_SIZE(lucid_evo_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
> @@ -512,6 +518,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll6_config = {
>
> static struct clk_alpha_pll cam_cc_pll6 = {
> .offset = 0x6000,
> + .config = &cam_cc_pll6_config,
> .vco_table = lucid_evo_vco,
> .num_vco = ARRAY_SIZE(lucid_evo_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
> @@ -584,6 +591,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll7_config = {
>
> static struct clk_alpha_pll cam_cc_pll7 = {
> .offset = 0x7000,
> + .config = &cam_cc_pll7_config,
> .vco_table = lucid_evo_vco,
> .num_vco = ARRAY_SIZE(lucid_evo_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
> @@ -656,6 +664,7 @@ static const struct alpha_pll_config sm8475_cam_cc_pll8_config = {
>
> static struct clk_alpha_pll cam_cc_pll8 = {
> .offset = 0x8000,
> + .config = &cam_cc_pll8_config,
> .vco_table = lucid_evo_vco,
> .num_vco = ARRAY_SIZE(lucid_evo_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
> @@ -1476,24 +1485,6 @@ static struct clk_rcg2 cam_cc_xo_clk_src = {
> },
> };
>
> -static struct clk_branch cam_cc_gdsc_clk = {
> - .halt_reg = 0x1320c,
> - .halt_check = BRANCH_HALT,
> - .clkr = {
> - .enable_reg = 0x1320c,
> - .enable_mask = BIT(0),
> - .hw.init = &(const struct clk_init_data) {
> - .name = "cam_cc_gdsc_clk",
> - .parent_hws = (const struct clk_hw*[]) {
> - &cam_cc_xo_clk_src.clkr.hw,
> - },
> - .num_parents = 1,
> - .flags = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT,
> - .ops = &clk_branch2_ops,
> - },
> - },
> -};
> -
> static struct clk_branch cam_cc_bps_ahb_clk = {
> .halt_reg = 0x1004c,
> .halt_check = BRANCH_HALT,
> @@ -2819,7 +2810,6 @@ static struct clk_regmap *cam_cc_sm8450_clocks[] = {
> [CAM_CC_CSIPHY4_CLK] = &cam_cc_csiphy4_clk.clkr,
> [CAM_CC_CSIPHY5_CLK] = &cam_cc_csiphy5_clk.clkr,
> [CAM_CC_FAST_AHB_CLK_SRC] = &cam_cc_fast_ahb_clk_src.clkr,
> - [CAM_CC_GDSC_CLK] = &cam_cc_gdsc_clk.clkr,
> [CAM_CC_ICP_AHB_CLK] = &cam_cc_icp_ahb_clk.clkr,
> [CAM_CC_ICP_CLK] = &cam_cc_icp_clk.clkr,
> [CAM_CC_ICP_CLK_SRC] = &cam_cc_icp_clk_src.clkr,
> @@ -2913,6 +2903,22 @@ static const struct qcom_reset_map cam_cc_sm8450_resets[] = {
> [CAM_CC_SFE_1_BCR] = { 0x13094 },
> };
>
> +static struct clk_alpha_pll *cam_cc_sm8450_plls[] = {
> + &cam_cc_pll0,
> + &cam_cc_pll1,
> + &cam_cc_pll2,
> + &cam_cc_pll3,
> + &cam_cc_pll4,
> + &cam_cc_pll5,
> + &cam_cc_pll6,
> + &cam_cc_pll7,
> + &cam_cc_pll8,
> +};
> +
> +static u32 cam_cc_sm8450_critical_cbcrs[] = {
> + 0x1320c, /* CAM_CC_GDSC_CLK */
> +};
> +
> static const struct regmap_config cam_cc_sm8450_regmap_config = {
> .reg_bits = 32,
> .reg_stride = 4,
> @@ -3021,6 +3027,13 @@ static struct gdsc *cam_cc_sm8450_gdscs[] = {
> [TITAN_TOP_GDSC] = &titan_top_gdsc,
> };
>
> +static struct qcom_cc_driver_data cam_cc_sm8450_driver_data = {
> + .alpha_plls = cam_cc_sm8450_plls,
> + .num_alpha_plls = ARRAY_SIZE(cam_cc_sm8450_plls),
> + .clk_cbcrs = cam_cc_sm8450_critical_cbcrs,
> + .num_clk_cbcrs = ARRAY_SIZE(cam_cc_sm8450_critical_cbcrs),
> +};
> +
> static const struct qcom_cc_desc cam_cc_sm8450_desc = {
> .config = &cam_cc_sm8450_regmap_config,
> .clks = cam_cc_sm8450_clocks,
> @@ -3029,6 +3042,8 @@ static const struct qcom_cc_desc cam_cc_sm8450_desc = {
> .num_resets = ARRAY_SIZE(cam_cc_sm8450_resets),
> .gdscs = cam_cc_sm8450_gdscs,
> .num_gdscs = ARRAY_SIZE(cam_cc_sm8450_gdscs),
> + .use_rpm = true,
> + .driver_data = &cam_cc_sm8450_driver_data,
> };
>
> static const struct of_device_id cam_cc_sm8450_match_table[] = {
> @@ -3040,12 +3055,6 @@ MODULE_DEVICE_TABLE(of, cam_cc_sm8450_match_table);
>
> static int cam_cc_sm8450_probe(struct platform_device *pdev)
> {
> - struct regmap *regmap;
> -
> - regmap = qcom_cc_map(pdev, &cam_cc_sm8450_desc);
> - if (IS_ERR(regmap))
> - return PTR_ERR(regmap);
> -
> if (of_device_is_compatible(pdev->dev.of_node, "qcom,sm8475-camcc")) {
> /* Update CAMCC PLL0 */
> cam_cc_pll0.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE];
> @@ -3092,28 +3101,18 @@ static int cam_cc_sm8450_probe(struct platform_device *pdev)
> cam_cc_pll8_out_even.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE];
> cam_cc_pll8_out_even.clkr.hw.init = &sm8475_cam_cc_pll8_out_even_init;
>
> - clk_lucid_ole_pll_configure(&cam_cc_pll0, regmap, &sm8475_cam_cc_pll0_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll1, regmap, &sm8475_cam_cc_pll1_config);
> - clk_rivian_evo_pll_configure(&cam_cc_pll2, regmap, &sm8475_cam_cc_pll2_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll3, regmap, &sm8475_cam_cc_pll3_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll4, regmap, &sm8475_cam_cc_pll4_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll5, regmap, &sm8475_cam_cc_pll5_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll6, regmap, &sm8475_cam_cc_pll6_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll7, regmap, &sm8475_cam_cc_pll7_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll8, regmap, &sm8475_cam_cc_pll8_config);
> - } else {
> - clk_lucid_evo_pll_configure(&cam_cc_pll0, regmap, &cam_cc_pll0_config);
> - clk_lucid_evo_pll_configure(&cam_cc_pll1, regmap, &cam_cc_pll1_config);
> - clk_rivian_evo_pll_configure(&cam_cc_pll2, regmap, &cam_cc_pll2_config);
> - clk_lucid_evo_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config);
> - clk_lucid_evo_pll_configure(&cam_cc_pll4, regmap, &cam_cc_pll4_config);
> - clk_lucid_evo_pll_configure(&cam_cc_pll5, regmap, &cam_cc_pll5_config);
> - clk_lucid_evo_pll_configure(&cam_cc_pll6, regmap, &cam_cc_pll6_config);
> - clk_lucid_evo_pll_configure(&cam_cc_pll7, regmap, &cam_cc_pll7_config);
> - clk_lucid_evo_pll_configure(&cam_cc_pll8, regmap, &cam_cc_pll8_config);
> + cam_cc_pll0.config = &sm8475_cam_cc_pll0_config;
> + cam_cc_pll1.config = &sm8475_cam_cc_pll1_config;
> + cam_cc_pll2.config = &sm8475_cam_cc_pll2_config;
> + cam_cc_pll3.config = &sm8475_cam_cc_pll3_config;
> + cam_cc_pll4.config = &sm8475_cam_cc_pll4_config;
> + cam_cc_pll5.config = &sm8475_cam_cc_pll5_config;
> + cam_cc_pll6.config = &sm8475_cam_cc_pll6_config;
> + cam_cc_pll7.config = &sm8475_cam_cc_pll7_config;
> + cam_cc_pll8.config = &sm8475_cam_cc_pll8_config;
> }
>
> - return qcom_cc_really_probe(&pdev->dev, &cam_cc_sm8450_desc, regmap);
> + return qcom_cc_probe(pdev, &cam_cc_sm8450_desc);
> }
>
> static struct platform_driver cam_cc_sm8450_driver = {
>
> --
> 2.34.1
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 10/18] clk: qcom: camcc-sm8550: Move PLL & clk configuration to really probe
2025-05-30 13:20 ` [PATCH v5 10/18] clk: qcom: camcc-sm8550: " Jagadeesh Kona
@ 2025-06-03 8:06 ` Bryan O'Donoghue
0 siblings, 0 replies; 38+ messages in thread
From: Bryan O'Donoghue @ 2025-06-03 8:06 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov,
Konrad Dybcio
On 30/05/2025 14:20, Jagadeesh Kona wrote:
> Camera PLLs on SM8550 require both MMCX and MXC rails to be kept ON to
> configure the PLLs properly. Hence move runtime power management, PLL
> configuration and enabling critical clocks to qcom_cc_really_probe() which
> ensures all required power domains are in enabled state before configuring
> the PLLs or enabling the clocks.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
> drivers/clk/qcom/camcc-sm8550.c | 85 +++++++++++++++++++++--------------------
> 1 file changed, 44 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/clk/qcom/camcc-sm8550.c b/drivers/clk/qcom/camcc-sm8550.c
> index 871155783c798fd9245d735642272eae2a2d3465..63aed9e4c362d523093409f74ef4e57f292ddf90 100644
> --- a/drivers/clk/qcom/camcc-sm8550.c
> +++ b/drivers/clk/qcom/camcc-sm8550.c
> @@ -7,7 +7,6 @@
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> #include <linux/platform_device.h>
> -#include <linux/pm_runtime.h>
> #include <linux/regmap.h>
>
> #include <dt-bindings/clock/qcom,sm8550-camcc.h>
> @@ -74,6 +73,7 @@ static const struct alpha_pll_config cam_cc_pll0_config = {
>
> static struct clk_alpha_pll cam_cc_pll0 = {
> .offset = 0x0,
> + .config = &cam_cc_pll0_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -151,6 +151,7 @@ static const struct alpha_pll_config cam_cc_pll1_config = {
>
> static struct clk_alpha_pll cam_cc_pll1 = {
> .offset = 0x1000,
> + .config = &cam_cc_pll1_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -201,6 +202,7 @@ static const struct alpha_pll_config cam_cc_pll2_config = {
>
> static struct clk_alpha_pll cam_cc_pll2 = {
> .offset = 0x2000,
> + .config = &cam_cc_pll2_config,
> .vco_table = rivian_ole_vco,
> .num_vco = ARRAY_SIZE(rivian_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO],
> @@ -232,6 +234,7 @@ static const struct alpha_pll_config cam_cc_pll3_config = {
>
> static struct clk_alpha_pll cam_cc_pll3 = {
> .offset = 0x3000,
> + .config = &cam_cc_pll3_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -286,6 +289,7 @@ static const struct alpha_pll_config cam_cc_pll4_config = {
>
> static struct clk_alpha_pll cam_cc_pll4 = {
> .offset = 0x4000,
> + .config = &cam_cc_pll4_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -340,6 +344,7 @@ static const struct alpha_pll_config cam_cc_pll5_config = {
>
> static struct clk_alpha_pll cam_cc_pll5 = {
> .offset = 0x5000,
> + .config = &cam_cc_pll5_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -394,6 +399,7 @@ static const struct alpha_pll_config cam_cc_pll6_config = {
>
> static struct clk_alpha_pll cam_cc_pll6 = {
> .offset = 0x6000,
> + .config = &cam_cc_pll6_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -448,6 +454,7 @@ static const struct alpha_pll_config cam_cc_pll7_config = {
>
> static struct clk_alpha_pll cam_cc_pll7 = {
> .offset = 0x7000,
> + .config = &cam_cc_pll7_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -502,6 +509,7 @@ static const struct alpha_pll_config cam_cc_pll8_config = {
>
> static struct clk_alpha_pll cam_cc_pll8 = {
> .offset = 0x8000,
> + .config = &cam_cc_pll8_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -556,6 +564,7 @@ static const struct alpha_pll_config cam_cc_pll9_config = {
>
> static struct clk_alpha_pll cam_cc_pll9 = {
> .offset = 0x9000,
> + .config = &cam_cc_pll9_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -610,6 +619,7 @@ static const struct alpha_pll_config cam_cc_pll10_config = {
>
> static struct clk_alpha_pll cam_cc_pll10 = {
> .offset = 0xa000,
> + .config = &cam_cc_pll10_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -664,6 +674,7 @@ static const struct alpha_pll_config cam_cc_pll11_config = {
>
> static struct clk_alpha_pll cam_cc_pll11 = {
> .offset = 0xb000,
> + .config = &cam_cc_pll11_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -718,6 +729,7 @@ static const struct alpha_pll_config cam_cc_pll12_config = {
>
> static struct clk_alpha_pll cam_cc_pll12 = {
> .offset = 0xc000,
> + .config = &cam_cc_pll12_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -3479,6 +3491,27 @@ static const struct qcom_reset_map cam_cc_sm8550_resets[] = {
> [CAM_CC_SFE_1_BCR] = { 0x133dc },
> };
>
> +static struct clk_alpha_pll *cam_cc_sm8550_plls[] = {
> + &cam_cc_pll0,
> + &cam_cc_pll1,
> + &cam_cc_pll2,
> + &cam_cc_pll3,
> + &cam_cc_pll4,
> + &cam_cc_pll5,
> + &cam_cc_pll6,
> + &cam_cc_pll7,
> + &cam_cc_pll8,
> + &cam_cc_pll9,
> + &cam_cc_pll10,
> + &cam_cc_pll11,
> + &cam_cc_pll12,
> +};
> +
> +static u32 cam_cc_sm8550_critical_cbcrs[] = {
> + 0x1419c, /* CAM_CC_GDSC_CLK */
> + 0x142cc, /* CAM_CC_SLEEP_CLK */
> +};
> +
> static const struct regmap_config cam_cc_sm8550_regmap_config = {
> .reg_bits = 32,
> .reg_stride = 4,
> @@ -3487,6 +3520,13 @@ static const struct regmap_config cam_cc_sm8550_regmap_config = {
> .fast_io = true,
> };
>
> +static struct qcom_cc_driver_data cam_cc_sm8550_driver_data = {
> + .alpha_plls = cam_cc_sm8550_plls,
> + .num_alpha_plls = ARRAY_SIZE(cam_cc_sm8550_plls),
> + .clk_cbcrs = cam_cc_sm8550_critical_cbcrs,
> + .num_clk_cbcrs = ARRAY_SIZE(cam_cc_sm8550_critical_cbcrs),
> +};
> +
> static const struct qcom_cc_desc cam_cc_sm8550_desc = {
> .config = &cam_cc_sm8550_regmap_config,
> .clks = cam_cc_sm8550_clocks,
> @@ -3495,6 +3535,8 @@ static const struct qcom_cc_desc cam_cc_sm8550_desc = {
> .num_resets = ARRAY_SIZE(cam_cc_sm8550_resets),
> .gdscs = cam_cc_sm8550_gdscs,
> .num_gdscs = ARRAY_SIZE(cam_cc_sm8550_gdscs),
> + .use_rpm = true,
> + .driver_data = &cam_cc_sm8550_driver_data,
> };
>
> static const struct of_device_id cam_cc_sm8550_match_table[] = {
> @@ -3505,46 +3547,7 @@ MODULE_DEVICE_TABLE(of, cam_cc_sm8550_match_table);
>
> static int cam_cc_sm8550_probe(struct platform_device *pdev)
> {
> - struct regmap *regmap;
> - int ret;
> -
> - ret = devm_pm_runtime_enable(&pdev->dev);
> - if (ret)
> - return ret;
> -
> - ret = pm_runtime_resume_and_get(&pdev->dev);
> - if (ret)
> - return ret;
> -
> - regmap = qcom_cc_map(pdev, &cam_cc_sm8550_desc);
> - if (IS_ERR(regmap)) {
> - pm_runtime_put(&pdev->dev);
> - return PTR_ERR(regmap);
> - }
> -
> - clk_lucid_ole_pll_configure(&cam_cc_pll0, regmap, &cam_cc_pll0_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll1, regmap, &cam_cc_pll1_config);
> - clk_rivian_evo_pll_configure(&cam_cc_pll2, regmap, &cam_cc_pll2_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll4, regmap, &cam_cc_pll4_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll5, regmap, &cam_cc_pll5_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll6, regmap, &cam_cc_pll6_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll7, regmap, &cam_cc_pll7_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll8, regmap, &cam_cc_pll8_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll9, regmap, &cam_cc_pll9_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll10, regmap, &cam_cc_pll10_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll11, regmap, &cam_cc_pll11_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll12, regmap, &cam_cc_pll12_config);
> -
> - /* Keep some clocks always-on */
> - qcom_branch_set_clk_en(regmap, 0x1419c); /* CAM_CC_GDSC_CLK */
> - qcom_branch_set_clk_en(regmap, 0x142cc); /* CAM_CC_SLEEP_CLK */
> -
> - ret = qcom_cc_really_probe(&pdev->dev, &cam_cc_sm8550_desc, regmap);
> -
> - pm_runtime_put(&pdev->dev);
> -
> - return ret;
> + return qcom_cc_probe(pdev, &cam_cc_sm8550_desc);
> }
>
> static struct platform_driver cam_cc_sm8550_driver = {
>
> --
> 2.34.1
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 11/18] clk: qcom: camcc-sm8650: Move PLL & clk configuration to really probe
2025-05-30 13:20 ` [PATCH v5 11/18] clk: qcom: camcc-sm8650: " Jagadeesh Kona
@ 2025-06-03 8:07 ` Bryan O'Donoghue
0 siblings, 0 replies; 38+ messages in thread
From: Bryan O'Donoghue @ 2025-06-03 8:07 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Konrad Dybcio,
Dmitry Baryshkov
On 30/05/2025 14:20, Jagadeesh Kona wrote:
> Camera PLLs on SM8650 require both MMCX and MXC rails to be kept ON
> to configure the PLLs properly. Hence move runtime power management,
> PLL configuration and enabling critical clocks to qcom_cc_really_probe()
> which ensures all required power domains are in enabled state before
> configuring the PLLs or enabling the clocks.
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
> drivers/clk/qcom/camcc-sm8650.c | 83 +++++++++++++++++++++--------------------
> 1 file changed, 42 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/clk/qcom/camcc-sm8650.c b/drivers/clk/qcom/camcc-sm8650.c
> index 0ccd6de8ba78a3493f8f853a4330d2676b5743d4..8b388904f56fc3b3f77a43a09f735ace24b9fcf7 100644
> --- a/drivers/clk/qcom/camcc-sm8650.c
> +++ b/drivers/clk/qcom/camcc-sm8650.c
> @@ -7,7 +7,6 @@
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> #include <linux/platform_device.h>
> -#include <linux/pm_runtime.h>
> #include <linux/regmap.h>
>
> #include <dt-bindings/clock/qcom,sm8650-camcc.h>
> @@ -72,6 +71,7 @@ static const struct alpha_pll_config cam_cc_pll0_config = {
>
> static struct clk_alpha_pll cam_cc_pll0 = {
> .offset = 0x0,
> + .config = &cam_cc_pll0_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -149,6 +149,7 @@ static const struct alpha_pll_config cam_cc_pll1_config = {
>
> static struct clk_alpha_pll cam_cc_pll1 = {
> .offset = 0x1000,
> + .config = &cam_cc_pll1_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -199,6 +200,7 @@ static const struct alpha_pll_config cam_cc_pll2_config = {
>
> static struct clk_alpha_pll cam_cc_pll2 = {
> .offset = 0x2000,
> + .config = &cam_cc_pll2_config,
> .vco_table = rivian_ole_vco,
> .num_vco = ARRAY_SIZE(rivian_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO],
> @@ -230,6 +232,7 @@ static const struct alpha_pll_config cam_cc_pll3_config = {
>
> static struct clk_alpha_pll cam_cc_pll3 = {
> .offset = 0x3000,
> + .config = &cam_cc_pll3_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -284,6 +287,7 @@ static const struct alpha_pll_config cam_cc_pll4_config = {
>
> static struct clk_alpha_pll cam_cc_pll4 = {
> .offset = 0x4000,
> + .config = &cam_cc_pll4_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -338,6 +342,7 @@ static const struct alpha_pll_config cam_cc_pll5_config = {
>
> static struct clk_alpha_pll cam_cc_pll5 = {
> .offset = 0x5000,
> + .config = &cam_cc_pll5_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -392,6 +397,7 @@ static const struct alpha_pll_config cam_cc_pll6_config = {
>
> static struct clk_alpha_pll cam_cc_pll6 = {
> .offset = 0x6000,
> + .config = &cam_cc_pll6_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -446,6 +452,7 @@ static const struct alpha_pll_config cam_cc_pll7_config = {
>
> static struct clk_alpha_pll cam_cc_pll7 = {
> .offset = 0x7000,
> + .config = &cam_cc_pll7_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -500,6 +507,7 @@ static const struct alpha_pll_config cam_cc_pll8_config = {
>
> static struct clk_alpha_pll cam_cc_pll8 = {
> .offset = 0x8000,
> + .config = &cam_cc_pll8_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -554,6 +562,7 @@ static const struct alpha_pll_config cam_cc_pll9_config = {
>
> static struct clk_alpha_pll cam_cc_pll9 = {
> .offset = 0x9000,
> + .config = &cam_cc_pll9_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -631,6 +640,7 @@ static const struct alpha_pll_config cam_cc_pll10_config = {
>
> static struct clk_alpha_pll cam_cc_pll10 = {
> .offset = 0xa000,
> + .config = &cam_cc_pll10_config,
> .vco_table = lucid_ole_vco,
> .num_vco = ARRAY_SIZE(lucid_ole_vco),
> .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
> @@ -3509,6 +3519,27 @@ static const struct qcom_reset_map cam_cc_sm8650_resets[] = {
> [CAM_CC_SFE_2_BCR] = { 0x130f4 },
> };
>
> +static struct clk_alpha_pll *cam_cc_sm8650_plls[] = {
> + &cam_cc_pll0,
> + &cam_cc_pll1,
> + &cam_cc_pll2,
> + &cam_cc_pll3,
> + &cam_cc_pll4,
> + &cam_cc_pll5,
> + &cam_cc_pll6,
> + &cam_cc_pll7,
> + &cam_cc_pll8,
> + &cam_cc_pll9,
> + &cam_cc_pll10,
> +};
> +
> +static u32 cam_cc_sm8650_critical_cbcrs[] = {
> + 0x132ec, /* CAM_CC_GDSC_CLK */
> + 0x13308, /* CAM_CC_SLEEP_CLK */
> + 0x13314, /* CAM_CC_DRV_XO_CLK */
> + 0x13318, /* CAM_CC_DRV_AHB_CLK */
> +};
> +
> static const struct regmap_config cam_cc_sm8650_regmap_config = {
> .reg_bits = 32,
> .reg_stride = 4,
> @@ -3517,6 +3548,13 @@ static const struct regmap_config cam_cc_sm8650_regmap_config = {
> .fast_io = true,
> };
>
> +static struct qcom_cc_driver_data cam_cc_sm8650_driver_data = {
> + .alpha_plls = cam_cc_sm8650_plls,
> + .num_alpha_plls = ARRAY_SIZE(cam_cc_sm8650_plls),
> + .clk_cbcrs = cam_cc_sm8650_critical_cbcrs,
> + .num_clk_cbcrs = ARRAY_SIZE(cam_cc_sm8650_critical_cbcrs),
> +};
> +
> static const struct qcom_cc_desc cam_cc_sm8650_desc = {
> .config = &cam_cc_sm8650_regmap_config,
> .clks = cam_cc_sm8650_clocks,
> @@ -3525,6 +3563,8 @@ static const struct qcom_cc_desc cam_cc_sm8650_desc = {
> .num_resets = ARRAY_SIZE(cam_cc_sm8650_resets),
> .gdscs = cam_cc_sm8650_gdscs,
> .num_gdscs = ARRAY_SIZE(cam_cc_sm8650_gdscs),
> + .use_rpm = true,
> + .driver_data = &cam_cc_sm8650_driver_data,
> };
>
> static const struct of_device_id cam_cc_sm8650_match_table[] = {
> @@ -3535,46 +3575,7 @@ MODULE_DEVICE_TABLE(of, cam_cc_sm8650_match_table);
>
> static int cam_cc_sm8650_probe(struct platform_device *pdev)
> {
> - struct regmap *regmap;
> - int ret;
> -
> - ret = devm_pm_runtime_enable(&pdev->dev);
> - if (ret)
> - return ret;
> -
> - ret = pm_runtime_resume_and_get(&pdev->dev);
> - if (ret)
> - return ret;
> -
> - regmap = qcom_cc_map(pdev, &cam_cc_sm8650_desc);
> - if (IS_ERR(regmap)) {
> - pm_runtime_put(&pdev->dev);
> - return PTR_ERR(regmap);
> - }
> -
> - clk_lucid_ole_pll_configure(&cam_cc_pll0, regmap, &cam_cc_pll0_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll1, regmap, &cam_cc_pll1_config);
> - clk_rivian_evo_pll_configure(&cam_cc_pll2, regmap, &cam_cc_pll2_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll4, regmap, &cam_cc_pll4_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll5, regmap, &cam_cc_pll5_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll6, regmap, &cam_cc_pll6_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll7, regmap, &cam_cc_pll7_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll8, regmap, &cam_cc_pll8_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll9, regmap, &cam_cc_pll9_config);
> - clk_lucid_ole_pll_configure(&cam_cc_pll10, regmap, &cam_cc_pll10_config);
> -
> - /* Keep clocks always enabled */
> - qcom_branch_set_clk_en(regmap, 0x13318); /* CAM_CC_DRV_AHB_CLK */
> - qcom_branch_set_clk_en(regmap, 0x13314); /* CAM_CC_DRV_XO_CLK */
> - qcom_branch_set_clk_en(regmap, 0x132ec); /* CAM_CC_GDSC_CLK */
> - qcom_branch_set_clk_en(regmap, 0x13308); /* CAM_CC_SLEEP_CLK */
> -
> - ret = qcom_cc_really_probe(&pdev->dev, &cam_cc_sm8650_desc, regmap);
> -
> - pm_runtime_put(&pdev->dev);
> -
> - return ret;
> + return qcom_cc_probe(pdev, &cam_cc_sm8650_desc);
> }
>
> static struct platform_driver cam_cc_sm8650_driver = {
>
> --
> 2.34.1
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 16/18] arm64: dts: qcom: sm8450: Additionally manage MXC power domain in camcc
2025-05-30 13:21 ` [PATCH v5 16/18] arm64: dts: qcom: sm8450: Additionally manage MXC power domain in camcc Jagadeesh Kona
@ 2025-06-03 8:08 ` Bryan O'Donoghue
0 siblings, 0 replies; 38+ messages in thread
From: Bryan O'Donoghue @ 2025-06-03 8:08 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Konrad Dybcio,
Dmitry Baryshkov
On 30/05/2025 14:21, Jagadeesh Kona wrote:
> Camcc requires both MMCX and MXC rails to be powered ON to configure
> the camera PLLs on SM8450 platform. Hence add MXC power domain to
> camcc node on SM8450.
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
> arch/arm64/boot/dts/qcom/sm8450.dtsi | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> index 36a67c679fbaed944d7590528b696635c306da5d..624190c07c59f3e6714f296f1b264d2a88135116 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> @@ -3292,8 +3292,10 @@ camcc: clock-controller@ade0000 {
> <&rpmhcc RPMH_CXO_CLK>,
> <&rpmhcc RPMH_CXO_CLK_A>,
> <&sleep_clk>;
> - power-domains = <&rpmhpd RPMHPD_MMCX>;
> - required-opps = <&rpmhpd_opp_low_svs>;
> + power-domains = <&rpmhpd RPMHPD_MMCX>,
> + <&rpmhpd RPMHPD_MXC>;
> + required-opps = <&rpmhpd_opp_low_svs>,
> + <&rpmhpd_opp_low_svs>;
> #clock-cells = <1>;
> #reset-cells = <1>;
> #power-domain-cells = <1>;
>
> --
> 2.34.1
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 17/18] arm64: dts: qcom: sm8550: Additionally manage MXC power domain in camcc
2025-05-30 13:21 ` [PATCH v5 17/18] arm64: dts: qcom: sm8550: " Jagadeesh Kona
@ 2025-06-03 8:09 ` Bryan O'Donoghue
0 siblings, 0 replies; 38+ messages in thread
From: Bryan O'Donoghue @ 2025-06-03 8:09 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Konrad Dybcio,
Dmitry Baryshkov
On 30/05/2025 14:21, Jagadeesh Kona wrote:
> From: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
>
> Camcc requires both MMCX and MXC rails to be powered ON to configure
> the camera PLLs on SM8550 platform. Hence add MXC power domain to
> camcc node on SM8550. While at it, update SM8550_MMCX macro to RPMHPD_MMCX
> to align towards common macros.
>
> Fixes: e271b59e39a6f ("arm64: dts: qcom: sm8550: Add camera clock controller")
> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> Reviewed-by: Taniya Das <quic_tdas@quicinc.com>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
> arch/arm64/boot/dts/qcom/sm8550.dtsi | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
> index 92017caedbbbea12eb2e43f2e9f5bcad0c0ee40c..e9bb077aa9f0b8be28608d4a0345aae7df8cd167 100644
> --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
> @@ -3333,8 +3333,10 @@ camcc: clock-controller@ade0000 {
> <&bi_tcxo_div2>,
> <&bi_tcxo_ao_div2>,
> <&sleep_clk>;
> - power-domains = <&rpmhpd SM8550_MMCX>;
> - required-opps = <&rpmhpd_opp_low_svs>;
> + power-domains = <&rpmhpd RPMHPD_MMCX>,
> + <&rpmhpd RPMHPD_MXC>;
> + required-opps = <&rpmhpd_opp_low_svs>,
> + <&rpmhpd_opp_low_svs>;
> #clock-cells = <1>;
> #reset-cells = <1>;
> #power-domain-cells = <1>;
>
> --
> 2.34.1
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 18/18] arm64: dts: qcom: sm8650: Additionally manage MXC power domain in camcc
2025-05-30 13:21 ` [PATCH v5 18/18] arm64: dts: qcom: sm8650: " Jagadeesh Kona
@ 2025-06-03 8:09 ` Bryan O'Donoghue
0 siblings, 0 replies; 38+ messages in thread
From: Bryan O'Donoghue @ 2025-06-03 8:09 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Konrad Dybcio,
Dmitry Baryshkov
On 30/05/2025 14:21, Jagadeesh Kona wrote:
> Camcc requires both MMCX and MXC rails to be powered ON to configure
> the camera PLLs on SM8650 platform. Hence add MXC power domain to
> camcc node on SM8650.
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
> arch/arm64/boot/dts/qcom/sm8650.dtsi | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
> index ad60596b71d25bb0198b26660dc41195a1210a23..a2b3d97abc7f799810e20131d7231608c8757859 100644
> --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
> @@ -5072,7 +5072,8 @@ camcc: clock-controller@ade0000 {
> <&bi_tcxo_div2>,
> <&bi_tcxo_ao_div2>,
> <&sleep_clk>;
> - power-domains = <&rpmhpd RPMHPD_MMCX>;
> + power-domains = <&rpmhpd RPMHPD_MMCX>,
> + <&rpmhpd RPMHPD_MXC>;
> #clock-cells = <1>;
> #reset-cells = <1>;
> #power-domain-cells = <1>;
>
> --
> 2.34.1
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (17 preceding siblings ...)
2025-05-30 13:21 ` [PATCH v5 18/18] arm64: dts: qcom: sm8650: " Jagadeesh Kona
@ 2025-06-03 8:09 ` Bryan O'Donoghue
2025-06-12 4:00 ` (subset) " Bjorn Andersson
2025-07-29 14:49 ` neil.armstrong
20 siblings, 0 replies; 38+ messages in thread
From: Bryan O'Donoghue @ 2025-06-03 8:09 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov,
Konrad Dybcio
On 30/05/2025 14:20, Jagadeesh Kona wrote:
> In recent QCOM chipsets, PLLs require more than one power domain to be
> kept ON to configure the PLL. But the current code doesn't enable all
> the required power domains while configuring the PLLs, this leads to
> functional issues due to suboptimal settings of PLLs.
>
> To address this, add support for handling runtime power management,
> configuring plls and enabling critical clocks from qcom_cc_really_probe.
> The clock controller can specify PLLs, critical clocks, and runtime PM
> requirements using the descriptor data. The code in qcom_cc_really_probe()
> ensures all necessary power domains are enabled before configuring PLLs
> or critical clocks.
>
> This series fixes the below warning reported in SM8550 venus testing due
> to video_cc_pll0 not properly getting configured during videocc probe
>
> [ 46.535132] Lucid PLL latch failed. Output may be unstable!
>
> The patch adding support to configure the PLLs from common code is
> picked from below series and updated it.
> https://lore.kernel.org/all/20250113-support-pll-reconfigure-v1-0-1fae6bc1062d@quicinc.com/
>
> This series is dependent on bindings patch in below Vladimir's series, hence
> included the Vladimir's series patches also in this series and updated them.
> https://lore.kernel.org/all/20250303225521.1780611-1-vladimir.zapolskiy@linaro.org/
>
> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
> ---
> Changes in v5:
> - Reversed order of patches 2 & 3 to add MXC support in SM8450
> camcc bindings first and then moved SC8280XP camcc to SA8775P
> camcc to have single power domain support for it.
> - Added return code for qcom_cc_clk_pll_configure() and
> returned -EINVAL in case if PLL config or registers is
> NULL in patch 6 [Bryan]
> - Added separate CBCR's list for SM8650 videocc and
> updated clk_cbcrs list based on compatible in patch 8[Konrad]
> - Added R-By tags received on v4
> - Link to v4: https://lore.kernel.org/r/20250515-videocc-pll-multi-pd-voting-v4-0-571c63297d01@quicinc.com
>
> Changes in v4:
> - Updated the SC8280XP camcc bindings patch to fix the
> required-opps warning reported by kernel bot
> - Updated the description of power-domains, required-opps of SM8450 camcc
> bindings as per review comments on v3 [Bryan]
> - Moved the PLL config checks to calling function code [Dmitry]
> - Removed qcom_clk_reg_setting struct and regmap_update_bits() code.
> Added a .clk_regs_configure() callback that clock drivers can implement
> if they require to update some misc register settings [Dmitry]
> - Moved the PLLs and CBCRs data to a separate qcom_cc_driver_data
> struct to avoid bloating up the CC descriptor structure
> - Updated the videocc and camcc driver patches to incorporate above
> qcom_cc_driver_data change
> - Updated the commit text of DT patches [Bryan]
> - Added the R-By, T-By tags received on v3
> - Link to v3: https://lore.kernel.org/r/20250327-videocc-pll-multi-pd-voting-v3-0-895fafd62627@quicinc.com
>
> Changes in v3:
> - Updated the videocc bindings patch to add required-opps for MXC power domain [Dmitry]
> and added Bryan & Rob R/A-By tags received for this patch on v1.
> - Included the Vladimir's bindings patch for SM8450 camcc bindings to
> add multiple PD support and updated them to fix the bot warnings.
> - Moved SC8280XP camcc bindings to SA8775P camcc since SC8280XP only
> require single MMCX power domain
> - Split runtime PM and PLL configuration to separate patches [Dmitry]
> - Removed direct regmap_update_bits to configure clock CBCR's and
> using clock helpers to configure the CBCR registers [Dmitry, Bryan]
> - Added new helpers to configure all PLLs & update misc clock
> register settings from common code [Dmitry, Bryan]
> - Updated the name of qcom_clk_cfg structure to qcom_clk_reg_setting [Konrad]
> - Updated the fields in structure from unsigned int to u32 and added
> val field to this structure [Konrad]
> - Added a new u32 array for cbcr branch clocks & num_clk_cbcrs fields
> to maintain the list of critical clock cbcrs in clock controller
> descriptor [Konrad]
> - Updated the plls field to alpha_plls in descriptor structure [Konrad]
> - Added WARN() in PLL configure function if PLL type passed is not
> supported. The suggestion is to use BUG(), but updated it to
> WARN() to avoid checkpatch warning. [Bjorn]
> - Moved the pll configure and helper macros to PLL code from common code [Bjorn]
> - Updated camcc drivers for SM8450, SM8550, SM8650 and X1E80100 targets
> with support to configure PLLs from common code and added MXC power
> domain in corresponding camcc DT nodes. [Bryan]
> - Added Dmitry and Bryan R-By tags received on videocc DT node changes in v1
> - Link to v2: https://lore.kernel.org/r/20250306-videocc-pll-multi-pd-voting-v2-0-0cd00612bc0e@quicinc.com
>
> Changes in v2:
> - Added support to handle rpm, PLL configuration and enable critical
> clocks from qcom_cc_really_probe() in common code as per v1 commments
> from Bryan, Konrad and Dmitry
> - Added patches to configure PLLs from common code
> - Updated the SM8450, SM8550 videocc patches to use the newly
> added support to handle rpm, configure PLLs from common code
> - Split the DT change for each target separately as per
> Dmitry comments
> - Added R-By and A-By tags received on v1
> - Link to v1: https://lore.kernel.org/r/20250218-videocc-pll-multi-pd-voting-v1-0-cfe6289ea29b@quicinc.com
>
> ---
> Jagadeesh Kona (15):
> dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain
> dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc
> clk: qcom: common: Handle runtime power management in qcom_cc_really_probe
> clk: qcom: common: Add support to configure clk regs in qcom_cc_really_probe
> clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe
> clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
> clk: qcom: camcc-sm8450: Move PLL & clk configuration to really probe
> clk: qcom: camcc-sm8550: Move PLL & clk configuration to really probe
> clk: qcom: camcc-sm8650: Move PLL & clk configuration to really probe
> clk: qcom: camcc-x1e80100: Move PLL & clk configuration to really probe
> arm64: dts: qcom: sm8450: Additionally manage MXC power domain in videocc
> arm64: dts: qcom: sm8550: Additionally manage MXC power domain in videocc
> arm64: dts: qcom: sm8650: Additionally manage MXC power domain in videocc
> arm64: dts: qcom: sm8450: Additionally manage MXC power domain in camcc
> arm64: dts: qcom: sm8650: Additionally manage MXC power domain in camcc
>
> Taniya Das (1):
> clk: qcom: clk-alpha-pll: Add support for common PLL configuration function
>
> Vladimir Zapolskiy (2):
> dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains
> arm64: dts: qcom: sm8550: Additionally manage MXC power domain in camcc
>
> .../bindings/clock/qcom,sa8775p-camcc.yaml | 15 ++++
> .../bindings/clock/qcom,sm8450-camcc.yaml | 20 +++--
> .../bindings/clock/qcom,sm8450-videocc.yaml | 18 +++--
> arch/arm64/boot/dts/qcom/sm8450.dtsi | 12 ++-
> arch/arm64/boot/dts/qcom/sm8550.dtsi | 12 ++-
> arch/arm64/boot/dts/qcom/sm8650.dtsi | 6 +-
> drivers/clk/qcom/camcc-sm8450.c | 89 +++++++++++-----------
> drivers/clk/qcom/camcc-sm8550.c | 85 +++++++++++----------
> drivers/clk/qcom/camcc-sm8650.c | 83 ++++++++++----------
> drivers/clk/qcom/camcc-x1e80100.c | 67 ++++++++--------
> drivers/clk/qcom/clk-alpha-pll.c | 57 ++++++++++++++
> drivers/clk/qcom/clk-alpha-pll.h | 3 +
> drivers/clk/qcom/common.c | 81 +++++++++++++++++---
> drivers/clk/qcom/common.h | 10 +++
> drivers/clk/qcom/videocc-sm8450.c | 58 ++++++--------
> drivers/clk/qcom/videocc-sm8550.c | 66 ++++++++--------
> 16 files changed, 421 insertions(+), 261 deletions(-)
> ---
> base-commit: 138cfc44b3c4a5fb800388c6e27be169970fb9f7
> change-id: 20250218-videocc-pll-multi-pd-voting-d614dce910e7
>
> Best regards,
> --
> Jagadeesh Kona <quic_jkona@quicinc.com>
>
>
Can we merge this series now.
Looks ready.
---
bod
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: (subset) [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (18 preceding siblings ...)
2025-06-03 8:09 ` [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Bryan O'Donoghue
@ 2025-06-12 4:00 ` Bjorn Andersson
2025-06-12 10:03 ` Jagadeesh Kona
2025-07-29 14:49 ` neil.armstrong
20 siblings, 1 reply; 38+ messages in thread
From: Bjorn Andersson @ 2025-06-12 4:00 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Konrad Dybcio, Vladimir Zapolskiy, Dmitry Baryshkov,
Jagadeesh Kona
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov,
Konrad Dybcio
On Fri, 30 May 2025 18:50:45 +0530, Jagadeesh Kona wrote:
> In recent QCOM chipsets, PLLs require more than one power domain to be
> kept ON to configure the PLL. But the current code doesn't enable all
> the required power domains while configuring the PLLs, this leads to
> functional issues due to suboptimal settings of PLLs.
>
> To address this, add support for handling runtime power management,
> configuring plls and enabling critical clocks from qcom_cc_really_probe.
> The clock controller can specify PLLs, critical clocks, and runtime PM
> requirements using the descriptor data. The code in qcom_cc_really_probe()
> ensures all necessary power domains are enabled before configuring PLLs
> or critical clocks.
>
> [...]
Applied, thanks!
[01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain
commit: 1a42f4d4bb92ea961c58599bac837fb8b377a296
[02/18] dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains
commit: a02a8f8cb7f6f54b077a6f9eb74ccd840b472416
[03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc
commit: 842fa748291553d2f56410034991d0eb36b70900
[04/18] clk: qcom: clk-alpha-pll: Add support for common PLL configuration function
commit: 0f698c16358ef300ed28a608368b89a4f6a8623a
[05/18] clk: qcom: common: Handle runtime power management in qcom_cc_really_probe
commit: c0b6627369bcfec151ccbd091f9ff1cadb1d40c1
[06/18] clk: qcom: common: Add support to configure clk regs in qcom_cc_really_probe
commit: 452ae64997dd1db1fe9bec2e7bd65b33338e7a6b
[07/18] clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe
commit: 512af5bf312efe09698de0870e99c0cec4d13e21
[08/18] clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
commit: a9dc2cc7279a1967f37192a2f954e7111bfa61b7
[09/18] clk: qcom: camcc-sm8450: Move PLL & clk configuration to really probe
commit: eb65d754eb5eaeab7db87ce7e64dab27b7d156d8
[10/18] clk: qcom: camcc-sm8550: Move PLL & clk configuration to really probe
commit: adb50c762f3a513a363d91722dbd8d1b4afc5f10
[11/18] clk: qcom: camcc-sm8650: Move PLL & clk configuration to really probe
commit: 3f8dd231e60b706fc9395edbf0186b7a0756f45d
[12/18] clk: qcom: camcc-x1e80100: Move PLL & clk configuration to really probe
commit: d7eddaf0ed07e79ffdfd20acb2f6f2ca53e7851b
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: (subset) [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe
2025-06-12 4:00 ` (subset) " Bjorn Andersson
@ 2025-06-12 10:03 ` Jagadeesh Kona
2025-06-12 10:52 ` Krzysztof Kozlowski
0 siblings, 1 reply; 38+ messages in thread
From: Jagadeesh Kona @ 2025-06-12 10:03 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov,
Konrad Dybcio
On 6/12/2025 9:30 AM, Bjorn Andersson wrote:
>
> On Fri, 30 May 2025 18:50:45 +0530, Jagadeesh Kona wrote:
>> In recent QCOM chipsets, PLLs require more than one power domain to be
>> kept ON to configure the PLL. But the current code doesn't enable all
>> the required power domains while configuring the PLLs, this leads to
>> functional issues due to suboptimal settings of PLLs.
>>
>> To address this, add support for handling runtime power management,
>> configuring plls and enabling critical clocks from qcom_cc_really_probe.
>> The clock controller can specify PLLs, critical clocks, and runtime PM
>> requirements using the descriptor data. The code in qcom_cc_really_probe()
>> ensures all necessary power domains are enabled before configuring PLLs
>> or critical clocks.
>>
>> [...]
>
> Applied, thanks!
>
> [01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain
> commit: 1a42f4d4bb92ea961c58599bac837fb8b377a296
> [02/18] dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains
> commit: a02a8f8cb7f6f54b077a6f9eb74ccd840b472416
> [03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc
> commit: 842fa748291553d2f56410034991d0eb36b70900
> [04/18] clk: qcom: clk-alpha-pll: Add support for common PLL configuration function
> commit: 0f698c16358ef300ed28a608368b89a4f6a8623a
> [05/18] clk: qcom: common: Handle runtime power management in qcom_cc_really_probe
> commit: c0b6627369bcfec151ccbd091f9ff1cadb1d40c1
> [06/18] clk: qcom: common: Add support to configure clk regs in qcom_cc_really_probe
> commit: 452ae64997dd1db1fe9bec2e7bd65b33338e7a6b
> [07/18] clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe
> commit: 512af5bf312efe09698de0870e99c0cec4d13e21
> [08/18] clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
> commit: a9dc2cc7279a1967f37192a2f954e7111bfa61b7
> [09/18] clk: qcom: camcc-sm8450: Move PLL & clk configuration to really probe
> commit: eb65d754eb5eaeab7db87ce7e64dab27b7d156d8
> [10/18] clk: qcom: camcc-sm8550: Move PLL & clk configuration to really probe
> commit: adb50c762f3a513a363d91722dbd8d1b4afc5f10
> [11/18] clk: qcom: camcc-sm8650: Move PLL & clk configuration to really probe
> commit: 3f8dd231e60b706fc9395edbf0186b7a0756f45d
> [12/18] clk: qcom: camcc-x1e80100: Move PLL & clk configuration to really probe
> commit: d7eddaf0ed07e79ffdfd20acb2f6f2ca53e7851b
>
> Best regards,
Hi Bjorn,
Thanks for picking these patches. However, the dt-bindings patches are closely linked with
the DT patches in this series and needs to be picked together. The dt-bindings changes adds
multiple power domains support for clock controllers, and without the corresponding DT
patches, dtbs_check will give warnings.
Can you please help to pick DT patches as well?
Thanks,
Jagadeesh
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: (subset) [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe
2025-06-12 10:03 ` Jagadeesh Kona
@ 2025-06-12 10:52 ` Krzysztof Kozlowski
2025-06-16 7:25 ` Jagadeesh Kona
0 siblings, 1 reply; 38+ messages in thread
From: Krzysztof Kozlowski @ 2025-06-12 10:52 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Bryan O'Donoghue, Dmitry Baryshkov, Konrad Dybcio
On 12/06/2025 12:03, Jagadeesh Kona wrote:
>
>
> On 6/12/2025 9:30 AM, Bjorn Andersson wrote:
>>
>> On Fri, 30 May 2025 18:50:45 +0530, Jagadeesh Kona wrote:
>>> In recent QCOM chipsets, PLLs require more than one power domain to be
>>> kept ON to configure the PLL. But the current code doesn't enable all
>>> the required power domains while configuring the PLLs, this leads to
>>> functional issues due to suboptimal settings of PLLs.
>>>
>>> To address this, add support for handling runtime power management,
>>> configuring plls and enabling critical clocks from qcom_cc_really_probe.
>>> The clock controller can specify PLLs, critical clocks, and runtime PM
>>> requirements using the descriptor data. The code in qcom_cc_really_probe()
>>> ensures all necessary power domains are enabled before configuring PLLs
>>> or critical clocks.
>>>
>>> [...]
>>
>> Applied, thanks!
>>
>> [01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain
>> commit: 1a42f4d4bb92ea961c58599bac837fb8b377a296
>> [02/18] dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains
>> commit: a02a8f8cb7f6f54b077a6f9eb74ccd840b472416
>> [03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc
>> commit: 842fa748291553d2f56410034991d0eb36b70900
>> [04/18] clk: qcom: clk-alpha-pll: Add support for common PLL configuration function
>> commit: 0f698c16358ef300ed28a608368b89a4f6a8623a
>> [05/18] clk: qcom: common: Handle runtime power management in qcom_cc_really_probe
>> commit: c0b6627369bcfec151ccbd091f9ff1cadb1d40c1
>> [06/18] clk: qcom: common: Add support to configure clk regs in qcom_cc_really_probe
>> commit: 452ae64997dd1db1fe9bec2e7bd65b33338e7a6b
>> [07/18] clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe
>> commit: 512af5bf312efe09698de0870e99c0cec4d13e21
>> [08/18] clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
>> commit: a9dc2cc7279a1967f37192a2f954e7111bfa61b7
>> [09/18] clk: qcom: camcc-sm8450: Move PLL & clk configuration to really probe
>> commit: eb65d754eb5eaeab7db87ce7e64dab27b7d156d8
>> [10/18] clk: qcom: camcc-sm8550: Move PLL & clk configuration to really probe
>> commit: adb50c762f3a513a363d91722dbd8d1b4afc5f10
>> [11/18] clk: qcom: camcc-sm8650: Move PLL & clk configuration to really probe
>> commit: 3f8dd231e60b706fc9395edbf0186b7a0756f45d
>> [12/18] clk: qcom: camcc-x1e80100: Move PLL & clk configuration to really probe
>> commit: d7eddaf0ed07e79ffdfd20acb2f6f2ca53e7851b
>>
>> Best regards,
>
>
> Hi Bjorn,
>
> Thanks for picking these patches. However, the dt-bindings patches are closely linked with
> the DT patches in this series and needs to be picked together. The dt-bindings changes adds
DT bindings are the DT patches. What do you mean by DT? DTS? If so, then
you introduce regressions without explaining this at all in cover letter
or patches.
> multiple power domains support for clock controllers, and without the corresponding DT
> patches, dtbs_check will give warnings.
>
> Can you please help to pick DT patches as well?
Please read soc maintainer profile explaining how DTS is being organized.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: (subset) [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe
2025-06-12 10:52 ` Krzysztof Kozlowski
@ 2025-06-16 7:25 ` Jagadeesh Kona
2025-06-17 13:27 ` Bjorn Andersson
0 siblings, 1 reply; 38+ messages in thread
From: Jagadeesh Kona @ 2025-06-16 7:25 UTC (permalink / raw)
To: Krzysztof Kozlowski, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Konrad Dybcio, Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Bryan O'Donoghue, Dmitry Baryshkov, Konrad Dybcio
On 6/12/2025 4:22 PM, Krzysztof Kozlowski wrote:
> On 12/06/2025 12:03, Jagadeesh Kona wrote:
>>
>>
>> On 6/12/2025 9:30 AM, Bjorn Andersson wrote:
>>>
>>> On Fri, 30 May 2025 18:50:45 +0530, Jagadeesh Kona wrote:
>>>> In recent QCOM chipsets, PLLs require more than one power domain to be
>>>> kept ON to configure the PLL. But the current code doesn't enable all
>>>> the required power domains while configuring the PLLs, this leads to
>>>> functional issues due to suboptimal settings of PLLs.
>>>>
>>>> To address this, add support for handling runtime power management,
>>>> configuring plls and enabling critical clocks from qcom_cc_really_probe.
>>>> The clock controller can specify PLLs, critical clocks, and runtime PM
>>>> requirements using the descriptor data. The code in qcom_cc_really_probe()
>>>> ensures all necessary power domains are enabled before configuring PLLs
>>>> or critical clocks.
>>>>
>>>> [...]
>>>
>>> Applied, thanks!
>>>
>>> [01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain
>>> commit: 1a42f4d4bb92ea961c58599bac837fb8b377a296
>>> [02/18] dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains
>>> commit: a02a8f8cb7f6f54b077a6f9eb74ccd840b472416
>>> [03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc
>>> commit: 842fa748291553d2f56410034991d0eb36b70900
>>> [04/18] clk: qcom: clk-alpha-pll: Add support for common PLL configuration function
>>> commit: 0f698c16358ef300ed28a608368b89a4f6a8623a
>>> [05/18] clk: qcom: common: Handle runtime power management in qcom_cc_really_probe
>>> commit: c0b6627369bcfec151ccbd091f9ff1cadb1d40c1
>>> [06/18] clk: qcom: common: Add support to configure clk regs in qcom_cc_really_probe
>>> commit: 452ae64997dd1db1fe9bec2e7bd65b33338e7a6b
>>> [07/18] clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe
>>> commit: 512af5bf312efe09698de0870e99c0cec4d13e21
>>> [08/18] clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
>>> commit: a9dc2cc7279a1967f37192a2f954e7111bfa61b7
>>> [09/18] clk: qcom: camcc-sm8450: Move PLL & clk configuration to really probe
>>> commit: eb65d754eb5eaeab7db87ce7e64dab27b7d156d8
>>> [10/18] clk: qcom: camcc-sm8550: Move PLL & clk configuration to really probe
>>> commit: adb50c762f3a513a363d91722dbd8d1b4afc5f10
>>> [11/18] clk: qcom: camcc-sm8650: Move PLL & clk configuration to really probe
>>> commit: 3f8dd231e60b706fc9395edbf0186b7a0756f45d
>>> [12/18] clk: qcom: camcc-x1e80100: Move PLL & clk configuration to really probe
>>> commit: d7eddaf0ed07e79ffdfd20acb2f6f2ca53e7851b
>>>
>>> Best regards,
>>
>>
>> Hi Bjorn,
>>
>> Thanks for picking these patches. However, the dt-bindings patches are closely linked with
>> the DT patches in this series and needs to be picked together. The dt-bindings changes adds
>
> DT bindings are the DT patches. What do you mean by DT? DTS? If so, then
> you introduce regressions without explaining this at all in cover letter
> or patches.
>
>> multiple power domains support for clock controllers, and without the corresponding DT
>> patches, dtbs_check will give warnings.
>>
>> Can you please help to pick DT patches as well?
>
> Please read soc maintainer profile explaining how DTS is being organized.
>
I apologize for not mentioning this details in cover letter. Here the dt-bindings documentation
changes(patches 1-3) are only applied and the corresponding DTS changes(patches 13-18) are not
yet applied via DTS tree, leading to dtbs_check warnings.
Thanks,
Jagadeesh
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: (subset) [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe
2025-06-16 7:25 ` Jagadeesh Kona
@ 2025-06-17 13:27 ` Bjorn Andersson
2025-06-17 19:16 ` Jagadeesh Kona
0 siblings, 1 reply; 38+ messages in thread
From: Bjorn Andersson @ 2025-06-17 13:27 UTC (permalink / raw)
To: Jagadeesh Kona
Cc: Krzysztof Kozlowski, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov, Ajit Pandey, Imran Shaik,
Taniya Das, Satya Priya Kakitapalli, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Bryan O'Donoghue, Dmitry Baryshkov,
Konrad Dybcio
On Mon, Jun 16, 2025 at 12:55:47PM +0530, Jagadeesh Kona wrote:
>
>
> On 6/12/2025 4:22 PM, Krzysztof Kozlowski wrote:
> > On 12/06/2025 12:03, Jagadeesh Kona wrote:
> >>
> >>
> >> On 6/12/2025 9:30 AM, Bjorn Andersson wrote:
> >>>
> >>> On Fri, 30 May 2025 18:50:45 +0530, Jagadeesh Kona wrote:
> >>>> In recent QCOM chipsets, PLLs require more than one power domain to be
> >>>> kept ON to configure the PLL. But the current code doesn't enable all
> >>>> the required power domains while configuring the PLLs, this leads to
> >>>> functional issues due to suboptimal settings of PLLs.
> >>>>
> >>>> To address this, add support for handling runtime power management,
> >>>> configuring plls and enabling critical clocks from qcom_cc_really_probe.
> >>>> The clock controller can specify PLLs, critical clocks, and runtime PM
> >>>> requirements using the descriptor data. The code in qcom_cc_really_probe()
> >>>> ensures all necessary power domains are enabled before configuring PLLs
> >>>> or critical clocks.
> >>>>
> >>>> [...]
> >>>
> >>> Applied, thanks!
> >>>
> >>> [01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain
> >>> commit: 1a42f4d4bb92ea961c58599bac837fb8b377a296
> >>> [02/18] dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains
> >>> commit: a02a8f8cb7f6f54b077a6f9eb74ccd840b472416
> >>> [03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc
> >>> commit: 842fa748291553d2f56410034991d0eb36b70900
> >>> [04/18] clk: qcom: clk-alpha-pll: Add support for common PLL configuration function
> >>> commit: 0f698c16358ef300ed28a608368b89a4f6a8623a
> >>> [05/18] clk: qcom: common: Handle runtime power management in qcom_cc_really_probe
> >>> commit: c0b6627369bcfec151ccbd091f9ff1cadb1d40c1
> >>> [06/18] clk: qcom: common: Add support to configure clk regs in qcom_cc_really_probe
> >>> commit: 452ae64997dd1db1fe9bec2e7bd65b33338e7a6b
> >>> [07/18] clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe
> >>> commit: 512af5bf312efe09698de0870e99c0cec4d13e21
> >>> [08/18] clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
> >>> commit: a9dc2cc7279a1967f37192a2f954e7111bfa61b7
> >>> [09/18] clk: qcom: camcc-sm8450: Move PLL & clk configuration to really probe
> >>> commit: eb65d754eb5eaeab7db87ce7e64dab27b7d156d8
> >>> [10/18] clk: qcom: camcc-sm8550: Move PLL & clk configuration to really probe
> >>> commit: adb50c762f3a513a363d91722dbd8d1b4afc5f10
> >>> [11/18] clk: qcom: camcc-sm8650: Move PLL & clk configuration to really probe
> >>> commit: 3f8dd231e60b706fc9395edbf0186b7a0756f45d
> >>> [12/18] clk: qcom: camcc-x1e80100: Move PLL & clk configuration to really probe
> >>> commit: d7eddaf0ed07e79ffdfd20acb2f6f2ca53e7851b
> >>>
> >>> Best regards,
> >>
> >>
> >> Hi Bjorn,
> >>
> >> Thanks for picking these patches. However, the dt-bindings patches are closely linked with
> >> the DT patches in this series and needs to be picked together. The dt-bindings changes adds
> >
> > DT bindings are the DT patches. What do you mean by DT? DTS? If so, then
> > you introduce regressions without explaining this at all in cover letter
> > or patches.
> >
> >> multiple power domains support for clock controllers, and without the corresponding DT
> >> patches, dtbs_check will give warnings.
> >>
> >> Can you please help to pick DT patches as well?
> >
> > Please read soc maintainer profile explaining how DTS is being organized.
> >
>
> I apologize for not mentioning this details in cover letter. Here the dt-bindings documentation
> changes(patches 1-3) are only applied and the corresponding DTS changes(patches 13-18) are not
> yet applied via DTS tree, leading to dtbs_check warnings.
>
Mentioning this in the cover letter wouldn't change the fact that the
binding is changing in an unexpected way.
As the binding now express that 2 power-domains is required, the driver
author would be free to expect that the loaded DTB has 2 power-domains
specified. But the user might still have an older DTB on their system
(exactly what dtbs_check is complaining about now).
A quick look makes me think that it's because you removed the maxItems:1
which means that the properties needs to match completely. Changing this
to minItems:1 should allow for both cases, I think.
Can you please send a patch that fixes up the bindings to allow both the
old and new case?
Regards,
Bjorn
> Thanks,
> Jagadeesh
>
> >
> > Best regards,
> > Krzysztof
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: (subset) [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe
2025-06-17 13:27 ` Bjorn Andersson
@ 2025-06-17 19:16 ` Jagadeesh Kona
0 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-06-17 19:16 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Krzysztof Kozlowski, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov, Ajit Pandey, Imran Shaik,
Taniya Das, Satya Priya Kakitapalli, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Bryan O'Donoghue, Dmitry Baryshkov,
Konrad Dybcio
On 6/17/2025 6:57 PM, Bjorn Andersson wrote:
> On Mon, Jun 16, 2025 at 12:55:47PM +0530, Jagadeesh Kona wrote:
>>
>>
>> On 6/12/2025 4:22 PM, Krzysztof Kozlowski wrote:
>>> On 12/06/2025 12:03, Jagadeesh Kona wrote:
>>>>
>>>>
>>>> On 6/12/2025 9:30 AM, Bjorn Andersson wrote:
>>>>>
>>>>> On Fri, 30 May 2025 18:50:45 +0530, Jagadeesh Kona wrote:
>>>>>> In recent QCOM chipsets, PLLs require more than one power domain to be
>>>>>> kept ON to configure the PLL. But the current code doesn't enable all
>>>>>> the required power domains while configuring the PLLs, this leads to
>>>>>> functional issues due to suboptimal settings of PLLs.
>>>>>>
>>>>>> To address this, add support for handling runtime power management,
>>>>>> configuring plls and enabling critical clocks from qcom_cc_really_probe.
>>>>>> The clock controller can specify PLLs, critical clocks, and runtime PM
>>>>>> requirements using the descriptor data. The code in qcom_cc_really_probe()
>>>>>> ensures all necessary power domains are enabled before configuring PLLs
>>>>>> or critical clocks.
>>>>>>
>>>>>> [...]
>>>>>
>>>>> Applied, thanks!
>>>>>
>>>>> [01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain
>>>>> commit: 1a42f4d4bb92ea961c58599bac837fb8b377a296
>>>>> [02/18] dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains
>>>>> commit: a02a8f8cb7f6f54b077a6f9eb74ccd840b472416
>>>>> [03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc
>>>>> commit: 842fa748291553d2f56410034991d0eb36b70900
>>>>> [04/18] clk: qcom: clk-alpha-pll: Add support for common PLL configuration function
>>>>> commit: 0f698c16358ef300ed28a608368b89a4f6a8623a
>>>>> [05/18] clk: qcom: common: Handle runtime power management in qcom_cc_really_probe
>>>>> commit: c0b6627369bcfec151ccbd091f9ff1cadb1d40c1
>>>>> [06/18] clk: qcom: common: Add support to configure clk regs in qcom_cc_really_probe
>>>>> commit: 452ae64997dd1db1fe9bec2e7bd65b33338e7a6b
>>>>> [07/18] clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe
>>>>> commit: 512af5bf312efe09698de0870e99c0cec4d13e21
>>>>> [08/18] clk: qcom: videocc-sm8550: Move PLL & clk configuration to really probe
>>>>> commit: a9dc2cc7279a1967f37192a2f954e7111bfa61b7
>>>>> [09/18] clk: qcom: camcc-sm8450: Move PLL & clk configuration to really probe
>>>>> commit: eb65d754eb5eaeab7db87ce7e64dab27b7d156d8
>>>>> [10/18] clk: qcom: camcc-sm8550: Move PLL & clk configuration to really probe
>>>>> commit: adb50c762f3a513a363d91722dbd8d1b4afc5f10
>>>>> [11/18] clk: qcom: camcc-sm8650: Move PLL & clk configuration to really probe
>>>>> commit: 3f8dd231e60b706fc9395edbf0186b7a0756f45d
>>>>> [12/18] clk: qcom: camcc-x1e80100: Move PLL & clk configuration to really probe
>>>>> commit: d7eddaf0ed07e79ffdfd20acb2f6f2ca53e7851b
>>>>>
>>>>> Best regards,
>>>>
>>>>
>>>> Hi Bjorn,
>>>>
>>>> Thanks for picking these patches. However, the dt-bindings patches are closely linked with
>>>> the DT patches in this series and needs to be picked together. The dt-bindings changes adds
>>>
>>> DT bindings are the DT patches. What do you mean by DT? DTS? If so, then
>>> you introduce regressions without explaining this at all in cover letter
>>> or patches.
>>>
>>>> multiple power domains support for clock controllers, and without the corresponding DT
>>>> patches, dtbs_check will give warnings.
>>>>
>>>> Can you please help to pick DT patches as well?
>>>
>>> Please read soc maintainer profile explaining how DTS is being organized.
>>>
>>
>> I apologize for not mentioning this details in cover letter. Here the dt-bindings documentation
>> changes(patches 1-3) are only applied and the corresponding DTS changes(patches 13-18) are not
>> yet applied via DTS tree, leading to dtbs_check warnings.
>>
>
> Mentioning this in the cover letter wouldn't change the fact that the
> binding is changing in an unexpected way.
>
> As the binding now express that 2 power-domains is required, the driver
> author would be free to expect that the loaded DTB has 2 power-domains
> specified. But the user might still have an older DTB on their system
> (exactly what dtbs_check is complaining about now).
>
> A quick look makes me think that it's because you removed the maxItems:1
> which means that the properties needs to match completely. Changing this
> to minItems:1 should allow for both cases, I think.
>
>
> Can you please send a patch that fixes up the bindings to allow both the
> old and new case?
>
Thanks Bjorn and Krzysztof for the info and suggestion.
I tried adding minItems as 1 to power-domains and required-opps properties
and dtbs_check is working fine now for both single and multi power-domains cases.
I have posted the below series with this fixes:
https://lore.kernel.org/all/20250618-sm8450-videocc-camcc-bindings-single-pd-fix-v1-0-02e83aeba280@quicinc.com/
Thanks,
Jagadeesh
> Regards,
> Bjorn
>
>> Thanks,
>> Jagadeesh
>>
>>>
>>> Best regards,
>>> Krzysztof
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
` (19 preceding siblings ...)
2025-06-12 4:00 ` (subset) " Bjorn Andersson
@ 2025-07-29 14:49 ` neil.armstrong
2025-07-30 9:50 ` Jagadeesh Kona
20 siblings, 1 reply; 38+ messages in thread
From: neil.armstrong @ 2025-07-29 14:49 UTC (permalink / raw)
To: Jagadeesh Kona, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov,
Konrad Dybcio
Hi,
On 30/05/2025 15:20, Jagadeesh Kona wrote:
> In recent QCOM chipsets, PLLs require more than one power domain to be
> kept ON to configure the PLL. But the current code doesn't enable all
> the required power domains while configuring the PLLs, this leads to
> functional issues due to suboptimal settings of PLLs.
>
> To address this, add support for handling runtime power management,
> configuring plls and enabling critical clocks from qcom_cc_really_probe.
> The clock controller can specify PLLs, critical clocks, and runtime PM
> requirements using the descriptor data. The code in qcom_cc_really_probe()
> ensures all necessary power domains are enabled before configuring PLLs
> or critical clocks.
>
> This series fixes the below warning reported in SM8550 venus testing due
> to video_cc_pll0 not properly getting configured during videocc probe
>
> [ 46.535132] Lucid PLL latch failed. Output may be unstable!
>
> The patch adding support to configure the PLLs from common code is
> picked from below series and updated it.
> https://lore.kernel.org/all/20250113-support-pll-reconfigure-v1-0-1fae6bc1062d@quicinc.com/
>
> This series is dependent on bindings patch in below Vladimir's series, hence
> included the Vladimir's series patches also in this series and updated them.
> https://lore.kernel.org/all/20250303225521.1780611-1-vladimir.zapolskiy@linaro.org/
Could you re-spin patches 13 to 18 to fix the bindings checks ?
Thanks,
Neil
<snip>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe
2025-07-29 14:49 ` neil.armstrong
@ 2025-07-30 9:50 ` Jagadeesh Kona
0 siblings, 0 replies; 38+ messages in thread
From: Jagadeesh Kona @ 2025-07-30 9:50 UTC (permalink / raw)
To: Neil Armstrong, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio,
Vladimir Zapolskiy, Dmitry Baryshkov
Cc: Ajit Pandey, Imran Shaik, Taniya Das, Satya Priya Kakitapalli,
linux-arm-msm, linux-clk, devicetree, linux-kernel,
Krzysztof Kozlowski, Bryan O'Donoghue, Dmitry Baryshkov,
Konrad Dybcio
On 7/29/2025 8:19 PM, neil.armstrong@linaro.org wrote:
> Hi,
>
> On 30/05/2025 15:20, Jagadeesh Kona wrote:
>> In recent QCOM chipsets, PLLs require more than one power domain to be
>> kept ON to configure the PLL. But the current code doesn't enable all
>> the required power domains while configuring the PLLs, this leads to
>> functional issues due to suboptimal settings of PLLs.
>>
>> To address this, add support for handling runtime power management,
>> configuring plls and enabling critical clocks from qcom_cc_really_probe.
>> The clock controller can specify PLLs, critical clocks, and runtime PM
>> requirements using the descriptor data. The code in qcom_cc_really_probe()
>> ensures all necessary power domains are enabled before configuring PLLs
>> or critical clocks.
>>
>> This series fixes the below warning reported in SM8550 venus testing due
>> to video_cc_pll0 not properly getting configured during videocc probe
>>
>> [ 46.535132] Lucid PLL latch failed. Output may be unstable!
>>
>> The patch adding support to configure the PLLs from common code is
>> picked from below series and updated it.
>> https://lore.kernel.org/all/20250113-support-pll-reconfigure-v1-0-1fae6bc1062d@quicinc.com/
>>
>> This series is dependent on bindings patch in below Vladimir's series, hence
>> included the Vladimir's series patches also in this series and updated them.
>> https://lore.kernel.org/all/20250303225521.1780611-1-vladimir.zapolskiy@linaro.org/
>
>
> Could you re-spin patches 13 to 18 to fix the bindings checks ?
>
I tried applying the patches 13-18 on latest linux-next tip and I see they are applied properly without any conflicts.
Bjorn, can you please help to pick the patches 13-18 to fix the bindings checks[1]. Please let me know if anything needed from me.
[1]: https://lore.kernel.org/oe-kbuild-all/453bd020-8124-4a7d-8d0f-8180d38f1ebc@quicinc.com/#t
Thanks,
Jagadeesh
> Thanks,
> Neil
>
> <snip>
>
^ permalink raw reply [flat|nested] 38+ messages in thread
end of thread, other threads:[~2025-07-30 9:50 UTC | newest]
Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-30 13:20 [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 01/18] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 02/18] dt-bindings: clock: qcom,sm8450-camcc: Allow to specify two power domains Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 03/18] dt-bindings: clock: qcom,sm8450-camcc: Move sc8280xp camcc to sa8775p camcc Jagadeesh Kona
2025-06-03 7:04 ` Krzysztof Kozlowski
2025-05-30 13:20 ` [PATCH v5 04/18] clk: qcom: clk-alpha-pll: Add support for common PLL configuration function Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 05/18] clk: qcom: common: Handle runtime power management in qcom_cc_really_probe Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 06/18] clk: qcom: common: Add support to configure clk regs " Jagadeesh Kona
2025-05-30 23:00 ` Konrad Dybcio
2025-05-30 13:20 ` [PATCH v5 07/18] clk: qcom: videocc-sm8450: Move PLL & clk configuration to really probe Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 08/18] clk: qcom: videocc-sm8550: " Jagadeesh Kona
2025-05-30 22:57 ` Konrad Dybcio
2025-06-03 8:02 ` Bryan O'Donoghue
2025-05-30 13:20 ` [PATCH v5 09/18] clk: qcom: camcc-sm8450: " Jagadeesh Kona
2025-06-03 8:05 ` Bryan O'Donoghue
2025-05-30 13:20 ` [PATCH v5 10/18] clk: qcom: camcc-sm8550: " Jagadeesh Kona
2025-06-03 8:06 ` Bryan O'Donoghue
2025-05-30 13:20 ` [PATCH v5 11/18] clk: qcom: camcc-sm8650: " Jagadeesh Kona
2025-06-03 8:07 ` Bryan O'Donoghue
2025-05-30 13:20 ` [PATCH v5 12/18] clk: qcom: camcc-x1e80100: " Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 13/18] arm64: dts: qcom: sm8450: Additionally manage MXC power domain in videocc Jagadeesh Kona
2025-05-30 13:20 ` [PATCH v5 14/18] arm64: dts: qcom: sm8550: " Jagadeesh Kona
2025-05-30 13:21 ` [PATCH v5 15/18] arm64: dts: qcom: sm8650: " Jagadeesh Kona
2025-05-30 13:21 ` [PATCH v5 16/18] arm64: dts: qcom: sm8450: Additionally manage MXC power domain in camcc Jagadeesh Kona
2025-06-03 8:08 ` Bryan O'Donoghue
2025-05-30 13:21 ` [PATCH v5 17/18] arm64: dts: qcom: sm8550: " Jagadeesh Kona
2025-06-03 8:09 ` Bryan O'Donoghue
2025-05-30 13:21 ` [PATCH v5 18/18] arm64: dts: qcom: sm8650: " Jagadeesh Kona
2025-06-03 8:09 ` Bryan O'Donoghue
2025-06-03 8:09 ` [PATCH v5 00/18] clk: qcom: Add support to attach multiple power domains in cc probe Bryan O'Donoghue
2025-06-12 4:00 ` (subset) " Bjorn Andersson
2025-06-12 10:03 ` Jagadeesh Kona
2025-06-12 10:52 ` Krzysztof Kozlowski
2025-06-16 7:25 ` Jagadeesh Kona
2025-06-17 13:27 ` Bjorn Andersson
2025-06-17 19:16 ` Jagadeesh Kona
2025-07-29 14:49 ` neil.armstrong
2025-07-30 9:50 ` Jagadeesh Kona
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).