18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 28c2ecf20Sopenharmony_ci# Copyright (c) 2020 MediaTek Inc. 38c2ecf20Sopenharmony_ci%YAML 1.2 48c2ecf20Sopenharmony_ci--- 58c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/media/i2c/dongwoon,dw9768.yaml# 68c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_cititle: Dongwoon Anatech DW9768 Voice Coil Motor (VCM) Lens Device Tree Bindings 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_cimaintainers: 118c2ecf20Sopenharmony_ci - Dongchun Zhu <dongchun.zhu@mediatek.com> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cidescription: |- 148c2ecf20Sopenharmony_ci The Dongwoon DW9768 is a single 10-bit digital-to-analog (DAC) converter 158c2ecf20Sopenharmony_ci with 100 mA output current sink capability. VCM current is controlled with 168c2ecf20Sopenharmony_ci a linear mode driver. The DAC is controlled via a 2-wire (I2C-compatible) 178c2ecf20Sopenharmony_ci serial interface that operates at clock rates up to 1MHz. This chip 188c2ecf20Sopenharmony_ci integrates Advanced Actuator Control (AAC) technology and is intended for 198c2ecf20Sopenharmony_ci driving voice coil lenses in camera modules. 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciproperties: 228c2ecf20Sopenharmony_ci compatible: 238c2ecf20Sopenharmony_ci enum: 248c2ecf20Sopenharmony_ci - dongwoon,dw9768 # for DW9768 VCM 258c2ecf20Sopenharmony_ci - giantec,gt9769 # for GT9769 VCM 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci reg: 288c2ecf20Sopenharmony_ci maxItems: 1 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci vin-supply: 318c2ecf20Sopenharmony_ci description: 328c2ecf20Sopenharmony_ci Definition of the regulator used as Digital I/O voltage supply. 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci vdd-supply: 358c2ecf20Sopenharmony_ci description: 368c2ecf20Sopenharmony_ci Definition of the regulator used as Digital core voltage supply. 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci dongwoon,aac-mode: 398c2ecf20Sopenharmony_ci description: 408c2ecf20Sopenharmony_ci Indication of AAC mode select. 418c2ecf20Sopenharmony_ci $ref: "/schemas/types.yaml#/definitions/uint32" 428c2ecf20Sopenharmony_ci enum: 438c2ecf20Sopenharmony_ci - 1 # AAC2 mode(operation time# 0.48 x Tvib) 448c2ecf20Sopenharmony_ci - 2 # AAC3 mode(operation time# 0.70 x Tvib) 458c2ecf20Sopenharmony_ci - 3 # AAC4 mode(operation time# 0.75 x Tvib) 468c2ecf20Sopenharmony_ci - 5 # AAC8 mode(operation time# 1.13 x Tvib) 478c2ecf20Sopenharmony_ci default: 2 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci dongwoon,aac-timing: 508c2ecf20Sopenharmony_ci description: 518c2ecf20Sopenharmony_ci Number of AAC Timing count that controlled by one 6-bit period of 528c2ecf20Sopenharmony_ci vibration register AACT[5:0], the unit of which is 100 us. 538c2ecf20Sopenharmony_ci $ref: "/schemas/types.yaml#/definitions/uint32" 548c2ecf20Sopenharmony_ci default: 0x20 558c2ecf20Sopenharmony_ci minimum: 0x00 568c2ecf20Sopenharmony_ci maximum: 0x3f 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci dongwoon,clock-presc: 598c2ecf20Sopenharmony_ci description: 608c2ecf20Sopenharmony_ci Indication of VCM internal clock dividing rate select, as one multiple 618c2ecf20Sopenharmony_ci factor to calculate VCM ring periodic time Tvib. 628c2ecf20Sopenharmony_ci $ref: "/schemas/types.yaml#/definitions/uint32" 638c2ecf20Sopenharmony_ci enum: 648c2ecf20Sopenharmony_ci - 0 # Dividing Rate - 2 658c2ecf20Sopenharmony_ci - 1 # Dividing Rate - 1 668c2ecf20Sopenharmony_ci - 2 # Dividing Rate - 1/2 678c2ecf20Sopenharmony_ci - 3 # Dividing Rate - 1/4 688c2ecf20Sopenharmony_ci - 4 # Dividing Rate - 8 698c2ecf20Sopenharmony_ci - 5 # Dividing Rate - 4 708c2ecf20Sopenharmony_ci default: 1 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_cirequired: 738c2ecf20Sopenharmony_ci - compatible 748c2ecf20Sopenharmony_ci - reg 758c2ecf20Sopenharmony_ci - vin-supply 768c2ecf20Sopenharmony_ci - vdd-supply 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ciadditionalProperties: false 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ciexamples: 818c2ecf20Sopenharmony_ci - | 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci i2c { 848c2ecf20Sopenharmony_ci #address-cells = <1>; 858c2ecf20Sopenharmony_ci #size-cells = <0>; 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci dw9768: camera-lens@c { 888c2ecf20Sopenharmony_ci compatible = "dongwoon,dw9768"; 898c2ecf20Sopenharmony_ci reg = <0x0c>; 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci vin-supply = <&mt6358_vcamio_reg>; 928c2ecf20Sopenharmony_ci vdd-supply = <&mt6358_vcama2_reg>; 938c2ecf20Sopenharmony_ci dongwoon,aac-timing = <0x39>; 948c2ecf20Sopenharmony_ci }; 958c2ecf20Sopenharmony_ci }; 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci... 98