blob: c384bf0bb25dab599608735d0163196c2fcd7e84 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/input/allwinner,sun4i-a10-lradc-keys.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner A10 LRADC
8
9maintainers:
10 - Chen-Yu Tsai <wens@csie.org>
11 - Maxime Ripard <mripard@kernel.org>
12
13properties:
14 compatible:
15 oneOf:
16 - const: allwinner,sun4i-a10-lradc-keys
17 - const: allwinner,sun8i-a83t-r-lradc
18 - items:
19 - enum:
20 - allwinner,suniv-f1c100s-lradc
21 - allwinner,sun50i-a64-lradc
22 - const: allwinner,sun8i-a83t-r-lradc
23 - const: allwinner,sun50i-r329-lradc
24 - items:
25 - const: allwinner,sun20i-d1-lradc
26 - const: allwinner,sun50i-r329-lradc
27
28 reg:
29 maxItems: 1
30
31 clocks:
32 maxItems: 1
33
34 resets:
35 maxItems: 1
36
37 interrupts:
38 maxItems: 1
39
40 vref-supply:
41 description:
42 Regulator for the LRADC reference voltage
43
44 wakeup-source: true
45
46patternProperties:
47 "^button-[0-9]+$":
48 type: object
49 $ref: input.yaml#
50 properties:
51 label:
Tom Rini53633a82024-02-29 12:33:36 -050052 description: Descriptive name of the key
53
54 linux,code: true
55
56 channel:
57 $ref: /schemas/types.yaml#/definitions/uint32
58 enum: [0, 1]
59 description: ADC Channel this key is attached to
60
61 voltage:
62 $ref: /schemas/types.yaml#/definitions/uint32
63 description:
64 Voltage in microvolts at LRADC input when this key is
65 pressed
66
67 required:
68 - label
69 - linux,code
70 - channel
71 - voltage
72
73 additionalProperties: false
74
75required:
76 - compatible
77 - reg
78 - interrupts
79 - vref-supply
80
81if:
82 properties:
83 compatible:
84 contains:
85 enum:
86 - allwinner,sun50i-r329-lradc
87
88then:
89 required:
90 - clocks
91 - resets
92
93additionalProperties: false
94
95examples:
96 - |
97 lradc: lradc@1c22800 {
98 compatible = "allwinner,sun4i-a10-lradc-keys";
99 reg = <0x01c22800 0x100>;
100 interrupts = <31>;
101 vref-supply = <&reg_vcc3v0>;
102
103 button-191 {
104 label = "Volume Up";
105 linux,code = <115>;
106 channel = <0>;
107 voltage = <191274>;
108 };
109
110 button-392 {
111 label = "Volume Down";
112 linux,code = <114>;
113 channel = <0>;
114 voltage = <392644>;
115 };
116 };
117
118...