13fa97ae0SDongchun Zhu# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
23fa97ae0SDongchun Zhu# Copyright (c) 2020 MediaTek Inc.
33fa97ae0SDongchun Zhu%YAML 1.2
43fa97ae0SDongchun Zhu---
53fa97ae0SDongchun Zhu$id: http://devicetree.org/schemas/media/i2c/dongwoon,dw9768.yaml#
63fa97ae0SDongchun Zhu$schema: http://devicetree.org/meta-schemas/core.yaml#
73fa97ae0SDongchun Zhu
83fa97ae0SDongchun Zhutitle: Dongwoon Anatech DW9768 Voice Coil Motor (VCM) Lens Device Tree Bindings
93fa97ae0SDongchun Zhu
103fa97ae0SDongchun Zhumaintainers:
113fa97ae0SDongchun Zhu  - Dongchun Zhu <dongchun.zhu@mediatek.com>
123fa97ae0SDongchun Zhu
133fa97ae0SDongchun Zhudescription: |-
143fa97ae0SDongchun Zhu  The Dongwoon DW9768 is a single 10-bit digital-to-analog (DAC) converter
153fa97ae0SDongchun Zhu  with 100 mA output current sink capability. VCM current is controlled with
163fa97ae0SDongchun Zhu  a linear mode driver. The DAC is controlled via a 2-wire (I2C-compatible)
173fa97ae0SDongchun Zhu  serial interface that operates at clock rates up to 1MHz. This chip
183fa97ae0SDongchun Zhu  integrates Advanced Actuator Control (AAC) technology and is intended for
193fa97ae0SDongchun Zhu  driving voice coil lenses in camera modules.
203fa97ae0SDongchun Zhu
213fa97ae0SDongchun Zhuproperties:
223fa97ae0SDongchun Zhu  compatible:
233fa97ae0SDongchun Zhu    enum:
243fa97ae0SDongchun Zhu      - dongwoon,dw9768 # for DW9768 VCM
253fa97ae0SDongchun Zhu      - giantec,gt9769  # for GT9769 VCM
263fa97ae0SDongchun Zhu
273fa97ae0SDongchun Zhu  reg:
283fa97ae0SDongchun Zhu    maxItems: 1
293fa97ae0SDongchun Zhu
303fa97ae0SDongchun Zhu  vin-supply:
313fa97ae0SDongchun Zhu    description:
323fa97ae0SDongchun Zhu      Definition of the regulator used as Digital I/O voltage supply.
333fa97ae0SDongchun Zhu
343fa97ae0SDongchun Zhu  vdd-supply:
353fa97ae0SDongchun Zhu    description:
363fa97ae0SDongchun Zhu      Definition of the regulator used as Digital core voltage supply.
373fa97ae0SDongchun Zhu
383fa97ae0SDongchun Zhu  dongwoon,aac-mode:
393fa97ae0SDongchun Zhu    description:
403fa97ae0SDongchun Zhu      Indication of AAC mode select.
415f0b06daSRob Herring    $ref: "/schemas/types.yaml#/definitions/uint32"
425f0b06daSRob Herring    enum:
433fa97ae0SDongchun Zhu      - 1    #  AAC2 mode(operation time# 0.48 x Tvib)
443fa97ae0SDongchun Zhu      - 2    #  AAC3 mode(operation time# 0.70 x Tvib)
453fa97ae0SDongchun Zhu      - 3    #  AAC4 mode(operation time# 0.75 x Tvib)
463fa97ae0SDongchun Zhu      - 5    #  AAC8 mode(operation time# 1.13 x Tvib)
473fa97ae0SDongchun Zhu    default: 2
483fa97ae0SDongchun Zhu
493fa97ae0SDongchun Zhu  dongwoon,aac-timing:
503fa97ae0SDongchun Zhu    description:
513fa97ae0SDongchun Zhu      Number of AAC Timing count that controlled by one 6-bit period of
523fa97ae0SDongchun Zhu      vibration register AACT[5:0], the unit of which is 100 us.
535f0b06daSRob Herring    $ref: "/schemas/types.yaml#/definitions/uint32"
545f0b06daSRob Herring    default: 0x20
553fa97ae0SDongchun Zhu    minimum: 0x00
563fa97ae0SDongchun Zhu    maximum: 0x3f
573fa97ae0SDongchun Zhu
583fa97ae0SDongchun Zhu  dongwoon,clock-presc:
593fa97ae0SDongchun Zhu    description:
603fa97ae0SDongchun Zhu      Indication of VCM internal clock dividing rate select, as one multiple
613fa97ae0SDongchun Zhu      factor to calculate VCM ring periodic time Tvib.
625f0b06daSRob Herring    $ref: "/schemas/types.yaml#/definitions/uint32"
635f0b06daSRob Herring    enum:
643fa97ae0SDongchun Zhu      - 0    #  Dividing Rate -  2
653fa97ae0SDongchun Zhu      - 1    #  Dividing Rate -  1
663fa97ae0SDongchun Zhu      - 2    #  Dividing Rate -  1/2
673fa97ae0SDongchun Zhu      - 3    #  Dividing Rate -  1/4
683fa97ae0SDongchun Zhu      - 4    #  Dividing Rate -  8
693fa97ae0SDongchun Zhu      - 5    #  Dividing Rate -  4
703fa97ae0SDongchun Zhu    default: 1
713fa97ae0SDongchun Zhu
723fa97ae0SDongchun Zhurequired:
733fa97ae0SDongchun Zhu  - compatible
743fa97ae0SDongchun Zhu  - reg
753fa97ae0SDongchun Zhu  - vin-supply
763fa97ae0SDongchun Zhu  - vdd-supply
773fa97ae0SDongchun Zhu
783fa97ae0SDongchun ZhuadditionalProperties: false
793fa97ae0SDongchun Zhu
803fa97ae0SDongchun Zhuexamples:
813fa97ae0SDongchun Zhu  - |
823fa97ae0SDongchun Zhu
833fa97ae0SDongchun Zhu    i2c {
843fa97ae0SDongchun Zhu        #address-cells = <1>;
853fa97ae0SDongchun Zhu        #size-cells = <0>;
863fa97ae0SDongchun Zhu
873fa97ae0SDongchun Zhu        dw9768: camera-lens@c {
883fa97ae0SDongchun Zhu            compatible = "dongwoon,dw9768";
893fa97ae0SDongchun Zhu            reg = <0x0c>;
903fa97ae0SDongchun Zhu
913fa97ae0SDongchun Zhu            vin-supply = <&mt6358_vcamio_reg>;
923fa97ae0SDongchun Zhu            vdd-supply = <&mt6358_vcama2_reg>;
933fa97ae0SDongchun Zhu            dongwoon,aac-timing = <0x39>;
943fa97ae0SDongchun Zhu        };
953fa97ae0SDongchun Zhu    };
963fa97ae0SDongchun Zhu
973fa97ae0SDongchun Zhu...
98