Skip to contentSkip to conversation

arm: enable TI SoC thermal driver

PATCH Superseded Eduardo Valentin 4 participants 18 messages May 15, 2013 – Jun 4, 2013

Subsystems (4)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover arm: enable TI SoC thermal driver

Hello,

Idea is to add the missing bits under arch/arm/*omap* required to enable by default the ti-soc-thermal driver. I am planing to move it out of staging tree. It would be interesting to get feedback from other ppl. By enabling it by default we could reach more ppl for testing it across the supported chips.

The difference from v1 is just that patch 01 doe snot include the dts prefix, as it is not supposed to be DTS related.

BR,

Eduardo Valentin (3):
arm: introduce config HAS_BANDGAP
arm: dts: add bandgap entry for OMAP443x devices
arm: dts: add bandgap entry for OMAP4460 devices

 arch/arm/Kconfig                | 3 +++
 arch/arm/boot/dts/omap443x.dtsi | 4 ++++
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 arch/arm/mach-omap2/Kconfig     | 1 +
 4 files changed, 17 insertions(+)
Signature · 1 line
1.8.2.1.342.gfa7285d
#1 lore raw

PATCH v2 1/3 arm: introduce config HAS_BANDGAP

Introduce HAS_BANDGAP config entry. This config is a boolean value so that arch code can flag is they feature a bandgap device.

This config entry follows the same idea behind
ARCH_HAS_CPUFREQ.

Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-omap at vger.kernel.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/Kconfig            | 3 +++
 arch/arm/mach-omap2/Kconfig | 1 +
 2 files changed, 4 insertions(+)
arch/arm/Kconfig +3 -0
index d423d58..bcbdec9 100644
@@ -174,6 +174,9 @@ config ARCH_HAS_CPUFREQ
 	  and that the relevant menu configurations are displayed for
 	  it.
 
+config ARCH_HAS_BANDGAP
+	bool
+
 config GENERIC_HWEIGHT
 	bool
 	default y
arch/arm/mach-omap2/Kconfig +1 -0
index f49cd51..8620ab5 100644
@@ -4,6 +4,7 @@ config ARCH_OMAP
 config ARCH_OMAP2PLUS
 	bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
 	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_BANDGAP
 	select ARCH_HAS_HOLES_MEMORYMODEL
 	select ARCH_OMAP
 	select ARCH_REQUIRE_GPIOLIB
Signature · 1 line
1.8.2.1.342.gfa7285d
#2 lore raw

Re: [PATCHv2 1/3] arm: introduce config HAS_BANDGAP

Tony, Russell,

Quoted 7 lines · Eduardo Valentin

Introduce HAS_BANDGAP config entry. This config is a boolean value so that arch code can flag is they feature a bandgap device.

This config entry follows the same idea behind
ARCH_HAS_CPUFREQ.

Quoted 6 lines
Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-omap at vger.kernel.org
Cc linux-kernel at vger.kernel.org

Gentle reminder on this one.

Quoted 32 lines
---
 arch/arm/Kconfig            | 3 +++
 arch/arm/mach-omap2/Kconfig | 1 +
 2 files changed, 4 insertions(+)
arch/arm/Kconfig +3 -0
index d423d58..bcbdec9 100644
@@ -174,6 +174,9 @@ config ARCH_HAS_CPUFREQ
 	  and that the relevant menu configurations are displayed for
 	  it.
 
+config ARCH_HAS_BANDGAP
+	bool
+
 config GENERIC_HWEIGHT
 	bool
 	default y
arch/arm/mach-omap2/Kconfig +1 -0
index f49cd51..8620ab5 100644
@@ -4,6 +4,7 @@ config ARCH_OMAP
 config ARCH_OMAP2PLUS
 	bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
 	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_BANDGAP
 	select ARCH_HAS_HOLES_MEMORYMODEL
 	select ARCH_OMAP
 	select ARCH_REQUIRE_GPIOLIB
Signature · 11 lines
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130531/5c661b74/attachment.sig>
#3 lore raw

Re: [PATCHv2 1/3] arm: introduce config HAS_BANDGAP

In reply to Eduardo Valentin
Quoted 6 lines · Eduardo Valentin

Introduce HAS_BANDGAP config entry. This config is a boolean value so that arch code can flag is they feature a bandgap device.

This config entry follows the same idea behind
ARCH_HAS_CPUFREQ.

It would be nice if you explain what BANDGAP means here, since you introduce this option in this patch.

#4 lore raw

Re: [PATCHv2 1/3] arm: introduce config HAS_BANDGAP

Fabio,

Quoted 6 lines · Fabio Estevam
Quoted 4 lines · Eduardo Valentin

Introduce HAS_BANDGAP config entry. This config is a boolean value so that arch code can flag is they feature a bandgap device.

Quoted 7 lines
Quoted 2 lines

This config entry follows the same idea behind
ARCH_HAS_CPUFREQ.

It would be nice if you explain what BANDGAP means here, since you introduce this option in this patch.

Yeah, I didnt do it because bandgap is a common term used in digital circuits [1,2]. Also, as in this patch we do not add term different from the common used bandgap term, I believe it is self explanatory.

I any case, I am resending with minor explanation.

[1] - http://en.wikipedia.org/wiki/Bandgap_voltage_reference
[2] - http://en.wikipedia.org/wiki/Silicon_bandgap_temperature_sensor

Signature · 11 lines
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130604/28b8ba3c/attachment.sig>
#5 lore raw

PATCH v3 1/3 arm: introduce config HAS_BANDGAP

Bandgap is a device used to measure temperature on electronic equipments. It is widely used in digital integrated circuits. It is based on the dependency between silicon voltage and temperature.

This patch introduce HAS_BANDGAP config entry.
This config is a boolean value so that arch
code can flag if they feature a bandgap device.

This config entry follows the same idea behind
ARCH_HAS_CPUFREQ.

Cc Russell King <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-omap at vger.kernel.org
Cc linux-kernel at vger.kernel.org
Cc Fabio Stevam <[email protected]>
---
 arch/arm/Kconfig            | 3 +++
 arch/arm/mach-omap2/Kconfig | 1 +
 2 files changed, 4 insertions(+)
arch/arm/Kconfig +3 -0
index d423d58..bcbdec9 100644
@@ -174,6 +174,9 @@ config ARCH_HAS_CPUFREQ
 	  and that the relevant menu configurations are displayed for
 	  it.
 
+config ARCH_HAS_BANDGAP
+	bool
+
 config GENERIC_HWEIGHT
 	bool
 	default y
arch/arm/mach-omap2/Kconfig +1 -0
index f49cd51..8620ab5 100644
@@ -4,6 +4,7 @@ config ARCH_OMAP
 config ARCH_OMAP2PLUS
 	bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
 	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_BANDGAP
 	select ARCH_HAS_HOLES_MEMORYMODEL
 	select ARCH_OMAP
 	select ARCH_REQUIRE_GPIOLIB
Signature · 1 line
1.8.2.1.342.gfa7285d
#6 lore raw

PATCH v2 2/3 arm: dts: add bandgap entry for OMAP443x devices

In reply to Eduardo Valentin

This patch add the bandgap entry for OMAP4430 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap443x.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/omap443x.dtsi +4 -0
index cccf39a..8d6c968 100644
@@ -24,4 +24,8 @@
 			clock-latency = <300000>; /* From legacy driver */
 		};
 	};
