2013-10-01 18:33:49

by Eduardo Valentin

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

Hello all,

This is a complementary patch series with themal DT support for DRA7.

Although this work depends on the thermal dt parser work [1], I decided
to share it before hand. It also depends on DRA7 DT base port support,
which I fetched from Rajendra's tree [2].

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

All best,

[1] - https://lkml.org/lkml/2013/9/26/787
[2] - git://github.com/rrnayak/linux.git out-of-tree/dra-integrated-v3

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 | 23 +++++++++++++++++++++++
arch/arm/boot/dts/dra7-iva-thermal.dtsi | 28 ++++++++++++++++++++++++++++
arch/arm/boot/dts/dra7.dtsi | 27 ++++++++++++++++++++++++++-
4 files changed, 105 insertions(+), 1 deletion(-)
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


2013-10-01 18:34:08

by Eduardo Valentin

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

This patch changes 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.

This thermal data can be reused across TI SoC devices.

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..fea0cea
--- /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 = THERMAL_TRIP_CRITICAL;
+ };
+ };
+};
--
1.8.2.1.342.gfa7285d

2013-10-01 18:34:18

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCH 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.

Signed-off-by: Eduardo Valentin <[email protected]>
---
arch/arm/boot/dts/dra7.dtsi | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 4e9b159..1104d8a 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -25,8 +25,12 @@
};

