Devicetree
 help / color / mirror / Atom feed
* [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; 6+ 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] 6+ 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-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, 0 replies; 6+ 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] 6+ 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-01 18:04 ` [PATCH RFT 3/3] arm64: dts: qcom: sm7325-nothing-spacewar: Add UW camera actuator Danila Tikhonov
  2 siblings, 1 reply; 6+ 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] 6+ 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; 6+ 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] 6+ 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; 6+ 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] 6+ 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
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

end of thread, other threads:[~2026-08-01 19:03 UTC | newest]

Thread overview: 6+ 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-01 18:04 ` [PATCH RFT 2/3] media: i2c: dw9719: Add DW9800W support Danila Tikhonov
2026-08-01 19:03   ` Neko
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