+	bandgap {
+		reg = <0x4a002260 0x4 0x4a00232C 0x4>;
+		compatible = "ti,omap4430-bandgap";
+	};
 };
Signature · 1 line
1.8.2.1.342.gfa7285d
#7 lore raw

PATCH v2 3/3 arm: dts: add bandgap entry for OMAP4460 devices

In reply to Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +9 -0
index 2cf227c..e5bfbfe 100644
@@ -29,4 +29,13 @@
 			     <0 55 0x4>;
 		ti,hwmods = "debugss";
 	};
+
+	bandgap {
+		reg = <0x4a002260 0x4
+			0x4a00232C 0x4
+			0x4a002378 0x18>;
+		compatible = "ti,omap4460-bandgap";
+		interrupts = <0 126 4>; /* talert */
+		ti,tshut-gpio = <86>;
+	};
 };
Signature · 1 line
1.8.2.1.342.gfa7285d
#8 lore raw

Re: [PATCHv2 3/3] arm: dts: add bandgap entry for OMAP4460 devices

Hi Eduardo,

Quoted 20 lines · Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +0 -0
index 2cf227c..e5bfbfe 100644
@@ -29,4 +29,13 @@
 			     <0 55 0x4>;

arch/arm/boot/dts/omap4460.dtsi line 39

Quoted 10 lines
arch/arm/boot/dts/omap4460.dtsi +8 -0
 		ti,hwmods = "debugss";
 	};
