lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250210082035.8670-2-val@packett.cool>
Date: Mon, 10 Feb 2025 05:19:16 -0300
From: Val Packett <val@...kett.cool>
To: 
Cc: Val Packett <val@...kett.cool>,
	Daniel Scally <djrscally@...il.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Sakari Ailus <sakari.ailus@...ux.intel.com>,
	linux-media@...r.kernel.org,
	devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/5] media: dt-bindings: i2c: add DW9719/DW9718S VCM binding

Add DT bindings for the dw9719 voice coil motor driver, which is getting
devicetree compatibles added along with DW9718S support.

Also mention the binding file in the corresponding MAINTAINERS entry.

Signed-off-by: Val Packett <val@...kett.cool>
---
 .../bindings/media/i2c/dongwoon,dw9719.yaml   | 110 ++++++++++++++++++
 MAINTAINERS                                   |   1 +
 2 files changed, 111 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml

diff --git a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
new file mode 100644
index 000000000000..88161038223f
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
@@ -0,0 +1,110 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/dongwoon,dw9719.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dongwoon Anatech DW9719 Voice Coil Motor (VCM) DAC
+
+maintainers:
+  - Daniel Scally <djrscally@...il.com>
+
+description: |-
+  The Dongwoon DW9719/DW9718S is a single 10-bit digital-to-analog converter
+  with 100 mA output current sink capability, designed for linear control of
+  voice coil motors (VCM) in camera lenses. This chip provides a Smart Actuator
+  Control (SAC) mode intended for driving voice coil lenses in camera modules.
+
+properties:
+  compatible:
+    enum:
+      - dongwoon,dw9719
+      - dongwoon,dw9718s
+
+  reg:
+    maxItems: 1
+
+  vdd-supply:
+    description: VDD power supply
+
+  dongwoon,sac-mode:
+    description: |
+      Slew Rate Control mode to use: direct, LSC (Linear Slope Control) or
+      SAC1-SAC6 (Smart Actuator Control).
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum:
+      - 0    # Direct mode
+      - 1    # LSC mode
+      - 2    # SAC1 mode (operation time# 0.32 x Tvib)
+      - 3    # SAC2 mode (operation time# 0.48 x Tvib)
+      - 4    # SAC3 mode (operation time# 0.72 x Tvib)
+      - 5    # SAC4 mode (operation time# 1.20 x Tvib)
+      - 6    # SAC5 mode (operation time# 1.64 x Tvib)
+      - 7    # SAC6 mode (operation time# 1.88 x Tvib)
+    default: 4
+
+  dongwoon,vcm-freq:
+    description:
+      The switching frequency for the voice coil motor.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: dongwoon,dw9718s
+    then:
+      properties:
+        dongwoon,vcm-freq:
+          default: 0
+          enum:
+            - 0    # 5.00 MHz
+            - 1    # 3.33 MHz
+            - 2    # 2.50 MHz
+            - 3    # 2.00 MHz
+            - 4    # 1.67 MHz
+            - 5    # 1.43 MHz
+            - 6    # 1.25 MHz
+            - 7    # 1.11 MHz
+            - 8    # 1.00 MHz
+            - 9    # 0.91 MHz
+            - 10   # 0.83 MHz
+            - 11   # 0.77 MHz
+            - 12   # 0.71 MHz
+            - 13   # 0.67 MHz
+            - 14   # 0.63 MHz
+            - 15   # 0.59 MHz
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: dongwoon,dw9719
+    then:
+      properties:
+        dongwoon,vcm-freq:
+          default: 0x60
+
+required:
+  - compatible
+  - reg
+  - vdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        vcm_rear: camera-lens@c {
+            compatible = "dongwoon,dw9718s";
+            reg = <0x0c>;
+
+            vdd-supply = <&pm8937_l17>;
+        };
+    };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 603b11222d67..42dd86f5d5c8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6932,6 +6932,7 @@ M:	Daniel Scally <djrscally@...il.com>
 L:	linux-media@...r.kernel.org
 S:	Maintained
 T:	git git://linuxtv.org/media.git
+F:	Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
 F:	drivers/media/i2c/dw9719.c
 
 DONGWOON DW9768 LENS VOICE COIL DRIVER
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