* [PATCH RFT 0/3] Add UW Camera Actuator support for Nothing Phone (1)
@ 2026-08-01 18:04 Danila Tikhonov
2026-08-01 18:04 ` [PATCH RFT 1/3] dt-bindings: media: i2c: dw9719: Document DW9800W Danila Tikhonov
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Danila Tikhonov @ 2026-08-01 18:04 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, André Apitzsch, Daniel Scally, Sakari Ailus,
Bjorn Andersson, Konrad Dybcio, Eugene Lepshy, Vasiliy Doylov,
Achill Gilgenast, Luca Weiss, Griffin Kroah-Hartman
Cc: linux-media, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming, Danila Tikhonov
This series is marked as RFT because, in addition to adding DW9800W
support, it introduces chip ID validation for DW9800K. I do not have the
DW9800K datasheet or hardware, so I cannot confirm its chip ID value.
DW9800W support, however, has been fully tested.
A separate compatible is added for DW9800W because its datasheet
specifies a different default VCM frequency than DW9800K. The register
layout is identical, but it is unclear whether DW9800K uses the same
chip ID as DW9800W.
- Patch 1 documents the new DW9800W compatible.
- Patch 2 adds DW9800W support and moves DW9800K into the chip ID
validation switch.
- Patch 3 adds the DW9800W actuator node to the sm7325-nothing-spacewar
device-tree with the vendor-provided vcm-prescale value. The vendor-
provided sac-mode value matches the driver's default and is therefore
omitted.
Signed-off-by: Danila Tikhonov <danila@mainlining.org>
---
Danila Tikhonov (3):
dt-bindings: media: i2c: dw9719: Document DW9800W
media: i2c: dw9719: Add DW9800W support
arm64: dts: qcom: sm7325-nothing-spacewar: Add UW camera actuator
.../bindings/media/i2c/dongwoon,dw9719.yaml | 1 +
.../boot/dts/qcom/sm7325-nothing-spacewar.dts | 10 ++++++++-
drivers/media/i2c/dw9719.c | 25 ++++++++++++++++++----
3 files changed, 31 insertions(+), 5 deletions(-)
---
base-commit: 415606a7be939835db9b0d6b711887586646346d
change-id: 20260801-dw9800w-clean-b3af4ef4f875
prerequisite-message-id: <20260801143125.267054-1-danila@mainlining.org>
prerequisite-patch-id: bc2fbe0b102239e80d8effbd6db5bac152d9dbbc
prerequisite-patch-id: 29a239772d265935e75c326a5e1cb448028756b0
Best regards,
--
Danila Tikhonov <danila@mainlining.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH RFT 1/3] dt-bindings: media: i2c: dw9719: Document DW9800W
2026-08-01 18:04 [PATCH RFT 0/3] Add UW Camera Actuator support for Nothing Phone (1) Danila Tikhonov
@ 2026-08-01 18:04 ` Danila Tikhonov
2026-08-04 8:29 ` Krzysztof Kozlowski
2026-08-01 18:04 ` [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support Danila Tikhonov
2026-08-01 18:04 ` [PATCH RFT 3/3] arm64: dts: qcom: sm7325-nothing-spacewar: Add UW camera actuator Danila Tikhonov
2 siblings, 1 reply; 12+ messages in thread
From: Danila Tikhonov @ 2026-08-01 18:04 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, André Apitzsch, Daniel Scally, Sakari Ailus,
Bjorn Andersson, Konrad Dybcio, Eugene Lepshy, Vasiliy Doylov,
Achill Gilgenast, Luca Weiss, Griffin Kroah-Hartman
Cc: linux-media, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming, Danila Tikhonov
Document the Dongwoon Anatech DW9800W.
Signed-off-by: Danila Tikhonov <danila@mainlining.org>
---
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 8e8d62436e0d..63d4092ef290 100644
--- a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml
@@ -22,6 +22,7 @@ properties:
- dongwoon,dw9719
- dongwoon,dw9761
- dongwoon,dw9800k
+ - dongwoon,dw9800w
reg:
maxItems: 1
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support
2026-08-01 18:04 [PATCH RFT 0/3] Add UW Camera Actuator support for Nothing Phone (1) Danila Tikhonov
2026-08-01 18:04 ` [PATCH RFT 1/3] dt-bindings: media: i2c: dw9719: Document DW9800W Danila Tikhonov
@ 2026-08-01 18:04 ` Danila Tikhonov
2026-08-01 19:03 ` Neko
2026-08-04 8:40 ` Sakari Ailus
2026-08-01 18:04 ` [PATCH RFT 3/3] arm64: dts: qcom: sm7325-nothing-spacewar: Add UW camera actuator Danila Tikhonov
2 siblings, 2 replies; 12+ messages in thread
From: Danila Tikhonov @ 2026-08-01 18:04 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, André Apitzsch, Daniel Scally, Sakari Ailus,
Bjorn Andersson, Konrad Dybcio, Eugene Lepshy, Vasiliy Doylov,
Achill Gilgenast, Luca Weiss, Griffin Kroah-Hartman
Cc: linux-media, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming, Danila Tikhonov
The DW9800W uses the same chip ID and register layout as the DW9800K,
but requires different default VCM frequency value.
Add a separate device match entry for the DW9800W and validate the
common chip ID. Use the matched variant to select the appropriate
default values.
Tested on the Nothing Phone (1) smartphone.
Signed-off-by: Danila Tikhonov <danila@mainlining.org>
---
drivers/media/i2c/dw9719.c | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
index 3b7ba88fd67c..bb9319fc350b 100644
--- a/drivers/media/i2c/dw9719.c
+++ b/drivers/media/i2c/dw9719.c
@@ -44,6 +44,7 @@
#define DW9719_INFO CCI_REG8(0)
#define DW9719_ID 0xF1
+#define DW9800_ID 0xF2
#define DW9761_ID 0xF4
#define DW9719_CONTROL CCI_REG8(2)
@@ -72,6 +73,8 @@
#define DW9800K_MODE_SAC_SHIFT 6
#define DW9800K_DEFAULT_VCM_FREQ 0x10
+#define DW9800W_DEFAULT_VCM_FREQ 0x60
+
#define to_dw9719_device(x) container_of(x, struct dw9719_device, sd)
enum dw9719_model {
@@ -79,6 +82,7 @@ enum dw9719_model {
DW9719,
DW9761,
DW9800K,
+ DW9800W,
};
struct dw9719_device {
@@ -140,10 +144,6 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
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;
default:
break;
}
@@ -159,6 +159,21 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
dw9719->sac_mode = DW9719_DEFAULT_SAC;
dw9719->vcm_freq = DW9719_DEFAULT_VCM_FREQ;
break;
+ case DW9800_ID:
+ dw9719->sac_mode = DW9800K_DEFAULT_SAC;
+ switch (dw9719->model) {
+ case DW9800K:
+ dw9719->model = DW9800K;
+ dw9719->vcm_freq = DW9800K_DEFAULT_VCM_FREQ;
+ break;
+ case DW9800W:
+ dw9719->model = DW9800W;
+ dw9719->vcm_freq = DW9800W_DEFAULT_VCM_FREQ;
+ break;
+ default:
+ return -ENODEV;
+ }
+ break;
case DW9761_ID:
dw9719->model = DW9761;
dw9719->mode_low_bits = 0x01;
@@ -189,6 +204,7 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
switch (dw9719->model) {
case DW9800K:
+ case DW9800W:
cci_write(dw9719->regmap, DW9719_CONTROL, DW9719_ENABLE_RINGING, &ret);
cci_write(dw9719->regmap, DW9719_MODE,
dw9719->sac_mode << DW9800K_MODE_SAC_SHIFT, &ret);
@@ -453,6 +469,7 @@ static const struct of_device_id dw9719_of_table[] = {
{ .compatible = "dongwoon,dw9719", .data = (const void *)DW9719 },
{ .compatible = "dongwoon,dw9761", .data = (const void *)DW9761 },
{ .compatible = "dongwoon,dw9800k", .data = (const void *)DW9800K },
+ { .compatible = "dongwoon,dw9800w", .data = (const void *)DW9800W },
{ }
};
MODULE_DEVICE_TABLE(of, dw9719_of_table);
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH RFT 3/3] arm64: dts: qcom: sm7325-nothing-spacewar: Add UW camera actuator
2026-08-01 18:04 [PATCH RFT 0/3] Add UW Camera Actuator support for Nothing Phone (1) Danila Tikhonov
2026-08-01 18:04 ` [PATCH RFT 1/3] dt-bindings: media: i2c: dw9719: Document DW9800W Danila Tikhonov
2026-08-01 18:04 ` [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support Danila Tikhonov
@ 2026-08-01 18:04 ` Danila Tikhonov
2026-08-01 19:02 ` Neko
2 siblings, 1 reply; 12+ messages in thread
From: Danila Tikhonov @ 2026-08-01 18:04 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, André Apitzsch, Daniel Scally, Sakari Ailus,
Bjorn Andersson, Konrad Dybcio, Eugene Lepshy, Vasiliy Doylov,
Achill Gilgenast, Luca Weiss, Griffin Kroah-Hartman
Cc: linux-media, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming, Danila Tikhonov
Add a node for the Dongwoon DW9800W actuator, used for focus of the
ultra-wide camera sensor.
Signed-off-by: Danila Tikhonov <danila@mainlining.org>
---
arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts b/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts
index fb8074580110..37047beee8db 100644
--- a/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts
+++ b/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts
@@ -877,7 +877,13 @@ &cci1 {
};
&cci1_i2c0 {
- /* actuator (For Ultra Wide sensor) @ 0xc */
+ camu_dw9800w: actuator@c {
+ compatible = "dongwoon,dw9800w";
+ reg = <0x0c>;
+ vdd-supply = <&vreg_camu_vaf_1p8>;
+
+ dongwoon,vcm-prescale = <122>;
+ };
camu_s5kjn1: camera@2d {
compatible = "samsung,s5kjn1";
@@ -898,6 +904,8 @@ camu_s5kjn1: camera@2d {
orientation = <1>; /* Rear facing */
rotation = <90>;
+ lens-focus = <&camu_dw9800w>;
+
port {
camera_s5kjn1_ep: endpoint {
data-lanes = <1 2 3 4>;
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH RFT 3/3] arm64: dts: qcom: sm7325-nothing-spacewar: Add UW camera actuator
2026-08-01 18:04 ` [PATCH RFT 3/3] arm64: dts: qcom: sm7325-nothing-spacewar: Add UW camera actuator Danila Tikhonov
@ 2026-08-01 19:02 ` Neko
0 siblings, 0 replies; 12+ messages in thread
From: Neko @ 2026-08-01 19:02 UTC (permalink / raw)
To: Danila Tikhonov, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, André Apitzsch,
Daniel Scally, Sakari Ailus, Bjorn Andersson, Konrad Dybcio,
Eugene Lepshy, Achill Gilgenast, Luca Weiss,
Griffin Kroah-Hartman
Cc: linux-media, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming
On 8/1/26 9:04 PM, Danila Tikhonov wrote:
> Add a node for the Dongwoon DW9800W actuator, used for focus of the
> ultra-wide camera sensor.
>
> Signed-off-by: Danila Tikhonov <danila@mainlining.org>
> ---
> arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts b/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts
Tested-by: Vasiliy Doylov <neko@altlinux.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support
2026-08-01 18:04 ` [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support Danila Tikhonov
@ 2026-08-01 19:03 ` Neko
2026-08-04 8:40 ` Sakari Ailus
1 sibling, 0 replies; 12+ messages in thread
From: Neko @ 2026-08-01 19:03 UTC (permalink / raw)
To: Danila Tikhonov, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, André Apitzsch,
Daniel Scally, Sakari Ailus, Bjorn Andersson, Konrad Dybcio,
Eugene Lepshy, Achill Gilgenast, Luca Weiss,
Griffin Kroah-Hartman
Cc: linux-media, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming
On 8/1/26 9:04 PM, Danila Tikhonov wrote:
> The DW9800W uses the same chip ID and register layout as the DW9800K,
> but requires different default VCM frequency value.
>
> Add a separate device match entry for the DW9800W and validate the
> common chip ID. Use the matched variant to select the appropriate
> default values.
>
> Tested on the Nothing Phone (1) smartphone
Tested-by: Vasiliy Doylov <neko@altlinux.org> # DW9800W
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFT 1/3] dt-bindings: media: i2c: dw9719: Document DW9800W
2026-08-01 18:04 ` [PATCH RFT 1/3] dt-bindings: media: i2c: dw9719: Document DW9800W Danila Tikhonov
@ 2026-08-04 8:29 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-04 8:29 UTC (permalink / raw)
To: Danila Tikhonov
Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, André Apitzsch, Daniel Scally, Sakari Ailus,
Bjorn Andersson, Konrad Dybcio, Eugene Lepshy, Vasiliy Doylov,
Achill Gilgenast, Luca Weiss, Griffin Kroah-Hartman, linux-media,
devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming
On Sat, Aug 01, 2026 at 09:04:14PM +0300, Danila Tikhonov wrote:
> Document the Dongwoon Anatech DW9800W.
Which is different than dw9800k? How?
I should not have to read your driver code to figure that out.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support
2026-08-01 18:04 ` [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support Danila Tikhonov
2026-08-01 19:03 ` Neko
@ 2026-08-04 8:40 ` Sakari Ailus
2026-08-04 18:27 ` Danila Tikhonov
1 sibling, 1 reply; 12+ messages in thread
From: Sakari Ailus @ 2026-08-04 8:40 UTC (permalink / raw)
To: Danila Tikhonov
Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, André Apitzsch, Daniel Scally, Bjorn Andersson,
Konrad Dybcio, Eugene Lepshy, Vasiliy Doylov, Achill Gilgenast,
Luca Weiss, Griffin Kroah-Hartman, linux-media, devicetree,
linux-kernel, linux-arm-msm, ~postmarketos/upstreaming
Hi Danila,
Thank you for the patch.
On Sat, Aug 01, 2026 at 09:04:15PM +0300, Danila Tikhonov wrote:
> The DW9800W uses the same chip ID and register layout as the DW9800K,
> but requires different default VCM frequency value.
Is this a real difference between the two models or what fits for the
attached lens? Too bad the datasheet isn't publicly available. :-(
At least the differing default and constraints for dongwoon,vcm-prescale
needs to be documented in bindings.
>
> Add a separate device match entry for the DW9800W and validate the
> common chip ID. Use the matched variant to select the appropriate
> default values.
>
> Tested on the Nothing Phone (1) smartphone.
>
> Signed-off-by: Danila Tikhonov <danila@mainlining.org>
> ---
> drivers/media/i2c/dw9719.c | 25 +++++++++++++++++++++----
> 1 file changed, 21 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
> index 3b7ba88fd67c..bb9319fc350b 100644
> --- a/drivers/media/i2c/dw9719.c
> +++ b/drivers/media/i2c/dw9719.c
> @@ -44,6 +44,7 @@
>
> #define DW9719_INFO CCI_REG8(0)
> #define DW9719_ID 0xF1
> +#define DW9800_ID 0xF2
> #define DW9761_ID 0xF4
>
> #define DW9719_CONTROL CCI_REG8(2)
> @@ -72,6 +73,8 @@
> #define DW9800K_MODE_SAC_SHIFT 6
> #define DW9800K_DEFAULT_VCM_FREQ 0x10
>
> +#define DW9800W_DEFAULT_VCM_FREQ 0x60
> +
> #define to_dw9719_device(x) container_of(x, struct dw9719_device, sd)
>
> enum dw9719_model {
> @@ -79,6 +82,7 @@ enum dw9719_model {
> DW9719,
> DW9761,
> DW9800K,
> + DW9800W,
> };
>
> struct dw9719_device {
> @@ -140,10 +144,6 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
> 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;
> default:
> break;
> }
> @@ -159,6 +159,21 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
> dw9719->sac_mode = DW9719_DEFAULT_SAC;
> dw9719->vcm_freq = DW9719_DEFAULT_VCM_FREQ;
> break;
> + case DW9800_ID:
Ideally the detection change would be in its own patch but I guess it's ok
as-is.
> + dw9719->sac_mode = DW9800K_DEFAULT_SAC;
> + switch (dw9719->model) {
> + case DW9800K:
> + dw9719->model = DW9800K;
> + dw9719->vcm_freq = DW9800K_DEFAULT_VCM_FREQ;
> + break;
> + case DW9800W:
> + dw9719->model = DW9800W;
> + dw9719->vcm_freq = DW9800W_DEFAULT_VCM_FREQ;
> + break;
> + default:
> + return -ENODEV;
> + }
> + break;
> case DW9761_ID:
> dw9719->model = DW9761;
> dw9719->mode_low_bits = 0x01;
> @@ -189,6 +204,7 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
>
> switch (dw9719->model) {
> case DW9800K:
> + case DW9800W:
> cci_write(dw9719->regmap, DW9719_CONTROL, DW9719_ENABLE_RINGING, &ret);
> cci_write(dw9719->regmap, DW9719_MODE,
> dw9719->sac_mode << DW9800K_MODE_SAC_SHIFT, &ret);
> @@ -453,6 +469,7 @@ static const struct of_device_id dw9719_of_table[] = {
> { .compatible = "dongwoon,dw9719", .data = (const void *)DW9719 },
> { .compatible = "dongwoon,dw9761", .data = (const void *)DW9761 },
> { .compatible = "dongwoon,dw9800k", .data = (const void *)DW9800K },
> + { .compatible = "dongwoon,dw9800w", .data = (const void *)DW9800W },
> { }
> };
> MODULE_DEVICE_TABLE(of, dw9719_of_table);
>
--
Kind regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support
2026-08-04 8:40 ` Sakari Ailus
@ 2026-08-04 18:27 ` Danila Tikhonov
2026-08-05 11:29 ` Sakari Ailus
0 siblings, 1 reply; 12+ messages in thread
From: Danila Tikhonov @ 2026-08-04 18:27 UTC (permalink / raw)
To: Sakari Ailus
Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, André Apitzsch, Daniel Scally, Bjorn Andersson,
Konrad Dybcio, Eugene Lepshy, Vasiliy Doylov, Achill Gilgenast,
Luca Weiss, Griffin Kroah-Hartman, linux-media, devicetree,
linux-kernel, linux-arm-msm, ~postmarketos/upstreaming
Hi Sakari,
Thank you for your comment.
On 04/08/2026 11:40, Sakari Ailus wrote:
> Hi Danila,
>
> Thank you for the patch.
>
> On Sat, Aug 01, 2026 at 09:04:15PM +0300, Danila Tikhonov wrote:
>> The DW9800W uses the same chip ID and register layout as the DW9800K,
>> but requires different default VCM frequency value.
> Is this a real difference between the two models or what fits for the
> attached lens? Too bad the datasheet isn't publicly available. :-(
>
> At least the differing default and constraints for dongwoon,vcm-prescale
> needs to be documented in bindings.
I share your skepticism and have essentially the same concerns. Since I
do not have the DW9800K datasheet, I cannot say with certainty how it
differs from the DW9800W.
In particular, the parameter referred to as the VCM frequency in the
driver is used to derive the SACT value. For the DW9800W, SACT[5:0]
defines the actuator resonance period in SAC mode and the one-step
period in LSC mode. The datasheet gives the corresponding formulas as:
- tVIB = 6.3 ms + SACT * 0.1 ms
- LSC 1-step period = 252 µs + SACT * 4 µs
Therefore, the default value may differ between the DW9800K and DW9800W
if the formulas or timing characteristics used to calculate SACT are
different.
This uncertainty is also one of the reasons why the series currently
carries the RFT prefix. I hope the Fairphone guys can provide some
insight into the rationale behind the default-value directives that were
added for the DW9800K.
>> Add a separate device match entry for the DW9800W and validate the
>> common chip ID. Use the matched variant to select the appropriate
>> default values.
>>
>> Tested on the Nothing Phone (1) smartphone.
>>
>> Signed-off-by: Danila Tikhonov <danila@mainlining.org>
>> ---
>> drivers/media/i2c/dw9719.c | 25 +++++++++++++++++++++----
>> 1 file changed, 21 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
>> index 3b7ba88fd67c..bb9319fc350b 100644
>> --- a/drivers/media/i2c/dw9719.c
>> +++ b/drivers/media/i2c/dw9719.c
>> @@ -44,6 +44,7 @@
>>
>> #define DW9719_INFO CCI_REG8(0)
>> #define DW9719_ID 0xF1
>> +#define DW9800_ID 0xF2
>> #define DW9761_ID 0xF4
>>
>> #define DW9719_CONTROL CCI_REG8(2)
>> @@ -72,6 +73,8 @@
>> #define DW9800K_MODE_SAC_SHIFT 6
>> #define DW9800K_DEFAULT_VCM_FREQ 0x10
>>
>> +#define DW9800W_DEFAULT_VCM_FREQ 0x60
>> +
>> #define to_dw9719_device(x) container_of(x, struct dw9719_device, sd)
>>
>> enum dw9719_model {
>> @@ -79,6 +82,7 @@ enum dw9719_model {
>> DW9719,
>> DW9761,
>> DW9800K,
>> + DW9800W,
>> };
>>
>> struct dw9719_device {
>> @@ -140,10 +144,6 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
>> 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;
>> default:
>> break;
>> }
>> @@ -159,6 +159,21 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
>> dw9719->sac_mode = DW9719_DEFAULT_SAC;
>> dw9719->vcm_freq = DW9719_DEFAULT_VCM_FREQ;
>> break;
>> + case DW9800_ID:
> Ideally the detection change would be in its own patch but I guess it's ok
> as-is.
>
>> + dw9719->sac_mode = DW9800K_DEFAULT_SAC;
>> + switch (dw9719->model) {
>> + case DW9800K:
>> + dw9719->model = DW9800K;
>> + dw9719->vcm_freq = DW9800K_DEFAULT_VCM_FREQ;
>> + break;
>> + case DW9800W:
>> + dw9719->model = DW9800W;
>> + dw9719->vcm_freq = DW9800W_DEFAULT_VCM_FREQ;
>> + break;
>> + default:
>> + return -ENODEV;
>> + }
>> + break;
>> case DW9761_ID:
>> dw9719->model = DW9761;
>> dw9719->mode_low_bits = 0x01;
>> @@ -189,6 +204,7 @@ static int dw9719_power_up(struct dw9719_device *dw9719, bool detect)
>>
>> switch (dw9719->model) {
>> case DW9800K:
>> + case DW9800W:
>> cci_write(dw9719->regmap, DW9719_CONTROL, DW9719_ENABLE_RINGING, &ret);
>> cci_write(dw9719->regmap, DW9719_MODE,
>> dw9719->sac_mode << DW9800K_MODE_SAC_SHIFT, &ret);
>> @@ -453,6 +469,7 @@ static const struct of_device_id dw9719_of_table[] = {
>> { .compatible = "dongwoon,dw9719", .data = (const void *)DW9719 },
>> { .compatible = "dongwoon,dw9761", .data = (const void *)DW9761 },
>> { .compatible = "dongwoon,dw9800k", .data = (const void *)DW9800K },
>> + { .compatible = "dongwoon,dw9800w", .data = (const void *)DW9800W },
>> { }
>> };
>> MODULE_DEVICE_TABLE(of, dw9719_of_table);
>>
---
Best regards,
Danila
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support
2026-08-04 18:27 ` Danila Tikhonov
@ 2026-08-05 11:29 ` Sakari Ailus
2026-08-07 14:30 ` Griffin Kroah-Hartman
0 siblings, 1 reply; 12+ messages in thread
From: Sakari Ailus @ 2026-08-05 11:29 UTC (permalink / raw)
To: Danila Tikhonov, Luca Weiss, Griffin Kroah-Hartman
Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, André Apitzsch, Daniel Scally, Bjorn Andersson,
Konrad Dybcio, Eugene Lepshy, Vasiliy Doylov, Achill Gilgenast,
linux-media, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming
Hi Danila, Griffin,
On Tue, Aug 04, 2026 at 09:27:01PM +0300, Danila Tikhonov wrote:
> Hi Sakari,
>
> Thank you for your comment.
>
> On 04/08/2026 11:40, Sakari Ailus wrote:
> > Hi Danila,
> >
> > Thank you for the patch.
> >
> > On Sat, Aug 01, 2026 at 09:04:15PM +0300, Danila Tikhonov wrote:
> > > The DW9800W uses the same chip ID and register layout as the DW9800K,
> > > but requires different default VCM frequency value.
> > Is this a real difference between the two models or what fits for the
> > attached lens? Too bad the datasheet isn't publicly available. :-(
> >
> > At least the differing default and constraints for dongwoon,vcm-prescale
> > needs to be documented in bindings.
> I share your skepticism and have essentially the same concerns. Since I
> do not have the DW9800K datasheet, I cannot say with certainty how it
> differs from the DW9800W.
Indeed. The limits should have been added for dw9800k, too, but I guess I
missed this in review. :-\
>
> In particular, the parameter referred to as the VCM frequency in the
> driver is used to derive the SACT value. For the DW9800W, SACT[5:0]
> defines the actuator resonance period in SAC mode and the one-step
> period in LSC mode. The datasheet gives the corresponding formulas as:
> - tVIB = 6.3 ms + SACT * 0.1 ms
> - LSC 1-step period = 252 µs + SACT * 4 µs
>
> Therefore, the default value may differ between the DW9800K and DW9800W
> if the formulas or timing characteristics used to calculate SACT are
> different.
Griffin, would you be able to comment this?
Another matter: the comment on dw9800k says there's no device ID. So is
there a device ID that wasn't just checked earlier or is there really no
device ID?
--
Regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support
2026-08-05 11:29 ` Sakari Ailus
@ 2026-08-07 14:30 ` Griffin Kroah-Hartman
2026-08-08 12:42 ` Danila Tikhonov
0 siblings, 1 reply; 12+ messages in thread
From: Griffin Kroah-Hartman @ 2026-08-07 14:30 UTC (permalink / raw)
To: Sakari Ailus, Danila Tikhonov, Luca Weiss
Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, André Apitzsch, Daniel Scally, Bjorn Andersson,
Konrad Dybcio, Eugene Lepshy, Vasiliy Doylov, Achill Gilgenast,
linux-media, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming
Hello Sakari, Danilla,
On 05/08/2026 13:29, Sakari Ailus wrote:
> Hi Danila, Griffin,
>
> On Tue, Aug 04, 2026 at 09:27:01PM +0300, Danila Tikhonov wrote:
>> Hi Sakari,
>>
>> Thank you for your comment.
>>
>> On 04/08/2026 11:40, Sakari Ailus wrote:
>>> Hi Danila,
>>>
>>> Thank you for the patch.
>>>
>>> On Sat, Aug 01, 2026 at 09:04:15PM +0300, Danila Tikhonov wrote:
>>>> The DW9800W uses the same chip ID and register layout as the DW9800K,
>>>> but requires different default VCM frequency value.
>>> Is this a real difference between the two models or what fits for the
>>> attached lens? Too bad the datasheet isn't publicly available. :-(
>>>
>>> At least the differing default and constraints for dongwoon,vcm-prescale
>>> needs to be documented in bindings.
>> I share your skepticism and have essentially the same concerns. Since I
>> do not have the DW9800K datasheet, I cannot say with certainty how it
>> differs from the DW9800W.
> Indeed. The limits should have been added for dw9800k, too, but I guess I
> missed this in review. :-\
>
>> In particular, the parameter referred to as the VCM frequency in the
>> driver is used to derive the SACT value. For the DW9800W, SACT[5:0]
>> defines the actuator resonance period in SAC mode and the one-step
>> period in LSC mode. The datasheet gives the corresponding formulas as:
>> - tVIB = 6.3 ms + SACT * 0.1 ms
>> - LSC 1-step period = 252 µs + SACT * 4 µs
>>
>> Therefore, the default value may differ between the DW9800K and DW9800W
>> if the formulas or timing characteristics used to calculate SACT are
>> different.
> Griffin, would you be able to comment this?
After checking on my side, DW9800W and K are almost identical in both
structure
and register values, including how tVIB and tLSC are calculated, DW9800K
has an extra
register that can change the output current to 130mA but we don't ever
use that.
We didn't have a datasheet when working on the DW9800k so we had to go
off of
the downstream driver during runtime to get our register values. The
datasheet is a
much more reliable source to be using for this instead.
My colleague has already identified ways to fix the bindings, which we will
tackle ourselves.
> Another matter: the comment on dw9800k says there's no device ID. So is
> there a device ID that wasn't just checked earlier or is there really no
> device ID?
Indeed, it turns out the DW9800K DOES have an info register, which should be
0xEB, that's on us for not updating it after we received more documentation.
Thanks for drawing our attention to this! Nice patch.
Griffin
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support
2026-08-07 14:30 ` Griffin Kroah-Hartman
@ 2026-08-08 12:42 ` Danila Tikhonov
0 siblings, 0 replies; 12+ messages in thread
From: Danila Tikhonov @ 2026-08-08 12:42 UTC (permalink / raw)
To: Griffin Kroah-Hartman, Sakari Ailus, Luca Weiss
Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, André Apitzsch, Daniel Scally, Bjorn Andersson,
Konrad Dybcio, Eugene Lepshy, Vasiliy Doylov, Achill Gilgenast,
linux-media, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming
Hi Griffin, Sakari,
Thank you for the clarification.
On 07/08/2026 17:30, Griffin Kroah-Hartman wrote:
> Hello Sakari, Danilla,
>
> On 05/08/2026 13:29, Sakari Ailus wrote:
>> Hi Danila, Griffin,
>>
>> On Tue, Aug 04, 2026 at 09:27:01PM +0300, Danila Tikhonov wrote:
>>> Hi Sakari,
>>>
>>> Thank you for your comment.
>>>
>>> On 04/08/2026 11:40, Sakari Ailus wrote:
>>>> Hi Danila,
>>>>
>>>> Thank you for the patch.
>>>>
>>>> On Sat, Aug 01, 2026 at 09:04:15PM +0300, Danila Tikhonov wrote:
>>>>> The DW9800W uses the same chip ID and register layout as the DW9800K,
>>>>> but requires different default VCM frequency value.
>>>> Is this a real difference between the two models or what fits for the
>>>> attached lens? Too bad the datasheet isn't publicly available. :-(
>>>>
>>>> At least the differing default and constraints for
>>>> dongwoon,vcm-prescale
>>>> needs to be documented in bindings.
>>> I share your skepticism and have essentially the same concerns. Since I
>>> do not have the DW9800K datasheet, I cannot say with certainty how it
>>> differs from the DW9800W.
>> Indeed. The limits should have been added for dw9800k, too, but I
>> guess I
>> missed this in review. :-\
>>
>>> In particular, the parameter referred to as the VCM frequency in the
>>> driver is used to derive the SACT value. For the DW9800W, SACT[5:0]
>>> defines the actuator resonance period in SAC mode and the one-step
>>> period in LSC mode. The datasheet gives the corresponding formulas as:
>>> - tVIB = 6.3 ms + SACT * 0.1 ms
>>> - LSC 1-step period = 252 µs + SACT * 4 µs
>>>
>>> Therefore, the default value may differ between the DW9800K and DW9800W
>>> if the formulas or timing characteristics used to calculate SACT are
>>> different.
>> Griffin, would you be able to comment this?
>
> After checking on my side, DW9800W and K are almost identical in both
> structure
> and register values, including how tVIB and tLSC are calculated,
> DW9800K has an extra
> register that can change the output current to 130mA but we don't ever
> use that.
>
> We didn't have a datasheet when working on the DW9800k so we had to go
> off of
> the downstream driver during runtime to get our register values. The
> datasheet is a
> much more reliable source to be using for this instead.
>
> My colleague has already identified ways to fix the bindings, which we
> will
> tackle ourselves.
>
I'm glad you were able to clarify the situation, as this should help us
handle both IC variants correctly.
>> Another matter: the comment on dw9800k says there's no device ID. So is
>> there a device ID that wasn't just checked earlier or is there really no
>> device ID?
>
> Indeed, it turns out the DW9800K DOES have an info register, which
> should be
> 0xEB, that's on us for not updating it after we received more
> documentation.
>
Given this, and assuming everyone agrees, I think it would make sense
for me to leave the DW9800K untouched in the next version of this patch
series. Since it turns out that the DW9800K has a different Chip ID, you
can fix the Chip ID check for it separately based on the information you
have.
One point is still unclear to me, though: is the default VCM frequency
the same for both ICs, or does it differ between them?
> Thanks for drawing our attention to this! Nice patch.
>
> Griffin
>
---
Best regards,
Danila
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-08-08 12:42 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-01 18:04 [PATCH RFT 0/3] Add UW Camera Actuator support for Nothing Phone (1) Danila Tikhonov
2026-08-01 18:04 ` [PATCH RFT 1/3] dt-bindings: media: i2c: dw9719: Document DW9800W Danila Tikhonov
2026-08-04 8:29 ` Krzysztof Kozlowski
2026-08-01 18:04 ` [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support Danila Tikhonov
2026-08-01 19:03 ` Neko
2026-08-04 8:40 ` Sakari Ailus
2026-08-04 18:27 ` Danila Tikhonov
2026-08-05 11:29 ` Sakari Ailus
2026-08-07 14:30 ` Griffin Kroah-Hartman
2026-08-08 12:42 ` Danila Tikhonov
2026-08-01 18:04 ` [PATCH RFT 3/3] arm64: dts: qcom: sm7325-nothing-spacewar: Add UW camera actuator Danila Tikhonov
2026-08-01 19:02 ` Neko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).