All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] SM6375 feature enablement (round one)
@ 2023-03-03 21:58 Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 01/15] dt-bindings: thermal: qcom-tsens: Add compatible for SM6375 Konrad Dybcio
                   ` (14 more replies)
  0 siblings, 15 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Hello

This series brings support for a couple of nice things on SM6375, namely:

* 2 TSENS controllers & associated thermal-zones
* RPM sleep stats
* IMEM
* WCN3990 Wi-Fi (Bluetooth doesn't wanna play ball yet)
* MPSS & RMTFS
* L3 scaling interconnect (not yet hooked up in this series, but it works,
  still assessing the best scaling configuration)
* MPM (big!; also implicitly fixes some interrupt lanes due to my earlier
  misunderstanding of the downstream MPM<->GIC mapping)
* Additional CPU sleep state (gated clock, power rail still on)
* V- key on the Xperia

It does *not* bring support for GPU, MDSS, icc and various other scaling
parts which are still in progress of being upstreamed.

More PDX225-specific patches, along with Wi-Fi enablement will come after
that. But hey, we already know it works great ;)

Tested on the only sm6375 device we support, the Xperia 10 IV (PDX225).

Depends on:
https://lore.kernel.org/lkml/20230109135647.339224-5-konrad.dybcio@linaro.org/

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Konrad Dybcio (15):
      dt-bindings: thermal: qcom-tsens: Add compatible for SM6375
      dt-bindings: interconnect: OSM L3: Add SM6375 CPUCP compatible
      dt-bindings: sram: qcom,imem: document SM6375 IMEM
      arm64: dts: qcom: sm6375: Add RPM sleep stats
      arm64: dts: qcom: sm6375: Add IMEM
      arm64: dts: qcom: sm6375: Add RMTFS
      arm64: dts: qcom: sm6375: Add wifi node
      arm64: dts: qcom: sm6375: Add modem nodes
      arm64: dts: qcom: sm6375: Add CPUCP L3 node
      arm64: dts: qcom: sm6375: Add TSENS
      arm64: dts: qcom: sm6375: Configure TSENS thermal zones
      arm64: dts: qcom: sm6375: Introduce MPM support
      arm64: dts: qcom: sm6375: Bump CPU rail power collapse index
      arm64: dts: qcom: sm6375: Introduce C3 power state for both ARM clusters
      arm64: dts: qcom: sm6375-pdx225: Add volume down GPIO key

 .../bindings/interconnect/qcom,osm-l3.yaml         |   1 +
 .../devicetree/bindings/sram/qcom,imem.yaml        |   1 +
 .../devicetree/bindings/thermal/qcom-tsens.yaml    |   1 +
 .../dts/qcom/sm6375-sony-xperia-murray-pdx225.dts  |  27 +
 arch/arm64/boot/dts/qcom/sm6375.dtsi               | 936 ++++++++++++++++++++-
 5 files changed, 952 insertions(+), 14 deletions(-)
---
base-commit: 1acf39ef8f1425cd105f630dc2c7c1d8fff27ed1
change-id: 20230303-topic-sm6375_features0_dts-860904f318d8

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@linaro.org>


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

* [PATCH 01/15] dt-bindings: thermal: qcom-tsens: Add compatible for SM6375
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-06  8:57   ` Krzysztof Kozlowski
  2023-03-03 21:58 ` [PATCH 02/15] dt-bindings: interconnect: OSM L3: Add SM6375 CPUCP compatible Konrad Dybcio
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

The Qualcomm SM6375 platform has two instances of the tsens v2.8.0 block,
add a compatible for these instances.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
index 926e9c51c93c..d73b72dafcbc 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -56,6 +56,7 @@ properties:
               - qcom,sdm845-tsens
               - qcom,sm6115-tsens
               - qcom,sm6350-tsens
+              - qcom,sm6375-tsens
               - qcom,sm8150-tsens
               - qcom,sm8250-tsens
               - qcom,sm8350-tsens

-- 
2.39.2


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

* [PATCH 02/15] dt-bindings: interconnect: OSM L3: Add SM6375 CPUCP compatible
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 01/15] dt-bindings: thermal: qcom-tsens: Add compatible for SM6375 Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-06  8:58   ` Krzysztof Kozlowski
  2023-03-03 21:58 ` [PATCH 03/15] dt-bindings: sram: qcom,imem: document SM6375 IMEM Konrad Dybcio
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

SM6375 has a CPUCP block (which for all Linux can tell is really rebadged
EPSS) responsible for scaling L3. Add a compatible for it.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 Documentation/devicetree/bindings/interconnect/qcom,osm-l3.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,osm-l3.yaml b/Documentation/devicetree/bindings/interconnect/qcom,osm-l3.yaml
index 576992a6dc5a..9d0a98d77ae9 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,osm-l3.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,osm-l3.yaml
@@ -29,6 +29,7 @@ properties:
           - enum:
               - qcom,sc7280-epss-l3
               - qcom,sc8280xp-epss-l3
+              - qcom,sm6375-cpucp-l3
               - qcom,sm8250-epss-l3
               - qcom,sm8350-epss-l3
           - const: qcom,epss-l3

-- 
2.39.2


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

* [PATCH 03/15] dt-bindings: sram: qcom,imem: document SM6375 IMEM
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 01/15] dt-bindings: thermal: qcom-tsens: Add compatible for SM6375 Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 02/15] dt-bindings: interconnect: OSM L3: Add SM6375 CPUCP compatible Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-06  8:58   ` Krzysztof Kozlowski
  2023-03-03 21:58 ` [PATCH 04/15] arm64: dts: qcom: sm6375: Add RPM sleep stats Konrad Dybcio
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Add a compatible for SM6375 IMEM.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 Documentation/devicetree/bindings/sram/qcom,imem.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
index ba694ce4a037..0548e8e0d30b 100644
--- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
+++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
@@ -26,6 +26,7 @@ properties:
           - qcom,sdm845-imem
           - qcom,sdx55-imem
           - qcom,sdx65-imem
+          - qcom,sm6375-imem
           - qcom,sm8450-imem
       - const: syscon
       - const: simple-mfd

-- 
2.39.2


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

* [PATCH 04/15] arm64: dts: qcom: sm6375: Add RPM sleep stats
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (2 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 03/15] dt-bindings: sram: qcom,imem: document SM6375 IMEM Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 05/15] arm64: dts: qcom: sm6375: Add IMEM Konrad Dybcio
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Add a node for RPM sleep stats to enable sleep monitoring.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index 31b88c738510..de5882c0ff81 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -718,6 +718,11 @@ rpm_msg_ram: sram@45f0000 {
 			reg = <0 0x045f0000 0 0x7000>;
 		};
 
+		sram@4690000 {
+			compatible = "qcom,rpm-stats";
+			reg = <0 0x04690000 0 0x400>;
+		};
+
 		sdhc_2: mmc@4784000 {
 			compatible = "qcom,sm6375-sdhci", "qcom,sdhci-msm-v5";
 			reg = <0 0x04784000 0 0x1000>;

-- 
2.39.2


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

* [PATCH 05/15] arm64: dts: qcom: sm6375: Add IMEM
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (3 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 04/15] arm64: dts: qcom: sm6375: Add RPM sleep stats Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 06/15] arm64: dts: qcom: sm6375: Add RMTFS Konrad Dybcio
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Add a node for the IMEM block on SM6375.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index de5882c0ff81..5a0abb7f7124 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -1233,6 +1233,20 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
 			};
 		};
 
+		sram@c125000 {
+			compatible = "qcom,sm6375-imem", "syscon", "simple-mfd";
+			reg = <0 0x0c125000 0 0x1000>;
+			ranges = <0 0 0x0c125000 0x1000>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			pil-reloc@94c {
+				compatible = "qcom,pil-reloc-info";
+				reg = <0x94c 0xc8>;
+			};
+		};
+
 		apps_smmu: iommu@c600000 {
 			compatible = "qcom,sm6375-smmu-500", "arm,mmu-500";
 			reg = <0 0x0c600000 0 0x100000>;

-- 
2.39.2


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

* [PATCH 06/15] arm64: dts: qcom: sm6375: Add RMTFS
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (4 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 05/15] arm64: dts: qcom: sm6375: Add IMEM Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 07/15] arm64: dts: qcom: sm6375: Add wifi node Konrad Dybcio
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Add a node for RMTFS on SM6375.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index 5a0abb7f7124..2cdd000a4e2b 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/clock/qcom,rpmcc.h>
 #include <dt-bindings/clock/qcom,sm6375-gcc.h>
 #include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,scm.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/mailbox/qcom-ipcc.h>
 #include <dt-bindings/power/qcom-rpmpd.h>
@@ -424,6 +425,15 @@ removed_mem: removed@c0000000 {
 			no-map;
 		};
 
+		rmtfs_mem: rmtfs@f3900000 {
+			compatible = "qcom,rmtfs-mem";
+			reg = <0 0xf3900000 0 0x280000>;
+			no-map;
+
+			qcom,client-id = <1>;
+			qcom,vmid = <QCOM_SCM_VMID_MSS_MSA QCOM_SCM_VMID_NAV>;
+		};
+
 		debug_mem: debug@ffb00000 {
 			reg = <0 0xffb00000 0 0xc0000>;
 			no-map;

-- 
2.39.2


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

* [PATCH 07/15] arm64: dts: qcom: sm6375: Add wifi node
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (5 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 06/15] arm64: dts: qcom: sm6375: Add RMTFS Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 08/15] arm64: dts: qcom: sm6375: Add modem nodes Konrad Dybcio
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Add a node for ATH10K_SNoC wifi on SM6375.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index 2cdd000a4e2b..e473a90f3dea 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -1333,6 +1333,28 @@ apps_smmu: iommu@c600000 {
 			#iommu-cells = <2>;
 		};
 
+		wifi: wifi@c800000 {
+			compatible = "qcom,wcn3990-wifi";
+			reg = <0 0x0c800000 0 0x800000>;
+			reg-names = "membase";
+			memory-region = <&pil_wlan_mem>;
+			interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 362 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 363 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 364 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 365 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 366 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 367 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 368 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 369 IRQ_TYPE_LEVEL_HIGH>;
+			iommus = <&apps_smmu 0x80 0x1>;
+			qcom,msa-fixed-perm;
+			status = "disabled";
+		};
+
 		intc: interrupt-controller@f200000 {
 			compatible = "arm,gic-v3";
 			reg = <0x0 0x0f200000 0x0 0x10000>,  /* GICD */

-- 
2.39.2


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

* [PATCH 08/15] arm64: dts: qcom: sm6375: Add modem nodes
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (6 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 07/15] arm64: dts: qcom: sm6375: Add wifi node Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 09/15] arm64: dts: qcom: sm6375: Add CPUCP L3 node Konrad Dybcio
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Add required nodes to make the embedded 5G modem boot up on SM6375.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 82 ++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index e473a90f3dea..90f18754a63b 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -565,6 +565,47 @@ smp2p_cdsp_in: slave-kernel {
 		};
 	};
 
+	smp2p-modem {
+		compatible = "qcom,smp2p";
+		qcom,smem = <435>, <428>;
+		interrupts-extended = <&ipcc IPCC_CLIENT_MPSS
+					     IPCC_MPROC_SIGNAL_SMP2P
+					     IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&ipcc IPCC_CLIENT_MPSS
+				IPCC_MPROC_SIGNAL_SMP2P>;
+
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <1>;
+
+		smp2p_modem_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		smp2p_modem_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		ipa_smp2p_out: ipa-ap-to-modem {
+			qcom,entry-name = "ipa";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		ipa_smp2p_in: ipa-modem-to-ap {
+			qcom,entry-name = "ipa";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		wlan_smp2p_in: wlan-wpss-to-ap {
+			qcom,entry-name = "wlan";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
 	soc: soc@0 {
 		#address-cells = <2>;
 		#size-cells = <2>;
@@ -1170,6 +1211,47 @@ usb_1_dwc3: usb@4e00000 {
 			};
 		};
 
+		remoteproc_mss: remoteproc@6000000 {
+			compatible = "qcom,sm6375-mpss-pas";
+			reg = <0 0x06000000 0 0x4040>;
+
+			interrupts-extended = <&intc GIC_SPI 307 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_modem_in 1 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_modem_in 2 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_modem_in 3 IRQ_TYPE_EDGE_RISING>,
+					      <&smp2p_modem_in 7 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "wdog",
+					  "fatal",
+					  "ready",
+					  "handover",
+					  "stop-ack",
+					  "shutdown-ack";
+
+			clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>;
+			clock-names = "xo";
+
+			power-domains = <&rpmpd SM6375_VDDCX>;
+			power-domain-names = "cx";
+
+			memory-region = <&pil_mpss_wlan_mem>;
+
+			qcom,smem-states = <&smp2p_modem_out 0>;
+			qcom,smem-state-names = "stop";
+
+			status = "disabled";
+
+			glink-edge {
+				interrupts-extended = <&ipcc IPCC_CLIENT_MPSS
+							     IPCC_MPROC_SIGNAL_GLINK_QMP
+							     IRQ_TYPE_EDGE_RISING>;
+				mboxes = <&ipcc IPCC_CLIENT_MPSS
+						IPCC_MPROC_SIGNAL_GLINK_QMP>;
+				label = "modem";
+				qcom,remote-pid = <1>;
+			};
+		};
+
 		remoteproc_adsp: remoteproc@a400000 {
 			compatible = "qcom,sm6375-adsp-pas";
 			reg = <0 0x0a400000 0 0x100>;

-- 
2.39.2


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

* [PATCH 09/15] arm64: dts: qcom: sm6375: Add CPUCP L3 node
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (7 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 08/15] arm64: dts: qcom: sm6375: Add modem nodes Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-10  3:14   ` Sibi Sankar
  2023-03-03 21:58 ` [PATCH 10/15] arm64: dts: qcom: sm6375: Add TSENS Konrad Dybcio
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Enable the CPUCP block responsible for scaling the L3 cache.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index 90f18754a63b..59d7ed25aa36 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -1505,6 +1505,15 @@ frame@f42d000 {
 			};
 		};
 
+		cpucp_l3: interconnect@fd90000 {
+			compatible = "qcom,sm6375-cpucp-l3", "qcom,epss-l3";
+			reg = <0 0x0fd90000 0 0x1000>;
+
+			clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, <&gcc GPLL0>;
+			clock-names = "xo", "alternate";
+			#interconnect-cells = <1>;
+		};
+
 		cpufreq_hw: cpufreq@fd91000 {
 			compatible = "qcom,sm6375-cpufreq-epss", "qcom,cpufreq-epss";
 			reg = <0 0x0fd91000 0 0x1000>, <0 0x0fd92000 0 0x1000>;

-- 
2.39.2


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

* [PATCH 10/15] arm64: dts: qcom: sm6375: Add TSENS
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (8 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 09/15] arm64: dts: qcom: sm6375: Add CPUCP L3 node Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 11/15] arm64: dts: qcom: sm6375: Configure TSENS thermal zones Konrad Dybcio
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Add nodes for the two TSENS v2.8.0 controllers present on the SoC.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index 59d7ed25aa36..a88ed6467e68 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -764,6 +764,28 @@ spmi_bus: spmi@1c40000 {
 			#interrupt-cells = <4>;
 		};
 
+		tsens0: thermal-sensor@4411000 {
+			compatible = "qcom,sm6375-tsens", "qcom,tsens-v2";
+			reg = <0 0x04411000 0 0x140>, /* TM */
+			      <0 0x04410000 0 0x20>;  /* SROT */
+			interrupts = <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "uplow", "critical";
+			#thermal-sensor-cells = <1>;
+			#qcom,sensors = <15>;
+		};
+
+		tsens1: thermal-sensor@4413000 {
+			compatible = "qcom,sm6375-tsens", "qcom,tsens-v2";
+			reg = <0 0x04413000 0 0x140>, /* TM */
+			      <0 0x04412000 0 0x20>;  /* SROT */
+			interrupts = <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "uplow", "critical";
+			#thermal-sensor-cells = <1>;
+			#qcom,sensors = <11>;
+		};
+
 		rpm_msg_ram: sram@45f0000 {
 			compatible = "qcom,rpm-msg-ram";
 			reg = <0 0x045f0000 0 0x7000>;

-- 
2.39.2


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

* [PATCH 11/15] arm64: dts: qcom: sm6375: Configure TSENS thermal zones
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (9 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 10/15] arm64: dts: qcom: sm6375: Add TSENS Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 12/15] arm64: dts: qcom: sm6375: Introduce MPM support Konrad Dybcio
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Add a thermal zones configuration for all 15+11 TSENS sensors.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 704 +++++++++++++++++++++++++++++++++++
 1 file changed, 704 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index a88ed6467e68..94bb373f8d97 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -1550,6 +1550,710 @@ cpufreq_hw: cpufreq@fd91000 {
 		};
 	};
 
+	thermal-zones {
+		mapss0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 0>;
+
+			trips {
+				mapss0_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				mapss0_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				mapss0_crit: mapss-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 1>;
+
+			trips {
+				cpu0_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu0_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu0_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 2>;
+
+			trips {
+				cpu1_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu1_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu1_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu2-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 3>;
+
+			trips {
+				cpu2_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu2_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu2_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu3-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 4>;
+
+			trips {
+				cpu3_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu3_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu3_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu4-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 5>;
+
+			trips {
+				cpu4_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu4_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu4_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu5-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 6>;
+
+			trips {
+				cpu5_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu5_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu5_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cluster0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 7>;
+
+			trips {
+				cluster0_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cluster0_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cluster0_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cluster1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 8>;
+
+			trips {
+				cluster1_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cluster1_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cluster1_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu6-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 9>;
+
+			trips {
+				cpu6_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu6_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu6_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu7-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 10>;
+
+			trips {
+				cpu7_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu7_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu7_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu-unk0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 11>;
+
+			trips {
+				cpu_unk0_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_unk0_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_unk0_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu-unk1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 12>;
+
+			trips {
+				cpu_unk1_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_unk1_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_unk1_crit: cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		gpuss0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 13>;
+
+			trips {
+				gpuss0_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				gpuss0_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				gpuss0_crit: gpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		gpuss1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens0 14>;
+
+			trips {
+				gpuss1_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				gpuss1_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				gpuss1_crit: gpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		mapss1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 0>;
+
+			trips {
+				mapss1_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				mapss1_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				mapss1_crit: mapss-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cwlan-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 1>;
+
+			trips {
+				cwlan_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cwlan_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cwlan_crit: cwlan-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		audio-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 2>;
+
+			trips {
+				audio_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				audio_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				audio_crit: audio-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		ddr-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 3>;
+
+			trips {
+				ddr_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				ddr_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				ddr_crit: ddr-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		q6hvx-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 4>;
+
+			trips {
+				q6hvx_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				q6hvx_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				q6hvx_crit: q6hvx-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		camera-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 5>;
+
+			trips {
+				camera_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				camera_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				camera_crit: camera-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		mdm-core0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 6>;
+
+			trips {
+				mdm_core0_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				mdm_core0_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				mdm_core0_crit: mdm-core0-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		mdm-core1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 7>;
+
+			trips {
+				mdm_core1_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				mdm_core1_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				mdm_core1_crit: mdm-core1-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		mdm-vec-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 8>;
+
+			trips {
+				mdm_vec_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				mdm_vec_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				mdm_vec_crit: mdm-vec-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		msm-scl-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 9>;
+
+			trips {
+				msm_scl_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				msm_scl_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				msm_scl_crit: msm-scl-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		video-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens1 10>;
+
+			trips {
+				video_alert0: trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				video_alert1: trip-point1 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				video_crit: video-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,

-- 
2.39.2


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

* [PATCH 12/15] arm64: dts: qcom: sm6375: Introduce MPM support
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (10 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 11/15] arm64: dts: qcom: sm6375: Configure TSENS thermal zones Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-14 23:57   ` Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 13/15] arm64: dts: qcom: sm6375: Bump CPU rail power collapse index Konrad Dybcio
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Add a node for MPM and wire it up on consumers that use it. This also
fixes a very bad and sad assumption I made when initially porting this
SoC that the downstream MPM-TLMM mappings were 1-1. That apparently
changed some time ago, so with this patch the MPM consumers will actually
be hooked up to the correct interrupt lines.