cpus {
- cpu@0 {
+ cpu0: cpu@0 {
compatible = "arm,cortex-a15";
+
+ /* cooling properties */
+ #cooling-cells = <2>; /* min and max */
+
timer {
compatible = "arm,armv7-timer";
/*
--
1.8.2.1.342.gfa7285d

2013-10-01 18:34:25

by Eduardo Valentin

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

This patch changes 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.

This thermal data can be reused across TI SoC devices.

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..f8b9051
--- /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 = THERMAL_TRIP_CRITICAL;
+ };
+ };
+};
--
1.8.2.1.342.gfa7285d

2013-10-01 18:34:33

by Eduardo Valentin

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

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

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 3a746c2..4e9b159 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -53,6 +53,18 @@
};
};

+ 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>;
+ };
+
gic: interrupt-controller@48211000 {
compatible = "arm,cortex-a15-gic";
interrupt-controller;
--
1.8.2.1.342.gfa7285d

2013-10-01 18:34:43

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCH 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.

Signed-off-by: Eduardo Valentin <[email protected]>
---
arch/arm/boot/dts/dra7-evm.dts | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 21fe16b..3b6c16a 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -7,6 +7,8 @@
*/
/dts-v1/;

+#include <dt-bindings/thermal/thermal.h>
+
#include "dra7.dtsi"

/ {
@@ -93,6 +95,12 @@
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
clock-frequency = <400000>;
+ tmp102: tmp102@48{
+ compatible = "ti,tmp102";
+ reg = <0x48>;
+
+ #thermal-sensor-cells = <0>;
+ };
};

&i2c2 {
--
1.8.2.1.342.gfa7285d

2013-10-01 18:34:46

by Eduardo Valentin

[permalink] [raw]
Subject: [PATCH 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.

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 1104d8a..8ba5e1c 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -57,6 +57,15 @@
};
};

+ 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"
+ };
+
bandgap: bandgap {
reg = <0x4a0021e0 0xc
0x4a00232c 0xc
--
1.8.2.1.342.gfa7285d

2013-10-01 18:35:00

by Eduardo Valentin

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

Add simple thermal zone on tmp102.

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 3b6c16a..70e1a12 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -90,6 +90,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

2013-10-01 22:34:40

by Nishanth Menon

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

On 14:32-20131001, Eduardo Valentin wrote:
minor comments follow
> This patch changes a dtsi file to contain the thermal data
s/changes/introduces?
> for IVA domain on DRA7 and later SoCs. This data will
> enable a thermal shutdown at 125C.
>
> This thermal data can be reused across TI SoC devices.
is'nt it just DRA7 that reuses this - based on dtsi name?
>
> 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..fea0cea
> --- /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 */
^^ double tab here?
> + thermal-sensors = <&bandgap 4>;
space after bandgap is good enough?
> +
> + trips {
> + iva_crit: iva_crit {
> + temperature = <125000>; /* milliCelsius */
> + hysteresis = <2000>; /* milliCelsius */
> + type = THERMAL_TRIP_CRITICAL;
> + };
> + };
> +};

--
Regards,
Nishanth Menon

2013-10-01 22:38:06

by Nishanth Menon

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

On 14:32-20131001, Eduardo Valentin wrote:
> This patch changes a dtsi file to contain the thermal data
^^ introduces?
> for DSPEVE domain on DRA7 and later SoCs. This data will
> enable a thermal shutdown at 125C.
>
> This thermal data can be reused across TI SoC devices.
>
> 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..f8b9051
> --- /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>;
^^ tab control a bit? ;)
> +
> + trips {
> + dspeve_crit: dspeve_crit {
> + temperature = <125000>; /* milliCelsius */
> + hysteresis = <2000>; /* milliCelsius */
> + type = THERMAL_TRIP_CRITICAL;
> + };
> + };
> +};

--
Regards,
Nishanth Menon

2013-10-01 22:47:45

by Nishanth Menon

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

On 14:32-20131001, Eduardo Valentin wrote:
> This patch adds bandgap IP entry on DRA7 dtsi device tree file.
>
> 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 3a746c2..4e9b159 100644
> --- a/arch/arm/boot/dts/dra7.dtsi
> +++ b/arch/arm/boot/dts/dra7.dtsi
> @@ -53,6 +53,18 @@
> };
> };
>
> + bandgap: bandgap {
would you like to follow bandgap: bandgap@4a0021e0 convention?
Also, could you move it under ocp?
I already commented about this previously here:
https://lkml.org/lkml/2013/9/27/300

> + 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>;
> + };
> +
> gic: interrupt-controller@48211000 {
> compatible = "arm,cortex-a15-gic";
> interrupt-controller;
--
Regards,
Nishanth Menon

2013-10-01 22:52:09

by Nishanth Menon

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

On 14:32-20131001, Eduardo Valentin wrote:
> On dra7-evm there is an tmp102 temperature sensor on i2c bus 1.
> This patch adds its device tree node.
>
> Signed-off-by: Eduardo Valentin <[email protected]>
> ---
> arch/arm/boot/dts/dra7-evm.dts | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
> index 21fe16b..3b6c16a 100644
> --- a/arch/arm/boot/dts/dra7-evm.dts
> +++ b/arch/arm/boot/dts/dra7-evm.dts
> @@ -7,6 +7,8 @@
> */
> /dts-v1/;
>
> +#include <dt-bindings/thermal/thermal.h>
> +

^^ needed?

> #include "dra7.dtsi"
>
> / {
> @@ -93,6 +95,12 @@
> pinctrl-names = "default";
> pinctrl-0 = <&i2c1_pins>;
> clock-frequency = <400000>;
could you add an EOL here?
> + tmp102: tmp102@48{
a space before the {?
> + compatible = "ti,tmp102";
> + reg = <0x48>;
> +
> + #thermal-sensor-cells = <0>;
> + };
> };
>
> &i2c2 {
> --
> 1.8.2.1.342.gfa7285d
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Regards,
Nishanth Menon

2013-10-01 22:59:52

by Nishanth Menon

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

On 14:32-20131001, Eduardo Valentin wrote:
> Hello all,
>
> This is a complementary patch series with themal DT support for DRA7.
>
> Although this work depends on the thermal dt parser work [1], I decided
> to share it before hand. It also depends on DRA7 DT base port support,
> which I fetched from Rajendra's tree [2].
>
> This patch series has been runtime tested on DRA7-evm.
>
> All best,
>
> [1] - https://lkml.org/lkml/2013/9/26/787
> [2] - git://github.com/rrnayak/linux.git out-of-tree/dra-integrated-v3
>
> 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 | 23 +++++++++++++++++++++++
> arch/arm/boot/dts/dra7-iva-thermal.dtsi | 28 ++++++++++++++++++++++++++++
> arch/arm/boot/dts/dra7.dtsi | 27 ++++++++++++++++++++++++++-
> 4 files changed, 105 insertions(+), 1 deletion(-)
> create mode 100644 arch/arm/boot/dts/dra7-dspeve-thermal.dtsi
> create mode 100644 arch/arm/boot/dts/dra7-iva-thermal.dtsi

+Benoit, Tony, Linux-omap.
Ref: http://marc.info/?l=linux-pm&m=138065243027014&w=2

Tony, Benoit,
The following diff[1] is probably needed to ensure that right audience
is addressed.

Eduardo,
could you send an updated series with Tony,
Benoit and linux-omap in the loop?

[1]
diff --git a/MAINTAINERS b/MAINTAINERS
index 284969f..3442671 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5969,6 +5969,7 @@ M: Tony Lindgren <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
+F: arch/arm/boot/dts/*dra7*
F: arch/arm/boot/dts/*omap*
F: arch/arm/boot/dts/*am3*

--
Regards,
Nishanth Menon

2013-10-02 01:27:47

by Eduardo Valentin

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

On 01-10-2013 18:33, Nishanth Menon wrote:
> On 14:32-20131001, Eduardo Valentin wrote:
> minor comments follow
>> This patch changes a dtsi file to contain the thermal data
> s/changes/introduces?
>> for IVA domain on DRA7 and later SoCs. This data will
>> enable a thermal shutdown at 125C.
>>
>> This thermal data can be reused across TI SoC devices.
> is'nt it just DRA7 that reuses this - based on dtsi name?

For now, yes, but the file is intended to be reusable. just like the
file with cpu thermal zone is reusable on omap4/5/dra devices.

>>
>> 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..fea0cea
>> --- /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 */
> ^^ double tab here?
>> + thermal-sensors = <&bandgap 4>;
> space after bandgap is good enough?

Those tabulation were intentional, to hint that 4 means sensor id.

>> +
>> + trips {
>> + iva_crit: iva_crit {
>> + temperature = <125000>; /* milliCelsius */
>> + hysteresis = <2000>; /* milliCelsius */
>> + type = THERMAL_TRIP_CRITICAL;
>> + };
>> + };
>> +};
>


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

Eduardo Valentin


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

2013-10-02 01:28:41

by Eduardo Valentin

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

On 01-10-2013 18:37, Nishanth Menon wrote:
> On 14:32-20131001, Eduardo Valentin wrote:
>> This patch changes a dtsi file to contain the thermal data
> ^^ introduces?
>> for DSPEVE domain on DRA7 and later SoCs. This data will
>> enable a thermal shutdown at 125C.
>>
>> This thermal data can be reused across TI SoC devices.
>>
>> 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..f8b9051
>> --- /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>;
> ^^ tab control a bit? ;)

check answer on IVA patch.

>> +
>> + trips {
>> + dspeve_crit: dspeve_crit {
>> + temperature = <125000>; /* milliCelsius */
>> + hysteresis = <2000>; /* milliCelsius */
>> + type = THERMAL_TRIP_CRITICAL;
>> + };
>> + };
>> +};
>


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

