Skip to contentSkip to conversation

clk: qcom: add clock drivers for Qualcomm Seca

PATCH Superseded Bartosz Golaszewski 6 participants 17 messages Nov 27 – Nov 30

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover clk: qcom: add clock drivers for Qualcomm Seca

Qualcomm Seca is an automotive SoC with 12 Oryon CPU cores that's a slightly less powerful cousin of the Nord SoC.

Add the negcc, tcsrcc and nwgcc clock drivers along with bindings documenting the hardware and update the RPMh clock driver with Seca clocks.

---
Bartosz Golaszewski (6):
dt-bindings: clock: qcom: document the Seca Global Clock Controller
clk: qcom: add the Global Clock Controller driver for Seca
dt-bindings: clock: qcom: document the Seca TCSR Clock Controller
clk: qcom: add the TCSR Clock Controller for Seca
dt-bindings: clock: qcom,rpmhcc: document the RPMh clock controller on Seca
clk: qcom: rpmh: add RPMh clocks for Seca

 .../devicetree/bindings/clock/qcom,rpmhcc.yaml     |    1 +
 .../devicetree/bindings/clock/qcom,seca-negcc.yaml |   61 +
 .../devicetree/bindings/clock/qcom,seca-nwgcc.yaml |   69 +
 .../devicetree/bindings/clock/qcom,seca-tcsr.yaml  |   65 +
 drivers/clk/qcom/Kconfig                           |   21 +
 drivers/clk/qcom/Makefile                          |    2 +
 drivers/clk/qcom/clk-rpmh.c                        |   16 +
 drivers/clk/qcom/negcc-seca.c                      | 1458 +++++++++++++
 drivers/clk/qcom/nwgcc-seca.c                      | 2138 ++++++++++++++++++++
 drivers/clk/qcom/tcsrcc-seca.c                     |  147 ++
 include/dt-bindings/clock/qcom,seca-negcc.h        |   98 +
 include/dt-bindings/clock/qcom,seca-nwgcc.h        |  144 ++
 include/dt-bindings/clock/qcom,seca-tcsrcc.h       |   25 +
 13 files changed, 4245 insertions(+)

---
base-commit: a9c48428cbd8d96b26f92631d0db6f8519c5fcc5
change-id: 20261126-seca-clocks-28e44d453241

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>
#1 lore raw

PATCH 1/6 dt-bindings: clock: qcom: document the Seca Global Clock Controller

The Global Clock Controller (GCC) on Qualcomm Seca is split into the North-East and North-West modules. Add devicetree bindings describing the two.

---
 .../devicetree/bindings/clock/qcom,seca-negcc.yaml |  61 +++++++++
 .../devicetree/bindings/clock/qcom,seca-nwgcc.yaml |  69 ++++++++++
 include/dt-bindings/clock/qcom,seca-negcc.h        |  98 ++++++++++++++
 include/dt-bindings/clock/qcom,seca-nwgcc.h        | 144 +++++++++++++++++++++
 4 files changed, 372 insertions(+)
Documentation/devicetree/bindings/clock/qcom,seca-negcc.yaml new file +61 -0
new file mode 100644
index 0000000000000000000000000000000000000000..b1595d7dda2b3db59a7fdfc9f6b30d56655d8836
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,seca-negcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: North East Global Clock & Reset Controller on Qualcomm Seca SoC
+
+maintainers:
+  - Bartosz Golaszewski <[email protected]>
+
+description: |
+  Qualcomm North East Global Clock Control (NE) module provides the clocks,
+  resets and power domains on Seca SoC.
+
+  See also: include/dt-bindings/clock/qcom,seca-negcc.h
+
+properties:
+  compatible:
+    const: qcom,seca-negcc
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: Sleep clock source
+      - description: USB3 Phy sec wrapper pipe clock source
+      - description: USB3 Phy wrapper pipe clock source
+
+  power-domains:
+    items:
+      - description: CX power domain
+
+required:
+  - compatible
+  - clocks
+  - power-domains
+  - '#power-domain-cells'
+
+allOf:
+  - $ref: qcom,gcc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    #include <dt-bindings/power/qcom,rpmhpd.h>
+    clock-controller@8900000 {
+      compatible = "qcom,seca-negcc";
+      reg = <0x08900000 0xf4200>;
+      clocks = <&rpmhcc RPMH_CXO_CLK>,
+               <&sleep_clk>,
+               <&usb3_phy_sec_pipe_clk>,
+               <&usb3_phy_pipe_clk>;
+      power-domains = <&rpmhpd RPMHPD_CX>;
+      #clock-cells = <1>;
+      #reset-cells = <1>;
+      #power-domain-cells = <1>;
+    };
+
+...
Documentation/devicetree/bindings/clock/qcom,seca-nwgcc.yaml new file +69 -0