+
+	bandgap {
+		reg = <0x4a002260 0x4
+			0x4a00232C 0x4
+			0x4a002378 0x18>;
+		compatible = "ti,omap4460-bandgap";
+		interrupts = <0 126 4>; /* talert */
+		ti,tshut-gpio = <86>;

Why do you need a custom attribute for GPIO? Cannot you use the standard one?

Where is the gpio controller phandle?

Usually it looks like this:

	gpios = <&gpio1 8 0>;

Regards,
Benoit

#9 lore raw

Re: [PATCHv2 3/3] arm: dts: add bandgap entry for OMAP4460 devices

Quoted 31 lines · Benoit Cousson

Hi Eduardo,

Quoted 28 lines · Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +6 -0
index 2cf227c..e5bfbfe 100644
@@ -29,4 +29,13 @@
 			     <0 55 0x4>;
 		ti,hwmods = "debugss";
 	};
+
+	bandgap {
+		reg = <0x4a002260 0x4
+			0x4a00232C 0x4
+			0x4a002378 0x18>;
+		compatible = "ti,omap4460-bandgap";
Quoted 8 lines

arch/arm/boot/dts/omap4460.dtsi line 39

Quoted 2 lines
arch/arm/boot/dts/omap4460.dtsi +2 -0
+		interrupts = <0 126 4>; /* talert */
+		ti,tshut-gpio = <86>;

Why do you need a custom attribute for GPIO? Cannot you use the standard one?

I believe it was by your suggestion :-), during the first attempts to send this driver. But could not find the thread link :-( sorry.

I guess the reasoning to mark it as a ti specific is because it will be used as IRQ line to treat thermal shutdown (in SW).

Quoted 13 lines

Where is the gpio controller phandle?

Usually it looks like this:

	gpios = <&gpio1 8 0>;

Regards,
Benoit

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130515/8b26aa1e/attachment.sig>

#10 lore raw

Re: [PATCHv2 3/3] arm: dts: add bandgap entry for OMAP4460 devices

Quoted 41 lines · Eduardo Valentin
Quoted 31 lines · Benoit Cousson

Hi Eduardo,

Quoted 28 lines · Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +6 -0
index 2cf227c..e5bfbfe 100644
@@ -29,4 +29,13 @@
 			     <0 55 0x4>;
 		ti,hwmods = "debugss";
 	};
+
+	bandgap {
+		reg = <0x4a002260 0x4
+			0x4a00232C 0x4
+			0x4a002378 0x18>;
+		compatible = "ti,omap4460-bandgap";
Quoted 8 lines

arch/arm/boot/dts/omap4460.dtsi line 39

Quoted 2 lines
arch/arm/boot/dts/omap4460.dtsi +2 -0
+		interrupts = <0 126 4>; /* talert */
+		ti,tshut-gpio = <86>;

Why do you need a custom attribute for GPIO? Cannot you use the standard one?

Quoted 6 lines

I believe it was by your suggestion :-), during the first attempts to send this driver. But could not find the thread link :-( sorry.

I guess the reasoning to mark it as a ti specific is because it will be used as IRQ line to treat thermal shutdown (in SW).

so use interrup-parent

Quoted 23 lines
Quoted 4 lines

Where is the gpio controller phandle?

Quoted 10 lines

Usually it looks like this:

	gpios = <&gpio1 8 0>;

Regards,
Benoit

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

#11 lore raw

Re: [PATCHv2 3/3] arm: dts: add bandgap entry for OMAP4460 devices

Quoted 42 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 41 lines · Eduardo Valentin
Quoted 39 lines · Benoit Cousson

Hi Eduardo,

Quoted 20 lines · Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +0 -0
index 2cf227c..e5bfbfe 100644
@@ -29,4 +29,13 @@
 			     <0 55 0x4>;

arch/arm/boot/dts/omap4460.dtsi line 39

Quoted 10 lines
arch/arm/boot/dts/omap4460.dtsi +8 -0
 		ti,hwmods = "debugss";
 	};
+
+	bandgap {
+		reg = <0x4a002260 0x4
+			0x4a00232C 0x4
+			0x4a002378 0x18>;
+		compatible = "ti,omap4460-bandgap";
+		interrupts = <0 126 4>; /* talert */
+		ti,tshut-gpio = <86>;

Why do you need a custom attribute for GPIO? Cannot you use the standard one?

Quoted 7 lines
Quoted 6 lines

I believe it was by your suggestion :-), during the first attempts to send this driver. But could not find the thread link :-( sorry.

I guess the reasoning to mark it as a ti specific is because it will be used as IRQ line to treat thermal shutdown (in SW).

so use interrup-parent

Jean-Christophe,

That will change the controller and break the configuration for the other IRQ line, coming from GIC.

Quoted 19 lines
Quoted 16 lines
Quoted 14 lines

Where is the gpio controller phandle?

Usually it looks like this:

	gpios = <&gpio1 8 0>;

Regards,
Benoit

Quoted 7 lines
Quoted 4 lines

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130516/88c47180/attachment.sig>

#12 lore raw

Re: [PATCHv2 3/3] arm: dts: add bandgap entry for OMAP4460 devices

Quoted 49 lines · Eduardo Valentin
Quoted 48 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 47 lines · Eduardo Valentin
Quoted 31 lines · Benoit Cousson

Hi Eduardo,

Quoted 28 lines · Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +6 -0
index 2cf227c..e5bfbfe 100644
@@ -29,4 +29,13 @@
 			     <0 55 0x4>;
 		ti,hwmods = "debugss";
 	};
