linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: qcom: Introduce Qualcomm Cooling Driver suppport
@ 2022-09-12  9:16 Bhupesh Sharma
  2022-09-12  9:16 ` [PATCH 1/3] arm64: dts: qcom: sm8150: Add qmi cooling device nodes Bhupesh Sharma
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bhupesh Sharma @ 2022-09-12  9:16 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: agross, linux-kernel, linux-pm, daniel.lezcano, devicetree, robh,
	andersson, rafael, bhupesh.sharma, bhupesh.linux,
	linux-arm-kernel, catalin.marinas

This patchset introduces the arm64 dts and defconfig changes for introducing
the Qualcomm Cooling Driver (aka Qualcomm Thermal Mitigation Driver).

Several Qualcomm Snapdragon SoCs have Thermal Mitigation Devices (TMDs)
present on various remote subsystem(s) (for e.g. the Compute DSP, aka cDSP),
which can be used for several mitigations for remote subsystem(s), including
remote processor mitigation, rail voltage restriction etc. 

At the very top-level, the dts is supposed to describe a TMD node, which
should further represent the remote subsystem(s) present on the SoC and
further each child of a subsystem should represent the separate cooling devices
available on the remote subsystem.

Note that this patchset is targeted for the 'linux-arm-msm' tree and the thermal
driver/dtbinding patchset/changes targeted for 'linux-pm' tree has been sent as a
separate patchset (see [1]). Note that without the PATCH mentioned in
[2] this patchset will not compile cleanly.

This patchset is based on the latest 'linux-next/master'.

[1]. https://lore.kernel.org/linux-arm-msm/20220912085049.3517140-1-bhupesh.sharma@linaro.org/
[2]. https://lore.kernel.org/linux-arm-msm/20220912085049.3517140-4-bhupesh.sharma@linaro.org/

Cc: andersson@kernel.org
Cc: robh@kernel.org
Cc: daniel.lezcano@linaro.org
Cc: rafael@kernel.org

Bhupesh Sharma (3):
  arm64: dts: qcom: sm8150: Add qmi cooling device nodes
  arm64: dts: qcom: sa8155p-adp: Enable qmi cooling device
  arm64: defconfig: Enable Qualcomm QMI cooling device driver

 arch/arm64/boot/dts/qcom/sa8155p-adp.dts |  4 ++
 arch/arm64/boot/dts/qcom/sm8150.dtsi     | 62 ++++++++++++++++++++++++
 arch/arm64/configs/defconfig             |  1 +
 3 files changed, 67 insertions(+)

-- 
2.37.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/3] arm64: dts: qcom: sm8150: Add qmi cooling device nodes
  2022-09-12  9:16 [PATCH 0/3] arm64: qcom: Introduce Qualcomm Cooling Driver suppport Bhupesh Sharma
@ 2022-09-12  9:16 ` Bhupesh Sharma
  2022-09-14  0:22   ` kernel test robot
  2022-09-12  9:16 ` [PATCH 2/3] arm64: dts: qcom: sa8155p-adp: Enable qmi cooling device Bhupesh Sharma
  2022-09-12  9:16 ` [PATCH 3/3] arm64: defconfig: Enable Qualcomm QMI cooling device driver Bhupesh Sharma
  2 siblings, 1 reply; 5+ messages in thread
From: Bhupesh Sharma @ 2022-09-12  9:16 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: agross, linux-kernel, linux-pm, daniel.lezcano, devicetree, robh,
	andersson, rafael, bhupesh.sharma, bhupesh.linux,
	linux-arm-kernel, catalin.marinas, Rob Herring

Add qmi cooling nodes to sm8150 dts file. This node
describes the various qmi thermal mitigation devices
(tmd) which are available on remote processor subsystems.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: andersson@kernel.org
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 62 ++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index cef8c4f4f0ff..6aa270ebbd3f 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -13,6 +13,7 @@
 #include <dt-bindings/clock/qcom,gpucc-sm8150.h>
 #include <dt-bindings/interconnect/qcom,osm-l3.h>
 #include <dt-bindings/interconnect/qcom,sm8150.h>
+#include <dt-bindings/thermal/qcom,tmd.h>
 #include <dt-bindings/thermal/thermal.h>
 
 / {
@@ -3444,6 +3445,67 @@ compute-cb@8 {
 			};
 		};
 
+		qmi_tmd_devices: qmi-tmd-devices {
+			compatible = "qcom,qmi-tmd-devices";
+			status = "disabled";
+
+			modem0 {
+				qcom,instance-id = <MODEM0_INSTANCE_ID>;
+
+				modem0_pa: tmd-device0 {
+					label = "pa";
+					#cooling-cells = <2>;
+				};
+
+				modem0_proc: tmd-device1 {
+					label = "modem";
+					#cooling-cells = <2>;
+				};
+
+				modem0_current: tmd-device2 {
+					label = "modem_current";
+					#cooling-cells = <2>;
+				};
+
+				modem0_skin: tmd-device3 {
+					label = "modem_skin";
+					#cooling-cells = <2>;
+				};
+
+				modem0_vdd: tmd-device4 {
+					label = "cpuv_restriction_cold";
+					#cooling-cells = <2>;
+				};
+			};
+
+			adsp {
+				qcom,instance-id = <ADSP_INSTANCE_ID>;
+
+				adsp_vdd: tmd-device0 {
+					label = "cpuv_restriction_cold";
+					#cooling-cells = <2>;
+				};
+			};
+
+			cdsp {
+				qcom,instance-id = <CDSP_INSTANCE_ID>;
+
+				cdsp_vdd: tmd-device0 {
+					label = "cpuv_restriction_cold";
+					#cooling-cells = <2>;
+				};
+			};
+
+			slpi {
+				qcom,instance-id = <SLPI_INSTANCE_ID>;
+
+				slpi_vdd: tmd-device0 {
+					label = "cpuv_restriction_cold";
+					#cooling-cells = <2>;
+				};
+			};
+		};
+
 		usb_1_hsphy: phy@88e2000 {
 			compatible = "qcom,sm8150-usb-hs-phy",
 				     "qcom,usb-snps-hs-7nm-phy";
-- 
2.37.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/3] arm64: dts: qcom: sa8155p-adp: Enable qmi cooling device
  2022-09-12  9:16 [PATCH 0/3] arm64: qcom: Introduce Qualcomm Cooling Driver suppport Bhupesh Sharma
  2022-09-12  9:16 ` [PATCH 1/3] arm64: dts: qcom: sm8150: Add qmi cooling device nodes Bhupesh Sharma
