clk: qcom: add clock drivers for Qualcomm Seca
v2 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.
---
Changes in v2:
- Reuse the existing Nord RPMh clocks setup for Seca as they're
compatible, keep the new devicetree compatible though
- Cosmetic changes in TCSR bindings: don't mention resets and
power-domains as there are none and move reg right after compatible
- Collect tags
- Link to v1: https://patch.msgid.link/[email protected]
---
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 | 64 + drivers/clk/qcom/Kconfig | 21 + drivers/clk/qcom/Makefile | 2 + drivers/clk/qcom/clk-rpmh.c | 1 + 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, 4229 insertions(+)
---
base-commit: d138596e9f822033490b2e577ec2ea64f2aa246c
change-id: 20261126-seca-clocks-28e44d453241
Best regards,
Signature · 1 line
Bartosz Golaszewski <[email protected]>
PATCH v2 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
@@ -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
PATCH v2 2/6 clk: qcom: add the Global Clock Controller driver for Seca
In reply to Bartosz GolaszewskiAdd 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
@@ -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
@@ -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.
PATCH v2 3/6 dt-bindings: clock: qcom: document the Seca TCSR Clock Controller
In reply to Bartosz GolaszewskiAdd devicetree bindings for the Top Control and Status Register Clock Controller on Qualcomm Seca SoCs.
--- .../devicetree/bindings/clock/qcom,seca-tcsr.yaml | 64 ++++++++++++++++++++++ include/dt-bindings/clock/qcom,seca-tcsrcc.h | 25 +++++++++ 2 files changed, 89 insertions(+)
Documentation/devicetree/bindings/clock/qcom,seca-tcsr.yaml new file +64 -0
@@ -0,0 +1,64 @@ +# 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 on the Seca SoC. + + See also: + - include/dt-bindings/clock/qcom,seca-tcsrcc.h + +properties: + compatible: + const: qcom,seca-tcsr + + reg: + maxItems: 1 + + clocks: + items: + - description: TCXO pad clock + + '#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
@@ -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
PATCH v2 4/6 clk: qcom: add the TCSR Clock Controller for Seca
In reply to Bartosz GolaszewskiAdd 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
@@ -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
@@ -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
PATCH v2 5/6 dt-bindings: clock: qcom,rpmhcc: document the RPMh clock controller on Seca
In reply to Bartosz GolaszewskiAdd 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
@@ -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
PATCH v2 6/6 clk: qcom: rpmh: add RPMh clocks for Seca
In reply to Bartosz GolaszewskiAdd the RPMh clocks present on the Qualcomm Seca SoC. The clocks are the same as on Nord so just reuse the existing structure.
--- drivers/clk/qcom/clk-rpmh.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/qcom/clk-rpmh.c +1 -0
@@ -1155,6 +1155,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_nord}, { .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