Skip to contentSkip to conversation

dt-bindings: fsl: scu: add thermal binding

PATCH Superseded Anson Huang 3 participants 9 messages Feb 7, 2019 – Feb 20, 2019

Subsystems (3)

v6 of 16 Superseded Latest is v16 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/4 dt-bindings: fsl: scu: add thermal binding

NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller, the system controller is in charge of system power, clock and thermal sensors etc. management, Linux kernel has to communicate with system controller via MU (message unit) IPC to get temperature from thermal sensors, this patch adds binding doc for i.MX system controller thermal driver.

---
ChangeLog since V5:
- add "imx,sensor-resource-id" in each thermal zone to pass resource ID for thermal driver.

---
 .../devicetree/bindings/arm/freescale/fsl,scu.txt    | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +20 -0
index 72d481c..4b79751 100644
@@ -122,6 +122,20 @@ RTC bindings based on SCU Message Protocol
 Required properties:
 - compatible: should be "fsl,imx8qxp-sc-rtc";
 
+Thermal bindings based on SCU Message Protocol
+------------------------------------------------------------
+
+Required properties:
+- compatible : Must be "fsl,imx8qxp-sc-thermal";
+- tsens-num : Total number of thermal sensors supported;
+- #thermal-sensor-cells : Should be 1. See
+			  Documentation/devicetree/bindings/thermal/thermal.txt
+			  for a description.
+- imx,sensor-resource-id : This property should be defined in each thermal zone
+			   of thermal-zones node, it passes each thermal zone's
+			   resource id for thermal driver to get temperature via
+			   SCU IPC.
+
 Example (imx8qxp):
 -------------
 lsio_mu1: mailbox@5d1c0000 {
@@ -168,6 +182,12 @@ firmware {
 		rtc: rtc {
 			compatible = "fsl,imx8qxp-sc-rtc";
 		};
+
+		tsens: thermal-sensor {
+			compatible = "fsl,imx8qxp-sc-thermal";
+			tsens-num = <1>;
+			#thermal-sensor-cells = <1>;
+		};
 	};
 };
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH v6 2/4 thermal: imx_sc: add i.MX system controller thermal support

i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller inside, the system controller is in charge of controlling power, clock and thermal sensors etc..

This patch adds i.MX system controller thermal driver support, Linux kernel has to communicate with system controller via MU (message unit) IPC to get each thermal sensor's temperature, it supports multiple sensors which are passed from device tree, please see the binding doc for details.

---
ChangeLog since V5:
- instead of abusing common thermal sensor ID, add a property in each thermal zone to pass resource id to thermal driver.

---
 drivers/thermal/Kconfig          |  11 +++
 drivers/thermal/Makefile         |   1 +
 drivers/thermal/imx_sc_thermal.c | 161 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 173 insertions(+)
 create mode 100644 drivers/thermal/imx_sc_thermal.c
drivers/thermal/Kconfig +11 -0
index 58bb7d7..fec0ef5 100644
@@ -223,6 +223,17 @@ config IMX_THERMAL
 	  cpufreq is used as the cooling device to throttle CPUs when the
 	  passive trip is crossed.
 
+config IMX_SC_THERMAL
+	tristate "Temperature sensor driver for NXP i.MX SoCs with System Controller"
+	depends on (ARCH_MXC && IMX_SCU) || COMPILE_TEST
+	depends on OF
+	help
+	  Support for Temperature Monitor (TEMPMON) found on NXP i.MX SoCs with
+	  system controller inside, Linux kernel has to communicate with system
+	  controller via MU (message unit) IPC to get temperature from thermal
+	  sensor. It supports one critical trip point and one
+	  passive trip point for each thermal sensor.
+
 config MAX77620_THERMAL
 	tristate "Temperature sensor driver for Maxim MAX77620 PMIC"
 	depends on MFD_MAX77620
drivers/thermal/Makefile +1 -0
index 486d682..4062627 100644
@@ -40,6 +40,7 @@ obj-$(CONFIG_DB8500_THERMAL)	+= db8500_thermal.o
 obj-$(CONFIG_ARMADA_THERMAL)	+= armada_thermal.o
 obj-$(CONFIG_TANGO_THERMAL)	+= tango_thermal.o
 obj-$(CONFIG_IMX_THERMAL)	+= imx_thermal.o
