Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPL-2.0 should be replaced by GPL-2.0-only (or GPL-2.0-or-later)

%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 <[email protected]>

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>;
};
};
...
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6932,6 +6932,7 @@ M: Daniel Scally <[email protected]>
L: [email protected]
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
Expand Down
140 changes: 140 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8917-motorola-nora.dts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,108 @@
status = "okay";
};

&camss {
vdda-supply = <&pm8937_l2>;
status = "okay";

ports {
port@0 {
reg = <0>;
csiphy0_ep: endpoint {
clock-lanes = <7>;
data-lanes = <0 1 2 3>;
remote-endpoint = <&rear_cam_ep>;
};
};
port@1 {
reg = <1>;
csiphy1_ep: endpoint {
clock-lanes = <7>;
data-lanes = <0 1>;
remote-endpoint = <&front_cam_ep>;
};
};
};
};

&cci {
pinctrl-names = "default";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pinctrl-names comes after pinctrls-0

pinctrl-0 = <&cci0_default>,
<&cci1_default>,
<&camss_mclk0_default>,
<&camss_mclk1_default>;
status = "okay";
};

&cci_i2c0 {
focus_rear: vcm@c {
compatible = "dongwoon,dw9718s";
reg = <0x0c>;
vdd-supply = <&pm8937_l17>;
};

camera@10 {
compatible = "ovti,ov5675";
reg = <0x10>;

clocks = <&gcc GCC_CAMSS_MCLK1_CLK>;
clock-rates = <19200000>;

pinctrl-0 = <&cam_sensor_front_default>;
pinctrl-names = "default";

reset-gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;

avdd-supply = <&pm8937_l22>;
dvdd-supply = <&pm8937_l23>;
dovdd-supply = <&pm8937_l6>;

orientation = <0>; /* Front */
rotation = <90>;

/* flash-leds = <&flash_front>; NOTYET: spmi-flash-led-v1 needs v4l2 support */

port {
front_cam_ep: endpoint {
data-lanes = <0 1>;
link-frequencies = /bits/ 64 <450000000>;
remote-endpoint = <&csiphy1_ep>;
};
};
};

camera@2d {
compatible = "samsung,s5k3l8";
reg = <0x2d>;

clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
clock-frequency = <24000000>;

pinctrl-0 = <&cam_sensor_rear_default>;
pinctrl-names = "default";

reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;

avdd-supply = <&pm8937_l22>;
dvdd-supply = <&pm8937_l23>;
vio-supply = <&pm8937_l6>;
aux-supply = <&pm8937_l17>;

orientation = <1>; /* Rear */
rotation = <270>;

lens-focus = <&focus_rear>;
/* flash-leds = <&flash_rear>; NOTYET: spmi-flash-led-v1 needs v4l2 support */

port {
rear_cam_ep: endpoint {
data-lanes = <0 1 2 3>;
remote-endpoint = <&csiphy0_ep>;
};
};
};
};

&blsp1_i2c2 {
clock-frequency = <400000>;
status = "okay";
Expand Down Expand Up @@ -253,6 +355,30 @@
status = "okay";
};

&pmi8950_flash {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

flash_rear: led@0 {
reg = <0>;
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-max-microamp = <200000>;
flash-max-microamp = <1000000>;
flash-max-timeout-us = <1280000>;
};

flash_front: led@1 {
reg = <1>;
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-max-microamp = <200000>;
flash-max-microamp = <1000000>;
flash-max-timeout-us = <1280000>;
};
};

&pmi8950_smbcharger {
monitored-battery = <&battery>;
status = "okay";
Expand Down Expand Up @@ -429,6 +555,20 @@
&tlmm {
gpio-reserved-ranges = <20 4>;

cam_sensor_rear_default: cam-sensor-rear-default-state {
pins = "gpio35";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

cam_sensor_front_default: cam-sensor-front-default-state {
pins = "gpio40";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

gpio_keys_default: gpio-keys-default-state {
pins = "gpio91";
function = "gpio";
Expand Down
21 changes: 21 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8917.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,27 @@
bias-pull-down;
};

camss_mclk0_default: camss-mclk0-default-state {
pins = "gpio26";
function = "cam_mclk";
drive-strength = <2>;
bias-disable;
};

camss_mclk1_default: camss-mclk1-default-state {
pins = "gpio27";
function = "cam_mclk";
drive-strength = <2>;
bias-disable;
};

camss_mclk2_default: camss-mclk2-default-state {
pins = "gpio28";
function = "cam_mclk";
drive-strength = <2>;
bias-disable;
};

cci0_default: cci0-default-state {
pins = "gpio29", "gpio30";
function = "cci_i2c";
Expand Down
10 changes: 10 additions & 0 deletions drivers/media/i2c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,16 @@ config VIDEO_S5C73M3
This is a V4L2 sensor driver for Samsung S5C73M3
8 Mpixel camera.

config VIDEO_S5K2XX
tristate "Samsung S5K2xx-family sensors support"
depends on I2C && VIDEO_DEV
select MEDIA_CONTROLLER
select VIDEO_V4L2_SUBDEV_API
select REGMAP_I2C
help
This is a V4L2 sensor driver for Samsung S5K2-family raw
camera sensors.

config VIDEO_S5K5BAF
tristate "Samsung S5K5BAF sensor support"
help
Expand Down
1 change: 1 addition & 0 deletions drivers/media/i2c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ obj-$(CONFIG_VIDEO_RDACM20) += rdacm20.o
obj-$(CONFIG_VIDEO_RDACM21) += rdacm21.o
obj-$(CONFIG_VIDEO_RJ54N1) += rj54n1cb0c.o
obj-$(CONFIG_VIDEO_S5C73M3) += s5c73m3/
obj-$(CONFIG_VIDEO_S5K2XX) += s5k2xx.o
obj-$(CONFIG_VIDEO_S5K5BAF) += s5k5baf.o
obj-$(CONFIG_VIDEO_S5K6A3) += s5k6a3.o
obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o
Expand Down
Loading
Loading