1*8bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*8bab661aSEmmanuel Vadot%YAML 1.2
3*8bab661aSEmmanuel Vadot---
4*8bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/input/qcom,pm8921-pwrkey.yaml#
5*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8bab661aSEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: Qualcomm PM8921 PMIC Power Key
8*8bab661aSEmmanuel Vadot
9*8bab661aSEmmanuel Vadotmaintainers:
10*8bab661aSEmmanuel Vadot  - Bjorn Andersson <andersson@kernel.org>
11*8bab661aSEmmanuel Vadot
12*8bab661aSEmmanuel VadotallOf:
13*8bab661aSEmmanuel Vadot  - $ref: input.yaml#
14*8bab661aSEmmanuel Vadot
15*8bab661aSEmmanuel Vadotproperties:
16*8bab661aSEmmanuel Vadot  compatible:
17*8bab661aSEmmanuel Vadot    oneOf:
18*8bab661aSEmmanuel Vadot      - enum:
19*8bab661aSEmmanuel Vadot          - qcom,pm8921-pwrkey
20*8bab661aSEmmanuel Vadot          - qcom,pm8058-pwrkey
21*8bab661aSEmmanuel Vadot      - items:
22*8bab661aSEmmanuel Vadot          - enum:
23*8bab661aSEmmanuel Vadot              - qcom,pm8018-pwrkey
24*8bab661aSEmmanuel Vadot          - const: qcom,pm8921-pwrkey
25*8bab661aSEmmanuel Vadot
26*8bab661aSEmmanuel Vadot  reg:
27*8bab661aSEmmanuel Vadot    maxItems: 1
28*8bab661aSEmmanuel Vadot
29*8bab661aSEmmanuel Vadot  interrupts:
30*8bab661aSEmmanuel Vadot    items:
31*8bab661aSEmmanuel Vadot      - description: key release
32*8bab661aSEmmanuel Vadot      - description: key press
33*8bab661aSEmmanuel Vadot
34*8bab661aSEmmanuel Vadot  debounce:
35*8bab661aSEmmanuel Vadot    description:
36*8bab661aSEmmanuel Vadot      Time in microseconds that key must be pressed or
37*8bab661aSEmmanuel Vadot      released for state change interrupt to trigger.
38*8bab661aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
39*8bab661aSEmmanuel Vadot
40*8bab661aSEmmanuel Vadot  pull-up:
41*8bab661aSEmmanuel Vadot    description:
42*8bab661aSEmmanuel Vadot      Presence of this property indicates that the KPDPWR_N
43*8bab661aSEmmanuel Vadot      pin should be configured for pull up.
44*8bab661aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
45*8bab661aSEmmanuel Vadot
46*8bab661aSEmmanuel Vadotrequired:
47*8bab661aSEmmanuel Vadot  - compatible
48*8bab661aSEmmanuel Vadot  - reg
49*8bab661aSEmmanuel Vadot  - interrupts
50*8bab661aSEmmanuel Vadot
51*8bab661aSEmmanuel VadotunevaluatedProperties: false
52*8bab661aSEmmanuel Vadot
53*8bab661aSEmmanuel Vadotexamples:
54*8bab661aSEmmanuel Vadot  - |
55*8bab661aSEmmanuel Vadot   #include <dt-bindings/interrupt-controller/irq.h>
56*8bab661aSEmmanuel Vadot   ssbi {
57*8bab661aSEmmanuel Vadot     #address-cells = <1>;
58*8bab661aSEmmanuel Vadot     #size-cells = <0>;
59*8bab661aSEmmanuel Vadot
60*8bab661aSEmmanuel Vadot     pmic@0 {
61*8bab661aSEmmanuel Vadot       reg = <0x0>;
62*8bab661aSEmmanuel Vadot       #address-cells = <1>;
63*8bab661aSEmmanuel Vadot       #size-cells = <0>;
64*8bab661aSEmmanuel Vadot
65*8bab661aSEmmanuel Vadot       pwrkey@1c {
66*8bab661aSEmmanuel Vadot         compatible = "qcom,pm8921-pwrkey";
67*8bab661aSEmmanuel Vadot         reg = <0x1c>;
68*8bab661aSEmmanuel Vadot         interrupt-parent = <&pmicint>;
69*8bab661aSEmmanuel Vadot         interrupts = <50 IRQ_TYPE_EDGE_RISING>, <51 IRQ_TYPE_EDGE_RISING>;
70*8bab661aSEmmanuel Vadot         debounce = <15625>;
71*8bab661aSEmmanuel Vadot         pull-up;
72*8bab661aSEmmanuel Vadot       };
73*8bab661aSEmmanuel Vadot     };
74*8bab661aSEmmanuel Vadot   };
75*8bab661aSEmmanuel Vadot...
76