2014-01-06 12:37:59

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCHv2 0/7] DRA7: DT thermal support

Hello all,

Now that the basic thermal DT support is merged into Rui's tree,
I am resending this series, which introduces the DT node entries
for DRA7 thermal limits representation.

The series adds two thermal zones, to represent IVA and DSPEVE,
respectively. It also adds the support to tmp102 and a corresponding
pcb thermal zone.

There are only cosmetic changes from v1. A couple of spaces and tabulations
have been fixed, and minor changes in sentences present in commit log.
One difference from V1 is the fact that now bandgap is introduced under
OCP, which is also a minor diff.

This patch series has been runtime tested on DRA7-evm.

All best

Eduardo Valentin (7):
arm: dts: add dra7 DSPEVE thermal data
arm: dts: add dra7 IVA thermal data
arm: dts: dra7: add bandgap entry
arm: dts: add cooling properties on dra7 cpu node
arm: dts: dra7: add thermal data
arm: dts: add tmp102 i2c sensor node on dra7-evm
arm: dts: add thermal zones info on tmp102 for DRA7-EVM

arch/arm/boot/dts/dra7-dspeve-thermal.dtsi | 28 ++++++++++++++++++++++++++++
arch/arm/boot/dts/dra7-evm.dts | 22 ++++++++++++++++++++++
arch/arm/boot/dts/dra7-iva-thermal.dtsi | 28 ++++++++++++++++++++++++++++
arch/arm/boot/dts/dra7.dtsi | 26 ++++++++++++++++++++++++++
4 files changed, 104 insertions(+)
create mode 100644 arch/arm/boot/dts/dra7-dspeve-thermal.dtsi
create mode 100644 arch/arm/boot/dts/dra7-iva-thermal.dtsi

--
1.8.2.1.342.gfa7285d


2014-01-06 12:38:55

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCHv2 1/7] arm: dts: add dra7 DSPEVE thermal data

This patch introduces a dtsi file to contain the thermal data
for DSPEVE domain on DRA7 and later SoCs. This data will
enable a thermal shutdown at 125C.

Cc: Benoît Cousson <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Ian Campbell <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Eduardo Valentin <[email protected]>
---
arch/arm/boot/dts/dra7-dspeve-thermal.dtsi | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 arch/arm/boot/dts/dra7-dspeve-thermal.dtsi

diff --git a/arch/arm/boot/dts/dra7-dspeve-thermal.dtsi b/arch/arm/boot/dts/dra7-dspeve-thermal.dtsi
new file mode 100644
index 0000000..50e78b6
--- /dev/null
+++ b/arch/arm/boot/dts/dra7-dspeve-thermal.dtsi
@@ -0,0 +1,28 @@
+/*
+ * Device Tree Source for DRA7 SoC DSPEVE thermal
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ * Contact: Eduardo Valentin <[email protected]>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <dt-bindings/thermal/thermal.h>
+
+dspeve_thermal: dspeve_thermal {
+ polling-delay-passive = <250>; /* milliseconds */
+ polling-delay = <1000>; /* milliseconds */
+
+ /* sensor ID */
+ thermal-sensors = <&bandgap 3>;
+
+ trips {
+ dspeve_crit: dspeve_crit {
+ temperature = <125000>; /* milliCelsius */
+ hysteresis = <2000>; /* milliCelsius */
+ type = "critical";
+ };
+ };
+};
--
1.8.2.1.342.gfa7285d

2014-01-06 12:39:15

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCHv2 2/7] arm: dts: add dra7 IVA thermal data

This patch introduces a dtsi file to contain the thermal data
for IVA domain on DRA7 and later SoCs. This data will
enable a thermal shutdown at 125C.

Cc: Benoît Cousson <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Ian Campbell <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Eduardo Valentin <[email protected]>
---
arch/arm/boot/dts/dra7-iva-thermal.dtsi | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 arch/arm/boot/dts/dra7-iva-thermal.dtsi

diff --git a/arch/arm/boot/dts/dra7-iva-thermal.dtsi b/arch/arm/boot/dts/dra7-iva-thermal.dtsi
new file mode 100644
index 0000000..4895f65
--- /dev/null
+++ b/arch/arm/boot/dts/dra7-iva-thermal.dtsi
@@ -0,0 +1,28 @@
+/*
+ * Device Tree Source for DRA7 SoC IVA thermal
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ * Contact: Eduardo Valentin <[email protected]>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <dt-bindings/thermal/thermal.h>
+
+iva_thermal: iva_thermal {
+ polling-delay-passive = <250>; /* milliseconds */
+ polling-delay = <1000>; /* milliseconds */
+
+ /* sensor ID */
+ thermal-sensors = <&bandgap 4>;
+
+ trips {
+ iva_crit: iva_crit {
+ temperature = <125000>; /* milliCelsius */
+ hysteresis = <2000>; /* milliCelsius */
+ type = "critical";
+ };
+ };
+};
--
1.8.2.1.342.gfa7285d