Eduardo Valentin


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

2013-10-02 01:29:14

by Eduardo Valentin

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

On 01-10-2013 18:46, Nishanth Menon wrote:
> On 14:32-20131001, Eduardo Valentin wrote:
>> This patch adds bandgap IP entry on DRA7 dtsi device tree file.
>>
>> 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 3a746c2..4e9b159 100644
>> --- a/arch/arm/boot/dts/dra7.dtsi
>> +++ b/arch/arm/boot/dts/dra7.dtsi
>> @@ -53,6 +53,18 @@
>> };
>> };
>>
>> + bandgap: bandgap {
> would you like to follow bandgap: bandgap@4a0021e0 convention?
> Also, could you move it under ocp?
> I already commented about this previously here:
> https://lkml.org/lkml/2013/9/27/300

yes, this can be done.

>
>> + 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>;
>> + };
>> +
>> gic: interrupt-controller@48211000 {
>> compatible = "arm,cortex-a15-gic";
>> interrupt-controller;


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

Eduardo Valentin


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

2013-10-02 01:33:40

by Eduardo Valentin

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

On 01-10-2013 18:51, Nishanth Menon wrote:
> On 14:32-20131001, Eduardo Valentin wrote:
>> On dra7-evm there is an tmp102 temperature sensor on i2c bus 1.
>> This patch adds its device tree node.
>>
>> Signed-off-by: Eduardo Valentin <[email protected]>
>> ---
>> arch/arm/boot/dts/dra7-evm.dts | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
>> index 21fe16b..3b6c16a 100644
>> --- a/arch/arm/boot/dts/dra7-evm.dts
>> +++ b/arch/arm/boot/dts/dra7-evm.dts
>> @@ -7,6 +7,8 @@
>> */
>> /dts-v1/;
>>
>> +#include <dt-bindings/thermal/thermal.h>
>> +
>
> ^^ needed?

In fact this is left over from previous local versions and can be
removed from this patch.

However, depending on how patch 7 evolves, it could be needed, yes.

>
>> #include "dra7.dtsi"
>>
>> / {
>> @@ -93,6 +95,12 @@
>> pinctrl-names = "default";
>> pinctrl-0 = <&i2c1_pins>;
>> clock-frequency = <400000>;
> could you add an EOL here?
>> + tmp102: tmp102@48{
> a space before the {?

ok for both cosmetic comments.

>> + compatible = "ti,tmp102";
>> + reg = <0x48>;
>> +
>> + #thermal-sensor-cells = <0>;
>> + };
>> };
>>
>> &i2c2 {
>> --
>> 1.8.2.1.342.gfa7285d
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>


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

Eduardo Valentin


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

2013-10-02 01:47:04

by Eduardo Valentin

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

On 01-10-2013 18:58, Nishanth Menon wrote:
> On 14:32-20131001, Eduardo Valentin wrote:
>> Hello all,
>>
>> This is a complementary patch series with themal DT support for DRA7.
>>
>> Although this work depends on the thermal dt parser work [1], I decided
>> to share it before hand. It also depends on DRA7 DT base port support,
>> which I fetched from Rajendra's tree [2].
>>
>> This patch series has been runtime tested on DRA7-evm.
>>
>> All best,
>>
>> [1] - https://lkml.org/lkml/2013/9/26/787
>> [2] - git://github.com/rrnayak/linux.git out-of-tree/dra-integrated-v3
>>
>> 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 | 23 +++++++++++++++++++++++
>> arch/arm/boot/dts/dra7-iva-thermal.dtsi | 28 ++++++++++++++++++++++++++++
>> arch/arm/boot/dts/dra7.dtsi | 27 ++++++++++++++++++++++++++-
>> 4 files changed, 105 insertions(+), 1 deletion(-)
>> create mode 100644 arch/arm/boot/dts/dra7-dspeve-thermal.dtsi
>> create mode 100644 arch/arm/boot/dts/dra7-iva-thermal.dtsi
>
> +Benoit, Tony, Linux-omap.
> Ref: http://marc.info/?l=linux-pm&m=138065243027014&w=2
>
> Tony, Benoit,
> The following diff[1] is probably needed to ensure that right audience
> is addressed.

Well, yeah. thinking of this series now I probably should have mentioned
clear that it is not ready for merge. Not only because it depends on a
working in progress I have referred at [1], but because we lack
completely dra7 files (at linus tree we have no files under
arch/arm/boot/dts/*dra7*). Therefore, I mentioned in this cover letter
that I actually based this work on top of [2] and [1]. Apologies if it
was not clear enough for you.

Just to make clear, the intention of this patch set was to share and use
yet another example of the usage of the work at [1]. Thus the audience
was directed to the cc and to lists I used.

>
> Eduardo,
> could you send an updated series with Tony,
> Benoit and linux-omap in the loop?

Well sure, once it has the right dependency in place.

>
> [1]
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 284969f..3442671 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -5969,6 +5969,7 @@ M: Tony Lindgren <[email protected]>
> L: [email protected]
> L: [email protected]
> S: Maintained
> +F: arch/arm/boot/dts/*dra7*

I believe, once we have them merged, then I suppose this diff is applicable.

> F: arch/arm/boot/dts/*omap*
> F: arch/arm/boot/dts/*am3*
>
>


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

Eduardo Valentin


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