@ 2022-09-12  9:16 ` Bhupesh Sharma
  2022-09-12  9:16 ` [PATCH 3/3] arm64: defconfig: Enable Qualcomm QMI cooling device driver Bhupesh Sharma
  2 siblings, 0 replies; 5+ messages in thread
From: Bhupesh Sharma @ 2022-09-12  9:16 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: agross, linux-kernel, linux-pm, daniel.lezcano, devicetree, robh,
	andersson, rafael, bhupesh.sharma, bhupesh.linux,
	linux-arm-kernel, catalin.marinas, Rob Herring

Enable qmi cooling devices for sa8155p adp platform.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: andersson@kernel.org
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
index ba547ca9fc6b..0c5d1fd5bc47 100644
--- a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
+++ b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
@@ -364,6 +364,10 @@ rgmii_phy: phy@7 {
 	};
 };
 
+&qmi_tmd_devices {
+	status = "okay";
+};
+
 &qupv3_id_1 {
 	status = "okay";
 };
-- 
2.37.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/3] arm64: defconfig: Enable Qualcomm QMI cooling device driver
  2022-09-12  9:16 [PATCH 0/3] arm64: qcom: Introduce Qualcomm Cooling Driver suppport Bhupesh Sharma
  2022-09-12  9:16 ` [PATCH 1/3] arm64: dts: qcom: sm8150: Add qmi cooling device nodes Bhupesh Sharma
  2022-09-12  9:16 ` [PATCH 2/3] arm64: dts: qcom: sa8155p-adp: Enable qmi cooling device Bhupesh Sharma