69 lines not on this page · raw message

include/dt-bindings/clock/qcom,seca-negcc.h new file +98 -0

98 lines not on this page · raw message

include/dt-bindings/clock/qcom,seca-nwgcc.h new file +144 -0

144 lines not on this page · raw message

Signature · 1 line
2.47.3
Reviewed-by on v1 1/6
#2 lore raw

Re: [PATCH 1/6] dt-bindings: clock: qcom: document the Seca Global Clock Controller

Quoted 7 lines · Bartosz Golaszewski

The Global Clock Controller (GCC) on Qualcomm Seca is split into the North-East and North-West modules. Add devicetree bindings describing the two.

Best regards,
Krzysztof

#3 lore raw

PATCH 2/6 clk: qcom: add the Global Clock Controller driver for Seca

In reply to Bartosz Golaszewski

Add the driver for the North East and North West modules of the Global Clock Controller on the Qualcomm Seca SoC.

---
 drivers/clk/qcom/Kconfig      |   11 +
 drivers/clk/qcom/Makefile     |    1 +
 drivers/clk/qcom/negcc-seca.c | 1458 ++++++++++++++++++++++++++++
 drivers/clk/qcom/nwgcc-seca.c | 2138 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 3608 insertions(+)
drivers/clk/qcom/Kconfig +11 -0
index e6c58e8b184963fa3d885a7661ad982aaa5bcbc0..0680926b0ae0903d46fed642dd60e6187642e56b 100644
@@ -328,6 +328,17 @@ config CLK_NORD_VIDEOCC
 	  Say Y if you want to support video devices and functionality such as
 	  video encode/decode.
 
+config CLK_SECA_GCC
+	tristate "Seca Global Clock Controller"
+	depends on ARM64 || COMPILE_TEST
+	select QCOM_GDSC
+	default ARCH_QCOM
+	help
+	  Support for the global clock controller on Seca devices.
+	  Say Y if you want to use peripheral devices such as UART, SPI, I2C,
+	  USB, SD/UFS, PCIe etc. The clock controller is a combination of
+	  NE_GCC and NW_GCC.
+
 config CLK_SHIKRA_GCC
 	tristate "Shikra Global Clock Controller"
 	depends on ARM64 || COMPILE_TEST
drivers/clk/qcom/Makefile +1 -0
index f84d7343a3a475dd9ef1fa77bf0de25fab0d9e75..270c1b97b41f3db7f1d2fa98a262a8c8e189becc 100644
@@ -56,6 +56,7 @@ obj-$(CONFIG_CLK_NORD_GCC) += gcc-nord.o negcc-nord.o nwgcc-nord.o segcc-nord.o
 obj-$(CONFIG_CLK_NORD_GPUCC) += gpucc-nord.o gpu2cc-nord.o
 obj-$(CONFIG_CLK_NORD_TCSRCC) += tcsrcc-nord.o
 obj-$(CONFIG_CLK_NORD_VIDEOCC) += videocc-glymur.o
