* [PATCH v2 0/4] Add support for Dongwoon Anatech DW9800K driver
@ 2025-10-09 14:35 Griffin Kroah-Hartman
2025-10-09 14:35 ` [PATCH v2 1/4] dt-bindings: media: i2c: dw9719: Document DW9800K Griffin Kroah-Hartman
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Griffin Kroah-Hartman @ 2025-10-09 14:35 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree, Daniel Scally, Sakari Ailus,
Bjorn Andersson, Konrad Dybcio, André Apitzsch, Luca Weiss
Cc: linux-media, linux-kernel, linux-arm-msm, Griffin Kroah-Hartman,
Bryan O'Donoghue
Add devicetree bindings and driver support for the DW9800K VCM driver.
The driver code is added to the preexistent dw9719 driver, which has
similar functions and method order, but different register sets.
Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
---
Changes in v2:
- Reworded commit log on patch 3
- Changed code formatting in driver
- Link to v1: https://lore.kernel.org/r/20251002-dw9800-driver-v1-0-c305328e44f0@fairphone.com
---
Griffin Kroah-Hartman (4):
dt-bindings: media: i2c: dw9719: Document DW9800K
media: i2c: dw9719: Add DW9800K support
arm64: dts: qcom: qcm6490-fairphone-fp5: Enable CCI pull-up
arm64: dts: qcom: qcm6490-fairphone-fp5: Add UW cam actuator
.../bindings/media/i2c/dongwoon,dw9719.yaml | 1 +
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 11 +++++++++++
drivers/media/i2c/dw9719.c | 20 ++++++++++++++++++--
3 files changed, 30 insertions(+), 2 deletions(-)
---
base-commit: 6063257da111c7639d020c5f15bfb37fb839d8b6
change-id: 20250918-dw9800-driver-58105cd495e0
prerequisite-change-id: 20250709-dw9719-8a8822efc1b1:v2
prerequisite-patch-id: 5a1b6083c0f5df1421cfe6952dac44d9ddb7fb07
prerequisite-patch-id: db5f49e91aaf521fa487994765b4107f543531d6
prerequisite-patch-id: 76bfa65d3ff23fc827790b0868bc34655cfa93fe
prerequisite-patch-id: b76d61c90bdbf20f437d2fe438d54e707621e953
prerequisite-patch-id: 46fc09662693e6a51bb89ab4d0914265c74bc3bb
prerequisite-patch-id: 4e0012f76dd03d5653ba185a8ccc59017a1b90d1
prerequisite-patch-id: a618641cd4b7cde40825fa0d4201b6c27e74266d
prerequisite-patch-id: 8b43ff7e81258cc7624800e4bf645458a0f05380
Best regards,
--
Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/4] dt-bindings: media: i2c: dw9719: Document DW9800K
2025-10-09 14:35 [PATCH v2 0/4] Add support for Dongwoon Anatech DW9800K driver Griffin Kroah-Hartman
@ 2025-10-09 14:35 ` Griffin Kroah-Hartman
2025-10-09 14:35 ` [PATCH v2 2/4] media: i2c: dw9719: Add DW9800K support Griffin Kroah-Hartman
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Griffin Kroah-Hartman @ 2025-10-09 14:35 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree, Daniel Scally, Sakari Ailus,
Bjorn Andersson, Konrad Dybcio, André Apitzsch, Luca Weiss
Cc: linux-media, linux-kernel, linux-arm-msm, Griffin Kroah-Hartman
Document the Dongwoon Anatech DW9800K.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
---
Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
index 38db0764c0f70ad49295dcddc182b7e100a68b29..8e8d62436e0d0c4f9af9e52262b23881abd37cec 100644
--- a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
@@ -21,6 +21,7 @@ properties:
- dongwoon,dw9718s
- dongwoon,dw9719
- dongwoon,dw9761
+ - dongwoon,dw9800k
reg:
maxItems: 1
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/4] media: i2c: dw9719: Add DW9800K support
2025-10-09 14:35 [PATCH v2 0/4] Add support for Dongwoon Anatech DW9800K driver Griffin Kroah-Hartman
2025-10-09 14:35 ` [PATCH v2 1/4] dt-bindings: media: i2c: dw9719: Document DW9800K Griffin Kroah-Hartman
@ 2025-10-09 14:35 ` Griffin Kroah-Hartman
2025-10-09 14:35 ` [PATCH v2 3/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable CCI pull-up Griffin Kroah-Hartman
2025-10-09 14:35 ` [PATCH v2 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add UW cam actuator Griffin Kroah-Hartman
3 siblings, 0 replies; 7+ messages in thread
From: Griffin Kroah-Hartman @ 2025-10-09 14:35 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree, Daniel Scally, Sakari Ailus,
Bjorn Andersson, Konrad Dybcio, André Apitzsch, Luca Weiss
Cc: linux-media, linux-kernel, linux-arm-msm, Griffin Kroah-Hartman
The DW9800K is a similar part to the DW9719. The method for operation is
the same as the DW9719, but the register set is different. Add support
for this part to the existing dw9719 driver.
Tested on the Fairphone 5 smartphone.
Tested-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
---
drivers/media/i2c/dw9719.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
index 3627e78b8b6668933c4ecd92231465ce4105ff0c..fad716ece5ddcdc450669851b4b2685691b681bb 100644
--- a/drivers/media/i2c/dw9719.c
+++ b/drivers/media/i2c/dw9719.c
@@ -68,6 +68,9 @@
#define DW9761_VCM_PRELOAD CCI_REG8(8)
#define DW9761_DEFAULT_VCM_PRELOAD 0x73
+#define DW9800K_DEFAULT_SAC 1
+#define DW9800K_MODE_SAC_SHIFT 6
+#define DW9800K_DEFAULT_VCM_FREQ 0x10
#define to_dw9719_device(x) container_of(x, struct dw9719_device, sd)
@@ -75,6 +78,7 @@ enum dw9719_model {
DW9718S,
DW9719,
DW9761,
+ DW9800K,
};
struct dw9719_device {
@@ -130,11 +134,16 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
cci_write(dw9719->regmap, reg_pwr, DW9719_STANDBY, &ret);
if (detect) {
- /* This model does not have an INFO register */
- if (dw9719->model == DW9718S) {
+ /* These models do not have an INFO register */
+ switch (dw9719->model) {
+ case DW9718S:
dw9719->sac_mode = DW9718S_DEFAULT_SAC;
dw9719->vcm_freq = DW9718S_DEFAULT_VCM_FREQ;
goto props;
+ case DW9800K:
+ dw9719->sac_mode = DW9800K_DEFAULT_SAC;
+ dw9719->vcm_freq = DW9800K_DEFAULT_VCM_FREQ;
+ goto props;
}
ret = cci_read(dw9719->regmap, DW9719_INFO, &val, NULL);
@@ -177,6 +186,12 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
}
switch (dw9719->model) {
+ case DW9800K:
+ cci_write(dw9719->regmap, DW9719_CONTROL, DW9719_ENABLE_RINGING, &ret);
+ cci_write(dw9719->regmap, DW9719_MODE,
+ dw9719->sac_mode << DW9800K_MODE_SAC_SHIFT, &ret);
+ cci_write(dw9719->regmap, DW9719_VCM_FREQ, dw9719->vcm_freq, &ret);
+ break;
case DW9718S:
/* Datasheet says [OCP/UVLO] should be disabled below 2.5V */
dw9719->sac_mode &= DW9718S_CONTROL_SAC_MASK;
@@ -426,6 +441,7 @@ static const struct of_device_id dw9719_of_table[] = {
{ .compatible = "dongwoon,dw9718s", .data = (const void *)DW9718S },
{ .compatible = "dongwoon,dw9719", .data = (const void *)DW9719 },
{ .compatible = "dongwoon,dw9761", .data = (const void *)DW9761 },
+ { .compatible = "dongwoon,dw9800k", .data = (const void *)DW9800K },
{ }
};
MODULE_DEVICE_TABLE(of, dw9719_of_table);
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable CCI pull-up
2025-10-09 14:35 [PATCH v2 0/4] Add support for Dongwoon Anatech DW9800K driver Griffin Kroah-Hartman
2025-10-09 14:35 ` [PATCH v2 1/4] dt-bindings: media: i2c: dw9719: Document DW9800K Griffin Kroah-Hartman
2025-10-09 14:35 ` [PATCH v2 2/4] media: i2c: dw9719: Add DW9800K support Griffin Kroah-Hartman
@ 2025-10-09 14:35 ` Griffin Kroah-Hartman
2025-10-09 14:47 ` Konrad Dybcio
2025-10-09 14:35 ` [PATCH v2 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add UW cam actuator Griffin Kroah-Hartman
3 siblings, 1 reply; 7+ messages in thread
From: Griffin Kroah-Hartman @ 2025-10-09 14:35 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree, Daniel Scally, Sakari Ailus,
Bjorn Andersson, Konrad Dybcio, André Apitzsch, Luca Weiss
Cc: linux-media, linux-kernel, linux-arm-msm, Griffin Kroah-Hartman,
Bryan O'Donoghue
Enable vreg_l6p, which is the voltage source for the pull-up resistor of
the CCI busses.
This ensures that I2C communication works as expected.
Reviewed-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
---
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index e115b6a52b299ef663ccfb614785f8f89091f39d..2dd2c452592aa6b0ac826f19eb9cb1a8b90cee47 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -749,6 +749,8 @@ vreg_l6p: ldo6 {
regulator-name = "vreg_l6p";
regulator-min-microvolt = <1700000>;
regulator-max-microvolt = <1904000>;
+ /* Pull-up for CCI I2C busses */
+ regulator-always-on;
};
vreg_l7p: ldo7 {
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add UW cam actuator
2025-10-09 14:35 [PATCH v2 0/4] Add support for Dongwoon Anatech DW9800K driver Griffin Kroah-Hartman
` (2 preceding siblings ...)
2025-10-09 14:35 ` [PATCH v2 3/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable CCI pull-up Griffin Kroah-Hartman
@ 2025-10-09 14:35 ` Griffin Kroah-Hartman
2025-10-09 14:47 ` Konrad Dybcio
3 siblings, 1 reply; 7+ messages in thread
From: Griffin Kroah-Hartman @ 2025-10-09 14:35 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree, Daniel Scally, Sakari Ailus,
Bjorn Andersson, Konrad Dybcio, André Apitzsch, Luca Weiss
Cc: linux-media, linux-kernel, linux-arm-msm, Griffin Kroah-Hartman
Add a node for the Dongwoon DW9800K actuator, used for focus of the
ultra-wide camera sensor.
Tested-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
---
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index 2dd2c452592aa6b0ac826f19eb9cb1a8b90cee47..0e86cd5ff527925c7dba15c4e0ee5fc409fe4ce6 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -627,6 +627,15 @@ eeprom@50 {
};
&cci0_i2c1 {
+ camera_imx858_dw9800k: actuator@e {
+ compatible = "dongwoon,dw9800k";
+ reg = <0x0e>;
+ vdd-supply = <&vreg_afvdd_2p8>;
+
+ dongwoon,sac-mode = <1>;
+ dongwoon,vcm-prescale = <16>;
+ };
+
/* IMX858 @ 29 */
eeprom@54 {
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 3/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable CCI pull-up
2025-10-09 14:35 ` [PATCH v2 3/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable CCI pull-up Griffin Kroah-Hartman
@ 2025-10-09 14:47 ` Konrad Dybcio
0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2025-10-09 14:47 UTC (permalink / raw)
To: Griffin Kroah-Hartman, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree, Daniel Scally,
Sakari Ailus, Bjorn Andersson, Konrad Dybcio, André Apitzsch,
Luca Weiss
Cc: linux-media, linux-kernel, linux-arm-msm, Bryan O'Donoghue
On 10/9/25 4:35 PM, Griffin Kroah-Hartman wrote:
> Enable vreg_l6p, which is the voltage source for the pull-up resistor of
> the CCI busses.
>
> This ensures that I2C communication works as expected.
>
> Reviewed-by: Bryan O'Donoghue <bod@kernel.org>
> Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add UW cam actuator
2025-10-09 14:35 ` [PATCH v2 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add UW cam actuator Griffin Kroah-Hartman
@ 2025-10-09 14:47 ` Konrad Dybcio
0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2025-10-09 14:47 UTC (permalink / raw)
To: Griffin Kroah-Hartman, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree, Daniel Scally,
Sakari Ailus, Bjorn Andersson, Konrad Dybcio, André Apitzsch,
Luca Weiss
Cc: linux-media, linux-kernel, linux-arm-msm
On 10/9/25 4:35 PM, Griffin Kroah-Hartman wrote:
> Add a node for the Dongwoon DW9800K actuator, used for focus of the
> ultra-wide camera sensor.
>
> Tested-by: Luca Weiss <luca.weiss@fairphone.com>
> Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-10-09 14:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-09 14:35 [PATCH v2 0/4] Add support for Dongwoon Anatech DW9800K driver Griffin Kroah-Hartman
2025-10-09 14:35 ` [PATCH v2 1/4] dt-bindings: media: i2c: dw9719: Document DW9800K Griffin Kroah-Hartman
2025-10-09 14:35 ` [PATCH v2 2/4] media: i2c: dw9719: Add DW9800K support Griffin Kroah-Hartman
2025-10-09 14:35 ` [PATCH v2 3/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable CCI pull-up Griffin Kroah-Hartman
2025-10-09 14:47 ` Konrad Dybcio
2025-10-09 14:35 ` [PATCH v2 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add UW cam actuator Griffin Kroah-Hartman
2025-10-09 14:47 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox