* [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635)
@ 2025-07-07 9:56 Luca Weiss
2025-07-07 9:56 ` [PATCH v2 1/4] dt-bindings: clock: qcom: Document the Milos RPMH Clock Controller Luca Weiss
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Luca Weiss @ 2025-07-07 9:56 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Luca Weiss, Konrad Dybcio
Add support in the RPMh and TCSR clock drivers for the Milos SoC.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Changes in v2:
- Rebrand SM7635 to Milos as requested: https://lore.kernel.org/linux-arm-msm/aGMI1Zv6D+K+vWZL@hu-bjorande-lv.qualcomm.com/
- Pick up tags from Konrad
- Link to v1: https://lore.kernel.org/r/20250625-sm7635-clocks-misc-v1-0-45fea645d39b@fairphone.com
---
Luca Weiss (4):
dt-bindings: clock: qcom: Document the Milos RPMH Clock Controller
clk: qcom: rpmh: Add support for RPMH clocks on Milos
dt-bindings: clock: qcom: document the Milos TCSR Clock Controller
clk: qcom: tcsrcc-sm8650: Add support for Milos SoC
.../devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 +
.../bindings/clock/qcom,sm8550-tcsr.yaml | 1 +
drivers/clk/qcom/clk-rpmh.c | 26 ++++++++++++++++++++++
drivers/clk/qcom/tcsrcc-sm8650.c | 8 +++++++
4 files changed, 36 insertions(+)
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250620-sm7635-clocks-misc-0f359ad830ea
Best regards,
--
Luca Weiss <luca.weiss@fairphone.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/4] dt-bindings: clock: qcom: Document the Milos RPMH Clock Controller
2025-07-07 9:56 [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635) Luca Weiss
@ 2025-07-07 9:56 ` Luca Weiss
2025-07-08 8:00 ` Krzysztof Kozlowski
2025-07-07 9:56 ` [PATCH v2 2/4] clk: qcom: rpmh: Add support for RPMH clocks on Milos Luca Weiss
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Luca Weiss @ 2025-07-07 9:56 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Luca Weiss
Add bindings documentation for the Milos (e.g. SM7635) RPMH Clock
Controller.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
index dcb872b9cf3e01f87d4fc546311eb758ee63af9a..a4414ba0b287b23e69a913d10befa5d7368ff08b 100644
--- a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
@@ -17,6 +17,7 @@ description: |
properties:
compatible:
enum:
+ - qcom,milos-rpmh-clk
- qcom,qcs615-rpmh-clk
- qcom,qdu1000-rpmh-clk
- qcom,sa8775p-rpmh-clk
--
2.50.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/4] clk: qcom: rpmh: Add support for RPMH clocks on Milos
2025-07-07 9:56 [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635) Luca Weiss
2025-07-07 9:56 ` [PATCH v2 1/4] dt-bindings: clock: qcom: Document the Milos RPMH Clock Controller Luca Weiss
@ 2025-07-07 9:56 ` Luca Weiss
2025-07-07 9:56 ` [PATCH v2 3/4] dt-bindings: clock: qcom: document the Milos TCSR Clock Controller Luca Weiss
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Luca Weiss @ 2025-07-07 9:56 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Luca Weiss, Konrad Dybcio
Add support for RPMH clocks on Milos SoCs.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/clk/qcom/clk-rpmh.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index 00fb3e53a388ed24ed76622983eb5bd81a6b7002..5ca43776f1bdbaadeefbdeabeb557810ff0071ad 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -386,6 +386,8 @@ DEFINE_CLK_RPMH_VRM(clk6, _a2, "clka6", 2);
DEFINE_CLK_RPMH_VRM(clk7, _a2, "clka7", 2);
DEFINE_CLK_RPMH_VRM(clk8, _a2, "clka8", 2);
+DEFINE_CLK_RPMH_VRM(clk7, _a4, "clka7", 4);
+
DEFINE_CLK_RPMH_VRM(div_clk1, _div2, "divclka1", 2);
DEFINE_CLK_RPMH_BCM(ce, "CE0");
@@ -541,6 +543,29 @@ static const struct clk_rpmh_desc clk_rpmh_sc8180x = {
.num_clks = ARRAY_SIZE(sc8180x_rpmh_clocks),
};
+static struct clk_hw *milos_rpmh_clocks[] = {
+ [RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div4.hw,
+ [RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div4_ao.hw,
+ [RPMH_LN_BB_CLK2] = &clk_rpmh_clk7_a4.hw,
+ [RPMH_LN_BB_CLK2_A] = &clk_rpmh_clk7_a4_ao.hw,
+ /*
+ * RPMH_LN_BB_CLK3(_A) and RPMH_LN_BB_CLK4(_A) are marked as optional
+ * downstream, but do not exist in cmd-db on SM7635, so skip them.
+ */
+ [RPMH_RF_CLK1] = &clk_rpmh_clk1_a1.hw,
+ [RPMH_RF_CLK1_A] = &clk_rpmh_clk1_a1_ao.hw,
+ [RPMH_RF_CLK2] = &clk_rpmh_clk2_a1.hw,
+ [RPMH_RF_CLK2_A] = &clk_rpmh_clk2_a1_ao.hw,
+ [RPMH_RF_CLK3] = &clk_rpmh_clk3_a1.hw,
+ [RPMH_RF_CLK3_A] = &clk_rpmh_clk3_a1_ao.hw,
+ [RPMH_IPA_CLK] = &clk_rpmh_ipa.hw,
+};
+
+static const struct clk_rpmh_desc clk_rpmh_milos = {
+ .clks = milos_rpmh_clocks,
+ .num_clks = ARRAY_SIZE(milos_rpmh_clocks),
+};
+
static struct clk_hw *sm8250_rpmh_clocks[] = {
[RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div2.hw,
[RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div2_ao.hw,
@@ -943,6 +968,7 @@ static int clk_rpmh_probe(struct platform_device *pdev)
}
static const struct of_device_id clk_rpmh_match_table[] = {
+ { .compatible = "qcom,milos-rpmh-clk", .data = &clk_rpmh_milos},
{ .compatible = "qcom,qcs615-rpmh-clk", .data = &clk_rpmh_qcs615},
{ .compatible = "qcom,qdu1000-rpmh-clk", .data = &clk_rpmh_qdu1000},
{ .compatible = "qcom,sa8775p-rpmh-clk", .data = &clk_rpmh_sa8775p},
--
2.50.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/4] dt-bindings: clock: qcom: document the Milos TCSR Clock Controller
2025-07-07 9:56 [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635) Luca Weiss
2025-07-07 9:56 ` [PATCH v2 1/4] dt-bindings: clock: qcom: Document the Milos RPMH Clock Controller Luca Weiss
2025-07-07 9:56 ` [PATCH v2 2/4] clk: qcom: rpmh: Add support for RPMH clocks on Milos Luca Weiss
@ 2025-07-07 9:56 ` Luca Weiss
2025-07-08 8:00 ` Krzysztof Kozlowski
2025-07-07 9:56 ` [PATCH v2 4/4] clk: qcom: tcsrcc-sm8650: Add support for Milos SoC Luca Weiss
2025-07-17 4:31 ` (subset) [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635) Bjorn Andersson
4 siblings, 1 reply; 8+ messages in thread
From: Luca Weiss @ 2025-07-07 9:56 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Luca Weiss
Add bindings documentation for the Milos (e.g. SM7635) TCSR Clock
Controller.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml
index f3afbb25e8682de83fb16acaa35448545f77ce77..2ed7d59722fc7e1e8ccc3adbef16e26fc44bf156 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml
@@ -22,6 +22,7 @@ properties:
compatible:
items:
- enum:
+ - qcom,milos-tcsr
- qcom,sar2130p-tcsr
- qcom,sm8550-tcsr
- qcom,sm8650-tcsr
--
2.50.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 4/4] clk: qcom: tcsrcc-sm8650: Add support for Milos SoC
2025-07-07 9:56 [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635) Luca Weiss
` (2 preceding siblings ...)
2025-07-07 9:56 ` [PATCH v2 3/4] dt-bindings: clock: qcom: document the Milos TCSR Clock Controller Luca Weiss
@ 2025-07-07 9:56 ` Luca Weiss
2025-07-17 4:31 ` (subset) [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635) Bjorn Andersson
4 siblings, 0 replies; 8+ messages in thread
From: Luca Weiss @ 2025-07-07 9:56 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Luca Weiss, Konrad Dybcio
The Milos SoC has a very similar tcsrcc block, only TCSR_UFS_CLKREF_EN
uses different regs, and both TCSR_USB2_CLKREF_EN and
TCSR_USB3_CLKREF_EN are not present.
Modify these resources at probe if we're probing for Milos.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/clk/qcom/tcsrcc-sm8650.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/clk/qcom/tcsrcc-sm8650.c b/drivers/clk/qcom/tcsrcc-sm8650.c
index 11c7d6df48c7b39f661cc4c2df30387836d2ca60..3685dcde9a4bd5ebc62ae9c054e6b6a44d68d0c5 100644
--- a/drivers/clk/qcom/tcsrcc-sm8650.c
+++ b/drivers/clk/qcom/tcsrcc-sm8650.c
@@ -148,6 +148,7 @@ static const struct qcom_cc_desc tcsr_cc_sm8650_desc = {
};
static const struct of_device_id tcsr_cc_sm8650_match_table[] = {
+ { .compatible = "qcom,milos-tcsr" },
{ .compatible = "qcom,sm8650-tcsr" },
{ }
};
@@ -155,6 +156,13 @@ MODULE_DEVICE_TABLE(of, tcsr_cc_sm8650_match_table);
static int tcsr_cc_sm8650_probe(struct platform_device *pdev)
{
+ if (of_device_is_compatible(pdev->dev.of_node, "qcom,milos-tcsr")) {
+ tcsr_ufs_clkref_en.halt_reg = 0x31118;
+ tcsr_ufs_clkref_en.clkr.enable_reg = 0x31118;
+ tcsr_cc_sm8650_clocks[TCSR_USB2_CLKREF_EN] = NULL;
+ tcsr_cc_sm8650_clocks[TCSR_USB3_CLKREF_EN] = NULL;
+ }
+
return qcom_cc_probe(pdev, &tcsr_cc_sm8650_desc);
}
--
2.50.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: clock: qcom: Document the Milos RPMH Clock Controller
2025-07-07 9:56 ` [PATCH v2 1/4] dt-bindings: clock: qcom: Document the Milos RPMH Clock Controller Luca Weiss
@ 2025-07-08 8:00 ` Krzysztof Kozlowski
0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-08 8:00 UTC (permalink / raw)
To: Luca Weiss
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das,
~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
devicetree, linux-kernel
On Mon, Jul 07, 2025 at 11:56:37AM +0200, Luca Weiss wrote:
> Add bindings documentation for the Milos (e.g. SM7635) RPMH Clock
> Controller.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/4] dt-bindings: clock: qcom: document the Milos TCSR Clock Controller
2025-07-07 9:56 ` [PATCH v2 3/4] dt-bindings: clock: qcom: document the Milos TCSR Clock Controller Luca Weiss
@ 2025-07-08 8:00 ` Krzysztof Kozlowski
0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-08 8:00 UTC (permalink / raw)
To: Luca Weiss
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taniya Das,
~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
devicetree, linux-kernel
On Mon, Jul 07, 2025 at 11:56:39AM +0200, Luca Weiss wrote:
> Add bindings documentation for the Milos (e.g. SM7635) TCSR Clock
> Controller.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> Documentation/devicetree/bindings/clock/qcom,sm8550-tcsr.yaml | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (subset) [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635)
2025-07-07 9:56 [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635) Luca Weiss
` (3 preceding siblings ...)
2025-07-07 9:56 ` [PATCH v2 4/4] clk: qcom: tcsrcc-sm8650: Add support for Milos SoC Luca Weiss
@ 2025-07-17 4:31 ` Bjorn Andersson
4 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2025-07-17 4:31 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Taniya Das, Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Konrad Dybcio
On Mon, 07 Jul 2025 11:56:36 +0200, Luca Weiss wrote:
> Add support in the RPMh and TCSR clock drivers for the Milos SoC.
>
>
Applied, thanks!
[1/4] dt-bindings: clock: qcom: Document the Milos RPMH Clock Controller
commit: 136e6393a5462502dc78c661fcf09f360c6f5d6b
[2/4] clk: qcom: rpmh: Add support for RPMH clocks on Milos
commit: 4901838d2be20e00711f3b2b612acd1c7c754a88
[3/4] dt-bindings: clock: qcom: document the Milos TCSR Clock Controller
commit: 5009024ad7c670066204c3153b177de20ea9d93b
[4/4] clk: qcom: tcsrcc-sm8650: Add support for Milos SoC
commit: 7181c64fdd3e10e731568b2f44c3805173bd7b9c
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-07-17 4:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-07 9:56 [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635) Luca Weiss
2025-07-07 9:56 ` [PATCH v2 1/4] dt-bindings: clock: qcom: Document the Milos RPMH Clock Controller Luca Weiss
2025-07-08 8:00 ` Krzysztof Kozlowski
2025-07-07 9:56 ` [PATCH v2 2/4] clk: qcom: rpmh: Add support for RPMH clocks on Milos Luca Weiss
2025-07-07 9:56 ` [PATCH v2 3/4] dt-bindings: clock: qcom: document the Milos TCSR Clock Controller Luca Weiss
2025-07-08 8:00 ` Krzysztof Kozlowski
2025-07-07 9:56 ` [PATCH v2 4/4] clk: qcom: tcsrcc-sm8650: Add support for Milos SoC Luca Weiss
2025-07-17 4:31 ` (subset) [PATCH v2 0/4] Add RPMh and TCSR clock support for Milos (SM7635) Bjorn Andersson
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).