+obj-$(CONFIG_CLK_SECA_GCC) += negcc-seca.o nwgcc-seca.o
 obj-$(CONFIG_CLK_SHIKRA_AUDIOCORECC) += audiocorecc-shikra.o
 obj-$(CONFIG_CLK_SHIKRA_GCC) += gcc-shikra.o
 obj-$(CONFIG_CLK_X1E80100_CAMCC) += camcc-x1e80100.o
drivers/clk/qcom/negcc-seca.c new file +1458 -0

1,458 lines not on this page · raw message

drivers/clk/qcom/nwgcc-seca.c new file +2138 -0

1,518 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.47.3

Part of the diff is not shown here. View the raw message.

Acked-by on v1 2/6
#4 lore raw

Re: [PATCH 2/6] clk: qcom: add the Global Clock Controller driver for Seca

Quoted 18 lines · Bartosz Golaszewski

Add the driver for the North East and North West modules of the Global Clock Controller on the Qualcomm Seca SoC.

---
 drivers/clk/qcom/Kconfig      |   11 +
 drivers/clk/qcom/Makefile     |    1 +
 drivers/clk/qcom/negcc-seca.c | 1458 ++++++++++++++++++++++++++++
 drivers/clk/qcom/nwgcc-seca.c | 2138 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 3608 insertions(+)
drivers/clk/qcom/Kconfig +0 -0
index e6c58e8b184963fa3d885a7661ad982aaa5bcbc0..0680926b0ae0903d46fed642dd60e6187642e56b 100644

drivers/clk/qcom/Kconfig config CLK_NORD_VIDEOCC · line 335

Quoted 8 lines
drivers/clk/qcom/Kconfig +5 -0
@@ -328,6 +328,17 @@ config CLK_NORD_VIDEOCC
 	  Say Y if you want to support video devices and functionality such as
 	  video encode/decode.
 
+config CLK_SECA_GCC
+	tristate "Seca Global Clock Controller"
+	depends on ARM64 || COMPILE_TEST
+	select QCOM_GDSC
+	default ARCH_QCOM

Best regards,
Krzysztof

#5 lore raw

PATCH 3/6 dt-bindings: clock: qcom: document the Seca TCSR Clock Controller

In reply to Bartosz Golaszewski

Add devicetree bindings for the Top Control and Status Register Clock Controller on Qualcomm Seca SoCs.

