Tegra ARM32 device-tree improvements for 5.15
Subsystems (2)
v2 cover Tegra ARM32 device-tree improvements for 5.15
This series:
- adds SoC thermal sensor node
- adds interrupt for LM90 to Ouya, AC100, Nexus 7 and A500 devices
- fixes interrupt of LM90 sensor for all boards
- removes bogus VBUS regulators from A500 device-tree
- improves thermal zones of Nexus 7 and A500 devices based on previous discussion with Daniel Lezcano [1]
[1] https://lore.kernel.org/lkml/[email protected]/
Changelog:
v2: - Added these new minor patches:
ARM: tegra: acer-a500: Add power supplies to accelerometer
ARM: tegra: acer-a500: Use verbose variant of atmel,wakeup-method
Dmitry Osipenko (15):
ARM: tegra: Add SoC thermal sensor to Tegra30 device-trees
ARM: tegra: ouya: Add interrupt to temperature sensor node
ARM: tegra: paz00: Add interrupt to temperature sensor node
ARM: tegra: nexus7: Add interrupt to temperature sensor node
ARM: tegra: acer-a500: Add interrupt to temperature sensor node
ARM: tegra: nyan: Correct interrupt trigger type of temperature sensor
ARM: tegra: apalis: Correct interrupt trigger type of temperature
sensor
ARM: tegra: cardhu: Correct interrupt trigger type of temperature
sensor
ARM: tegra: dalmore: Correct interrupt trigger type of temperature
sensor
ARM: tegra: jetson-tk1: Correct interrupt trigger type of temperature
sensor
ARM: tegra: acer-a500: Remove bogus USB VBUS regulators
ARM: tegra: acer-a500: Add power supplies to accelerometer
ARM: tegra: acer-a500: Use verbose variant of atmel,wakeup-method
value
ARM: tegra: acer-a500: Improve thermal zones
ARM: tegra: nexus7: Improve thermal zones
arch/arm/boot/dts/tegra114-dalmore.dts | 2 +- arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi | 2 +- arch/arm/boot/dts/tegra124-apalis.dtsi | 2 +- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 2 +- arch/arm/boot/dts/tegra124-nyan.dtsi | 2 +- .../boot/dts/tegra20-acer-a500-picasso.dts | 90 ++++++++++++------- arch/arm/boot/dts/tegra20-paz00.dts | 4 + .../tegra30-asus-nexus7-grouper-common.dtsi | 60 ++++++++++++- arch/arm/boot/dts/tegra30-cardhu.dtsi | 2 +- arch/arm/boot/dts/tegra30-ouya.dts | 13 ++- arch/arm/boot/dts/tegra30.dtsi | 87 +++++++++++++++++- 11 files changed, 211 insertions(+), 55 deletions(-)
Signature · 1 line
2.32.0
PATCH v2 1/15 ARM: tegra: Add SoC thermal sensor to Tegra30 device-trees
Add the on-chip SoC thermal sensor to Tegra30 device-trees. Now CPU temperature reporting and thermal throttling is available on all Tegra30 devices universally.
--- arch/arm/boot/dts/tegra30.dtsi | 87 ++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 4 deletions(-)
arch/arm/boot/dts/tegra30.dtsi +83 -4
@@ -5,6 +5,7 @@ #include <dt-bindings/pinctrl/pinctrl-tegra.h> #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/soc/tegra-pmc.h> +#include <dt-bindings/thermal/thermal.h> #include "tegra30-peripherals-opp.dtsi"
@@ -800,6 +801,20 @@ fuse@7000f800 { reset-names = "fuse"; }; + tsensor: tsensor@70014000 { + compatible = "nvidia,tegra30-tsensor"; + reg = <0x70014000 0x500>; + interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&tegra_car TEGRA30_CLK_TSENSOR>; + resets = <&tegra_car TEGRA30_CLK_TSENSOR>; + + assigned-clocks = <&tegra_car TEGRA30_CLK_TSENSOR>; + assigned-clock-parents = <&tegra_car TEGRA30_CLK_CLK_M>; + assigned-clock-rates = <500000>; + + #thermal-sensor-cells = <1>; + }; + hda@70030000 { compatible = "nvidia,tegra30-hda"; reg = <0x70030000 0x10000>;
@@ -1062,32 +1077,36 @@ cpus { #address-cells = <1>; #size-cells = <0>; - cpu@0 { + cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0>; clocks = <&tegra_car TEGRA30_CLK_CCLK_G>; + #cooling-cells = <2>; }; - cpu@1 { + cpu1: cpu@1 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <1>; clocks = <&tegra_car TEGRA30_CLK_CCLK_G>; + #cooling-cells = <2>; }; - cpu@2 { + cpu2: cpu@2 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <2>; clocks = <&tegra_car TEGRA30_CLK_CCLK_G>; + #cooling-cells = <2>; }; - cpu@3 { + cpu3: cpu@3 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <3>; clocks = <&tegra_car TEGRA30_CLK_CCLK_G>; + #cooling-cells = <2>; }; };
@@ -1102,4 +1121,64 @@ pmu { <&{/cpus/cpu@2}>, <&{/cpus/cpu@3}>; }; + + thermal-zones { + tsensor0-thermal { + polling-delay-passive = <1000>; /* milliseconds */ + polling-delay = <5000>; /* milliseconds */ + + thermal-sensors = <&tsensor 0>; + + trips { + level1_trip: dvfs-alert { + /* throttle at 80C until temperature drops to 79.8C */ + temperature = <80000>; + hysteresis = <200>; + type = "passive"; + }; + + level2_trip: cpu-div2-throttle { + /* hardware CPU x2 freq throttle at 85C */ + temperature = <85000>; + hysteresis = <200>; + type = "hot"; + }; + + level3_trip: soc-critical { + /* hardware shut down at 90C */ + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&level1_trip>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&actmon THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + tsensor1-thermal { + status = "disabled"; + + polling-delay-passive = <1000>; /* milliseconds */ + polling-delay = <0>; /* milliseconds */ + + thermal-sensors = <&tsensor 1>; + + trips { + dvfs-alert { + temperature = <80000>; + hysteresis = <200>; + type = "passive"; + }; + }; + }; + }; };
Signature · 1 line
2.32.0
PATCH v2 2/15 ARM: tegra: ouya: Add interrupt to temperature sensor node
In reply to Dmitry OsipenkoThe TEMP_ALERT pin of LM90 temperature sensor is connected to Tegra SoC. Add interrupt property to the temperature sensor and enable it in pinmux, for completeness.
--- arch/arm/boot/dts/tegra30-ouya.dts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
arch/arm/boot/dts/tegra30-ouya.dts +6 -7
@@ -124,12 +124,11 @@ cpu_temp: nct1008@4c { compatible = "onnn,nct1008"; reg = <0x4c>; vcc-supply = <&sys_3v3_reg>; + + interrupt-parent = <&gpio>; + interrupts = <TEGRA_GPIO(CC, 2) IRQ_TYPE_EDGE_FALLING>; + #thermal-sensor-cells = <1>; -/* - * The interrupt is bugged, once triggered it never clears. - * interrupt-parent = <&gpio>; - * interrupts = <TEGRA_GPIO(CC, 2) IRQ_TYPE_LEVEL_LOW>; - */ }; pmic: pmic@2d {
@@ -4376,8 +4375,8 @@ pcc2 { nvidia,pins = "pcc2"; nvidia,function = "i2s4"; nvidia,pull = <TEGRA_PIN_PULL_NONE>; - nvidia,tristate = <TEGRA_PIN_ENABLE>; - nvidia,enable-input = <TEGRA_PIN_DISABLE>; + nvidia,tristate = <TEGRA_PIN_DISABLE>; + nvidia,enable-input = <TEGRA_PIN_ENABLE>; }; sdmmc4_rst_n_pcc3 { nvidia,pins = "sdmmc4_rst_n_pcc3";
Signature · 1 line
2.32.0
PATCH v2 3/15 ARM: tegra: paz00: Add interrupt to temperature sensor node
In reply to Dmitry OsipenkoThe TEMP_ALERT pin of LM90 temperature sensor is connected to Tegra SoC. Add interrupt property to the temperature sensor for completeness.
--- arch/arm/boot/dts/tegra20-paz00.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/tegra20-paz00.dts +4 -0
@@ -503,6 +503,10 @@ ldo_rtc { adt7461: temperature-sensor@4c { compatible = "adi,adt7461"; reg = <0x4c>; + + interrupt-parent = <&gpio>; + interrupts = <TEGRA_GPIO(N, 6) IRQ_TYPE_EDGE_FALLING>; + #thermal-sensor-cells = <1>; }; };
Signature · 1 line
2.32.0
PATCH v2 4/15 ARM: tegra: nexus7: Add interrupt to temperature sensor node
In reply to Dmitry OsipenkoThe TEMP_ALERT pin of LM90 temperature sensor is connected to Tegra SoC. Add interrupt property to the temperature sensor for completeness.
--- arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi +4 -0
@@ -920,6 +920,10 @@ nct72: temperature-sensor@4c { compatible = "onnn,nct1008"; reg = <0x4c>; vcc-supply = <&vdd_3v3_sys>; + + interrupt-parent = <&gpio>; + interrupts = <TEGRA_GPIO(S, 3) IRQ_TYPE_EDGE_FALLING>; + #thermal-sensor-cells = <1>; };
Signature · 1 line
2.32.0
PATCH v2 5/15 ARM: tegra: acer-a500: Add interrupt to temperature sensor node
In reply to Dmitry OsipenkoThe TEMP_ALERT pin of LM90 temperature sensor is connected to Tegra SoC. Add interrupt property to the temperature sensor for completeness.
--- arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +4 -0
@@ -693,6 +693,10 @@ nct1008: temperature-sensor@4c { compatible = "onnn,nct1008"; reg = <0x4c>; vcc-supply = <&vdd_3v3_sys>; + + interrupt-parent = <&gpio>; + interrupts = <TEGRA_GPIO(N, 6) IRQ_TYPE_EDGE_FALLING>; + #thermal-sensor-cells = <1>; }; };
Signature · 1 line
2.32.0
PATCH v2 6/15 ARM: tegra: nyan: Correct interrupt trigger type of temperature sensor
In reply to Dmitry OsipenkoThe LM90 temperature sensor should use edge-triggered interrupt because LM90 hardware doesn't deassert interrupt line until temperature is back to normal state, which results in interrupt storm. Correct the interrupt trigger type.
--- arch/arm/boot/dts/tegra124-nyan.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/tegra124-nyan.dtsi +1 -1
@@ -91,7 +91,7 @@ temperature-sensor@4c { compatible = "ti,tmp451"; reg = <0x4c>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>; + interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_EDGE_FALLING>; #thermal-sensor-cells = <1>; };
Signature · 1 line
2.32.0
PATCH v2 7/15 ARM: tegra: apalis: Correct interrupt trigger type of temperature sensor
In reply to Dmitry OsipenkoThe LM90 temperature sensor should use edge-triggered interrupt because LM90 hardware doesn't deassert interrupt line until temperature is back to normal state, which results in interrupt storm. Correct the interrupt trigger type.
--- arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi | 2 +- arch/arm/boot/dts/tegra124-apalis.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi +1 -1
@@ -1751,7 +1751,7 @@ temp-sensor@4c { compatible = "ti,tmp451"; reg = <0x4c>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>; + interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_EDGE_FALLING>; #thermal-sensor-cells = <1>; vcc-supply = <®_module_3v3>; };
arch/arm/boot/dts/tegra124-apalis.dtsi +1 -1
@@ -1744,7 +1744,7 @@ temp-sensor@4c { compatible = "ti,tmp451"; reg = <0x4c>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>; + interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_EDGE_FALLING>; #thermal-sensor-cells = <1>; vcc-supply = <®_module_3v3>; };
Signature · 1 line
2.32.0
PATCH v2 8/15 ARM: tegra: cardhu: Correct interrupt trigger type of temperature sensor
In reply to Dmitry OsipenkoThe LM90 temperature sensor should use edge-triggered interrupt because LM90 hardware doesn't deassert interrupt line until temperature is back to normal state, which results in interrupt storm. Correct the interrupt trigger type.
--- arch/arm/boot/dts/tegra30-cardhu.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/tegra30-cardhu.dtsi +1 -1
@@ -348,7 +348,7 @@ nct1008: temperature-sensor@4c { reg = <0x4c>; vcc-supply = <&sys_3v3_reg>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(CC, 2) IRQ_TYPE_LEVEL_LOW>; + interrupts = <TEGRA_GPIO(CC, 2) IRQ_TYPE_EDGE_FALLING>; #thermal-sensor-cells = <1>; };
Signature · 1 line
2.32.0
PATCH v2 9/15 ARM: tegra: dalmore: Correct interrupt trigger type of temperature sensor
In reply to Dmitry OsipenkoThe LM90 temperature sensor should use edge-triggered interrupt because LM90 hardware doesn't deassert interrupt line until temperature is back to normal state, which results in interrupt storm. Correct the interrupt trigger type.
--- arch/arm/boot/dts/tegra114-dalmore.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/tegra114-dalmore.dts +1 -1
@@ -788,7 +788,7 @@ temperature-sensor@4c { reg = <0x4c>; vcc-supply = <&palmas_ldo6_reg>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>; + interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_EDGE_FALLING>; }; };
Signature · 1 line
2.32.0
PATCH v2 10/15 ARM: tegra: jetson-tk1: Correct interrupt trigger type of temperature sensor
In reply to Dmitry OsipenkoThe LM90 temperature sensor should use edge-triggered interrupt because LM90 hardware doesn't deassert interrupt line until temperature is back to normal state, which results in interrupt storm. Correct the interrupt trigger type.
--- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/tegra124-jetson-tk1.dts +1 -1
@@ -1427,7 +1427,7 @@ temperature-sensor@4c { compatible = "ti,tmp451"; reg = <0x4c>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>; + interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_EDGE_FALLING>; }; eeprom@56 {
Signature · 1 line
2.32.0
PATCH v2 11/15 ARM: tegra: acer-a500: Remove bogus USB VBUS regulators
In reply to Dmitry OsipenkoThe configuration of USB VBUS regulators was borrowed from downstream kernel, which is incorrect because the corresponding GPIOs are connected to PROX_EN (A501 3G model) and LED_EN pins in accordance to the board schematics. USB works fine with both GPIOs being disabled, so remove the bogus USB VBUS regulators. The USB VBUS of USB3 is supplied from the fixed 5v system regulator and device-mode USB1 doesn't have VBUS switches.
--- .../boot/dts/tegra20-acer-a500-picasso.dts | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-)
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +1 -24
@@ -723,7 +723,6 @@ usb-phy@c5000000 { nvidia,xcvr-setup-use-fuses; nvidia,xcvr-lsfslew = <2>; nvidia,xcvr-lsrslew = <2>; - vbus-supply = <&vdd_vbus1>; }; usb@c5008000 {
@@ -735,7 +734,7 @@ usb-phy@c5008000 { nvidia,xcvr-setup-use-fuses; nvidia,xcvr-lsfslew = <2>; nvidia,xcvr-lsrslew = <2>; - vbus-supply = <&vdd_vbus3>; + vbus-supply = <&vdd_5v0_sys>; }; brcm_wifi_pwrseq: wifi-pwrseq {
@@ -995,28 +994,6 @@ vdd_pnl: regulator@3 { vin-supply = <&vdd_5v0_sys>; }; - vdd_vbus1: regulator@4 { - compatible = "regulator-fixed"; - regulator-name = "vdd_usb1_vbus"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - regulator-always-on; - gpio = <&gpio TEGRA_GPIO(D, 0) GPIO_ACTIVE_HIGH>; - enable-active-high; - vin-supply = <&vdd_5v0_sys>; - }; - - vdd_vbus3: regulator@5 { - compatible = "regulator-fixed"; - regulator-name = "vdd_usb3_vbus"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - regulator-always-on; - gpio = <&gpio TEGRA_GPIO(D, 3) GPIO_ACTIVE_HIGH>; - enable-active-high; - vin-supply = <&vdd_5v0_sys>; - }; - sound { compatible = "nvidia,tegra-audio-wm8903-picasso", "nvidia,tegra-audio-wm8903";
Signature · 1 line
2.32.0
PATCH v2 12/15 ARM: tegra: acer-a500: Add power supplies to accelerometer
In reply to Dmitry OsipenkoAdd power supplies to accelerometer node, for completeness.
--- arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +3 -0
@@ -482,6 +482,9 @@ accelerometer@f { interrupt-parent = <&gpio>; interrupts = <TEGRA_GPIO(S, 7) IRQ_TYPE_EDGE_RISING>; + vdd-supply = <&vdd_1v8_sys>; + vddio-supply = <&vdd_1v8_sys>; + mount-matrix = "0", "1", "0", "1", "0", "0", "0", "0", "-1";
Signature · 1 line
2.32.0
PATCH v2 13/15 ARM: tegra: acer-a500: Use verbose variant of atmel,wakeup-method value
In reply to Dmitry OsipenkoThe verbose variant of the atmel,wakeup-method value was lost when patch that added the property was merged because it conflicted with other patch, re-add it for consistency.
--- arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +2 -1
@@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /dts-v1/; +#include <dt-bindings/input/atmel-maxtouch.h> #include <dt-bindings/input/gpio-keys.h> #include <dt-bindings/input/input.h> #include <dt-bindings/thermal/thermal.h>
@@ -454,7 +455,7 @@ touchscreen@4c { vdda-supply = <&vdd_3v3_sys>; vdd-supply = <&vdd_3v3_sys>; - atmel,wakeup-method = <1>; + atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>; }; gyroscope@68 {
Signature · 1 line
2.32.0
PATCH v2 14/15 ARM: tegra: acer-a500: Improve thermal zones
In reply to Dmitry OsipenkoUse skin temperature for maintaining temperature that is suitable specifically for A500. Add CPU thermal zone that protects silicon. All these changes don't make a significant difference, but it is a more correct definition of thermal zones.
--- .../boot/dts/tegra20-acer-a500-picasso.dts | 55 ++++++++++++++++--- 1 file changed, 46 insertions(+), 9 deletions(-)
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +46 -9
@@ -1029,11 +1029,48 @@ sound { }; thermal-zones { + /* + * NCT1008 has two sensors: + * + * 0: internal that monitors ambient/skin temperature + * 1: external that is connected to the CPU's diode + * + * Ideally we should use userspace thermal governor, + * but it's a much more complex solution. The "skin" + * zone is a simpler solution which prevents A500 from + * getting too hot from a user's tactile perspective. + * The CPU zone is intended to protect silicon from damage. + */ + skin-thermal { polling-delay-passive = <1000>; /* milliseconds */ - polling-delay = <0>; /* milliseconds */ + polling-delay = <5000>; /* milliseconds */ thermal-sensors = <&nct1008 0>; + + trips { + trip0: skin-alert { + /* start throttling at 60C */ + temperature = <60000>; + hysteresis = <200>; + type = "passive"; + }; + + trip1: skin-crit { + /* shut down at 70C */ + temperature = <70000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&trip0>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; cpu-thermal {
@@ -1043,24 +1080,24 @@ cpu-thermal { thermal-sensors = <&nct1008 1>; trips { - trip0: cpu-alert0 { - /* start throttling at 60C */ - temperature = <60000>; + trip2: cpu-alert { + /* throttle at 85C until temperature drops to 84.8C */ + temperature = <85000>; hysteresis = <200>; type = "passive"; }; - trip1: cpu-crit { - /* shut down at 70C */ - temperature = <70000>; + trip3: cpu-crit { + /* shut down at 90C */ + temperature = <90000>; hysteresis = <2000>; type = "critical"; }; }; cooling-maps { - map0 { - trip = <&trip0>; + map1 { + trip = <&trip2>; cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; };
Signature · 1 line
2.32.0
PATCH v2 15/15 ARM: tegra: nexus7: Improve thermal zones
In reply to Dmitry OsipenkoUse skin temperature for maintaining temperature that is suitable specifically for Nexus 7. Add CPU thermal zone that protects silicon. All these changes don't make a significant difference, but it is a more correct definition of thermal zones.
--- .../tegra30-asus-nexus7-grouper-common.dtsi | 56 +++++++++++++++++-- 1 file changed, 52 insertions(+), 4 deletions(-)
arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi +52 -4
@@ -1255,21 +1255,34 @@ sound { }; thermal-zones { - cpu-thermal { + /* + * NCT72 has two sensors: + * + * 0: internal that monitors ambient/skin temperature + * 1: external that is connected to the CPU's diode + * + * Ideally we should use userspace thermal governor, + * but it's a much more complex solution. The "skin" + * zone is a simpler solution which prevents Nexus 7 + * from getting too hot from a user's tactile perspective. + * The CPU zone is intended to protect silicon from damage. + */ + + skin-thermal { polling-delay-passive = <1000>; /* milliseconds */ polling-delay = <5000>; /* milliseconds */ - thermal-sensors = <&nct72 1>; + thermal-sensors = <&nct72 0>; trips { - trip0: cpu-alert0 { + trip0: skin-alert { /* throttle at 57C until temperature drops to 56.8C */ temperature = <57000>; hysteresis = <200>; type = "passive"; }; - trip1: cpu-crit { + trip1: skin-crit { /* shut down at 65C */ temperature = <65000>; hysteresis = <2000>;
@@ -1289,5 +1302,40 @@ map0 { }; }; }; + + cpu-thermal { + polling-delay-passive = <1000>; /* milliseconds */ + polling-delay = <5000>; /* milliseconds */ + + thermal-sensors = <&nct72 1>; + + trips { + trip2: cpu-alert { + /* throttle at 85C until temperature drops to 84.8C */ + temperature = <85000>; + hysteresis = <200>; + type = "passive"; + }; + + trip3: cpu-crit { + /* shut down at 90C */ + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map1 { + trip = <&trip2>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&actmon THERMAL_NO_LIMIT + THERMAL_NO_LIMIT>; + }; + }; + }; }; };
Signature · 1 line
2.32.0
Thierry Reding
AppliedFrom: Thierry Reding <[email protected]>
Quoted 10 lines · Dmitry Osipenko
This series:
- adds SoC thermal sensor node
- adds interrupt for LM90 to Ouya, AC100, Nexus 7 and A500 devices
- fixes interrupt of LM90 sensor for all boards
- removes bogus VBUS regulators from A500 device-tree
- improves thermal zones of Nexus 7 and A500 devices based on previous discussion with Daniel Lezcano [1][...]
Applied, thanks!
[01/15] ARM: tegra: Add SoC thermal sensor to Tegra30 device-trees
commit: ffd8969c91000c5e914e3a6e9dd108b80a935910
[02/15] ARM: tegra: ouya: Add interrupt to temperature sensor node
commit: 00786f61df89c45c83d04e07f4021acc8fb87287
[03/15] ARM: tegra: paz00: Add interrupt to temperature sensor node
commit: a371e9698e8912ddae6cff65cb5bd068e45efe80
[04/15] ARM: tegra: nexus7: Add interrupt to temperature sensor node
commit: 4eb121af6184dcbae39438a4e6a5cfbac820cdd4
[05/15] ARM: tegra: acer-a500: Add interrupt to temperature sensor node
commit: c626fd7eeb11934af7b59b330885ff8f96e2c2a0
[06/15] ARM: tegra: nyan: Correct interrupt trigger type of temperature sensor
commit: 303e2f343403472f3a8421bdd9f62525117507d7
[07/15] ARM: tegra: apalis: Correct interrupt trigger type of temperature sensor
commit: 61f8c4f6eefb1f5053ba208c872bceac057747ff
[08/15] ARM: tegra: cardhu: Correct interrupt trigger type of temperature sensor
commit: ad86e473e1f3a7faa034535a91c9e594dd038830
[09/15] ARM: tegra: dalmore: Correct interrupt trigger type of temperature sensor
commit: 0a6e9f9cc27be904f32ed40742f3b74a8fc2690d
[10/15] ARM: tegra: jetson-tk1: Correct interrupt trigger type of temperature sensor
commit: 3970dc6444c5902463b50b10f04d3b0f576077bf
[11/15] ARM: tegra: acer-a500: Remove bogus USB VBUS regulators
commit: 0c3136565b64e6e90ab5f9bd6b6c12d5b506c335
[12/15] ARM: tegra: acer-a500: Add power supplies to accelerometer
commit: ebfbd63602b036f523514c48b5d1d36bef481d51
[13/15] ARM: tegra: acer-a500: Use verbose variant of atmel,wakeup-method value
commit: 0cae833ff5187f9f629ef8b97543eb24d2c64faa
[14/15] ARM: tegra: acer-a500: Improve thermal zones
commit: d97a74513cec1e378de9ffb6e5f512703db447d4
[15/15] ARM: tegra: nexus7: Improve thermal zones
commit: b3b3e68aaab6a7f233fbf05ec30ace9ddcb36e51Best regards,
Signature · 1 line
Thierry Reding <[email protected]>