diff mbox series

[1/3] ARM: dts: Configure missing thermal interrupt for 4430

Message ID 20201230084232.19221-1-tony@atomide.com
State New
Headers show
Series [1/3] ARM: dts: Configure missing thermal interrupt for 4430 | expand

Commit Message

Tony Lindgren Dec. 30, 2020, 8:42 a.m. UTC
We have gpio_86 wired internally to the bandgap thermal shutdown
interrupt on 4430 like we have it on 4460 according to the TRM.
This can be found easily by searching for TSHUT.

For some reason the thermal shutdown interrupt was never added
for 4430, let's add it. I believe this is needed for the thermal
shutdown interrupt handler ti_bandgap_tshut_irq_handler() to call
orderly_poweroff().

Fixes: aa9bb4bb8878 ("arm: dts: add omap4430 thermal data")
Cc: Carl Philipp Klemm <philipp@uvos.xyz>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/omap443x.dtsi | 2 ++
 1 file changed, 2 insertions(+)

Comments

Pavel Machek Dec. 31, 2020, 9:43 a.m. UTC | #1
Hi!

> From: Carl Philipp Klemm <philipp@uvos.xyz>
> 
> The omap4430 HS HIGH performance devces support 1.2GHz opp, lower speed
> variants do not. However for mapphone devices Motorola seems to have
> decided that this does not really matter for the SoC variants they have
> tested to use, and decided to clock all devices, including the ones with
> STANDARD performance chips at 1.2GHz upon release of the 3.0.8 vendor
> kernel shiped with Android 4.0. Therefore it seems safe to do the same,
> but let's only do it for Motorola devices as the others have not been
> tested.
> 
> Note that we prevent overheating with the passive cooling device
> cpu_alert0 configured in the dts file that starts lowering the speed as
> needed.
> 
> This also removes the "failed to find current OPP for freq 1200000000"
> warning.

> +&cpu0 {
> +        /*
> +	 * Note that the 1.2GiHz mode is enabled for all SoC variants for
> +	 * the Motorola Android Linux v3.0.8 based kernel.
> +	 */

I'm pretty sure it is GHz, not GiHz.

> +        operating-points = <
> +	        /* kHz    uV */
> +	        300000  1025000
> +	        600000  1200000
> +	        800000  1313000
> +	        1008000 1375000
> +		1200000 1375000
> +        >;

Is it intended to be 1.008GHz, or is it a typo?

Best regards,
								Pavel
Tony Lindgren Jan. 1, 2021, 6:06 a.m. UTC | #2
* Pavel Machek <pavel@ucw.cz> [201231 09:43]:
> I'm pretty sure it is GHz, not GiHz.

Oops right, will fix.

> > +        operating-points = <
> > +	        /* kHz    uV */
> > +	        300000  1025000
> > +	        600000  1200000
> > +	        800000  1313000
> > +	        1008000 1375000
> > +		1200000 1375000
> > +        >;
> 
> Is it intended to be 1.008GHz, or is it a typo?

The "1008000 1375000" is already there for 4430 in general, we now
add also add "1200000 1375000" but only for moto devices that have
it tested. The voltage used is the same in both cases.

The rates come from what's available from dpll_mpu_ck without
reprogramming the dpll.

Regards,

Tony
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/omap443x.dtsi b/arch/arm/boot/dts/omap443x.dtsi
--- a/arch/arm/boot/dts/omap443x.dtsi
+++ b/arch/arm/boot/dts/omap443x.dtsi
@@ -33,10 +33,12 @@  thermal-zones {
 	};
 
 	ocp {
+		/* 4430 has only gpio_86 tshut and no talert interrupt */
 		bandgap: bandgap@4a002260 {
 			reg = <0x4a002260 0x4
 			       0x4a00232C 0x4>;
 			compatible = "ti,omap4430-bandgap";
+			gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
 
 			#thermal-sensor-cells = <0>;
 		};