---
 .../devicetree/bindings/clock/qcom,seca-tcsr.yaml  | 65 ++++++++++++++++++++++
 include/dt-bindings/clock/qcom,seca-tcsrcc.h       | 25 +++++++++
 2 files changed, 90 insertions(+)
Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml new file +65 -0
new file mode 100644
index 0000000000000000000000000000000000000000..1349f70b5672a2de4e9388056e4c560cd1eacde2
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,seca-tcsr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Top Control and Status Register Clock Controller on Qualcomm Seca SoC
+
+maintainers:
+  - Bartosz Golaszewski <[email protected]>
+
+description: |
+  Qualcomm TCSR clock control module provides the clocks, resets and power
+  domains on the Seca SoC.
+
+  See also:
+  - include/dt-bindings/clock/qcom,seca-tcsrcc.h
+
+properties:
+  compatible:
+    const: qcom,seca-tcsr
+
+  clocks:
+    items:
+      - description: TCXO pad clock
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+
+  vdda-qref-1p2-supply: true
+  vdda-qref0-0p9-supply: true
+  vdda-qref1-0p9-supply: true
+  vdda-qref2-0p9-supply: true
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+  - vdda-qref-1p2-supply
+  - vdda-qref0-0p9-supply
+  - vdda-qref1-0p9-supply
+  - vdda-qref2-0p9-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmh.h>
+
+    clock-controller@f1d7000 {
+      compatible = "qcom,seca-tcsr";
+      reg = <0xf1d7000 0xf00c>;
+      clocks = <&rpmhcc RPMH_CXO_CLK>;
+      #clock-cells = <1>;
+      vdda-qref-1p2-supply = <&vreg_px11>;
+      vdda-qref0-0p9-supply = <&vreg_l1h>;
+      vdda-qref1-0p9-supply = <&vreg_l1h>;
+      vdda-qref2-0p9-supply = <&vreg_l1h>;
+    };
+
+...
include/dt-bindings/clock/qcom,seca-tcsrcc.h new file +25 -0
new file mode 100644
index 0000000000000000000000000000000000000000..ab77bb343a607813def35276fdbfda927accf346
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_SECA_TCSRCC_H
+#define _DT_BINDINGS_CLK_QCOM_SECA_TCSRCC_H
+
+/* TCSR_CC clocks */
+#define TCSR_DP_RX_0_CLKREF_EN					0
+#define TCSR_DP_TX_0_CLKREF_EN					1
+#define TCSR_DP_TX_1_CLKREF_EN					2
+#define TCSR_DP_TX_2_CLKREF_EN					3
+#define TCSR_PCIE_CLKREF_EN					4
+#define TCSR_UFS_0_CLKREF_EN					5
+#define TCSR_UFS_1_CLKREF_EN					6
+#define TCSR_USB2_0_CLKREF_EN					7
+#define TCSR_USB2_1_CLKREF_EN					8
+#define TCSR_USB2_2_CLKREF_EN					9
+#define TCSR_USB3_0_CLKREF_EN					10
+#define TCSR_USB3_1_CLKREF_EN					11
+#define TCSR_UX_SGMII_0_CLKREF_EN				12
+#define TCSR_UX_SGMII_1_CLKREF_EN				13
+
+#endif
Signature · 1 line
2.47.3
#6 lore raw

Re: [PATCH 3/6] dt-bindings: clock: qcom: document the Seca TCSR Clock Controller

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Low] dt-bindings: clock: qcom: clocks listed before reg in qcom,seca-tcsr.yaml - [Low] dt-bindings: clock…

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [Low] dt-bindings: clock: qcom: clocks listed before reg in qcom,seca-tcsr.yaml
- [Low] dt-bindings: clock: qcom: inaccurate description in qcom,seca-tcsr.yaml
--

commit 79f9dfc2c2abd664b75d0b9d8b416fefd80c9efe
Author: Bartosz Golaszewski <[email protected]>

dt-bindings: clock: qcom: document the Seca TCSR Clock Controller

This commit adds the devicetree binding schema and clock ID header for the Top Control and Status Register Clock Controller on Qualcomm Seca SoCs.

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml new file +4 -0
new file mode 100644
index 0000000000000..1349f70b5672a
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,seca-tcsr.yaml#

Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml line 14

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml new file +10 -0
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Top Control and Status Register Clock Controller on Qualcomm Seca SoC
+
+maintainers:
+  - Bartosz Golaszewski <[email protected]>
+
+description: |
+  Qualcomm TCSR clock control module provides the clocks, resets and power
+  domains on the Seca SoC.

[Severity: Low]
Does the Seca TCSR clock controller provide resets or power domains? The schema only defines #clock-cells, and include/dt-bindings/clock/qcom,seca-tcsrcc.h only defines TCSR_*_CLKREF_EN reference clocks, so mentioning resets and power domains here looks inaccurate (compare with qcom,x1e80100-tcsr.yaml).

Quoted 4 lines
Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml new file +4 -0
+
+  See also:
+  - include/dt-bindings/clock/qcom,seca-tcsrcc.h
+

Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml line 28

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml new file +10 -0
+properties:
+  compatible:
+    const: qcom,seca-tcsr
+
+  clocks:
+    items:
+      - description: TCXO pad clock
+
+  reg:
+    maxItems: 1

[Severity: Low]
Should reg be placed immediately after compatible and before clocks under properties, matching the canonical DT binding property order used in required and examples below?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Reviewed-by on v1 3/6
#7 lore raw