+
+	bandgap {
+		reg = <0x4a002260 0x4
+			0x4a00232C 0x4
+			0x4a002378 0x18>;
+		compatible = "ti,omap4460-bandgap";
Quoted 8 lines

arch/arm/boot/dts/omap4460.dtsi line 39

Quoted 2 lines
arch/arm/boot/dts/omap4460.dtsi +2 -0
+		interrupts = <0 126 4>; /* talert */
+		ti,tshut-gpio = <86>;

Why do you need a custom attribute for GPIO? Cannot you use the standard one?

I believe it was by your suggestion :-), during the first attempts to send this driver. But could not find the thread link :-( sorry.

I guess the reasoning to mark it as a ti specific is because it will be used as IRQ line to treat thermal shutdown (in SW).

Quoted 7 lines
Quoted 1 line

so use interrup-parent

Jean-Christophe,

That will change the controller and break the configuration for the other IRQ line, coming from GIC.

put this on hold I'm preparing a fix for this
I've discuss with Grant already.

This way for me is buggy

Best Regards,
J.

Quoted 29 lines
Quoted 27 lines
Quoted 24 lines
Quoted 5 lines

Where is the gpio controller phandle?

Quoted 10 lines

Usually it looks like this:

	gpios = <&gpio1 8 0>;

Regards,
Benoit

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

#13 lore raw

Re: [PATCHv2 3/3] arm: dts: add bandgap entry for OMAP4460 devices

In reply to Eduardo Valentin

Hi Eduardo,

Quoted 41 lines · Eduardo Valentin
Quoted 31 lines · Benoit Cousson

Hi Eduardo,

Quoted 28 lines · Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +6 -0
index 2cf227c..e5bfbfe 100644
@@ -29,4 +29,13 @@
 			     <0 55 0x4>;
 		ti,hwmods = "debugss";
 	};
+
+	bandgap {
+		reg = <0x4a002260 0x4
+			0x4a00232C 0x4
+			0x4a002378 0x18>;
+		compatible = "ti,omap4460-bandgap";
Quoted 8 lines

arch/arm/boot/dts/omap4460.dtsi line 39

Quoted 2 lines
arch/arm/boot/dts/omap4460.dtsi +2 -0
+		interrupts = <0 126 4>; /* talert */
+		ti,tshut-gpio = <86>;

Why do you need a custom attribute for GPIO? Cannot you use the standard one?

Quoted 2 lines

I believe it was by your suggestion :-), during the first attempts to send this driver. But could not find the thread link :-( sorry.

Ooops :-) I do not remember that... maybe it was long time ago, before we had any decent binding available for GPIO and IRQ...

Quoted 2 lines

I guess the reasoning to mark it as a ti specific is because it will be used as IRQ line to treat thermal shutdown (in SW).

Mmm, ok, so in that case, it is not even a gpio, but an interrupt entry that is needed like that:

	interrupt-parent = <&gpio3>;
	interrupts = <22>; /* gpio line 86 */

Except that we already have an IRQ line connected to GIC for the Talert... I'm not sure we can have 2 different IRQ controllers for one device :-(

We need to check.

Regards,
Benoit

Quoted 14 lines
Quoted 12 lines

Where is the gpio controller phandle?

Usually it looks like this:

	gpios = <&gpio1 8 0>;

Regards,
Benoit

#14 lore raw

Re: [PATCHv2 3/3] arm: dts: add bandgap entry for OMAP4460 devices

Quoted 41 lines · Benoit Cousson

Hi Eduardo,

Quoted 38 lines · Eduardo Valentin
Quoted 37 lines · Benoit Cousson

Hi Eduardo,

Quoted 30 lines · Eduardo Valentin

Include bandgap devices for OMAP4460 devices.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc devicetree-discuss at lists.ozlabs.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/boot/dts/omap4460.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/omap4460.dtsi +8 -0
index 2cf227c..e5bfbfe 100644
@@ -29,4 +29,13 @@
 			     <0 55 0x4>;
 		ti,hwmods = "debugss";
 	};
