xref: /freebsd-src/sys/contrib/device-tree/Bindings/input/qcom,pm8921-keypad.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1*84943d6fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*84943d6fSEmmanuel Vadot%YAML 1.2
3*84943d6fSEmmanuel Vadot---
4*84943d6fSEmmanuel Vadot$id: http://devicetree.org/schemas/input/qcom,pm8921-keypad.yaml#
5*84943d6fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*84943d6fSEmmanuel Vadot
7*84943d6fSEmmanuel Vadottitle: Qualcomm PM8921 PMIC KeyPad
8*84943d6fSEmmanuel Vadot
9*84943d6fSEmmanuel Vadotmaintainers:
10*84943d6fSEmmanuel Vadot  - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
11*84943d6fSEmmanuel Vadot
12*84943d6fSEmmanuel VadotallOf:
13*84943d6fSEmmanuel Vadot  - $ref: input.yaml#
14*84943d6fSEmmanuel Vadot  - $ref: matrix-keymap.yaml#
15*84943d6fSEmmanuel Vadot
16*84943d6fSEmmanuel Vadotproperties:
17*84943d6fSEmmanuel Vadot  compatible:
18*84943d6fSEmmanuel Vadot    enum:
19*84943d6fSEmmanuel Vadot      - qcom,pm8058-keypad
20*84943d6fSEmmanuel Vadot      - qcom,pm8921-keypad
21*84943d6fSEmmanuel Vadot
22*84943d6fSEmmanuel Vadot  reg:
23*84943d6fSEmmanuel Vadot    maxItems: 1
24*84943d6fSEmmanuel Vadot
25*84943d6fSEmmanuel Vadot  interrupts:
26*84943d6fSEmmanuel Vadot    items:
27*84943d6fSEmmanuel Vadot      - description: key sense
28*84943d6fSEmmanuel Vadot      - description: key stuck
29*84943d6fSEmmanuel Vadot
30*84943d6fSEmmanuel Vadot  wakeup-source:
31*84943d6fSEmmanuel Vadot    type: boolean
32*84943d6fSEmmanuel Vadot    description: use any event on keypad as wakeup event
33*84943d6fSEmmanuel Vadot
34*84943d6fSEmmanuel Vadot  linux,keypad-wakeup:
35*84943d6fSEmmanuel Vadot    type: boolean
36*84943d6fSEmmanuel Vadot    deprecated: true
37*84943d6fSEmmanuel Vadot    description: legacy version of the wakeup-source property
38*84943d6fSEmmanuel Vadot
39*84943d6fSEmmanuel Vadot  debounce:
40*84943d6fSEmmanuel Vadot    description:
41*84943d6fSEmmanuel Vadot      Time in microseconds that key must be pressed or
42*84943d6fSEmmanuel Vadot      released for state change interrupt to trigger.
43*84943d6fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
44*84943d6fSEmmanuel Vadot
45*84943d6fSEmmanuel Vadot  scan-delay:
46*84943d6fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
47*84943d6fSEmmanuel Vadot    description: time in microseconds to pause between successive scans of the
48*84943d6fSEmmanuel Vadot      matrix array
49*84943d6fSEmmanuel Vadot
50*84943d6fSEmmanuel Vadot  row-hold:
51*84943d6fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
52*84943d6fSEmmanuel Vadot    description: time in nanoseconds to pause between scans of each row in the
53*84943d6fSEmmanuel Vadot      matrix array.
54*84943d6fSEmmanuel Vadot
55*84943d6fSEmmanuel Vadotrequired:
56*84943d6fSEmmanuel Vadot  - compatible
57*84943d6fSEmmanuel Vadot  - reg
58*84943d6fSEmmanuel Vadot  - interrupts
59*84943d6fSEmmanuel Vadot  - linux,keymap
60*84943d6fSEmmanuel Vadot
61*84943d6fSEmmanuel VadotunevaluatedProperties: false
62*84943d6fSEmmanuel Vadot
63*84943d6fSEmmanuel Vadotexamples:
64*84943d6fSEmmanuel Vadot  - |
65*84943d6fSEmmanuel Vadot   #include <dt-bindings/input/input.h>
66*84943d6fSEmmanuel Vadot   #include <dt-bindings/interrupt-controller/irq.h>
67*84943d6fSEmmanuel Vadot   pmic {
68*84943d6fSEmmanuel Vadot       #address-cells = <1>;
69*84943d6fSEmmanuel Vadot       #size-cells = <0>;
70*84943d6fSEmmanuel Vadot
71*84943d6fSEmmanuel Vadot       keypad@148 {
72*84943d6fSEmmanuel Vadot           compatible = "qcom,pm8921-keypad";
73*84943d6fSEmmanuel Vadot           reg = <0x148>;
74*84943d6fSEmmanuel Vadot           interrupt-parent = <&pmicintc>;
75*84943d6fSEmmanuel Vadot           interrupts = <74 IRQ_TYPE_EDGE_RISING>, <75 IRQ_TYPE_EDGE_RISING>;
76*84943d6fSEmmanuel Vadot           linux,keymap = <
77*84943d6fSEmmanuel Vadot               MATRIX_KEY(0, 0, KEY_VOLUMEUP)
78*84943d6fSEmmanuel Vadot               MATRIX_KEY(0, 1, KEY_VOLUMEDOWN)
79*84943d6fSEmmanuel Vadot               MATRIX_KEY(0, 2, KEY_CAMERA_FOCUS)
80*84943d6fSEmmanuel Vadot               MATRIX_KEY(0, 3, KEY_CAMERA)
81*84943d6fSEmmanuel Vadot           >;
82*84943d6fSEmmanuel Vadot           keypad,num-rows = <1>;
83*84943d6fSEmmanuel Vadot           keypad,num-columns = <5>;
84*84943d6fSEmmanuel Vadot           debounce = <15>;
85*84943d6fSEmmanuel Vadot           scan-delay = <32>;
86*84943d6fSEmmanuel Vadot           row-hold = <91500>;
87*84943d6fSEmmanuel Vadot       };
88*84943d6fSEmmanuel Vadot   };
89*84943d6fSEmmanuel Vadot...
90