Skip to contentSkip to conversation

Nexus 7 and A500 device-tree improvements

PATCH Superseded Dmitry Osipenko 1 participant 7 messages Oct 25, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Nexus 7 and A500 device-tree improvements

This small series improves device-trees of Nexus 7 and A500 devices by correcting old and adding new DT properties.

Dmitry Osipenko (6):
ARM: tegra: acer-a500: Correct thermal zone names
ARM: tegra: acer-a500: Add power-supply to lvds-encoder node
ARM: tegra: nexus7: Correct thermal zone names
ARM: tegra: nexus7: Improve CPU passive-cooling threshold
ARM: tegra: nexus7: Add power-supply to lvds-encoder node
ARM: tegra: nexus7: Rename gpio-hog nodes

 arch/arm/boot/dts/tegra20-acer-a500-picasso.dts   |  5 +++--
 .../dts/tegra30-asus-nexus7-grouper-common.dtsi   | 15 ++++++++-------
 .../tegra30-asus-nexus7-grouper-maxim-pmic.dtsi   |  2 +-
 .../arm/boot/dts/tegra30-asus-nexus7-tilapia.dtsi |  2 +-
 4 files changed, 13 insertions(+), 11 deletions(-)
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/6 ARM: tegra: acer-a500: Correct thermal zone names

Rename thermal zones in order fix dt_binding_check warning telling that names do not match the expected pattern.

---
 arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +2 -2
