GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mt7623: bananapi-r2: disable the shorted power key (current + edge) · armbian/build@4a3b912

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • patch/kernel/archive
    • mt7623-6.18
      • bananapi-r2-disable-shorted-power-key.patch
    • mt7623-7.1
      • bananapi-r2-disable-shorted-power-key.patch
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎patch/kernel/archive/mt7623-6.18/bananapi-r2-disable-shorted-power-key.patch‎

Copy file name to clipboard
+41Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Subject: [PATCH] ARM: dts: mt7623: bananapi-r2: disable the shorted power key
2+
3+
The power button on this unit is physically shorted so the board
4+
auto-powers-on the moment DC is applied. The MT6323 PMIC therefore sees the
5+
power key permanently held, which (a) has the kernel deliver a stuck
6+
KEY_POWER to userspace (systemd shuts the board down) and (b) lets the PMIC
7+
long-press handler hardware-power-off the board.
8+
9+
Disable the power key input (KEY_POWER is never reported) and turn the PMIC
10+
long-press handler off (mediatek,long-press-mode = 0) so a permanently-held
11+
key can no longer power the board down. The 'home' key stays disabled as in
12+
mainline. Board-specific to the modified unit.
13+
14+
This matches the community fix for the same board (blacklisting the
15+
mtk_pmic_keys module so the held key is never registered) but does it in the
16+
device tree, disabling only the power key and leaving the driver in place.
17+
18+
Link: https://github.com/frank-w/BPI-Router-Linux/issues/35
19+
20+
Signed-off-by: Igor Pecovnik <[email protected]>
21+
22+
--- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
23+
+++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
24+
@@ -346,6 +346,17 @@
25+
};
26+
27+
&mt6323keys {
28+
+ /* The power button is physically shorted on this unit (the board
29+
+ * auto-powers-on when DC is applied), so the MT6323 sees the key held
30+
+ * forever. Turn the PMIC long-press handler off so a stuck key cannot
31+
+ * trigger a hardware power-off, and disable the power key input so
32+
+ * KEY_POWER is never delivered to userspace. */
33+
+ mediatek,long-press-mode = <0>;
34+
+
35+
+ power {
36+
+ status = "disabled";
37+
+ };
38+
+
39+
home {
40+
status = "disabled";
41+
};
Collapse file

‎patch/kernel/archive/mt7623-7.1/bananapi-r2-disable-shorted-power-key.patch‎

Copy file name to clipboard
+41Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Subject: [PATCH] ARM: dts: mt7623: bananapi-r2: disable the shorted power key
2+
3+
The power button on this unit is physically shorted so the board
4+
auto-powers-on the moment DC is applied. The MT6323 PMIC therefore sees the
5+
power key permanently held, which (a) has the kernel deliver a stuck
6+
KEY_POWER to userspace (systemd shuts the board down) and (b) lets the PMIC
7+
long-press handler hardware-power-off the board.
8+
9+
Disable the power key input (KEY_POWER is never reported) and turn the PMIC
10+
long-press handler off (mediatek,long-press-mode = 0) so a permanently-held
11+
key can no longer power the board down. The 'home' key stays disabled as in
12+
mainline. Board-specific to the modified unit.
13+
14+
This matches the community fix for the same board (blacklisting the
15+
mtk_pmic_keys module so the held key is never registered) but does it in the
16+
device tree, disabling only the power key and leaving the driver in place.
17+
18+
Link: https://github.com/frank-w/BPI-Router-Linux/issues/35
19+
20+
Signed-off-by: Igor Pecovnik <[email protected]>
21+
22+
--- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
23+
+++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
24+
@@ -346,6 +346,17 @@
25+
};
26+
27+
&mt6323keys {
28+
+ /* The power button is physically shorted on this unit (the board
29+
+ * auto-powers-on when DC is applied), so the MT6323 sees the key held
30+
+ * forever. Turn the PMIC long-press handler off so a stuck key cannot
31+
+ * trigger a hardware power-off, and disable the power key input so
32+
+ * KEY_POWER is never delivered to userspace. */
33+
+ mediatek,long-press-mode = <0>;
34+
+
35+
+ power {
36+
+ status = "disabled";
37+
+ };
38+
+
39+
home {
40+
status = "disabled";
41+
};

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.