linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control
@ 2023-06-08 12:53 Srinivas Kandagatla
  2023-06-08 12:53 ` [PATCH v3 1/6] dt-bindings: clock: Add LPASSCC and reset controller for SC8280XP Srinivas Kandagatla
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2023-06-08 12:53 UTC (permalink / raw)
  To: andersson, robh+dt, krzysztof.kozlowski+dt
  Cc: johan+linaro, agross, konrad.dybcio, mturquette, sboyd, conor+dt,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla

On SC8280XP, LPASS IP is controlled by q6dsp, however the reset lines
required by some of the IPs like Soundwire still need to be programmed from
Apps processor. This patchset adds support to reset controller on LPASS
CC and LPASS AudioCC.

Tested on X13s.

Thanks,
Srini

Changes since v2:
	- removed qcom,adsp-pil-mode bindings, can be added when
	 we have a variant of this SoC without dsp control
	- added compile check in Kconfig
	- fix variable naming to reflect correct cc.
	- few minor style related changes

Srinivas Kandagatla (6):
  dt-bindings: clock: Add LPASSCC and reset controller for SC8280XP
  dt-bindings: clock: Add LPASS AUDIOCC and reset controller for
    SC8280XP
  clk: qcom: Add lpass clock controller driver for SC8280XP
  clk: qcom: Add lpass audio clock controller driver for SC8280XP
  arm64: dts: qcom: sc8280xp: add resets for soundwire controllers
  arm64: defconfig: Enable sc828x0xp lpasscc clock controller

 .../bindings/clock/qcom,sc8280xp-lpasscc.yaml | 60 +++++++++++++
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi        | 21 +++++
 arch/arm64/configs/defconfig                  |  1 +
 drivers/clk/qcom/Kconfig                      |  9 ++
 drivers/clk/qcom/Makefile                     |  1 +
 drivers/clk/qcom/lpasscc-sc8280xp.c           | 87 +++++++++++++++++++
 .../dt-bindings/clock/qcom,sc8280xp-lpasscc.h | 17 ++++
 7 files changed, 196 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
 create mode 100644 drivers/clk/qcom/lpasscc-sc8280xp.c
 create mode 100644 include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 1/6] dt-bindings: clock: Add LPASSCC and reset controller for SC8280XP
  2023-06-08 12:53 [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control Srinivas Kandagatla
@ 2023-06-08 12:53 ` Srinivas Kandagatla
  2023-06-12  8:25   ` Krzysztof Kozlowski
  2023-06-08 12:53 ` [PATCH v3 2/6] dt-bindings: clock: Add LPASS AUDIOCC " Srinivas Kandagatla
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Srinivas Kandagatla @ 2023-06-08 12:53 UTC (permalink / raw)
  To: andersson, robh+dt, krzysztof.kozlowski+dt
  Cc: johan+linaro, agross, konrad.dybcio, mturquette, sboyd, conor+dt,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla

The LPASS (Low Power Audio Subsystem) clock controller provides reset
support when it is under the control of Q6DSP.

Add support for those resets and adds IDs for clients to request the reset.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/clock/qcom,sc8280xp-lpasscc.yaml | 50 +++++++++++++++++++
 .../dt-bindings/clock/qcom,sc8280xp-lpasscc.h | 12 +++++
 2 files changed, 62 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
 create mode 100644 include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h