index a0b829738e8f..372cc1b17eaf 100644
@@ -1020,14 +1020,14 @@ sound {
 	};
 
 	thermal-zones {
-		nct1008-local {
+		skin-thermal {
 			polling-delay-passive = <1000>; /* milliseconds */
 			polling-delay = <0>; /* milliseconds */
 
 			thermal-sensors = <&nct1008 0>;
 		};
 
-		nct1008-remote {
+		cpu-thermal {
 			polling-delay-passive = <1000>; /* milliseconds */
 			polling-delay = <5000>; /* milliseconds */
 
Signature · 1 line
2.27.0
#2 lore raw

PATCH 2/6 ARM: tegra: acer-a500: Add power-supply to lvds-encoder node

In reply to Dmitry Osipenko

The lvds-encoder binding now supports power-supply property, let's specify it in the device-tree for completeness.

---
 arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +1 -0
index 372cc1b17eaf..dd6fb134ee39 100644
@@ -907,6 +907,7 @@ lvds-encoder {
 		compatible = "ti,sn75lvds83", "lvds-encoder";
 
 		powerdown-gpios = <&gpio TEGRA_GPIO(B, 2) GPIO_ACTIVE_LOW>;
+		power-supply = <&vdd_3v3_sys>;
 
 		ports {
 			#address-cells = <1>;
Signature · 1 line
2.27.0
#3 lore raw

PATCH 3/6 ARM: tegra: nexus7: Correct thermal zone names

In reply to Dmitry Osipenko

Rename thermal zones in order fix dt_binding_check warning telling that names do not match the expected pattern.

---
 arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi +2 -2
index 88ca03f57b3b..fa6bbec7cbc4 100644
@@ -1240,14 +1240,14 @@ sound {
 	};
 
 	thermal-zones {
-		nct72-local {
+		skin-thermal {
 			polling-delay-passive = <1000>; /* milliseconds */
 			polling-delay = <0>; /* milliseconds */
 
 			thermal-sensors = <&nct72 0>;
 		};
 
-		nct72-remote {
+		cpu-thermal {
 			polling-delay-passive = <1000>; /* milliseconds */
 			polling-delay = <5000>; /* milliseconds */
 
Signature · 1 line
2.27.0
#4 lore raw

PATCH 4/6 ARM: tegra: nexus7: Improve CPU passive-cooling threshold

In reply to Dmitry Osipenko

The current CPU thermal limit is a bit inappropriate for Nexus 7 once device is getting used on a daily bases. For example, currently it's may be impossible to watch a hardware accelerated 720p video without hitting a severe CPU throttling, which ruins user experience. This patch improves the thermal throttling thresholds.

In my experience setting CPU thermal threshold to 57C provides the most reasonable result, where device is a bit warm under constant load and not getting overly hot, in the same time performance is okay. Let's bump the passive-cooling threshold from 50C to 57C and also lower the thermal hysteresis to 0.2C in order to make throttling more reactive.

---
 arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi +3 -3
index fa6bbec7cbc4..8d49860b135b 100644
@@ -1255,9 +1255,9 @@ cpu-thermal {
 
 			trips {
 				trip0: cpu-alert0 {
-					/* start throttling at 50C */
-					temperature = <50000>;
-					hysteresis = <3000>;
+					/* throttle at 57C until temperature drops to 56.8C */
+					temperature = <57000>;
+					hysteresis = <200>;
 					type = "passive";
 				};
 
Signature · 1 line
2.27.0
#5 lore raw

PATCH 5/6 ARM: tegra: nexus7: Add power-supply to lvds-encoder node

In reply to Dmitry Osipenko

The lvds-encoder binding now supports power-supply property, let's specify it in the device-tree for completeness.

---
 arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi +1 -0
index 8d49860b135b..f8a531350998 100644
@@ -1145,6 +1145,7 @@ lvds-encoder {
 		compatible = "ti,sn75lvds83", "lvds-encoder";
 
 		powerdown-gpios = <&gpio TEGRA_GPIO(N, 6) GPIO_ACTIVE_LOW>;
+		power-supply = <&vdd_3v3_sys>;
 
 		ports {
 			#address-cells = <1>;
Signature · 1 line
2.27.0
#6 lore raw

PATCH 6/6 ARM: tegra: nexus7: Rename gpio-hog nodes

In reply to Dmitry Osipenko

Devicetree schema now requires gpio-hog nodes to have a certain naming pattern, like a -hog suffix. This patch fixes dtbs_check warnings about the names.

---
 arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi     | 4 ++--
 arch/arm/boot/dts/tegra30-asus-nexus7-grouper-maxim-pmic.dtsi | 2 +-
 arch/arm/boot/dts/tegra30-asus-nexus7-tilapia.dtsi            | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi +2 -2
index f8a531350998..8def1d2e34f9 100644
@@ -75,7 +75,7 @@ lcd_output: endpoint {
 	};
 
 	gpio@6000d000 {
-		init-mode {
+		init-mode-hog {
 			gpio-hog;
 			gpios =	<TEGRA_GPIO(DD, 7) GPIO_ACTIVE_HIGH>,
 				<TEGRA_GPIO(CC, 6) GPIO_ACTIVE_HIGH>,
@@ -83,7 +83,7 @@ init-mode {
 			output-low;
 		};
 
-		init-low-power-mode {
+		init-low-power-mode-hog {
 			gpio-hog;
 			gpios = <TEGRA_GPIO(I, 6) GPIO_ACTIVE_HIGH>;
 			input;
arch/arm/boot/dts/tegra30-asus-nexus7-grouper-maxim-pmic.dtsi +1 -1
index b25b3fa90ac6..17b6682ffce8 100644
@@ -29,7 +29,7 @@ gpio4 {
 				};
 			};
 
-			cpu-pwr-req {
+			cpu-pwr-req-hog {
 				gpio-hog;
 				gpios = <6 GPIO_ACTIVE_HIGH>;
 				input;
arch/arm/boot/dts/tegra30-asus-nexus7-tilapia.dtsi +1 -1
index e3da89f1941a..a681ad51fddd 100644
@@ -23,7 +23,7 @@ panel-timing {
 	};
 
 	gpio@6000d000 {
-		init-mode-3g {
+		init-mode-3g-hog {
 			gpio-hog;
 			gpios =	<TEGRA_GPIO(D, 2) GPIO_ACTIVE_HIGH>,
 				<TEGRA_GPIO(C, 6) GPIO_ACTIVE_HIGH>,
Signature · 1 line
2.27.0