Fixes: 59d34ca97f91 ("arm64: dts: qcom: Add initial device tree for SM6375")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 32 ++++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index 94bb373f8d97..ecb654357288 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -315,6 +315,7 @@ CPU_PD7: power-domain-cpu7 {
 
 		CLUSTER_PD: power-domain-cpu-cluster0 {
 			#power-domain-cells = <0>;
+			power-domains = <&wakegic>;
 			domain-idle-states = <&CLUSTER_SLEEP_0>;
 		};
 	};
@@ -633,7 +634,7 @@ tlmm: pinctrl@500000 {
 			reg = <0 0x00500000 0 0x800000>;
 			interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
 			gpio-ranges = <&tlmm 0 0 157>;
-			/* TODO: Hook up MPM as wakeup-parent when it's there */
+			wakeup-parent = <&wakegic>;
 			interrupt-controller;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -755,7 +756,7 @@ spmi_bus: spmi@1c40000 {
 			      <0 0x01c0a000 0 0x26000>;
 			reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
 			interrupt-names = "periph_irq";
-			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&wakegic 86 IRQ_TYPE_LEVEL_HIGH>;
 			qcom,ee = <0>;
 			qcom,channel = <0>;
 			#address-cells = <2>;
@@ -791,6 +792,25 @@ rpm_msg_ram: sram@45f0000 {
 			reg = <0 0x045f0000 0 0x7000>;
 		};
 
+		wakegic: interrupt-controller@45f01b8 {
+			compatible = "qcom,mpm";
+			reg = <0 0x045f01b8 0 0x1000>;
+			interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
+			mboxes = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_SMP2P>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+			#power-domain-cells = <0>;
+			interrupt-parent = <&intc>;
+			qcom,mpm-pin-count = <96>;
+			qcom,mpm-pin-map = <5 296>,  /* Soundwire wake_irq */
+					   <12 422>, /* DWC3 ss_phy_irq */
+					   <86 183>, /* MPM wake, SPMI */
+					   <89 314>, /* TSENS0 0C */
+					   <90 315>, /* TSENS1 0C */
+					   <93 164>, /* DWC3 dm_hs_phy_irq */
+					   <94 165>; /* DWC3 dp_hs_phy_irq */
+		};
+
 		sram@4690000 {
 			compatible = "qcom,rpm-stats";
 			reg = <0 0x04690000 0 0x400>;
@@ -1185,10 +1205,10 @@ usb_1: usb@4ef8800 {
 					  <&gcc GCC_USB30_PRIM_MASTER_CLK>;
 			assigned-clock-rates = <19200000>, <133333333>;
 
-			interrupts = <GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&intc GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>,
+					      <&wakegic 12 IRQ_TYPE_LEVEL_HIGH>,
+					      <&wakegic 93 IRQ_TYPE_LEVEL_HIGH>,
+					      <&wakegic 94 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-names = "hs_phy_irq",
 					  "ss_phy_irq",
 					  "dm_hs_phy_irq",

-- 
2.39.2


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

* [PATCH 13/15] arm64: dts: qcom: sm6375: Bump CPU rail power collapse index
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (11 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 12/15] arm64: dts: qcom: sm6375: Introduce MPM support Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 14/15] arm64: dts: qcom: sm6375: Introduce C3 power state for both ARM clusters Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 15/15] arm64: dts: qcom: sm6375-pdx225: Add volume down GPIO key Konrad Dybcio
  14 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

In preparation for supporting a less-deep sleep state, rename the
existing rail power off from _0 to _1.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index ecb654357288..05d8d6a012b6 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -207,7 +207,7 @@ core7 {
 		idle-states {
 			entry-method = "psci";
 
-			LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
+			LITTLE_CPU_SLEEP_1: cpu-sleep-0-1 {
 				compatible = "arm,idle-state";
 				idle-state-name = "silver-rail-power-collapse";
 				arm,psci-suspend-param = <0x40000004>;
@@ -217,7 +217,7 @@ LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
 				local-timer-stop;
 			};
 
-			BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
+			BIG_CPU_SLEEP_1: cpu-sleep-1-1 {
 				compatible = "arm,idle-state";
 				idle-state-name = "gold-rail-power-collapse";
 				arm,psci-suspend-param = <0x40000004>;
@@ -268,49 +268,49 @@ psci {
 		CPU_PD0: power-domain-cpu0 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD1: power-domain-cpu1 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD2: power-domain-cpu2 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD3: power-domain-cpu3 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD4: power-domain-cpu4 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD5: power-domain-cpu5 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD6: power-domain-cpu6 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&BIG_CPU_SLEEP_0>;
+			domain-idle-states = <&BIG_CPU_SLEEP_1>;
 		};
 
 		CPU_PD7: power-domain-cpu7 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&BIG_CPU_SLEEP_0>;
+			domain-idle-states = <&BIG_CPU_SLEEP_1>;
 		};
 
 		CLUSTER_PD: power-domain-cpu-cluster0 {

-- 
2.39.2


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

* [PATCH 14/15] arm64: dts: qcom: sm6375: Introduce C3 power state for both ARM clusters
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (12 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 13/15] arm64: dts: qcom: sm6375: Bump CPU rail power collapse index Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  2023-03-03 21:58 ` [PATCH 15/15] arm64: dts: qcom: sm6375-pdx225: Add volume down GPIO key Konrad Dybcio
  14 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Introduce the C3 power state, which - to the best of my understanding -
gates the CPU clock, but does not shut off the power rail.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6375.dtsi | 36 ++++++++++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index 05d8d6a012b6..5a6661dbde08 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -207,6 +207,16 @@ core7 {
 		idle-states {
 			entry-method = "psci";
 
+			LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
+				compatible = "arm,idle-state";
+				idle-state-name = "silver-power-collapse";
+				arm,psci-suspend-param = <0x40000003>;
+				entry-latency-us = <549>;
+				exit-latency-us = <901>;
+				min-residency-us = <1774>;
+				local-timer-stop;
+			};
+
 			LITTLE_CPU_SLEEP_1: cpu-sleep-0-1 {
 				compatible = "arm,idle-state";
 				idle-state-name = "silver-rail-power-collapse";
@@ -217,6 +227,16 @@ LITTLE_CPU_SLEEP_1: cpu-sleep-0-1 {
 				local-timer-stop;
 			};
 
+			BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
+				compatible = "arm,idle-state";
+				idle-state-name = "gold-power-collapse";
+				arm,psci-suspend-param = <0x40000003>;
+				entry-latency-us = <523>;
+				exit-latency-us = <1244>;
+				min-residency-us = <2207>;
+				local-timer-stop;
+			};
+
 			BIG_CPU_SLEEP_1: cpu-sleep-1-1 {
 				compatible = "arm,idle-state";
 				idle-state-name = "gold-rail-power-collapse";
@@ -268,49 +288,49 @@ psci {
 		CPU_PD0: power-domain-cpu0 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD1: power-domain-cpu1 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD2: power-domain-cpu2 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD3: power-domain-cpu3 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD4: power-domain-cpu4 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD5: power-domain-cpu5 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&LITTLE_CPU_SLEEP_1>;
+			domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
 		};
 
 		CPU_PD6: power-domain-cpu6 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&BIG_CPU_SLEEP_1>;
+			domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
 		};
 
 		CPU_PD7: power-domain-cpu7 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&BIG_CPU_SLEEP_1>;
+			domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
 		};
 
 		CLUSTER_PD: power-domain-cpu-cluster0 {

-- 
2.39.2


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

* [PATCH 15/15] arm64: dts: qcom: sm6375-pdx225: Add volume down GPIO key
  2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
                   ` (13 preceding siblings ...)
  2023-03-03 21:58 ` [PATCH 14/15] arm64: dts: qcom: sm6375: Introduce C3 power state for both ARM clusters Konrad Dybcio
@ 2023-03-03 21:58 ` Konrad Dybcio
  14 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-03 21:58 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

Add the required nodes to enable the volume down key on the Sony
Xperia 10 IV.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../dts/qcom/sm6375-sony-xperia-murray-pdx225.dts  | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts
index b691c3834b6b..8220e6f44117 100644
--- a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts
+++ b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts
@@ -46,6 +46,23 @@ framebuffer: framebuffer@85200000 {
 		};
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+		label = "gpio-keys";
+
+		pinctrl-0 = <&vol_down_n>;
+		pinctrl-names = "default";
+
+		key-volume-down {
+			label = "Volume Down";
+			linux,code = <KEY_VOLUMEDOWN>;
+			gpios = <&pmr735a_gpios 1 GPIO_ACTIVE_LOW>;
+			debounce-interval = <15>;
+			linux,can-disable;
+			wakeup-source;
+		};
+	};
+
 	reserved-memory {
 		cont_splash_mem: memory@85200000 {
 			reg = <0 0x85200000 0 0xc00000>;
@@ -133,6 +150,16 @@ &pmk8350_rtc {
 	status = "okay";
 };
 
+&pmr735a_gpios {
+	vol_down_n: vol-down-n-state {
+		pins = "gpio1";
+		function = "normal";
+		power-source = <1>;
+		bias-pull-up;
+		input-enable;
+	};
+};
+
 &pon_pwrkey {
 	status = "okay";
 };

-- 
2.39.2


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

* Re: [PATCH 01/15] dt-bindings: thermal: qcom-tsens: Add compatible for SM6375
  2023-03-03 21:58 ` [PATCH 01/15] dt-bindings: thermal: qcom-tsens: Add compatible for SM6375 Konrad Dybcio
@ 2023-03-06  8:57   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-06  8:57 UTC (permalink / raw)
  To: Konrad Dybcio, Amit Kucheria, Thara Gopinath, Andy Gross,
	Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
	Rob Herring, Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel

On 03/03/2023 22:58, Konrad Dybcio wrote:
> The Qualcomm SM6375 platform has two instances of the tsens v2.8.0 block,
> add a compatible for these instances.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>

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

Best regards,
Krzysztof


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

* Re: [PATCH 02/15] dt-bindings: interconnect: OSM L3: Add SM6375 CPUCP compatible
  2023-03-03 21:58 ` [PATCH 02/15] dt-bindings: interconnect: OSM L3: Add SM6375 CPUCP compatible Konrad Dybcio
@ 2023-03-06  8:58   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-06  8:58 UTC (permalink / raw)
  To: Konrad Dybcio, Amit Kucheria, Thara Gopinath, Andy Gross,
	Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
	Rob Herring, Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel

On 03/03/2023 22:58, Konrad Dybcio wrote:
> SM6375 has a CPUCP block (which for all Linux can tell is really rebadged
> EPSS) responsible for scaling L3. Add a compatible for it.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---


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

Best regards,
Krzysztof


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

* Re: [PATCH 03/15] dt-bindings: sram: qcom,imem: document SM6375 IMEM
  2023-03-03 21:58 ` [PATCH 03/15] dt-bindings: sram: qcom,imem: document SM6375 IMEM Konrad Dybcio
@ 2023-03-06  8:58   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-06  8:58 UTC (permalink / raw)
  To: Konrad Dybcio, Amit Kucheria, Thara Gopinath, Andy Gross,
	Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
	Rob Herring, Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel

On 03/03/2023 22:58, Konrad Dybcio wrote:
> Add a compatible for SM6375 IMEM.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  Documentation/devicetree/bindings/sram/qcom,imem.yaml | 1 +


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

Best regards,
Krzysztof


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

* Re: [PATCH 09/15] arm64: dts: qcom: sm6375: Add CPUCP L3 node
  2023-03-03 21:58 ` [PATCH 09/15] arm64: dts: qcom: sm6375: Add CPUCP L3 node Konrad Dybcio
@ 2023-03-10  3:14   ` Sibi Sankar
  2023-03-10 13:15     ` Konrad Dybcio
  0 siblings, 1 reply; 22+ messages in thread
From: Sibi Sankar @ 2023-03-10  3:14 UTC (permalink / raw)
  To: Konrad Dybcio, Amit Kucheria, Thara Gopinath, Andy Gross,
	Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
	Rob Herring, Krzysztof Kozlowski, Georgi Djakov
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel

Hey Konrad,

Thanks for the patch.

On 3/4/23 03:28, Konrad Dybcio wrote:
> Enable the CPUCP block responsible for scaling the L3 cache.

FWIW, the patch just enables the l3 provider, the CPUCP block would
already be up at this point. You would also want to include the
expansion for CPUCP at least once in your patch.

> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>

> ---
>   arch/arm64/boot/dts/qcom/sm6375.dtsi | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
> index 90f18754a63b..59d7ed25aa36 100644
> --- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
> @@ -1505,6 +1505,15 @@ frame@f42d000 {
>   			};
>   		};
>   
> +		cpucp_l3: interconnect@fd90000 {
> +			compatible = "qcom,sm6375-cpucp-l3", "qcom,epss-l3";
> +			reg = <0 0x0fd90000 0 0x1000>;
> +
> +			clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, <&gcc GPLL0>;
> +			clock-names = "xo", "alternate";
> +			#interconnect-cells = <1>;
> +		};
> +
>   		cpufreq_hw: cpufreq@fd91000 {
>   			compatible = "qcom,sm6375-cpufreq-epss", "qcom,cpufreq-epss";
>   			reg = <0 0x0fd91000 0 0x1000>, <0 0x0fd92000 0 0x1000>;
> 

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

* Re: [PATCH 09/15] arm64: dts: qcom: sm6375: Add CPUCP L3 node
  2023-03-10  3:14   ` Sibi Sankar
@ 2023-03-10 13:15     ` Konrad Dybcio
  0 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-10 13:15 UTC (permalink / raw)
  To: Sibi Sankar, Amit Kucheria, Thara Gopinath, Andy Gross,
	Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
	Rob Herring, Krzysztof Kozlowski, Georgi Djakov
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel



On 10.03.2023 04:14, Sibi Sankar wrote:
> Hey Konrad,
> 
> Thanks for the patch.
> 
> On 3/4/23 03:28, Konrad Dybcio wrote:
>> Enable the CPUCP block responsible for scaling the L3 cache.
> 
> FWIW, the patch just enables the l3 provider, the CPUCP block would
> already be up at this point. You would also want to include the
> expansion for CPUCP at least once in your patch.
Right, I didn't think much about this, but I should probably reword
this and the bindings commit to mention that CPUCP != L3 scaler within.

Konrad
> 
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> 
> Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
> 
>> ---
>>   arch/arm64/boot/dts/qcom/sm6375.dtsi | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
>> index 90f18754a63b..59d7ed25aa36 100644
>> --- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
>> @@ -1505,6 +1505,15 @@ frame@f42d000 {
>>               };
>>           };
>>   +        cpucp_l3: interconnect@fd90000 {
>> +            compatible = "qcom,sm6375-cpucp-l3", "qcom,epss-l3";
>> +            reg = <0 0x0fd90000 0 0x1000>;
>> +
>> +            clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, <&gcc GPLL0>;
>> +            clock-names = "xo", "alternate";
>> +            #interconnect-cells = <1>;
>> +        };
>> +
>>           cpufreq_hw: cpufreq@fd91000 {
>>               compatible = "qcom,sm6375-cpufreq-epss", "qcom,cpufreq-epss";
>>               reg = <0 0x0fd91000 0 0x1000>, <0 0x0fd92000 0 0x1000>;
>>

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

* Re: [PATCH 12/15] arm64: dts: qcom: sm6375: Introduce MPM support
  2023-03-03 21:58 ` [PATCH 12/15] arm64: dts: qcom: sm6375: Introduce MPM support Konrad Dybcio
@ 2023-03-14 23:57   ` Konrad Dybcio
  0 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2023-03-14 23:57 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Rob Herring,
	Krzysztof Kozlowski, Georgi Djakov, Sibi Sankar
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel



On 3.03.2023 22:58, Konrad Dybcio wrote:
> Add a node for MPM and wire it up on consumers that use it. This also
> fixes a very bad and sad assumption I made when initially porting this
> SoC that the downstream MPM-TLMM mappings were 1-1. That apparently
> changed some time ago, so with this patch the MPM consumers will actually
> be hooked up to the correct interrupt lines.
> 
> Fixes: 59d34ca97f91 ("arm64: dts: qcom: Add initial device tree for SM6375")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
As agreed with Krzysztof offline, this one is a no-go.
Awaiting resolution on RPM MSG RAM bindings.

Konrad
>  arch/arm64/boot/dts/qcom/sm6375.dtsi | 32 ++++++++++++++++++++++++++------
>  1 file changed, 26 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
> index 94bb373f8d97..ecb654357288 100644
> --- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
> @@ -315,6 +315,7 @@ CPU_PD7: power-domain-cpu7 {
>  
>  		CLUSTER_PD: power-domain-cpu-cluster0 {
>  			#power-domain-cells = <0>;
> +			power-domains = <&wakegic>;
>  			domain-idle-states = <&CLUSTER_SLEEP_0>;
>  		};
>  	};
> @@ -633,7 +634,7 @@ tlmm: pinctrl@500000 {
>  			reg = <0 0x00500000 0 0x800000>;
>  			interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
>  			gpio-ranges = <&tlmm 0 0 157>;
> -			/* TODO: Hook up MPM as wakeup-parent when it's there */
> +			wakeup-parent = <&wakegic>;
>  			interrupt-controller;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -755,7 +756,7 @@ spmi_bus: spmi@1c40000 {
>  			      <0 0x01c0a000 0 0x26000>;
>  			reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
>  			interrupt-names = "periph_irq";
> -			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupts-extended = <&wakegic 86 IRQ_TYPE_LEVEL_HIGH>;
>  			qcom,ee = <0>;
>  			qcom,channel = <0>;
>  			#address-cells = <2>;
> @@ -791,6 +792,25 @@ rpm_msg_ram: sram@45f0000 {
>  			reg = <0 0x045f0000 0 0x7000>;
>  		};
>  
> +		wakegic: interrupt-controller@45f01b8 {
> +			compatible = "qcom,mpm";
> +			reg = <0 0x045f01b8 0 0x1000>;
> +			interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
> +			mboxes = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_SMP2P>;
> +			interrupt-controller;
> +			#interrupt-cells = <2>;
> +			#power-domain-cells = <0>;
> +			interrupt-parent = <&intc>;
> +			qcom,mpm-pin-count = <96>;
> +			qcom,mpm-pin-map = <5 296>,  /* Soundwire wake_irq */
> +					   <12 422>, /* DWC3 ss_phy_irq */
> +					   <86 183>, /* MPM wake, SPMI */
> +					   <89 314>, /* TSENS0 0C */
> +					   <90 315>, /* TSENS1 0C */
> +					   <93 164>, /* DWC3 dm_hs_phy_irq */
> +					   <94 165>; /* DWC3 dp_hs_phy_irq */
> +		};
> +
>  		sram@4690000 {
>  			compatible = "qcom,rpm-stats";
>  			reg = <0 0x04690000 0 0x400>;
> @@ -1185,10 +1205,10 @@ usb_1: usb@4ef8800 {
>  					  <&gcc GCC_USB30_PRIM_MASTER_CLK>;
>  			assigned-clock-rates = <19200000>, <133333333>;
>  
> -			interrupts = <GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>,
> -				     <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
> -				     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
> -				     <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupts-extended = <&intc GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>,
> +					      <&wakegic 12 IRQ_TYPE_LEVEL_HIGH>,
> +					      <&wakegic 93 IRQ_TYPE_LEVEL_HIGH>,
> +					      <&wakegic 94 IRQ_TYPE_LEVEL_HIGH>;
>  			interrupt-names = "hs_phy_irq",
>  					  "ss_phy_irq",
>  					  "dm_hs_phy_irq",
> 

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

end of thread, other threads:[~2023-03-14 23:57 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-03 21:58 [PATCH 00/15] SM6375 feature enablement (round one) Konrad Dybcio
2023-03-03 21:58 ` [PATCH 01/15] dt-bindings: thermal: qcom-tsens: Add compatible for SM6375 Konrad Dybcio
2023-03-06  8:57   ` Krzysztof Kozlowski
2023-03-03 21:58 ` [PATCH 02/15] dt-bindings: interconnect: OSM L3: Add SM6375 CPUCP compatible Konrad Dybcio
2023-03-06  8:58   ` Krzysztof Kozlowski
2023-03-03 21:58 ` [PATCH 03/15] dt-bindings: sram: qcom,imem: document SM6375 IMEM Konrad Dybcio
2023-03-06  8:58   ` Krzysztof Kozlowski
2023-03-03 21:58 ` [PATCH 04/15] arm64: dts: qcom: sm6375: Add RPM sleep stats Konrad Dybcio
2023-03-03 21:58 ` [PATCH 05/15] arm64: dts: qcom: sm6375: Add IMEM Konrad Dybcio
2023-03-03 21:58 ` [PATCH 06/15] arm64: dts: qcom: sm6375: Add RMTFS Konrad Dybcio
2023-03-03 21:58 ` [PATCH 07/15] arm64: dts: qcom: sm6375: Add wifi node Konrad Dybcio
2023-03-03 21:58 ` [PATCH 08/15] arm64: dts: qcom: sm6375: Add modem nodes Konrad Dybcio
2023-03-03 21:58 ` [PATCH 09/15] arm64: dts: qcom: sm6375: Add CPUCP L3 node Konrad Dybcio
2023-03-10  3:14   ` Sibi Sankar
2023-03-10 13:15     ` Konrad Dybcio
2023-03-03 21:58 ` [PATCH 10/15] arm64: dts: qcom: sm6375: Add TSENS Konrad Dybcio
2023-03-03 21:58 ` [PATCH 11/15] arm64: dts: qcom: sm6375: Configure TSENS thermal zones Konrad Dybcio
2023-03-03 21:58 ` [PATCH 12/15] arm64: dts: qcom: sm6375: Introduce MPM support Konrad Dybcio
2023-03-14 23:57   ` Konrad Dybcio
2023-03-03 21:58 ` [PATCH 13/15] arm64: dts: qcom: sm6375: Bump CPU rail power collapse index Konrad Dybcio
2023-03-03 21:58 ` [PATCH 14/15] arm64: dts: qcom: sm6375: Introduce C3 power state for both ARM clusters Konrad Dybcio
2023-03-03 21:58 ` [PATCH 15/15] arm64: dts: qcom: sm6375-pdx225: Add volume down GPIO key Konrad Dybcio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.