diff --git a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
new file mode 100644
index 000000000000..047cae91f443
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,sc8280xp-lpasscc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm LPASS Core & Audio Clock Controller on SC8280XP
+
+maintainers:
+  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description: |
+  Qualcomm LPASS core and audio clock control module provides the clocks,
+  and reset on SC8280XP.
+
+  See also::
+    include/dt-bindings/clock/qcom,lpasscc-sc8280xp.h
+
+properties:
+  compatible:
+    enum:
+      - qcom,sc8280xp-lpasscc
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+  - '#reset-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
+    lpasscc: clock-controller@33e0000 {
+        compatible = "qcom,sc8280xp-lpasscc";
+        reg = <0x033e0000 0x12000>;
+        #clock-cells = <1>;
+        #reset-cells = <1>;
+    };
+...
diff --git a/include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h b/include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h
new file mode 100644
index 000000000000..df800ea2741c
--- /dev/null
+++ b/include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, Linaro Ltd.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_LPASSCC_SC8280XP_H
+#define _DT_BINDINGS_CLK_QCOM_LPASSCC_SC8280XP_H
+
+/* LPASS TCSR */
+#define LPASS_AUDIO_SWR_TX_CGCR				0
+
+#endif
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 2/6] dt-bindings: clock: Add LPASS AUDIOCC and reset controller for SC8280XP
  2023-06-08 12:53 [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control Srinivas Kandagatla
  2023-06-08 12:53 ` [PATCH v3 1/6] dt-bindings: clock: Add LPASSCC and reset controller for SC8280XP Srinivas Kandagatla
@ 2023-06-08 12:53 ` Srinivas Kandagatla
  2023-06-12  8:26   ` Krzysztof Kozlowski
  2023-06-08 12:53 ` [PATCH v3 3/6] clk: qcom: Add lpass clock controller driver " Srinivas Kandagatla
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Srinivas Kandagatla @ 2023-06-08 12:53 UTC (permalink / raw)
  To: andersson, robh+dt, krzysztof.kozlowski+dt
  Cc: johan+linaro, agross, konrad.dybcio, mturquette, sboyd, conor+dt,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla

The LPASS (Low Power Audio Subsystem) Audio clock controller provides reset
support when it is under the control of Q6DSP.

Add support for those resets and adds IDs for clients to request the reset.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../bindings/clock/qcom,sc8280xp-lpasscc.yaml          | 10 ++++++++++
 include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h      |  5 +++++
 2 files changed, 15 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
index 047cae91f443..3326dcd6766c 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
@@ -19,6 +19,7 @@ description: |
 properties:
   compatible:
     enum:
+      - qcom,sc8280xp-lpassaudiocc
       - qcom,sc8280xp-lpasscc
 
   reg:
@@ -39,6 +40,15 @@ required:
 additionalProperties: false
 
 examples:
+  - |
+    #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
+    lpass_audiocc: clock-controller@32a9000 {
+        compatible = "qcom,sc8280xp-lpassaudiocc";
+        reg = <0x032a9000 0x1000>;
+        #clock-cells = <1>;
+        #reset-cells = <1>;
+    };
+
   - |
     #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
     lpasscc: clock-controller@33e0000 {
diff --git a/include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h b/include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h
index df800ea2741c..d190d57fc81a 100644
--- a/include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h
+++ b/include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h
@@ -6,6 +6,11 @@
 #ifndef _DT_BINDINGS_CLK_QCOM_LPASSCC_SC8280XP_H
 #define _DT_BINDINGS_CLK_QCOM_LPASSCC_SC8280XP_H
 
+/* LPASS AUDIO CC CSR */
+#define LPASS_AUDIO_SWR_RX_CGCR				0
+#define LPASS_AUDIO_SWR_WSA_CGCR			1
+#define LPASS_AUDIO_SWR_WSA2_CGCR			2
+
 /* LPASS TCSR */
 #define LPASS_AUDIO_SWR_TX_CGCR				0
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 3/6] clk: qcom: Add lpass clock controller driver for SC8280XP
  2023-06-08 12:53 [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control Srinivas Kandagatla
  2023-06-08 12:53 ` [PATCH v3 1/6] dt-bindings: clock: Add LPASSCC and reset controller for SC8280XP Srinivas Kandagatla
  2023-06-08 12:53 ` [PATCH v3 2/6] dt-bindings: clock: Add LPASS AUDIOCC " Srinivas Kandagatla
@ 2023-06-08 12:53 ` Srinivas Kandagatla
  2023-06-08 12:53 ` [PATCH v3 4/6] clk: qcom: Add lpass audio " Srinivas Kandagatla
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2023-06-08 12:53 UTC (permalink / raw)
  To: andersson, robh+dt, krzysztof.kozlowski+dt
  Cc: johan+linaro, agross, konrad.dybcio, mturquette, sboyd, conor+dt,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla

Add support for the lpass clock controller found on SC8280XP based devices.
This would allow lpass peripheral loader drivers to control the clocks and
bring the subsystems out of reset.

Currently this patch only supports resets as the Q6DSP is in control of
LPASS IP which manages most of the clocks via Q6PRM service on GPR rpmsg
channel.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/clk/qcom/Kconfig            |  9 ++++
 drivers/clk/qcom/Makefile           |  1 +
 drivers/clk/qcom/lpasscc-sc8280xp.c | 64 +++++++++++++++++++++++++++++
 3 files changed, 74 insertions(+)
 create mode 100644 drivers/clk/qcom/lpasscc-sc8280xp.c

diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
index 9cd1f05d436b..263e55d75e3f 100644
--- a/drivers/clk/qcom/Kconfig
+++ b/drivers/clk/qcom/Kconfig
@@ -551,6 +551,15 @@ config SC_LPASSCC_7280
 	  Say Y if you want to use the LPASS branch clocks of the LPASS clock
 	  controller to reset the LPASS subsystem.
 
+config SC_LPASSCC_8280XP
+	tristate "SC8280 Low Power Audio Subsystem (LPASS) Clock Controller"
+	depends on ARM64 || COMPILE_TEST
+	select SC_GCC_8280XP
+	help
+	  Support for the LPASS clock controller on SC8280XP devices.
+	  Say Y if you want to use the LPASS branch clocks of the LPASS clock
+	  controller to reset the LPASS subsystem.
+
 config SC_LPASS_CORECC_7180
 	tristate "SC7180 LPASS Core Clock Controller"
 	depends on ARM64 || COMPILE_TEST
diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile
index 75d035150118..e6e294274c35 100644
--- a/drivers/clk/qcom/Makefile
+++ b/drivers/clk/qcom/Makefile
@@ -81,6 +81,7 @@ obj-$(CONFIG_SC_GPUCC_7180) += gpucc-sc7180.o
 obj-$(CONFIG_SC_GPUCC_7280) += gpucc-sc7280.o
 obj-$(CONFIG_SC_GPUCC_8280XP) += gpucc-sc8280xp.o
 obj-$(CONFIG_SC_LPASSCC_7280) += lpasscc-sc7280.o
+obj-$(CONFIG_SC_LPASSCC_8280XP) += lpasscc-sc8280xp.o
 obj-$(CONFIG_SC_LPASS_CORECC_7180) += lpasscorecc-sc7180.o
 obj-$(CONFIG_SC_LPASS_CORECC_7280) += lpasscorecc-sc7280.o lpassaudiocc-sc7280.o
 obj-$(CONFIG_SC_MSS_7180) += mss-sc7180.o
diff --git a/drivers/clk/qcom/lpasscc-sc8280xp.c b/drivers/clk/qcom/lpasscc-sc8280xp.c
new file mode 100644
index 000000000000..4a0470fc6153
--- /dev/null
+++ b/drivers/clk/qcom/lpasscc-sc8280xp.c
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022, Linaro Limited
+ */
+
+#include <linux/clk-provider.h>
+#include <linux/err.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/regmap.h>
+
+#include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
+
+#include "common.h"
+#include "reset.h"
+
+static const struct qcom_reset_map lpasscc_sc8280xp_resets[] = {
+	[LPASS_AUDIO_SWR_TX_CGCR] = { 0xc010, 1 },
+};
+
+static struct regmap_config lpasscc_sc8280xp_regmap_config = {
+	.reg_bits = 32,
+	.reg_stride = 4,
+	.val_bits = 32,
+	.name = "lpass-tcsr",
+	.max_register = 0x12000,
+};
+
+static const struct qcom_cc_desc lpasscc_sc8280xp_reset_desc = {
+	.config = &lpasscc_sc8280xp_regmap_config,
+	.resets = lpasscc_sc8280xp_resets,
+	.num_resets = ARRAY_SIZE(lpasscc_sc8280xp_resets),
+};
+
+static const struct of_device_id lpasscc_sc8280xp_match_table[] = {
+	{
+		.compatible = "qcom,sc8280xp-lpasscc",
+		.data = &lpasscc_sc8280xp_reset_desc,
+	},
+	{ }
+};
+MODULE_DEVICE_TABLE(of, lpasscc_sc8280xp_match_table);
+
+static int lpasscc_sc8280xp_probe(struct platform_device *pdev)
+{
+	const struct qcom_cc_desc *desc = of_device_get_match_data(&pdev->dev);
+
+	return qcom_cc_probe_by_index(pdev, 0, desc);
+}
+
+static struct platform_driver lpasscc_sc8280xp_driver = {
+	.probe = lpasscc_sc8280xp_probe,
+	.driver = {
+		.name = "lpasscc-sc8280xp",
+		.of_match_table = lpasscc_sc8280xp_match_table,
+	},
+};
+
+module_platform_driver(lpasscc_sc8280xp_driver);
+
+MODULE_AUTHOR("Srinivas Kandagatla <srinivas.kandagatla@linaro.org>");
+MODULE_DESCRIPTION("QTI LPASSCC SC8280XP Driver");
+MODULE_LICENSE("GPL");
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 4/6] clk: qcom: Add lpass audio clock controller driver for SC8280XP
  2023-06-08 12:53 [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control Srinivas Kandagatla
                   ` (2 preceding siblings ...)
  2023-06-08 12:53 ` [PATCH v3 3/6] clk: qcom: Add lpass clock controller driver " Srinivas Kandagatla
@ 2023-06-08 12:53 ` Srinivas Kandagatla
  2023-06-08 12:53 ` [PATCH v3 5/6] arm64: dts: qcom: sc8280xp: add resets for soundwire controllers Srinivas Kandagatla
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2023-06-08 12:53 UTC (permalink / raw)
  To: andersson, robh+dt, krzysztof.kozlowski+dt
  Cc: johan+linaro, agross, konrad.dybcio, mturquette, sboyd, conor+dt,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla

Add support for the lpass audio clock controller found on SC8280XP based
devices. This would allow lpass peripheral loader drivers to control the
clocks and bring the subsystems out of reset.

Currently this patch only supports resets as the Q6DSP is in control of
LPASS IP which manages most of the clocks via Q6PRM service on GPR rpmsg
channel.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/clk/qcom/lpasscc-sc8280xp.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/clk/qcom/lpasscc-sc8280xp.c b/drivers/clk/qcom/lpasscc-sc8280xp.c
index 4a0470fc6153..43b37ce397cf 100644
--- a/drivers/clk/qcom/lpasscc-sc8280xp.c
+++ b/drivers/clk/qcom/lpasscc-sc8280xp.c
@@ -15,6 +15,26 @@
 #include "common.h"
 #include "reset.h"
 
+static const struct qcom_reset_map lpass_audiocc_sc8280xp_resets[] = {
+	[LPASS_AUDIO_SWR_RX_CGCR] =  { 0xa0, 1 },
+	[LPASS_AUDIO_SWR_WSA_CGCR] = { 0xb0, 1 },
+	[LPASS_AUDIO_SWR_WSA2_CGCR] =  { 0xd8, 1 },
+};
+
+static struct regmap_config lpass_audiocc_sc8280xp_regmap_config = {
+	.reg_bits = 32,
+	.reg_stride = 4,
+	.val_bits = 32,
+	.name = "lpass-audio-csr",
+	.max_register = 0x1000,
+};
+
+static const struct qcom_cc_desc lpass_audiocc_sc8280xp_reset_desc = {
+	.config = &lpass_audiocc_sc8280xp_regmap_config,
+	.resets = lpass_audiocc_sc8280xp_resets,
+	.num_resets = ARRAY_SIZE(lpass_audiocc_sc8280xp_resets),
+};
+
 static const struct qcom_reset_map lpasscc_sc8280xp_resets[] = {
 	[LPASS_AUDIO_SWR_TX_CGCR] = { 0xc010, 1 },
 };
@@ -35,6 +55,9 @@ static const struct qcom_cc_desc lpasscc_sc8280xp_reset_desc = {
 
 static const struct of_device_id lpasscc_sc8280xp_match_table[] = {
 	{
+		.compatible = "qcom,sc8280xp-lpassaudiocc",
+		.data = &lpass_audiocc_sc8280xp_reset_desc,
+	}, {
 		.compatible = "qcom,sc8280xp-lpasscc",
 		.data = &lpasscc_sc8280xp_reset_desc,
 	},
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 5/6] arm64: dts: qcom: sc8280xp: add resets for soundwire controllers
  2023-06-08 12:53 [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control Srinivas Kandagatla
                   ` (3 preceding siblings ...)
  2023-06-08 12:53 ` [PATCH v3 4/6] clk: qcom: Add lpass audio " Srinivas Kandagatla
@ 2023-06-08 12:53 ` Srinivas Kandagatla
  2023-06-08 12:53 ` [PATCH v3 6/6] arm64: defconfig: Enable sc828x0xp lpasscc clock controller Srinivas Kandagatla
  2023-06-13 22:30 ` (subset) [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control Bjorn Andersson
  6 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2023-06-08 12:53 UTC (permalink / raw)
  To: andersson, robh+dt, krzysztof.kozlowski+dt
  Cc: johan+linaro, agross, konrad.dybcio, mturquette, sboyd, conor+dt,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla

Soundwire controllers on sc8280xp needs an explicit reset, add
support for this.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index 6730349e34f4..6b1bb203b1d1 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -7,6 +7,7 @@
 #include <dt-bindings/clock/qcom,dispcc-sc8280xp.h>
 #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
 #include <dt-bindings/clock/qcom,rpmh.h>
+#include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
 #include <dt-bindings/interconnect/qcom,osm-l3.h>
 #include <dt-bindings/interconnect/qcom,sc8280xp.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -2560,6 +2561,8 @@ swr1: soundwire-controller@3210000 {
 			interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rxmacro>;
 			clock-names = "iface";
+			resets = <&lpass_audiocc LPASS_AUDIO_SWR_RX_CGCR>;
+			reset-names = "swr_audio_cgcr";
 			label = "RX";
 
 			qcom,din-ports = <0>;
@@ -2634,6 +2637,8 @@ swr0: soundwire-controller@3250000 {
 			interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&wsamacro>;
 			clock-names = "iface";
+			resets = <&lpass_audiocc LPASS_AUDIO_SWR_WSA_CGCR>;
+			reset-names = "swr_audio_cgcr";
 			label = "WSA";
 
 			qcom,din-ports = <2>;
@@ -2656,6 +2661,13 @@ swr0: soundwire-controller@3250000 {
 			status = "disabled";
 		};
 
+		lpass_audiocc: clock-controller@32a9000 {
+			compatible = "qcom,sc8280xp-lpassaudiocc";
+			reg = <0 0x032a9000 0 0x1000>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
 		swr2: soundwire-controller@3330000 {
 			compatible = "qcom,soundwire-v1.6.0";
 			reg = <0 0x03330000 0 0x2000>;
@@ -2665,6 +2677,8 @@ swr2: soundwire-controller@3330000 {
 
 			clocks = <&txmacro>;
 			clock-names = "iface";
+			resets = <&lpasscc LPASS_AUDIO_SWR_TX_CGCR>;
+			reset-names = "swr_audio_cgcr";
 			label = "TX";
 			#sound-dai-cells = <1>;
 			#address-cells = <2>;
@@ -2858,6 +2872,13 @@ data-pins {
 			};
 		};
 
+		lpasscc: clock-controller@33e0000 {
+			compatible = "qcom,sc8280xp-lpasscc";
+			reg = <0 0x033e0000 0 0x12000>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
 		sdc2: mmc@8804000 {
 			compatible = "qcom,sc8280xp-sdhci", "qcom,sdhci-msm-v5";
 			reg = <0 0x08804000 0 0x1000>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 6/6] arm64: defconfig: Enable sc828x0xp lpasscc clock controller
  2023-06-08 12:53 [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control Srinivas Kandagatla
                   ` (4 preceding siblings ...)
  2023-06-08 12:53 ` [PATCH v3 5/6] arm64: dts: qcom: sc8280xp: add resets for soundwire controllers Srinivas Kandagatla
@ 2023-06-08 12:53 ` Srinivas Kandagatla
  2023-06-13 22:30 ` (subset) [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control Bjorn Andersson
  6 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2023-06-08 12:53 UTC (permalink / raw)
  To: andersson, robh+dt, krzysztof.kozlowski+dt
  Cc: johan+linaro, agross, konrad.dybcio, mturquette, sboyd, conor+dt,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	Srinivas Kandagatla, Krzysztof Kozlowski

Enabled sc828x0xp lpasscc clock controller driver required for X13s laptop.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index e05706d3893d..bc5d75cf71de 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -1185,6 +1185,7 @@ CONFIG_SC_GCC_7180=y
 CONFIG_SC_GCC_7280=y
 CONFIG_SC_GCC_8180X=y
 CONFIG_SC_GCC_8280XP=y
+CONFIG_SC_LPASSCC_8280XP=m
 CONFIG_SDM_CAMCC_845=m
 CONFIG_SDM_GPUCC_845=y
 CONFIG_SDM_VIDEOCC_845=y
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/6] dt-bindings: clock: Add LPASSCC and reset controller for SC8280XP
  2023-06-08 12:53 ` [PATCH v3 1/6] dt-bindings: clock: Add LPASSCC and reset controller for SC8280XP Srinivas Kandagatla
@ 2023-06-12  8:25   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-12  8:25 UTC (permalink / raw)
  To: Srinivas Kandagatla, andersson, robh+dt, krzysztof.kozlowski+dt
  Cc: johan+linaro, agross, konrad.dybcio, mturquette, sboyd, conor+dt,
	linux-arm-msm, linux-clk, devicetree, linux-kernel

On 08/06/2023 14:53, Srinivas Kandagatla wrote:
> The LPASS (Low Power Audio Subsystem) clock controller provides reset
> support when it is under the control of Q6DSP.
> 
> Add support for those resets and adds IDs for clients to request the reset.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
> ---

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/6] dt-bindings: clock: Add LPASS AUDIOCC and reset controller for SC8280XP
  2023-06-08 12:53 ` [PATCH v3 2/6] dt-bindings: clock: Add LPASS AUDIOCC " Srinivas Kandagatla
@ 2023-06-12  8:26   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-12  8:26 UTC (permalink / raw)
  To: Srinivas Kandagatla, andersson, robh+dt, krzysztof.kozlowski+dt
  Cc: johan+linaro, agross, konrad.dybcio, mturquette, sboyd, conor+dt,
	linux-arm-msm, linux-clk, devicetree, linux-kernel

On 08/06/2023 14:53, Srinivas Kandagatla wrote:
> The LPASS (Low Power Audio Subsystem) Audio clock controller provides reset
> support when it is under the control of Q6DSP.
> 
> Add support for those resets and adds IDs for clients to request the reset.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  .../bindings/clock/qcom,sc8280xp-lpasscc.yaml          | 10 ++++++++++
>  include/dt-bindings/clock/qcom,sc8280xp-lpasscc.h      |  5 +++++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
> index 047cae91f443..3326dcd6766c 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,sc8280xp-lpasscc.yaml
> @@ -19,6 +19,7 @@ description: |
>  properties:
>    compatible:
>      enum:
> +      - qcom,sc8280xp-lpassaudiocc
>        - qcom,sc8280xp-lpasscc
>  
>    reg:
> @@ -39,6 +40,15 @@ required:
>  additionalProperties: false
>  
>  examples:
> +  - |
> +    #include <dt-bindings/clock/qcom,sc8280xp-lpasscc.h>
> +    lpass_audiocc: clock-controller@32a9000 {
> +        compatible = "qcom,sc8280xp-lpassaudiocc";

No need for new example - it's the same, just with different compatible.
With this:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: (subset) [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control
  2023-06-08 12:53 [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control Srinivas Kandagatla
                   ` (5 preceding siblings ...)
  2023-06-08 12:53 ` [PATCH v3 6/6] arm64: defconfig: Enable sc828x0xp lpasscc clock controller Srinivas Kandagatla
@ 2023-06-13 22:30 ` Bjorn Andersson
  6 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2023-06-13 22:30 UTC (permalink / raw)
  To: Srinivas Kandagatla, robh+dt, krzysztof.kozlowski+dt
  Cc: agross, sboyd, johan+linaro, linux-arm-msm, konrad.dybcio,
	linux-clk, conor+dt, mturquette, devicetree, linux-kernel

On Thu, 8 Jun 2023 13:53:09 +0100, Srinivas Kandagatla wrote:
> On SC8280XP, LPASS IP is controlled by q6dsp, however the reset lines
> required by some of the IPs like Soundwire still need to be programmed from
> Apps processor. This patchset adds support to reset controller on LPASS
> CC and LPASS AudioCC.
> 
> Tested on X13s.
> 
> [...]

Applied, thanks!

[6/6] arm64: defconfig: Enable sc828x0xp lpasscc clock controller
      commit: 318da4837d75efb2411b86b39427b7047b41204a

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-13 22:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08 12:53 [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control Srinivas Kandagatla
2023-06-08 12:53 ` [PATCH v3 1/6] dt-bindings: clock: Add LPASSCC and reset controller for SC8280XP Srinivas Kandagatla
2023-06-12  8:25   ` Krzysztof Kozlowski
2023-06-08 12:53 ` [PATCH v3 2/6] dt-bindings: clock: Add LPASS AUDIOCC " Srinivas Kandagatla
2023-06-12  8:26   ` Krzysztof Kozlowski
2023-06-08 12:53 ` [PATCH v3 3/6] clk: qcom: Add lpass clock controller driver " Srinivas Kandagatla
2023-06-08 12:53 ` [PATCH v3 4/6] clk: qcom: Add lpass audio " Srinivas Kandagatla
2023-06-08 12:53 ` [PATCH v3 5/6] arm64: dts: qcom: sc8280xp: add resets for soundwire controllers Srinivas Kandagatla
2023-06-08 12:53 ` [PATCH v3 6/6] arm64: defconfig: Enable sc828x0xp lpasscc clock controller Srinivas Kandagatla
2023-06-13 22:30 ` (subset) [PATCH v3 0/6] clk: qcom: sc8280xp: add lpasscc reset control 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).