@ 2022-09-12  9:16 ` Bhupesh Sharma
  2 siblings, 0 replies; 5+ messages in thread
From: Bhupesh Sharma @ 2022-09-12  9:16 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: agross, linux-kernel, linux-pm, daniel.lezcano, devicetree, robh,
	andersson, rafael, bhupesh.sharma, bhupesh.linux,
	linux-arm-kernel, catalin.marinas, Will Deacon, Arnd Bergmann

Enable Qualcomm QMI cooling device driver which is
available on several Qualcomm SoCs.

Cc: andersson@kernel.org
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@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 ea692ef4c841..24eed7db90bf 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -602,6 +602,7 @@ CONFIG_BRCMSTB_THERMAL=m
 CONFIG_EXYNOS_THERMAL=y
 CONFIG_TEGRA_SOCTHERM=m
 CONFIG_TEGRA_BPMP_THERMAL=m
+CONFIG_QCOM_QMI_COOLING=m
 CONFIG_QCOM_TSENS=y
 CONFIG_QCOM_SPMI_ADC_TM5=m
 CONFIG_QCOM_SPMI_TEMP_ALARM=m
-- 
2.37.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] arm64: dts: qcom: sm8150: Add qmi cooling device nodes
  2022-09-12  9:16 ` [PATCH 1/3] arm64: dts: qcom: sm8150: Add qmi cooling device nodes Bhupesh Sharma
@ 2022-09-14  0:22   ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-09-14  0:22 UTC (permalink / raw)
  To: Bhupesh Sharma, linux-arm-msm
  Cc: kbuild-all, agross, linux-kernel, linux-pm, daniel.lezcano,
	devicetree, robh, andersson, rafael, bhupesh.sharma,
	bhupesh.linux, linux-arm-kernel, catalin.marinas, Rob Herring

Hi Bhupesh,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on arm64/for-next/core clk/clk-next rockchip/for-next shawnguo/for-next soc/for-next xilinx-xlnx/master linus/master v6.0-rc5 next-20220913]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Bhupesh-Sharma/arm64-qcom-Introduce-Qualcomm-Cooling-Driver-suppport/20220912-171936
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220914/202209140842.dk0QBtpI-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/34ee1e982e105446a5f8ec8d41381f38a9c8bf0b
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Bhupesh-Sharma/arm64-qcom-Introduce-Qualcomm-Cooling-Driver-suppport/20220912-171936
        git checkout 34ee1e982e105446a5f8ec8d41381f38a9c8bf0b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/arm64/boot/dts/qcom/sa8155p-adp.dts:10:
>> arch/arm64/boot/dts/qcom/sm8150.dtsi:16:10: fatal error: dt-bindings/thermal/qcom,tmd.h: No such file or directory
      16 | #include <dt-bindings/thermal/qcom,tmd.h>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.


vim +16 arch/arm64/boot/dts/qcom/sm8150.dtsi

  > 16	#include <dt-bindings/thermal/qcom,tmd.h>
    17	#include <dt-bindings/thermal/thermal.h>
    18	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-09-14  0:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12  9:16 [PATCH 0/3] arm64: qcom: Introduce Qualcomm Cooling Driver suppport Bhupesh Sharma
2022-09-12  9:16 ` [PATCH 1/3] arm64: dts: qcom: sm8150: Add qmi cooling device nodes Bhupesh Sharma
2022-09-14  0:22   ` kernel test robot
2022-09-12  9:16 ` [PATCH 2/3] arm64: dts: qcom: sa8155p-adp: Enable qmi cooling device Bhupesh Sharma
2022-09-12  9:16 ` [PATCH 3/3] arm64: defconfig: Enable Qualcomm QMI cooling device driver Bhupesh Sharma

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).