0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/input/allwinner,sun4i-a10-lradc-keys.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Allwinner A10 LRADC Device Tree Bindings
0008
0009 maintainers:
0010 - Chen-Yu Tsai <wens@csie.org>
0011 - Maxime Ripard <mripard@kernel.org>
0012
0013 properties:
0014 compatible:
0015 oneOf:
0016 - const: allwinner,sun4i-a10-lradc-keys
0017 - const: allwinner,sun8i-a83t-r-lradc
0018 - items:
0019 - const: allwinner,sun50i-a64-lradc
0020 - const: allwinner,sun8i-a83t-r-lradc
0021 - const: allwinner,sun50i-r329-lradc
0022 - items:
0023 - const: allwinner,sun20i-d1-lradc
0024 - const: allwinner,sun50i-r329-lradc
0025
0026 reg:
0027 maxItems: 1
0028
0029 clocks:
0030 maxItems: 1
0031
0032 resets:
0033 maxItems: 1
0034
0035 interrupts:
0036 maxItems: 1
0037
0038 vref-supply:
0039 description:
0040 Regulator for the LRADC reference voltage
0041
0042 wakeup-source: true
0043
0044 patternProperties:
0045 "^button-[0-9]+$":
0046 type: object
0047 $ref: input.yaml#
0048 properties:
0049 label:
0050 $ref: /schemas/types.yaml#/definitions/string
0051 description: Descriptive name of the key
0052
0053 linux,code: true
0054
0055 channel:
0056 $ref: /schemas/types.yaml#/definitions/uint32
0057 enum: [0, 1]
0058 description: ADC Channel this key is attached to
0059
0060 voltage:
0061 $ref: /schemas/types.yaml#/definitions/uint32
0062 description:
0063 Voltage in microvolts at LRADC input when this key is
0064 pressed
0065
0066 required:
0067 - label
0068 - linux,code
0069 - channel
0070 - voltage
0071
0072 additionalProperties: false
0073
0074 required:
0075 - compatible
0076 - reg
0077 - interrupts
0078 - vref-supply
0079
0080 if:
0081 properties:
0082 compatible:
0083 contains:
0084 enum:
0085 - allwinner,sun50i-r329-lradc
0086
0087 then:
0088 required:
0089 - clocks
0090 - resets
0091
0092 additionalProperties: false
0093
0094 examples:
0095 - |
0096 lradc: lradc@1c22800 {
0097 compatible = "allwinner,sun4i-a10-lradc-keys";
0098 reg = <0x01c22800 0x100>;
0099 interrupts = <31>;
0100 vref-supply = <®_vcc3v0>;
0101
0102 button-191 {
0103 label = "Volume Up";
0104 linux,code = <115>;
0105 channel = <0>;
0106 voltage = <191274>;
0107 };
0108
0109 button-392 {
0110 label = "Volume Down";
0111 linux,code = <114>;
0112 channel = <0>;
0113 voltage = <392644>;
0114 };
0115 };
0116
0117 ...