0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mfd/iqs62x.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Azoteq IQS620A/621/622/624/625 Multi-Function Sensors
0008
0009 maintainers:
0010 - Jeff LaBundy <jeff@labundy.com>
0011
0012 description: |
0013 The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors
0014 integrate multiple sensing technologies in a single package.
0015
0016 Link to datasheets: https://www.azoteq.com/
0017
0018 properties:
0019 compatible:
0020 enum:
0021 - azoteq,iqs620a
0022 - azoteq,iqs621
0023 - azoteq,iqs622
0024 - azoteq,iqs624
0025 - azoteq,iqs625
0026
0027 reg:
0028 maxItems: 1
0029
0030 interrupts:
0031 maxItems: 1
0032
0033 firmware-name:
0034 $ref: /schemas/types.yaml#/definitions/string
0035 description:
0036 Specifies the name of the calibration and configuration file selected by
0037 the driver. If this property is omitted, the name is chosen based on the
0038 device name with ".bin" as the extension (e.g. iqs620a.bin for IQS620A).
0039
0040 keys:
0041 $ref: ../input/iqs62x-keys.yaml
0042
0043 pwm:
0044 $ref: ../pwm/iqs620a-pwm.yaml
0045
0046 required:
0047 - compatible
0048 - reg
0049 - interrupts
0050
0051 additionalProperties: false
0052
0053 examples:
0054 - |
0055 /*
0056 * Dual capacitive buttons with proximity-activated function, unipolar lid
0057 * switch and panel-mounted LED.
0058 */
0059 #include <dt-bindings/input/input.h>
0060 #include <dt-bindings/interrupt-controller/irq.h>
0061
0062 i2c {
0063 #address-cells = <1>;
0064 #size-cells = <0>;
0065
0066 iqs620a@44 {
0067 compatible = "azoteq,iqs620a";
0068 reg = <0x44>;
0069 interrupt-parent = <&gpio>;
0070 interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
0071
0072 keys {
0073 compatible = "azoteq,iqs620a-keys";
0074
0075 linux,keycodes = <KEY_SELECT>,
0076 <KEY_MENU>,
0077 <KEY_OK>,
0078 <KEY_MENU>;
0079
0080 hall-switch-south {
0081 linux,code = <SW_LID>;
0082 azoteq,use-prox;
0083 };
0084 };
0085
0086 iqs620a_pwm: pwm {
0087 compatible = "azoteq,iqs620a-pwm";
0088 #pwm-cells = <2>;
0089 };
0090 };
0091 };
0092
0093 pwmleds {
0094 compatible = "pwm-leds";
0095
0096 led-1 {
0097 pwms = <&iqs620a_pwm 0 1000000>;
0098 max-brightness = <255>;
0099 };
0100 };
0101
0102 - |
0103 /* Single inductive button with bipolar dock/tablet-mode switch. */
0104 #include <dt-bindings/input/input.h>
0105 #include <dt-bindings/interrupt-controller/irq.h>
0106
0107 i2c {
0108 #address-cells = <1>;
0109 #size-cells = <0>;
0110
0111 iqs620a@44 {
0112 compatible = "azoteq,iqs620a";
0113 reg = <0x44>;
0114 interrupt-parent = <&gpio>;
0115 interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
0116
0117 firmware-name = "iqs620a_coil.bin";
0118
0119 keys {
0120 compatible = "azoteq,iqs620a-keys";
0121
0122 linux,keycodes = <0>,
0123 <0>,
0124 <0>,
0125 <0>,
0126 <0>,
0127 <0>,
0128 <KEY_MUTE>;
0129
0130 hall-switch-north {
0131 linux,code = <SW_DOCK>;
0132 };
0133
0134 hall-switch-south {
0135 linux,code = <SW_TABLET_MODE>;
0136 };
0137 };
0138 };
0139 };
0140
0141 - |
0142 /* Dual capacitive buttons with volume knob. */
0143 #include <dt-bindings/input/input.h>
0144 #include <dt-bindings/interrupt-controller/irq.h>
0145
0146 i2c {
0147 #address-cells = <1>;
0148 #size-cells = <0>;
0149
0150 iqs624@44 {
0151 compatible = "azoteq,iqs624";
0152 reg = <0x44>;
0153 interrupt-parent = <&gpio>;
0154 interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
0155
0156 keys {
0157 compatible = "azoteq,iqs624-keys";
0158
0159 linux,keycodes = <BTN_0>,
0160 <0>,
0161 <BTN_1>,
0162 <0>,
0163 <0>,
0164 <0>,
0165 <0>,
0166 <0>,
0167 <0>,
0168 <0>,
0169 <0>,
0170 <0>,
0171 <0>,
0172 <0>,
0173 <KEY_VOLUMEUP>,
0174 <KEY_VOLUMEDOWN>;
0175 };
0176 };
0177 };
0178
0179 ...