-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path0042-dt-bindings-input-Add-bindings-for-Phytium-Keypad.patch
More file actions
101 lines (97 loc) · 3.42 KB
/
Copy path0042-dt-bindings-input-Add-bindings-for-Phytium-Keypad.patch
File metadata and controls
101 lines (97 loc) · 3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
From 24b24e5e44b6b8c5a722b8eaecfc89ffe7162839 Mon Sep 17 00:00:00 2001
From: Chen Baozi <chenbaozi@phytium.com.cn>
Date: Mon, 17 Jun 2024 19:33:03 +0800
Subject: [PATCH 042/150] dt-bindings: input: Add bindings for Phytium Keypad
This patch documents the DT bindings for Phytium Keypad Port.
Signed-off-by: Chen Baozi <chenbaozi@phytium.com.cn>
Change-Id: I0376886d1794eafe3c22f45602cb2c55ef20ae48
Signed-off-by: Andrew Powers-Holmes <aholmes@omnom.net>
---
.../bindings/input/phytium,keypad.yaml | 64 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 65 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/phytium,keypad.yaml
diff --git a/Documentation/devicetree/bindings/input/phytium,keypad.yaml b/Documentation/devicetree/bindings/input/phytium,keypad.yaml
new file mode 100644
index 000000000000..122fad370973
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/phytium,keypad.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/phytium,keypad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Phytium Keypad Port
+
+maintainers:
+ - Chen Baozi <chenbaozi@phytium.com.cn>
+
+allOf:
+ - $ref: "/schemas/input/matrix-keymap.yaml#"
+
+description: |
+ The keypad port is designed to interface with a keypad matrix, which
+ simplify the software task of scanning a keypad matrix. It is capable
+ of detecting, debouncing, and decoding one or multiple keys pressed
+ simultaneously on a keypad.
+
+
+properties:
+ compatible:
+ - const: phytium,keypad
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - linux,keymap
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ keypad: keypad@2807a000 {
+ compatible = "phytium,keypad";
+ reg = <0x 0x2807a000 0x0 0x1000>;
+ interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
+ keypad,num-rows = <4>;
+ keypad,num-columns = <4>;
+ linux,keymap = <0x00000067 /* KEY_UP */
+ 0x0001006c /* KEY_DOWN */
+ 0x00020072 /* KEY_VOLUMEDOWN */
+ 0x00030066 /* KEY_HOME */
+ 0x0100006a /* KEY_RIGHT */
+ 0x01010069 /* KEY_LEFT */
+ 0x0102001c /* KEY_ENTER */
+ 0x01030073 /* KEY_VOLUMEUP */
+ 0x02000040 /* KEY_F6 */
+ 0x02010042 /* KEY_F8 */
+ 0x02020043 /* KEY_F9 */
+ 0x02030044 /* KEY_F10 */
+ 0x0300003b /* KEY_F1 */
+ 0x0301003c /* KEY_F2 */
+ 0x0302003d /* KEY_F3 */
+ 0x03030074>; /* KEY_POWER */
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index d5bc6da93db6..1cdff71fb0e8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2535,6 +2535,7 @@ F: Documentation/devicetree/bindings/hwlock/phytium,hwspinlock.yaml
F: Documentation/devicetree/bindings/i2c/phytium,i2c.yaml
F: Documentation/devicetree/bindings/media/phytium,jpeg.yaml
F: Documentation/devicetree/bindings/iio/adc/phytium,adc.yaml
+F: Documentation/devicetree/bindings/input/phytium,keypad.yaml
F: Documentation/devicetree/bindings/mmc/phytium,mci.yaml
F: Documentation/devicetree/bindings/mmc/phytium,sdci.yaml
F: Documentation/devicetree/bindings/mtd/phytium,nfc.yaml
--
2.47.0