+obj-$(CONFIG_IMX_SC_THERMAL)	+= imx_sc_thermal.o
 obj-$(CONFIG_MAX77620_THERMAL)	+= max77620_thermal.o
 obj-$(CONFIG_QORIQ_THERMAL)	+= qoriq_thermal.o
 obj-$(CONFIG_DA9062_THERMAL)	+= da9062-thermal.o
drivers/thermal/imx_sc_thermal.c new file +161 -0

161 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw

PATCH v6 3/4 defconfig: arm64: add i.MX system controller thermal support

In reply to Anson Huang

This patch enables CONFIG_IMX_SC_THERMAL as module.

---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index 709e8f1..4c79832 100644
@@ -413,6 +413,7 @@ CONFIG_SENSORS_INA2XX=m
 CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
 CONFIG_CPU_THERMAL=y
 CONFIG_THERMAL_EMULATION=y
+CONFIG_IMX_SC_THERMAL=m
 CONFIG_ROCKCHIP_THERMAL=m
 CONFIG_RCAR_THERMAL=y
 CONFIG_RCAR_GEN3_THERMAL=y
Signature · 1 line
2.7.4
#3 lore raw

PATCH v6 4/4 arm64: dts: imx: add i.MX8QXP thermal support

In reply to Anson Huang

Add i.MX8QXP CPU thermal zone support.

---
ChangeLog since V5:
- add a property in each thermal zone to pass resource ID for thermal driver.

---
 arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
arch/arm64/boot/dts/freescale/imx8qxp.dtsi +28 -0
index 4c3dd95..88eb04b 100644
@@ -10,6 +10,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/pinctrl/pads-imx8qxp.h>
+#include <dt-bindings/thermal/thermal.h>
 
 / {
 	interrupt-parent = <&gic>;
@@ -116,6 +117,12 @@
 		rtc: rtc {
 			compatible = "fsl,imx8qxp-sc-rtc";
 		};
+
+		tsens: thermal-sensor {
+			compatible = "fsl,imx8qxp-sc-thermal";
+			tsens-num = <1>;
+			#thermal-sensor-cells = <1>;
+		};
 	};
 
 	timer {
@@ -443,4 +450,25 @@
 			power-domains = <&pd IMX_SC_R_GPIO_7>;
 		};
 	};
