xref: /linux/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml (revision d7aa60d966461ca6114dc348e97889dc8850ff7f)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/media/i2c/dongwoon,dw9719.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Dongwoon Anatech DW9719 Voice Coil Motor (VCM) Controller
8
9maintainers:
10  - André Apitzsch <git@apitzsch.eu>
11
12description:
13  The Dongwoon DW9718S/9719/9761 is a single 10-bit digital-to-analog converter
14  with 100 mA output current sink capability, designed for linear control of
15  voice coil motors (VCM) in camera lenses. This chip provides a Smart Actuator
16  Control (SAC) mode intended for driving voice coil lenses in camera modules.
17
18properties:
19  compatible:
20    enum:
21      - dongwoon,dw9718s
22      - dongwoon,dw9719
23      - dongwoon,dw9761
24      - dongwoon,dw9800k
25
26  reg:
27    maxItems: 1
28
29  vdd-supply:
30    description: VDD power supply
31
32  dongwoon,sac-mode:
33    description: |
34      Slew Rate Control mode to use: direct, LSC (Linear Slope Control) or
35      SAC1-SAC6 (Smart Actuator Control).
36    $ref: /schemas/types.yaml#/definitions/uint32
37    enum:
38      - 0   # Direct mode
39      - 1   # LSC mode
40      - 2   # SAC1 mode (operation time# 0.32 x Tvib)
41      - 3   # SAC2 mode (operation time# 0.48 x Tvib)
42      - 4   # SAC3 mode (operation time# 0.72 x Tvib)
43      - 5   # SAC4 mode (operation time# 1.20 x Tvib)
44      - 6   # SAC5 mode (operation time# 1.64 x Tvib)
45      - 7   # SAC6 mode (operation time# 1.88 x Tvib)
46    default: 4
47
48  dongwoon,vcm-prescale:
49    description:
50      Indication of VCM switching frequency dividing rate select.
51    $ref: /schemas/types.yaml#/definitions/uint32
52
53required:
54  - compatible
55  - reg
56  - vdd-supply
57
58allOf:
59  - if:
60      properties:
61        compatible:
62          contains:
63            const: dongwoon,dw9718s
64    then:
65      properties:
66        dongwoon,vcm-prescale:
67          description:
68            The final frequency is 10 MHz divided by (value + 2).
69          maximum: 15
70          default: 0
71
72additionalProperties: false
73
74examples:
75  - |
76    i2c {
77        #address-cells = <1>;
78        #size-cells = <0>;
79
80        actuator@c {
81            compatible = "dongwoon,dw9718s";
82            reg = <0x0c>;
83
84            vdd-supply = <&pm8937_l17>;
85
86            dongwoon,sac-mode = <4>;
87            dongwoon,vcm-prescale = <0>;
88        };
89    };
90