2014-01-06 12:39:27

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCHv2 4/7] arm: dts: add cooling properties on dra7 cpu node

DRA7 devices can reach high temperatures and thus
needs to have cpufreq-cooling on systems running on it.

This patch adds the required cooling device properties
so that cpufreq-cpu0 driver loads the cooling device.

Cc: Benoît Cousson <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Ian Campbell <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Eduardo Valentin <[email protected]>
---
arch/arm/boot/dts/dra7.dtsi | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 8f21157..139472c 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -47,6 +47,11 @@
1000000 1060000
1176000 1160000
>;
+
+ /* cooling properties */
+ #cooling-cells = <2>; /* min and max */
+ #cooling-min-level = <0>;
+ #cooling-max-level = <1>;
};
cpu@1 {
device_type = "cpu";
--
1.8.2.1.342.gfa7285d

2014-01-06 12:39:30

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCHv2 5/7] arm: dts: dra7: add thermal data

This patch adds thermal data for DRA7 SoCs. Cpufreq cooling
will be enabled for MPU domain whenever it crosses 100C.
GPU, CORE, DSPEVE, IVA will be exposed and system shall
shutdown when they cross 125C.

Cc: Benoît Cousson <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Ian Campbell <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Eduardo Valentin <[email protected]>
---
arch/arm/boot/dts/dra7.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 139472c..4784c0c 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -68,6 +68,15 @@
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
};

+ thermal_zones: thermal-zones {
+ /* SoC thermal zones */
+ #include "omap4-cpu-thermal.dtsi"
+ #include "omap5-gpu-thermal.dtsi"
+ #include "omap5-core-thermal.dtsi"
+ #include "dra7-dspeve-thermal.dtsi"
+ #include "dra7-iva-thermal.dtsi"
+ };
+
gic: interrupt-controller@48211000 {
compatible = "arm,cortex-a15-gic";
interrupt-controller;
--
1.8.2.1.342.gfa7285d

2014-01-06 12:39:25

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCHv2 3/7] arm: dts: dra7: add bandgap entry

This patch adds bandgap IP entry on DRA7 dtsi device tree file.

Cc: Benoît Cousson <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Ian Campbell <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Eduardo Valentin <[email protected]>
---
arch/arm/boot/dts/dra7.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index d0df4c4..8f21157 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -119,6 +119,18 @@
pinctrl-single,function-mask = <0x3fffffff>;
};

+ bandgap: bandgap {
+ reg = <0x4a0021e0 0xc
+ 0x4a00232c 0xc
+ 0x4a002380 0x2c
+ 0x4a0023C0 0x3c
+ 0x4a002564 0x8
+ 0x4a002574 0x50>;
+ compatible = "ti,dra752-bandgap";
+ interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+ #thermal-sensor-cells = <1>;
+ };
+
sdma: dma-controller@4a056000 {
compatible = "ti,omap4430-sdma";
reg = <0x4a056000 0x1000>;
--
1.8.2.1.342.gfa7285d

2014-01-06 12:40:33

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCHv2 6/7] arm: dts: add tmp102 i2c sensor node on dra7-evm

On dra7-evm there is an tmp102 temperature sensor on i2c bus 1.
This patch adds its device tree node.

Cc: Benoît Cousson <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Ian Campbell <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Eduardo Valentin <[email protected]>
---
arch/arm/boot/dts/dra7-evm.dts | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 5babba0..36e2c9e 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -212,6 +212,13 @@
};
};
};
+
+ tmp102: tmp102@48 {
+ compatible = "ti,tmp102";
+ reg = <0x48>;
+
+ #thermal-sensor-cells = <0>;
+ };
};

&i2c2 {
--
1.8.2.1.342.gfa7285d

2014-01-06 12:40:53

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCHv2 7/7] arm: dts: add thermal zones info on tmp102 for DRA7-EVM

Add simple thermal zone on tmp102.

Cc: Benoît Cousson <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Ian Campbell <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Eduardo Valentin <[email protected]>
---
arch/arm/boot/dts/dra7-evm.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 36e2c9e..1ea9c3d 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -95,6 +95,21 @@
};
};