+
+	thermal_zones: thermal-zones {
+		cpu-thermal0 {
+			polling-delay-passive = <250>;
+			polling-delay = <2000>;
+			thermal-sensors = <&tsens 0>;
+			imx,sensor-resource-id = <355>;
+			trips {
+				cpu_alert0: trip0 {
+					temperature = <107000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+				cpu_crit0: trip1 {
+					temperature = <127000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
 };
Signature · 1 line
2.7.4
#4 lore raw
In reply to Anson Huang

Gental ping...

Best Regards!
Anson Huang

Quoted 80 lines

-----Original Message-----
From: Anson Huang
Sent: 2019年2月7日 17:53
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Aisheng Dong <[email protected]>; [email protected]; Daniel Baluta <[email protected]>; [email protected]; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]
Cc: dl-linux-imx <[email protected]>
Subject: [PATCH V6 1/4] dt-bindings: fsl: scu: add thermal binding

NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller, the system controller is in charge of system power, clock and thermal sensors etc. management, Linux kernel has to communicate with system controller via MU (message unit) IPC to get temperature from thermal sensors, this patch adds binding doc for i.MX system controller thermal driver.

---
ChangeLog since V5:
- add "imx,sensor-resource-id" in each thermal zone to pass resource
ID for thermal driver.

---
 .../devicetree/bindings/arm/freescale/fsl,scu.txt    | 20
++++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +0 -0
index 72d481c..4b79751 100644
@@ -122,6 +122,20 @@ RTC bindings based on SCU Message Protocol

Required properties:
- compatible: should be "fsl,imx8qxp-sc-rtc";

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +8 -0
+Thermal bindings based on SCU Message Protocol
+------------------------------------------------------------
+
+Required properties:
+- compatible : Must be "fsl,imx8qxp-sc-thermal";
+- tsens-num : Total number of thermal sensors supported;
+- #thermal-sensor-cells : Should be 1. See
+

Documentation/devicetree/bindings/thermal/thermal.txt

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +2 -0
+			  for a description.
+- imx,sensor-resource-id : This property should be defined in each thermal

zone

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +1 -0
+			   of thermal-zones node, it passes each thermal

zone's

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +1 -0
+			   resource id for thermal driver to get temperature

via

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +8 -1
+			   SCU IPC.
+
 Example (imx8qxp):
 -------------
 lsio_mu1: mailbox@5d1c0000 {
@@ -168,6 +182,12 @@ firmware {
 		rtc: rtc {
 			compatible = "fsl,imx8qxp-sc-rtc";
 		};
+
+		tsens: thermal-sensor {
+			compatible = "fsl,imx8qxp-sc-thermal";
+			tsens-num = <1>;
+			#thermal-sensor-cells = <1>;
+		};
 	};
 };
 
--
Quoted 1 line

2.7.4

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw

Ping...

Best Regards!
Anson Huang

Quoted 104 lines

-----Original Message-----
From: Anson Huang
Sent: 2019年2月13日 13:36
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Aisheng Dong <[email protected]>; [email protected]; Daniel Baluta <[email protected]>; [email protected]; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]
Cc: dl-linux-imx <[email protected]>
Subject: RE: [PATCH V6 1/4] dt-bindings: fsl: scu: add thermal binding

Gental ping...

Best Regards!
Anson Huang

Quoted 81 lines

-----Original Message-----
From: Anson Huang
Sent: 2019年2月7日 17:53
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Aisheng Dong <[email protected]>; [email protected]; Daniel Baluta <[email protected]>; [email protected]; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]
Cc: dl-linux-imx <[email protected]>
Subject: [PATCH V6 1/4] dt-bindings: fsl: scu: add thermal binding

NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller, the system controller is in charge of system power, clock and thermal sensors etc. management, Linux kernel has to communicate with system controller via MU (message unit) IPC to get temperature from thermal sensors, this patch adds binding doc for i.MX system controller thermal driver.

---
ChangeLog since V5:
- add "imx,sensor-resource-id" in each thermal zone to pass resource
ID for thermal driver.

---
 .../devicetree/bindings/arm/freescale/fsl,scu.txt    | 20
++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt index 72d481c..4b79751 100644

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +0 -0
@@ -122,6 +122,20 @@ RTC bindings based on SCU Message Protocol

Required properties:
- compatible: should be "fsl,imx8qxp-sc-rtc";

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +8 -0
+Thermal bindings based on SCU Message Protocol
+------------------------------------------------------------
+
+Required properties:
+- compatible : Must be "fsl,imx8qxp-sc-thermal";
+- tsens-num : Total number of thermal sensors supported;
+- #thermal-sensor-cells : Should be 1. See
+

Documentation/devicetree/bindings/thermal/thermal.txt

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +3 -0
+			  for a description.
+- imx,sensor-resource-id : This property should be defined in each
+thermal

zone

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +1 -0
+			   of thermal-zones node, it passes each thermal

zone's

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +1 -0
+			   resource id for thermal driver to get temperature

via

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +8 -0
+			   SCU IPC.
+
 Example (imx8qxp):
 -------------
 lsio_mu1: mailbox@5d1c0000 {
@@ -168,6 +182,12 @@ firmware {
 		rtc: rtc {
 			compatible = "fsl,imx8qxp-sc-rtc";
 		};
+
+		tsens: thermal-sensor {
+			compatible = "fsl,imx8qxp-sc-thermal";
+			tsens-num = <1>;
+			#thermal-sensor-cells = <1>;
+		};
 	};
 };
 
Quoted 2 lines
Quoted 2 lines

--
2.7.4

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#6 lore raw
Quoted 1 line · Anson Huang

Ping...

I will take a look on this.

Quoted 111 lines

Best Regards!
Anson Huang

Quoted 106 lines

-----Original Message-----
From: Anson Huang
Sent: 2019年2月13日 13:36
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Aisheng Dong <[email protected]>; [email protected]; Daniel Baluta <[email protected]>; [email protected]; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]
Cc: dl-linux-imx <[email protected]>
Subject: RE: [PATCH V6 1/4] dt-bindings: fsl: scu: add thermal binding