Re: [PATCH 3/6] dt-bindings: clock: qcom: document the Seca TCSR Clock Controller

In reply to Bartosz Golaszewski
Quoted 10 lines · Bartosz Golaszewski

Add devicetree bindings for the Top Control and Status Register Clock Controller on Qualcomm Seca SoCs.

---
 .../devicetree/bindings/clock/qcom,seca-tcsr.yaml  | 65 ++++++++++++++++++++++
 include/dt-bindings/clock/qcom,seca-tcsrcc.h       | 25 +++++++++
 2 files changed, 90 insertions(+)

Best regards,
Krzysztof

#8 lore raw

Re: [PATCH 3/6] dt-bindings: clock: qcom: document the Seca TCSR Clock Controller

In reply to Bartosz Golaszewski
Quoted 7 lines · Bartosz Golaszewski
Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml new file +7 -0
+description: |
+  Qualcomm TCSR clock control module provides the clocks, resets and power
+  domains on the Seca SoC.
+
+  See also:
+  - include/dt-bindings/clock/qcom,seca-tcsrcc.h
+

Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml line 28

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml new file +10 -0
+properties:
+  compatible:
+    const: qcom,seca-tcsr
+
+  clocks:
+    items:
+      - description: TCXO pad clock
+
+  reg:
+    maxItems: 1

If there is going to be a new version, please implement Sashiko feedback. Rb-tag can stay.

Best regards,
Krzysztof

#9 lore raw

PATCH 4/6 clk: qcom: add the TCSR Clock Controller for Seca

In reply to Bartosz Golaszewski

Add the driver for the Top Control and Status Register Clock Controller on the Qualcomm Seca SoC.

---
 drivers/clk/qcom/Kconfig       |  10 +++
 drivers/clk/qcom/Makefile      |   1 +
 drivers/clk/qcom/tcsrcc-seca.c | 147 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 158 insertions(+)
drivers/clk/qcom/Kconfig +10 -0
index 0680926b0ae0903d46fed642dd60e6187642e56b..13a6deb0db4f0524e0c2077a66a024ec35167ec2 100644
@@ -339,6 +339,16 @@ config CLK_SECA_GCC
 	  USB, SD/UFS, PCIe etc. The clock controller is a combination of
 	  NE_GCC and NW_GCC.
 
+config CLK_SECA_TCSRCC
+	tristate "Seca TCSR Clock Controller"
+	depends on ARM64 || COMPILE_TEST
+	default m if ARCH_QCOM
+	help
+	  Support for the TCSR clock controller on Seca devices. It gates
+	  the QREF reference clocks of the PCIe, UX SGMII, UFS, DP, USB3 and
+	  eUSB2 PHYs and votes the QREF supplies of each path.
+	  Say Y or M if you want to use any of these PHYs.
+
 config CLK_SHIKRA_GCC
 	tristate "Shikra Global Clock Controller"
 	depends on ARM64 || COMPILE_TEST
drivers/clk/qcom/Makefile +1 -0
index 270c1b97b41f3db7f1d2fa98a262a8c8e189becc..34746aa9e0193993748378163f6fc2dc00ac18f5 100644
@@ -57,6 +57,7 @@ obj-$(CONFIG_CLK_NORD_GPUCC) += gpucc-nord.o gpu2cc-nord.o
 obj-$(CONFIG_CLK_NORD_TCSRCC) += tcsrcc-nord.o
 obj-$(CONFIG_CLK_NORD_VIDEOCC) += videocc-glymur.o
 obj-$(CONFIG_CLK_SECA_GCC) += negcc-seca.o nwgcc-seca.o
+obj-$(CONFIG_CLK_SECA_TCSRCC) += tcsrcc-seca.o
 obj-$(CONFIG_CLK_SHIKRA_AUDIOCORECC) += audiocorecc-shikra.o
 obj-$(CONFIG_CLK_SHIKRA_GCC) += gcc-shikra.o
 obj-$(CONFIG_CLK_X1E80100_CAMCC) += camcc-x1e80100.o
