xref: /linux/Documentation/devicetree/bindings/input/imagis,isa1200.yaml (revision 3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/input/imagis,isa1200.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Imagis ISA1200 haptic motor driver
8
9maintainers:
10  - Svyatoslav Ryhel <clamor95@gmail.com>
11  - Linus Walleij <linusw@kernel.org>
12
13description:
14  The ISA1200 is a high-performance enhanced haptic motor driver designed
15  for mobile hand-held devices. It supports various voltages for both ERM
16  (Eccentric Rotating Mass) and LRA (Linear Resonant Actuator) type
17  actuators. Thanks to an embedded LDO, battery power can be used directly
18  in handheld applications.
19
20properties:
21  compatible:
22    const: imagis,isa1200
23
24  reg:
25    maxItems: 1
26
27  control-gpios:
28    description:
29      One or two GPIOs flagged as active high linked to HEN and LEN pins
30    minItems: 1
31    maxItems: 2
32
33  clocks:
34    maxItems: 1
35
36  pwms:
37    maxItems: 1
38
39  vdd-supply:
40    description:
41      Regulator for 2.4V - 5.5V power supply
42
43  vddp-supply:
44    description:
45      Regulator for 2.4V - 3.6V IO power supply
46
47  imagis,clk-div:
48    $ref: /schemas/types.yaml#/definitions/uint32
49    description:
50      Divider for the external input clock/PWM
51    enum: [128, 256, 512, 1024]
52    default: 128
53
54  imagis,pll-div:
55    $ref: /schemas/types.yaml#/definitions/uint32
56    description:
57      Divider for the internal PLL clock
58    minimum: 1
59    maximum: 15
60    default: 1
61
62  imagis,mode:
63    $ref: /schemas/types.yaml#/definitions/uint32
64    description: |
65      Defines the motor type isa1200 drives
66      0 - LRA (Linear Resonant Actuator)
67      1 - ERM (Eccentric Rotating Mass)
68    enum: [0, 1]
69    default: 0
70
71  imagis,period-ns:
72    description:
73      Period of the internal PWM channel in nanoseconds.
74    minimum: 10000
75    maximum: 30000
76
77  imagis,duty-cycle-ns:
78    description:
79      Duty cycle of the external/internal PWM channel in nanoseconds,
80      defaults to 50% of the channel's period
81
82  ldo:
83    $ref: /schemas/regulator/regulator.yaml#
84    type: object
85    description:
86      Embedded LDO regulator with voltage range 2.3V - 3.8V
87    unevaluatedProperties: false
88
89    required:
90      - regulator-min-microvolt
91      - regulator-max-microvolt
92
93required:
94  - compatible
95  - reg
96  - ldo
97
98oneOf:
99  - required:
100      - clocks
101      - imagis,period-ns
102  - required:
103      - pwms
104
105additionalProperties: false
106
107examples:
108  - |
109    #include <dt-bindings/gpio/gpio.h>
110
111    i2c {
112        #address-cells = <1>;
113        #size-cells = <0>;
114
115        haptic-engine@49 {
116            compatible = "imagis,isa1200";
117            reg = <0x49>;
118
119            clocks = <&isa1200_refclk>;
120
121            control-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>,
122                            <&gpio 23 GPIO_ACTIVE_HIGH>;
123
124            vdd-supply = <&vdd_3v3_vbat>;
125            vddp-supply = <&vdd_2v8_vvib>;
126
127            imagis,clk-div = <256>;
128            imagis,pll-div = <2>;
129
130            imagis,mode = <0>; /* LRA_MODE */
131
132            imagis,period-ns = <13400>;
133            imagis,duty-cycle-ns = <100>;
134
135            ldo {
136                regulator-name = "vdd_vib";
137                regulator-min-microvolt = <2300000>;
138                regulator-max-microvolt = <2300000>;
139            };
140        };
141    };
142