Gental ping...

Best Regards!
Anson Huang

Quoted 83 lines

-----Original Message-----
From: Anson Huang
Sent: 2019年2月7日 17:53
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Aisheng Dong <[email protected]>; [email protected]; Daniel Baluta <[email protected]>; [email protected]; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]
Cc: dl-linux-imx <[email protected]>
Subject: [PATCH V6 1/4] dt-bindings: fsl: scu: add thermal binding

NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller, the system controller is in charge of system power, clock and thermal sensors etc. management, Linux kernel has to communicate with system controller via MU (message unit) IPC to get temperature from thermal sensors, this patch adds binding doc for i.MX system controller thermal driver.

---
ChangeLog since V5:
- add "imx,sensor-resource-id" in each thermal zone to pass resource
ID for thermal driver.

---
 .../devicetree/bindings/arm/freescale/fsl,scu.txt    | 20
++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt index 72d481c..4b79751 100644

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +0 -0
@@ -122,6 +122,20 @@ RTC bindings based on SCU Message Protocol

Required properties:
- compatible: should be "fsl,imx8qxp-sc-rtc";

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +8 -0
+Thermal bindings based on SCU Message Protocol
+------------------------------------------------------------
+
+Required properties:
+- compatible : Must be "fsl,imx8qxp-sc-thermal";
+- tsens-num : Total number of thermal sensors supported;
+- #thermal-sensor-cells : Should be 1. See
+

Documentation/devicetree/bindings/thermal/thermal.txt

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +3 -0
+			  for a description.
+- imx,sensor-resource-id : This property should be defined in each
+thermal

zone

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +1 -0
+			   of thermal-zones node, it passes each thermal

zone's

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +1 -0
+			   resource id for thermal driver to get temperature

via

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +8 -1
+			   SCU IPC.
+
 Example (imx8qxp):
 -------------
 lsio_mu1: mailbox@5d1c0000 {
@@ -168,6 +182,12 @@ firmware {
 		rtc: rtc {
 			compatible = "fsl,imx8qxp-sc-rtc";
 		};
+
+		tsens: thermal-sensor {
+			compatible = "fsl,imx8qxp-sc-thermal";
+			tsens-num = <1>;
+			#thermal-sensor-cells = <1>;
+		};
 	};
 };
 
--

2.7.4

#7 lore raw
In reply to Anson Huang
Quoted 2 lines

From: Anson Huang
Sent: Thursday, February 7, 2019 5:53 PM

[...]

Quoted 38 lines

NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller, the system controller is in charge of system power, clock and thermal sensors etc. management, Linux kernel has to communicate with system controller via MU (message unit) IPC to get temperature from thermal sensors, this patch adds binding doc for i.MX system controller thermal driver.

---
ChangeLog since V5:
- add "imx,sensor-resource-id" in each thermal zone to pass resource ID
for thermal driver.

---
 .../devicetree/bindings/arm/freescale/fsl,scu.txt    | 20
++++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +0 -0
index 72d481c..4b79751 100644
@@ -122,6 +122,20 @@ RTC bindings based on SCU Message Protocol

Required properties:
- compatible: should be "fsl,imx8qxp-sc-rtc";

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +10 -0
+Thermal bindings based on SCU Message Protocol
+------------------------------------------------------------
+
+Required properties:
+- compatible : Must be "fsl,imx8qxp-sc-thermal";
+- tsens-num : Total number of thermal sensors supported;
+- #thermal-sensor-cells : Should be 1. See
+			  Documentation/devicetree/bindings/thermal/thermal.txt
+			  for a description.
+- imx,sensor-resource-id : This property should be defined in each thermal

zone

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt RTC bindings based on SCU Message Protocol · line 137

Quoted 3 lines
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +3 -0
+			   of thermal-zones node, it passes each thermal zone's
+			   resource id for thermal driver to get temperature via
+			   SCU IPC.

This is missing in the example?

BTW, is this SCU function likely platform dependent?
If not, you probably could add a fallback compatible such as "fsl,scu-rtc"

Regards
Dong Aisheng

Quoted 19 lines
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +7 -1
+
 Example (imx8qxp):
 -------------
 lsio_mu1: mailbox@5d1c0000 {
@@ -168,6 +182,12 @@ firmware {
 		rtc: rtc {
 			compatible = "fsl,imx8qxp-sc-rtc";
 		};
+
+		tsens: thermal-sensor {
+			compatible = "fsl,imx8qxp-sc-thermal";
+			tsens-num = <1>;
+			#thermal-sensor-cells = <1>;
+		};
 	};
 };
 
--

2.7.4

#8 lore raw

Best Regards!
Anson Huang

Quoted 65 lines

-----Original Message-----
From: Aisheng Dong
Sent: 2019年2月20日 11:27
To: Anson Huang <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Daniel Baluta <[email protected]>; [email protected]; Andy Gross <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]
Cc: dl-linux-imx <[email protected]>
Subject: RE: [PATCH V6 1/4] dt-bindings: fsl: scu: add thermal binding

Quoted 2 lines

From: Anson Huang
Sent: Thursday, February 7, 2019 5:53 PM

[...]

Quoted 6 lines

NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller, the system controller is in charge of system power, clock and thermal sensors etc. management, Linux kernel has to communicate with system controller via MU (message unit) IPC to get temperature from thermal sensors, this patch adds binding doc for i.MX system

controller thermal driver.

Quoted 22 lines

---
ChangeLog since V5:
- add "imx,sensor-resource-id" in each thermal zone to pass resource
ID for thermal driver.

---
 .../devicetree/bindings/arm/freescale/fsl,scu.txt    | 20
++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt index 72d481c..4b79751 100644

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +0 -0
@@ -122,6 +122,20 @@ RTC bindings based on SCU Message Protocol

Required properties:
- compatible: should be "fsl,imx8qxp-sc-rtc";

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt RTC bindings based on SCU Message Protocol · line 138

Quoted 8 lines
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +8 -0
+Thermal bindings based on SCU Message Protocol
+------------------------------------------------------------
+
+Required properties:
+- compatible : Must be "fsl,imx8qxp-sc-thermal";
+- tsens-num : Total number of thermal sensors supported;
+- #thermal-sensor-cells : Should be 1. See
+

Documentation/devicetree/bindings/thermal/thermal.txt

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt

Quoted 5 lines
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +3 -0
+			  for a description.
+- imx,sensor-resource-id : This property should be defined in each
+thermal

zone

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +1 -0
+			   of thermal-zones node, it passes each thermal

zone's

Quoted 5 lines

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt

Quoted 1 line
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +1 -0
+			   resource id for thermal driver to get temperature

via

Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt RTC bindings based on SCU Message Protocol · line 137

Quoted 1 line
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +1 -0
+			   SCU IPC.

This is missing in the example?

There are two parts of thermal dts, one is the tsens which are different on each platform. The other are common thermal-zone definitions, these are covered by thermal binding doc. The property is added by us for our platforms, if want to put it in example, I need to copy Hope piece of common thermal-zone node.

Quoted 3 lines

BTW, is this SCU function likely platform dependent?
If not, you probably could add a fallback compatible such as "fsl,scu-rtc"

For now, the SCU API we used are platform independent, the ONLY parameter depends on platform is resource ID, we can get it from dtb node.

OK, I think we can use a more generic compatible name like "fsl,imx-sc-thermal".

Anson.

Quoted 21 lines

Regards
Dong Aisheng

Quoted 17 lines
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +7 -0
+
 Example (imx8qxp):
 -------------
 lsio_mu1: mailbox@5d1c0000 {
@@ -168,6 +182,12 @@ firmware {
 		rtc: rtc {
 			compatible = "fsl,imx8qxp-sc-rtc";
 		};
+
+		tsens: thermal-sensor {
+			compatible = "fsl,imx8qxp-sc-thermal";
+			tsens-num = <1>;
+			#thermal-sensor-cells = <1>;
+		};
 	};
 };
 
Quoted 2 lines
Quoted 2 lines

--
2.7.4

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel