xref: /openbmc/linux/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.yaml (revision 31a10f5b4b9ff323668c37173695ea463fc89863)
1*31a10f5bSStephan Gerhold# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*31a10f5bSStephan Gerhold%YAML 1.2
3*31a10f5bSStephan Gerhold---
4*31a10f5bSStephan Gerhold$id: http://devicetree.org/schemas/input/cypress,tm2-touchkey.yaml#
5*31a10f5bSStephan Gerhold$schema: http://devicetree.org/meta-schemas/core.yaml#
6*31a10f5bSStephan Gerhold
7*31a10f5bSStephan Gerholdtitle: Samsung TM2 touch key controller
8*31a10f5bSStephan Gerhold
9*31a10f5bSStephan Gerholdmaintainers:
10*31a10f5bSStephan Gerhold  - Stephan Gerhold <stephan@gerhold.net>
11*31a10f5bSStephan Gerhold
12*31a10f5bSStephan Gerholddescription: |
13*31a10f5bSStephan Gerhold  Touch key controllers similar to the TM2 can be found in a wide range of
14*31a10f5bSStephan Gerhold  Samsung devices. They are implemented using many different MCUs, but use
15*31a10f5bSStephan Gerhold  a similar I2C protocol.
16*31a10f5bSStephan Gerhold
17*31a10f5bSStephan GerholdallOf:
18*31a10f5bSStephan Gerhold  - $ref: input.yaml#
19*31a10f5bSStephan Gerhold
20*31a10f5bSStephan Gerholdproperties:
21*31a10f5bSStephan Gerhold  compatible:
22*31a10f5bSStephan Gerhold    enum:
23*31a10f5bSStephan Gerhold      - cypress,tm2-touchkey
24*31a10f5bSStephan Gerhold      - cypress,midas-touchkey
25*31a10f5bSStephan Gerhold      - cypress,aries-touchkey
26*31a10f5bSStephan Gerhold      - coreriver,tc360-touchkey
27*31a10f5bSStephan Gerhold
28*31a10f5bSStephan Gerhold  reg:
29*31a10f5bSStephan Gerhold    maxItems: 1
30*31a10f5bSStephan Gerhold
31*31a10f5bSStephan Gerhold  interrupts:
32*31a10f5bSStephan Gerhold    maxItems: 1
33*31a10f5bSStephan Gerhold
34*31a10f5bSStephan Gerhold  vdd-supply:
35*31a10f5bSStephan Gerhold    description: Optional regulator for LED voltage, 3.3V.
36*31a10f5bSStephan Gerhold
37*31a10f5bSStephan Gerhold  vcc-supply:
38*31a10f5bSStephan Gerhold    description: Optional regulator for MCU, 1.8V-3.3V (depending on MCU).
39*31a10f5bSStephan Gerhold
40*31a10f5bSStephan Gerhold  linux,keycodes:
41*31a10f5bSStephan Gerhold    minItems: 1
42*31a10f5bSStephan Gerhold    maxItems: 4
43*31a10f5bSStephan Gerhold
44*31a10f5bSStephan Gerholdrequired:
45*31a10f5bSStephan Gerhold  - compatible
46*31a10f5bSStephan Gerhold  - reg
47*31a10f5bSStephan Gerhold  - interrupts
48*31a10f5bSStephan Gerhold
49*31a10f5bSStephan GerholdadditionalProperties: false
50*31a10f5bSStephan Gerhold
51*31a10f5bSStephan Gerholdexamples:
52*31a10f5bSStephan Gerhold  - |
53*31a10f5bSStephan Gerhold    #include <dt-bindings/input/input.h>
54*31a10f5bSStephan Gerhold    #include <dt-bindings/interrupt-controller/irq.h>
55*31a10f5bSStephan Gerhold    i2c {
56*31a10f5bSStephan Gerhold        #address-cells = <1>;
57*31a10f5bSStephan Gerhold        #size-cells = <0>;
58*31a10f5bSStephan Gerhold
59*31a10f5bSStephan Gerhold        touchkey@20 {
60*31a10f5bSStephan Gerhold            compatible = "cypress,tm2-touchkey";
61*31a10f5bSStephan Gerhold            reg = <0x20>;
62*31a10f5bSStephan Gerhold            interrupt-parent = <&gpa3>;
63*31a10f5bSStephan Gerhold            interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
64*31a10f5bSStephan Gerhold            vcc-supply = <&ldo32_reg>;
65*31a10f5bSStephan Gerhold            vdd-supply = <&ldo33_reg>;
66*31a10f5bSStephan Gerhold            linux,keycodes = <KEY_MENU KEY_BACK>;
67*31a10f5bSStephan Gerhold        };
68*31a10f5bSStephan Gerhold    };
69