+&thermal_zones {
+ pcb_thermal: pcb_thermal {
+ polling-delay-passive = <250>; /* milliseconds */
+ polling-delay = <1000>; /* milliseconds */
+ thermal-sensors = <&tmp102>;
+ trips {
+ crit@80000 {
+ temperature = <80000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+};
+
&i2c1 {
status = "okay";
pinctrl-names = "default";
--
1.8.2.1.342.gfa7285d

2014-01-06 14:46:49

by Zhang Rui

[permalink] [raw]
Subject: Re: [PATCHv2 0/7] DRA7: DT thermal support

On Mon, 2014-01-06 at 08:36 -0400, Eduardo Valentin wrote:
> Hello all,
>
> Now that the basic thermal DT support is merged into Rui's tree,
> I am resending this series, which introduces the DT node entries
> for DRA7 thermal limits representation.
>
> The series adds two thermal zones, to represent IVA and DSPEVE,
> respectively. It also adds the support to tmp102 and a corresponding
> pcb thermal zone.
>
> There are only cosmetic changes from v1. A couple of spaces and tabulations
> have been fixed, and minor changes in sentences present in commit log.
> One difference from V1 is the fact that now bandgap is introduced under
> OCP, which is also a minor diff.
>
> This patch series has been runtime tested on DRA7-evm.
>
> All best
>
> Eduardo Valentin (7):
> arm: dts: add dra7 DSPEVE thermal data
> arm: dts: add dra7 IVA thermal data
> arm: dts: dra7: add bandgap entry
> arm: dts: add cooling properties on dra7 cpu node
> arm: dts: dra7: add thermal data
> arm: dts: add tmp102 i2c sensor node on dra7-evm
> arm: dts: add thermal zones info on tmp102 for DRA7-EVM
>
> arch/arm/boot/dts/dra7-dspeve-thermal.dtsi | 28 ++++++++++++++++++++++++++++
> arch/arm/boot/dts/dra7-evm.dts | 22 ++++++++++++++++++++++
> arch/arm/boot/dts/dra7-iva-thermal.dtsi | 28 ++++++++++++++++++++++++++++
> arch/arm/boot/dts/dra7.dtsi | 26 ++++++++++++++++++++++++++

I'm okay with this patch set. But as long as this patch set does not
change any code under drivers/thermal/, I prefer these patches to go to
your thermal-soc tree first.

thanks,
rui
> 4 files changed, 104 insertions(+)
> create mode 100644 arch/arm/boot/dts/dra7-dspeve-thermal.dtsi
> create mode 100644 arch/arm/boot/dts/dra7-iva-thermal.dtsi
>

2014-01-06 14:54:39

by Eduardo Valentin

[permalink] [raw]
Subject: Re: [PATCHv2 0/7] DRA7: DT thermal support

On 06-01-2014 10:46, Zhang Rui wrote:
> On Mon, 2014-01-06 at 08:36 -0400, Eduardo Valentin wrote:
>> Hello all,
>>
>> Now that the basic thermal DT support is merged into Rui's tree,
>> I am resending this series, which introduces the DT node entries
>> for DRA7 thermal limits representation.
>>
>> The series adds two thermal zones, to represent IVA and DSPEVE,
>> respectively. It also adds the support to tmp102 and a corresponding
>> pcb thermal zone.
>>
>> There are only cosmetic changes from v1. A couple of spaces and tabulations
>> have been fixed, and minor changes in sentences present in commit log.
>> One difference from V1 is the fact that now bandgap is introduced under
>> OCP, which is also a minor diff.
>>
>> This patch series has been runtime tested on DRA7-evm.
>>
>> All best
>>
>> Eduardo Valentin (7):
>> arm: dts: add dra7 DSPEVE thermal data
>> arm: dts: add dra7 IVA thermal data
>> arm: dts: dra7: add bandgap entry
>> arm: dts: add cooling properties on dra7 cpu node
>> arm: dts: dra7: add thermal data
>> arm: dts: add tmp102 i2c sensor node on dra7-evm
>> arm: dts: add thermal zones info on tmp102 for DRA7-EVM
>>
>> arch/arm/boot/dts/dra7-dspeve-thermal.dtsi | 28 ++++++++++++++++++++++++++++
>> arch/arm/boot/dts/dra7-evm.dts | 22 ++++++++++++++++++++++
>> arch/arm/boot/dts/dra7-iva-thermal.dtsi | 28 ++++++++++++++++++++++++++++
>> arch/arm/boot/dts/dra7.dtsi | 26 ++++++++++++++++++++++++++
>
> I'm okay with this patch set. But as long as this patch set does not
> change any code under drivers/thermal/, I prefer these patches to go to
> your thermal-soc tree first.

No problem at all. I will be queuing them.

>
> thanks,
> rui
>> 4 files changed, 104 insertions(+)
>> create mode 100644 arch/arm/boot/dts/dra7-dspeve-thermal.dtsi
>> create mode 100644 arch/arm/boot/dts/dra7-iva-thermal.dtsi
>>
>
>
>
>


--
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin


Attachments:
signature.asc (295.00 B)
OpenPGP digital signature