forked from home-assistant/operating-system
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'jethome_5.7' into jethome_5.7
- Loading branch information
Showing
10 changed files
with
176 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | ||
|
||
CONFIG_THERMAL_GOV_BANG_BANG=y | ||
CONFIG_SENSORS_GPIO_FAN=y | ||
|
||
CONFIG_KEYBOARD_GPIO=y | ||
CONFIG_KEYBOARD_GPIO_POLLED=y |
42 changes: 42 additions & 0 deletions
42
...l/board/hardkernel/patches/linux/0008-arm64-dts-meson-g12b-add-power-button-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
From 83ec133319bc8b04fad2bec65ffe95246c600520 Mon Sep 17 00:00:00 2001 | ||
Message-Id: <83ec133319bc8b04fad2bec65ffe95246c600520.1610380198.git.stefan@agner.ch> | ||
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1610380198.git.stefan@agner.ch> | ||
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1610380198.git.stefan@agner.ch> | ||
From: Stefan Agner <[email protected]> | ||
Date: Mon, 11 Jan 2021 11:20:48 +0100 | ||
Subject: [PATCH 08/10] arm64: dts: meson: g12b: add power button support | ||
|
||
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The | ||
GPIO is low active, e.g. when connecting with pin 9 (GND) a power | ||
button press is triggered. | ||
|
||
Signed-off-by: Stefan Agner <[email protected]> | ||
--- | ||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++ | ||
1 file changed, 11 insertions(+) | ||
|
||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | ||
index 445d90d25aa3..ddc7ad9a7d8d 100644 | ||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | ||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | ||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq { | ||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
+ gpio-keys-polled { | ||
+ compatible = "gpio-keys-polled"; | ||
+ poll-interval = <100>; | ||
+ | ||
+ power-button { | ||
+ label = "power"; | ||
+ linux,code = <KEY_POWER>; | ||
+ gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>; | ||
+ }; | ||
+ }; | ||
+ | ||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
-- | ||
2.30.0 | ||
|
42 changes: 42 additions & 0 deletions
42
...ernal/board/hardkernel/patches/linux/0009-arm64-dts-meson-g12b-add-GPIO-fan-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
From beb4dcdf3cd73f243563228528bc62e3caa881e8 Mon Sep 17 00:00:00 2001 | ||
Message-Id: <beb4dcdf3cd73f243563228528bc62e3caa881e8.1610380198.git.stefan@agner.ch> | ||
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1610380198.git.stefan@agner.ch> | ||
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1610380198.git.stefan@agner.ch> | ||
From: Stefan Agner <[email protected]> | ||
Date: Mon, 11 Jan 2021 11:38:54 +0100 | ||
Subject: [PATCH 09/10] arm64: dts: meson: g12b: add GPIO fan support | ||
|
||
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the | ||
pad used to control the fan does not support real PWM, hence the RPM | ||
cannot be modulated. | ||
|
||
Signed-off-by: Stefan Agner <[email protected]> | ||
--- | ||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++ | ||
1 file changed, 11 insertions(+) | ||
|
||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | ||
index ddc7ad9a7d8d..4d96732d0613 100644 | ||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | ||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | ||
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq { | ||
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
+ /* | ||
+ * 5V 80x80x10.8mm cooling fan from Hardkernel shop. | ||
+ */ | ||
+ fan0: gpio-fan { | ||
+ #cooling-cells = <2>; | ||
+ compatible = "gpio-fan"; | ||
+ gpio-fan,speed-map = <0 0 1600 1>; | ||
+ gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>; | ||
+ status = "okay"; | ||
+ }; | ||
+ | ||
gpio-keys-polled { | ||
compatible = "gpio-keys-polled"; | ||
poll-interval = <100>; | ||
-- | ||
2.30.0 | ||
|
74 changes: 74 additions & 0 deletions
74
.../hardkernel/patches/linux/0010-arm64-dts-meson-g12b-odroid-n2-add-fan-as-cooling-de.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
From 8ff3ba007f500ec4f21361fcac4ec7a5b67bcf7e Mon Sep 17 00:00:00 2001 | ||
Message-Id: <8ff3ba007f500ec4f21361fcac4ec7a5b67bcf7e.1610382778.git.stefan@agner.ch> | ||
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1610382778.git.stefan@agner.ch> | ||
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1610382778.git.stefan@agner.ch> | ||
From: Stefan Agner <[email protected]> | ||
Date: Mon, 11 Jan 2021 15:53:55 +0100 | ||
Subject: [PATCH 10/10] arm64: dts: meson: g12b: odroid-n2: add fan as cooling | ||
device | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
Add the GPIO fan as a cooling device for the CPU thermal zone. Since we | ||
have only full fan speed available with this, set the tripping point to | ||
65°C which is the highest tripping point which Hardkernel used in their | ||
downstream kernel. | ||
|
||
Signed-off-by: Stefan Agner <[email protected]> | ||
--- | ||
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 38 +++++++++++++++++++ | ||
1 file changed, 38 insertions(+) | ||
|
||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | ||
index 4d96732d0613..30d79175fa3e 100644 | ||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | ||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | ||
@@ -388,6 +388,44 @@ &clkc_audio { | ||
status = "okay"; | ||
}; | ||
|
||
+&cpu_thermal { | ||
+ trips { | ||
+ cpu_warm: cpu_warm { | ||
+ hysteresis = <5000>; | ||
+ temperature = <65000>; | ||
+ type = "active"; | ||
+ }; | ||
+ }; | ||
+ | ||
+ cooling-maps { | ||
+ map0 { | ||
+ cooling-device = | ||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; | ||
+ trip = <&cpu_warm>; | ||
+ }; | ||
+ map1 { | ||
+ trip = <&cpu_passive>; | ||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; | ||
+ }; | ||
+ map2 { | ||
+ trip = <&cpu_hot>; | ||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | ||
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; | ||
+ }; | ||
+ }; | ||
+}; | ||
+ | ||
&cpu0 { | ||
cpu-supply = <&vddcpu_b>; | ||
operating-points-v2 = <&cpu_opp_table_0>; | ||
-- | ||
2.30.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters