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 — poweroff working · frank-w/BPI-Router-Linux@fc6285a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Documentation/devicetree/bindings
    • input
      • keys.txt
      • mtk-pmic-keys.txt
    • mfd
      • mt6397.txt
    • power/reset
      • mt6323-poweroff.txt
      • mt6397-rtc-poweroff.txt
    • rtc
      • rtc-mt6397.txt
  • MAINTAINERS
  • arch/arm
    • boot/dts
      • mt7623n-bananapi-bpi-r2.dts
    • configs
      • mt7623n_evb_fwu_defconfig
  • drivers
    • input/keyboard
      • Kconfig
      • Makefile
      • mtk-pmic-keys.c
    • mfd
      • mt6397-core.c
    • power/reset
      • Kconfig
      • Makefile
      • mt6323-poweroff.c
      • mt6397-rtc-poweroff.c
    • rtc
      • rtc-mt6397.c
  • include/linux/mfd/mt6397
    • rtc.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Documentation/devicetree/bindings/input/keys.txt‎

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
General Keys Properties:
2+
3+
Optional properties for Keys:
4+
- power-off-time-sec: Duration in seconds which the key should be kept
5+
pressed for device to power off automatically. Device with key pressed
6+
shutdown feature can specify this property.
7+
- linux,keycodes: Specifies the numeric keycode values to be used for
8+
reporting key presses.
Collapse file

‎Documentation/devicetree/bindings/input/mtk-pmic-keys.txt‎

Copy file name to clipboard
+43Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
MediaTek MT6397/MT6323 PMIC Keys Device Driver
2+
3+
There are two key functions provided by MT6397/MT6323 PMIC, pwrkey
4+
and homekey. The key functions are defined as the subnode of the function
5+
node provided by MT6397/MT6323 PMIC that is being defined as one kind
6+
of Muti-Function Device (MFD)
7+
8+
For MT6397/MT6323 MFD bindings see:
9+
Documentation/devicetree/bindings/mfd/mt6397.txt
10+
11+
Required properties:
12+
- compatible: "mediatek,mt6397-keys" or "mediatek,mt6323-keys"
13+
- linux,keycodes: See Documentation/devicetree/bindings/input/keys.txt
14+
15+
Optional Properties:
16+
- wakeup-source: See Documentation/devicetree/bindings/power/wakeup-source.txt
17+
- mediatek,long-press-mode: Long press key shutdown setting, 1 for
18+
pwrkey only, 2 for pwrkey/homekey together, others for disabled.
19+
- power-off-time-sec: See Documentation/devicetree/bindings/input/keys.txt
20+
21+
Example:
22+
23+
pmic: mt6397 {
24+
compatible = "mediatek,mt6397";
25+
26+
...
27+
28+
mt6397keys: mt6397keys {
29+
compatible = "mediatek,mt6397-keys";
30+
mediatek,long-press-mode = <1>;
31+
power-off-time-sec = <0>;
32+
33+
power {
34+
linux,keycodes = <116>;
35+
wakeup-source;
36+
};
37+
38+
home {
39+
linux,keycodes = <114>;
40+
};
41+
};
42+
43+
};
Collapse file

‎Documentation/devicetree/bindings/mfd/mt6397.txt‎

Copy file name to clipboardExpand all lines: Documentation/devicetree/bindings/mfd/mt6397.txt
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ MT6397/MT6323 is a multifunction device with the following sub modules:
77
- GPIO
88
- Clock
99
- LED
10+
- Keys
11+
- Power controller
1012

1113
It is interfaced to host controller using SPI interface by a proprietary hardware
1214
called PMIC wrapper or pwrap. MT6397/MT6323 MFD is a child device of pwrap.
@@ -42,6 +44,16 @@ Optional subnodes:
4244
- compatible: "mediatek,mt6323-led"
4345
see Documentation/devicetree/bindings/leds/leds-mt6323.txt
4446

47+
- keys
48+
Required properties:
49+
- compatible: "mediatek,mt6397-keys" or "mediatek,mt6323-keys"
50+
see Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
51+
52+
- power-controller
53+
Required properties:
54+
- compatible: "mediatek,mt6323-pwrc"
55+
For details, see Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
56+
4557
Example:
4658
pwrap: pwrap@1000f000 {
4759
compatible = "mediatek,mt8135-pwrap";
Collapse file

‎Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt‎

Copy file name to clipboard
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Device Tree Bindings for Power Controller on MediaTek PMIC
2+
3+
The power controller which could be found on PMIC is responsible for externally
4+
powering off or on the remote MediaTek SoC through the circuit BBPU.
5+
6+
Required properties:
7+
- compatible: Should be one of follows
8+
"mediatek,mt6323-pwrc": for MT6323 PMIC
9+
10+
Example:
11+
12+
pmic {
13+
compatible = "mediatek,mt6323";
14+
15+
...
16+
17+
power-controller {
18+
compatible = "mediatek,mt6323-pwrc";
19+
};
20+
}
Collapse file

‎Documentation/devicetree/bindings/power/reset/mt6397-rtc-poweroff.txt‎

Copy file name to clipboardExpand all lines: Documentation/devicetree/bindings/power/reset/mt6397-rtc-poweroff.txt
-24Lines changed: 0 additions & 24 deletions
This file was deleted.
Collapse file

‎Documentation/devicetree/bindings/rtc/rtc-mt6397.txt‎

Copy file name to clipboard
+9-19Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,29 @@
11
Device-Tree bindings for MediaTek PMIC based RTC
22

3-
MediaTek PMIC based RTC is an independent function of MediaTek PMIC which
4-
is working as a multi-function device (MFD). And the RTC can be configured and
5-
set up via PMIC wrapper bus. Which is also common resource shared among the
6-
other functions present on the PMIC.
3+
MediaTek PMIC based RTC is an independent function of MediaTek PMIC that works
4+
as a type of multi-function device (MFD). The RTC can be configured and set up
5+
with PMIC wrapper bus which is a common resource shared with the other
6+
functions found on the same PMIC.
7+
8+
For MediaTek PMIC MFD bindings, see:
9+
Documentation/devicetree/bindings/mfd/mt6397.txt
710

811
For MediaTek PMIC wrapper bus bindings, see:
912
Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
1013

11-
Required parent node:
12-
- pmic
13-
For MediaTek PMIC MFD bindings, see:
14-
Documentation/devicetree/bindings/mfd/mt6397.txt
15-
1614
Required properties:
1715
- compatible: Should be one of follows
1816
"mediatek,mt6323-rtc": for MT6323 PMIC
1917
"mediatek,mt6397-rtc": for MT6397 PMIC
2018

21-
Optional child node:
22-
- power-off
23-
For Power-Off Device for MediaTek PMIC RTC bindings, see:
24-
Documentation/devicetree/bindings/power/reset/mt6397-rtc-poweroff.txt
25-
2619
Example:
2720

2821
pmic {
2922
compatible = "mediatek,mt6323";
3023

3124
...
25+
3226
rtc {
3327
compatible = "mediatek,mt6323-rtc";
34-
35-
power-off {
36-
compatible = "mediatek,mt6323-rtc-poweroff";
37-
};
3828
};
39-
};
29+
};
Collapse file

‎MAINTAINERS‎

Copy file name to clipboardExpand all lines: MAINTAINERS
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,9 @@ M: Eddie Huang <[email protected]>
15941594
L: [email protected] (moderated for non-subscribers)
15951595
L: [email protected] (moderated for non-subscribers)
15961596
S: Maintained
1597+
F: Documentation/devicetree/bindings/rtc/rtc-mt6397.txt
15971598
F: drivers/rtc/rtc-mt6397.c
1599+
F: include/linux/mfd/mt6397/rtc.h
15981600

15991601
ARM/Mediatek SoC support
16001602
M: Matthias Brugger <[email protected]>
@@ -8614,6 +8616,13 @@ L: [email protected]
86148616
S: Maintained
86158617
F: drivers/net/ethernet/mediatek/
86168618

8619+
MEDIATEK BOARD LEVEL SHUTDOWN DRIVERS
8620+
M: Sean Wang <[email protected]>
8621+
L: [email protected]
8622+
S: Maintained
8623+
F: Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
8624+
F: drivers/power/reset/mt6323-poweroff.c
8625+
86178626
MEDIATEK JPEG DRIVER
86188627
M: Rick Chang <[email protected]>
86198628
M: Bin Liu <[email protected]>
Collapse file

‎arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts‎

Copy file name to clipboardExpand all lines: arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+25-7Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -871,15 +871,33 @@
871871
};
872872
};
873873

874-
mt6323rtc: rtc {
875-
compatible = "mediatek,mt6323-rtc";
874+
mt6323keys: mt6323keys {
875+
compatible = "mediatek,mt6323-keys";
876+
mediatek,long-press-mode = <1>;
877+
power-off-time-sec = <0>;
876878

877-
power-off {
878-
compatible = "mediatek,mt6323-rtc-poweroff";
879-
};
880-
};
881-
};
879+
power {
880+
linux,keycodes = <116>;
881+
wakeup-source;
882+
};
883+
884+
home {
885+
linux,keycodes = <114>;
886+
};
887+
};
882888

889+
codec: mt6397codec {
890+
compatible = "mediatek,mt6397-codec";
891+
};
892+
893+
power-controller {
894+
compatible = "mediatek,mt6323-pwrc";
895+
};
896+
897+
rtc {
898+
compatible = "mediatek,mt6323-rtc";
899+
};
900+
};
883901
};
884902

885903
&consys {
Collapse file

‎arch/arm/configs/mt7623n_evb_fwu_defconfig‎

Copy file name to clipboardExpand all lines: arch/arm/configs/mt7623n_evb_fwu_defconfig
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ CONFIG_INPUT_EVDEV=y
193193
CONFIG_INPUT_EVBUG=y
194194
CONFIG_KEYBOARD_MATRIX=y
195195
CONFIG_KEYBOARD_SAMSUNG=y
196+
CONFIG_KEYBOARD_MTK_PMIC=m
196197
CONFIG_MOUSE_PS2_ELANTECH=y
197198
CONFIG_MOUSE_PS2_SENTELIC=y
198199
CONFIG_INPUT_MOUSEDEV=y
@@ -376,6 +377,7 @@ CONFIG_I2C_CHARDEV=m
376377
CONFIG_RTC_CLASS=y
377378
CONFIG_RTC_DRV_DS1307=m
378379
CONFIG_RTC_DRV_DS1307_CENTURY=y
380+
CONFIG_RTC_DRV_MT6397=m
379381

380382
CONFIG_SPI=y
381383
CONFIG_SPI_MASTER=y
@@ -385,6 +387,10 @@ CONFIG_SPI_MT65XX=m
385387
CONFIG_PWM=y
386388
CONFIG_PWM_MEDIATEK=m
387389

390+
#reset
391+
CONFIG_POWER_RESET=y
392+
CONFIG_POWER_RESET_MT6323=y
393+
388394
#Temperature sensor driver for mediatek SoCs
389395
CONFIG_MEDIATEK_MT6577_AUXADC=m
390396
CONFIG_THERMAL=m
@@ -570,7 +576,3 @@ CONFIG_NFS_COMMON=y
570576
#xfs
571577
CONFIG_XFS_FS=m
572578

573-
#RTC/POWER
574-
CONFIG_POWER_RESET=y
575-
CONFIG_POWER_RESET_MT6397_RTC=y
576-
Collapse file

‎drivers/input/keyboard/Kconfig‎

Copy file name to clipboardExpand all lines: drivers/input/keyboard/Kconfig
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,4 +756,13 @@ config KEYBOARD_BCM
756756
To compile this driver as a module, choose M here: the
757757
module will be called bcm-keypad.
758758

759+
config KEYBOARD_MTK_PMIC
760+
tristate "MediaTek PMIC keys support"
761+
depends on MFD_MT6397
762+
help
763+
Say Y here if you want to use the pmic keys (powerkey/homekey).
764+
765+
To compile this driver as a module, choose M here: the
766+
module will be called pmic-keys.
767+
759768
endif

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.