drivers/clk/qcom/tcsrcc-seca.c new file +147 -0

147 lines not on this page · raw message

Signature · 1 line
2.47.3
Acked-by on v1 4/6
#10 lore raw

Re: [PATCH 4/6] clk: qcom: add the TCSR Clock Controller for Seca

Quoted 17 lines · Bartosz Golaszewski

Add the driver for the Top Control and Status Register Clock Controller on the Qualcomm Seca SoC.

---
 drivers/clk/qcom/Kconfig       |  10 +++
 drivers/clk/qcom/Makefile      |   1 +
 drivers/clk/qcom/tcsrcc-seca.c | 147 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 158 insertions(+)
drivers/clk/qcom/Kconfig +0 -0
index 0680926b0ae0903d46fed642dd60e6187642e56b..13a6deb0db4f0524e0c2077a66a024ec35167ec2 100644

drivers/clk/qcom/Kconfig config CLK_SECA_GCC · line 345

Quoted 7 lines
drivers/clk/qcom/Kconfig +4 -0
@@ -339,6 +339,16 @@ config CLK_SECA_GCC
 	  USB, SD/UFS, PCIe etc. The clock controller is a combination of
 	  NE_GCC and NW_GCC.
 
+config CLK_SECA_TCSRCC
+	tristate "Seca TCSR Clock Controller"
+	depends on ARM64 || COMPILE_TEST
+	default m if ARCH_QCOM

Best regards,
Krzysztof

#11 lore raw

PATCH 5/6 dt-bindings: clock: qcom,rpmhcc: document the RPMh clock controller on Seca

In reply to Bartosz Golaszewski

Add the compatible for the RPMh clock controller on Qualcomm Seca SoC.

---
 Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml +1 -0
index 5c9b653bc2aa59ea85582d5bfd9aef5c48ec6903..cfa78198b2c0cca85888303b25766b7b01e2c13e 100644
@@ -38,6 +38,7 @@ properties:
           - qcom,sdx55-rpmh-clk
           - qcom,sdx65-rpmh-clk
           - qcom,sdx75-rpmh-clk
+          - qcom,seca-rpmh-clk
           - qcom,sm4450-rpmh-clk
           - qcom,sm6350-rpmh-clk
           - qcom,sm7250-rpmh-clk
Signature · 1 line
2.47.3
Reviewed-by on v1 5/6
#12 lore raw

Re: [PATCH 5/6] dt-bindings: clock: qcom,rpmhcc: document the RPMh clock controller on Seca

Quoted 6 lines · Bartosz Golaszewski

Add the compatible for the RPMh clock controller on Qualcomm Seca SoC.

---
 Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 +
 1 file changed, 1 insertion(+)

Best regards,
Krzysztof

#13 lore raw

PATCH 6/6 clk: qcom: rpmh: add RPMh clocks for Seca

In reply to Bartosz Golaszewski

Add the RPMh clocks present on the Qualcomm Seca SoC.

---
 drivers/clk/qcom/clk-rpmh.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/clk/qcom/clk-rpmh.c +16 -0
index 68640e5904a6484a37d48124f9d253d15c9602e7..178f39ca3aef8bfffcde2b7065884d1408eb24e1 100644
@@ -994,6 +994,21 @@ static const struct clk_rpmh_desc clk_rpmh_nord = {
 	.num_clks = ARRAY_SIZE(nord_rpmh_clocks),
 };
 
+static struct clk_hw *seca_rpmh_clocks[] = {
+	[RPMH_CXO_CLK]		= &clk_rpmh_bi_tcxo_div1.hw,
+	[RPMH_CXO_CLK_A]	= &clk_rpmh_bi_tcxo_div1_ao.hw,
+	[RPMH_LN_BB_CLK2]	= &clk_rpmh_ln_bb_clk2_a1.hw,
+	[RPMH_LN_BB_CLK2_A]	= &clk_rpmh_ln_bb_clk2_a1_ao.hw,
+	[RPMH_LN_BB_CLK3]	= &clk_rpmh_ln_bb_clk3_a1.hw,
+	[RPMH_LN_BB_CLK3_A]	= &clk_rpmh_ln_bb_clk3_a1_ao.hw,
+	[RPMH_IPA_CLK]		= &clk_rpmh_ipa.hw,
+};
+
+static const struct clk_rpmh_desc clk_rpmh_seca = {
+	.clks = seca_rpmh_clocks,
+	.num_clks = ARRAY_SIZE(seca_rpmh_clocks),
+};
+
 static struct clk_hw *hawi_rpmh_clocks[] = {
 	[RPMH_CXO_CLK]		= &clk_rpmh_bi_tcxo_div2.hw,
 	[RPMH_CXO_CLK_A]	= &clk_rpmh_bi_tcxo_div2_ao.hw,
@@ -1155,6 +1170,7 @@ static const struct of_device_id clk_rpmh_match_table[] = {
 	{ .compatible = "qcom,sdx55-rpmh-clk",  .data = &clk_rpmh_sdx55},
 	{ .compatible = "qcom,sdx65-rpmh-clk",  .data = &clk_rpmh_sdx65},
 	{ .compatible = "qcom,sdx75-rpmh-clk",  .data = &clk_rpmh_sdx75},
+	{ .compatible = "qcom,seca-rpmh-clk", .data = &clk_rpmh_seca},
 	{ .compatible = "qcom,sm4450-rpmh-clk", .data = &clk_rpmh_sm4450},
 	{ .compatible = "qcom,sm6350-rpmh-clk", .data = &clk_rpmh_sm6350},
 	{ .compatible = "qcom,sm7250-rpmh-clk", .data = &clk_rpmh_sm7250},
Signature · 1 line
2.47.3
#15 lore raw

Re: [PATCH 6/6] clk: qcom: rpmh: add RPMh clocks for Seca

In reply to Bartosz Golaszewski
Quoted 22 lines · Bartosz Golaszewski

Add the RPMh clocks present on the Qualcomm Seca SoC.

---
 drivers/clk/qcom/clk-rpmh.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/clk/qcom/clk-rpmh.c +5 -0
index 68640e5904a6484a37d48124f9d253d15c9602e7..178f39ca3aef8bfffcde2b7065884d1408eb24e1 100644
@@ -994,6 +994,21 @@ static const struct clk_rpmh_desc clk_rpmh_nord = {
 	.num_clks = ARRAY_SIZE(nord_rpmh_clocks),
 };
 
+static struct clk_hw *seca_rpmh_clocks[] = {
+	[RPMH_CXO_CLK]		= &clk_rpmh_bi_tcxo_div1.hw,
+	[RPMH_CXO_CLK_A]	= &clk_rpmh_bi_tcxo_div1_ao.hw,
+	[RPMH_LN_BB_CLK2]	= &clk_rpmh_ln_bb_clk2_a1.hw,
+	[RPMH_LN_BB_CLK2_A]	= &clk_rpmh_ln_bb_clk2_a1_ao.hw,

drivers/clk/qcom/clk-rpmh.c static const struct clk_rpmh_desc clk_rpmh_nord = { · line 1011

Quoted 10 lines
drivers/clk/qcom/clk-rpmh.c +10 -0
+	[RPMH_LN_BB_CLK3]	= &clk_rpmh_ln_bb_clk3_a1.hw,
+	[RPMH_LN_BB_CLK3_A]	= &clk_rpmh_ln_bb_clk3_a1_ao.hw,
+	[RPMH_IPA_CLK]		= &clk_rpmh_ipa.hw,
+};
+
+static const struct clk_rpmh_desc clk_rpmh_seca = {
+	.clks = seca_rpmh_clocks,
+	.num_clks = ARRAY_SIZE(seca_rpmh_clocks),
+};
+

I see the clocks list is same as nord, so can we please use nord as the fallback compatible for seca, similar to how maili reuses the hawi clocks and this change can be dropped.

Thanks,
Jagadeesh

Quoted 12 lines
drivers/clk/qcom/clk-rpmh.c +1 -0
 static struct clk_hw *hawi_rpmh_clocks[] = {
 	[RPMH_CXO_CLK]		= &clk_rpmh_bi_tcxo_div2.hw,
 	[RPMH_CXO_CLK_A]	= &clk_rpmh_bi_tcxo_div2_ao.hw,
@@ -1155,6 +1170,7 @@ static const struct of_device_id clk_rpmh_match_table[] = {
 	{ .compatible = "qcom,sdx55-rpmh-clk",  .data = &clk_rpmh_sdx55},
 	{ .compatible = "qcom,sdx65-rpmh-clk",  .data = &clk_rpmh_sdx65},
 	{ .compatible = "qcom,sdx75-rpmh-clk",  .data = &clk_rpmh_sdx75},
+	{ .compatible = "qcom,seca-rpmh-clk", .data = &clk_rpmh_seca},
 	{ .compatible = "qcom,sm4450-rpmh-clk", .data = &clk_rpmh_sm4450},
 	{ .compatible = "qcom,sm6350-rpmh-clk", .data = &clk_rpmh_sm6350},
 	{ .compatible = "qcom,sm7250-rpmh-clk", .data = &clk_rpmh_sm7250},
#16 lore raw

Re: [PATCH 6/6] clk: qcom: rpmh: add RPMh clocks for Seca

Quoted 31 lines · Jagadeesh Kona
Quoted 28 lines · Bartosz Golaszewski

Add the RPMh clocks present on the Qualcomm Seca SoC.

---
 drivers/clk/qcom/clk-rpmh.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/clk/qcom/clk-rpmh.c +11 -0
index 68640e5904a6484a37d48124f9d253d15c9602e7..178f39ca3aef8bfffcde2b7065884d1408eb24e1 100644
@@ -994,6 +994,21 @@ static const struct clk_rpmh_desc clk_rpmh_nord = {
 	.num_clks = ARRAY_SIZE(nord_rpmh_clocks),
 };
 
+static struct clk_hw *seca_rpmh_clocks[] = {
+	[RPMH_CXO_CLK]		= &clk_rpmh_bi_tcxo_div1.hw,
+	[RPMH_CXO_CLK_A]	= &clk_rpmh_bi_tcxo_div1_ao.hw,
+	[RPMH_LN_BB_CLK2]	= &clk_rpmh_ln_bb_clk2_a1.hw,
+	[RPMH_LN_BB_CLK2_A]	= &clk_rpmh_ln_bb_clk2_a1_ao.hw,
+	[RPMH_LN_BB_CLK3]	= &clk_rpmh_ln_bb_clk3_a1.hw,
+	[RPMH_LN_BB_CLK3_A]	= &clk_rpmh_ln_bb_clk3_a1_ao.hw,
+	[RPMH_IPA_CLK]		= &clk_rpmh_ipa.hw,
+};
+
+static const struct clk_rpmh_desc clk_rpmh_seca = {
Quoted 9 lines

drivers/clk/qcom/clk-rpmh.c static const struct clk_rpmh_desc clk_rpmh_nord = { · line 1011

Quoted 4 lines
drivers/clk/qcom/clk-rpmh.c +4 -0
+	.clks = seca_rpmh_clocks,
+	.num_clks = ARRAY_SIZE(seca_rpmh_clocks),
+};
+

I see the clocks list is same as nord, so can we please use nord as the fallback compatible for seca, similar to how maili reuses the hawi clocks and this change can be dropped.

I think a separate compatible without a fallback is better, if aything we can reuse nord_rpmh_clocks list for this compatible?

Bart