+
+	bandgap {
+		reg = <0x4a002260 0x4
+			0x4a00232C 0x4
+			0x4a002378 0x18>;
+		compatible = "ti,omap4460-bandgap";
+		interrupts = <0 126 4>; /* talert */
+		ti,tshut-gpio = <86>;
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

Why do you need a custom attribute for GPIO? Cannot you use the standard one?

I believe it was by your suggestion :-), during the first attempts to send this driver. But could not find the thread link :-( sorry.

Ooops :-) I do not remember that... maybe it was long time ago, before we had any decent binding available for GPIO and IRQ...

Probably it was because by that time we didnt have GPIO binding ready, yeah.

Quoted 6 lines
Quoted 2 lines

I guess the reasoning to mark it as a ti specific is because it will be used as IRQ line to treat thermal shutdown (in SW).

Mmm, ok, so in that case, it is not even a gpio, but an interrupt entry that is needed like that:

Quoted 9 lines
	interrupt-parent = <&gpio3>;
	interrupts = <22>; /* gpio line 86 */

Except that we already have an IRQ line connected to GIC for the Talert... I'm not sure we can have 2 different IRQ controllers for one device :-(

We need to check.

Yeah, I also dont think this will work, because we will reparent the interrupt, setting to a different controller. That will break the TALERT signal already defined at GIC (check original patch).

I propose keeping the way I sent. Unless there is a way to set two different controllers to same device.

Quoted 21 lines

Regards,
Benoit

Quoted 14 lines
Quoted 12 lines

Where is the gpio controller phandle?

Usually it looks like this:

	gpios = <&gpio1 8 0>;

Regards,
Benoit

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130516/89b66868/attachment-0001.sig>

#15 lore raw

Re: [PATCHv2 3/3] arm: dts: add bandgap entry for OMAP4460 devices

Salut Monsieur Benoit,

Quoted 3 lines · Eduardo Valentin
Quoted 2 lines · Benoit Cousson

Hi Eduardo,

<cut>

Quoted 11 lines
Quoted 2 lines

We need to check.

Yeah, I also dont think this will work, because we will reparent the interrupt, setting to a different controller. That will break the TALERT signal already defined at GIC (check original patch).

I propose keeping the way I sent. Unless there is a way to set two different controllers to same device.

Any idea on this patch? Shall we keep the way it is?

Quoted 23 lines
Quoted 21 lines

Regards,
Benoit

Quoted 14 lines
Quoted 12 lines

Where is the gpio controller phandle?

Usually it looks like this:

	gpios = <&gpio1 8 0>;

Regards,
Benoit

Signature · 11 lines
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130529/900f960b/attachment.sig>
#16 lore raw

Re: [PATCHv2 3/3] arm: dts: add bandgap entry for OMAP4460 devices

Hi Eduardo,

Quoted 15 lines · Eduardo Valentin

Salut Monsieur Benoit,

Quoted 3 lines · Eduardo Valentin
Quoted 2 lines · Benoit Cousson

Hi Eduardo,

<cut>

Quoted 6 lines
Quoted 1 line

We need to check.

Yeah, I also dont think this will work, because we will reparent the interrupt, setting to a different controller. That will break the TALERT signal already defined at GIC (check original patch).

Quoted 5 lines
Quoted 3 lines

I propose keeping the way I sent. Unless there is a way to set two different controllers to same device.

Any idea on this patch? Shall we keep the way it is?

Well since we cannot use directly interrupt, I think we need to use at least the proper gpio binding.

Thanks,
Benoit

#17 lore raw

Re: [PATCHv2 3/3] arm: dts: add bandgap entry for OMAP4460 devices

Quoted 18 lines · Benoit

Hi Eduardo,

Quoted 15 lines · Eduardo Valentin

Salut Monsieur Benoit,

Quoted 3 lines · Eduardo Valentin
Quoted 2 lines · Benoit Cousson

Hi Eduardo,

<cut>

Quoted 6 lines
Quoted 1 line

We need to check.

Yeah, I also dont think this will work, because we will reparent the interrupt, setting to a different controller. That will break the TALERT signal already defined at GIC (check original patch).

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

I propose keeping the way I sent. Unless there is a way to set two different controllers to same device.

Any idea on this patch? Shall we keep the way it is?

Well since we cannot use directly interrupt, I think we need to use at least the proper gpio binding.

hmm... OK. sounds reasonable. I will change the driver and resend this one in one single series.

Quoted 5 lines

Thanks,
Benoit

Signature · 11 lines
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 295 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130529/a5ab6edf/attachment.sig>