Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Enable DW9714V camera focus coil on SHIFT 6MQ
@ 2026-07-29 22:20 David Heidelberg via B4 Relay
  2026-07-29 22:20 ` [PATCH v2 1/2] dt-bindings: media: i2c: dongwoon,dw9714: Document DW9714A and V variant David Heidelberg via B4 Relay
  2026-07-29 22:20 ` [PATCH v2 2/2] arm64: dts: qcom: sdm845-shift-axolotl: Add actuator for main rear camera David Heidelberg via B4 Relay
  0 siblings, 2 replies; 6+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-07-29 22:20 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Konrad Dybcio,
	Alexander Martinz
  Cc: Krzysztof Kozlowski, linux-media, devicetree, linux-kernel,
	linux-arm-msm, phone-devel, David Heidelberg

Implements wiring for:
 - SGM2036 linear regulator used by the cci i2c camera module [1]
 - Dongwoon 9714V focus coil used by IMX519 camera sensor [2]

[1] https://www.sg-micro.com/rect/assets/efa85993-263c-41aa-9274-b488f59f85d5/SGM2036.pdf
[2] https://datasheet4u.com/pdf/1247146/DW9714V.pdf

Open question for future work: modeling the I2C bus supply.

Like many similar chips, the DW9714 has a single VDD supply, but its I2C
lines go through a level shifter to a 1.8V rail, and there is currently no
place in DT to describe that rail so it gets enabled during I2C access to
the device. As a stopgap, this series models it as an always-on fixed
regulator (see the TODO in the cam_bus_2p8 node).

Direction agreed with Rob Herring and Mark Brown on IRC:

 - Modeling the level shifter itself is overkill as long as it is just a
   supply; modeling the connector would come first if needed.
 - Since each side of the shifter has its own supply, the proper solution
   is a generic 'bus-supply' property valid in both the I2C controller and
   device nodes.
 - Defining it per-device-schema would ideally use an I2C equivalent of
   spi-peripheral-props.yaml, which does not exist yet. The pragmatic
   interim is to define bus-supply in i2c-controller.yaml for both places
   and add 'bus-supply: true' to schemas that need it now (dw9714),
   deferring the peripheral-props question until more shared device
   properties accumulate.

Once bus-supply exists, the regulator-always-on workaround in this DTS can
be dropped.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
Changes in v2:
- Address Sashiko findings.
- Link to v1: https://patch.msgid.link/20260729-dw9714v-v1-0-3c479b3cf8c0@ixit.cz

---
David Heidelberg (2):
      dt-bindings: media: i2c: dongwoon,dw9714: Document DW9714A and V variant
      arm64: dts: qcom: sdm845-shift-axolotl: Add actuator for main rear camera

 .../bindings/media/i2c/dongwoon,dw9714.yaml        | 10 +++-
 arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts  | 61 ++++++++++++++++++++++
 2 files changed, 70 insertions(+), 1 deletion(-)
---
base-commit: 78bc8af4affb9a732504eb22eeac7d1e50883853
change-id: 20260416-dw9714v-4566465ebe7d

Best regards,
--  
David Heidelberg <david@ixit.cz>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/2] dt-bindings: media: i2c: dongwoon,dw9714: Document DW9714A and V variant
  2026-07-29 22:20 [PATCH v2 0/2] Enable DW9714V camera focus coil on SHIFT 6MQ David Heidelberg via B4 Relay
@ 2026-07-29 22:20 ` David Heidelberg via B4 Relay
  2026-07-29 22:20 ` [PATCH v2 2/2] arm64: dts: qcom: sdm845-shift-axolotl: Add actuator for main rear camera David Heidelberg via B4 Relay
  1 sibling, 0 replies; 6+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-07-29 22:20 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Konrad Dybcio,
	Alexander Martinz
  Cc: Krzysztof Kozlowski, linux-media, devicetree, linux-kernel,
	linux-arm-msm, phone-devel, David Heidelberg

From: David Heidelberg <david@ixit.cz>

DW9714A is successor of DW9714 and DW9714V is successor of the DW9714A.

All actuators are backward compatible, but they do introduce new features.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
 .../devicetree/bindings/media/i2c/dongwoon,dw9714.yaml         | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.yaml b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.yaml
index 66229a3dc05d6..e8ad2d3448d5f 100644
--- a/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.yaml
@@ -10,17 +10,25 @@ maintainers:
   - Krzysztof Kozlowski <krzk@kernel.org>
 
 description:
   DW9174 is a 10-bit DAC with current sink capability. It is intended for
   driving voice coil lenses in camera modules.
 
 properties:
   compatible:
-    const: dongwoon,dw9714
+    oneOf:
+      - items:
+          - const: dongwoon,dw9714v
+          - const: dongwoon,dw9714a
+          - const: dongwoon,dw9714
+      - items:
+          - const: dongwoon,dw9714a
+          - const: dongwoon,dw9714
+      - const: dongwoon,dw9714
 
   reg:
     maxItems: 1
 
   powerdown-gpios:
     description:
       XSD pin for shutdown (active low)
 

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] arm64: dts: qcom: sdm845-shift-axolotl: Add actuator for main rear camera
  2026-07-29 22:20 [PATCH v2 0/2] Enable DW9714V camera focus coil on SHIFT 6MQ David Heidelberg via B4 Relay
  2026-07-29 22:20 ` [PATCH v2 1/2] dt-bindings: media: i2c: dongwoon,dw9714: Document DW9714A and V variant David Heidelberg via B4 Relay
@ 2026-07-29 22:20 ` David Heidelberg via B4 Relay
  2026-07-31 15:41   ` Konrad Dybcio
  1 sibling, 1 reply; 6+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-07-29 22:20 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Konrad Dybcio,
	Alexander Martinz
  Cc: Krzysztof Kozlowski, linux-media, devicetree, linux-kernel,
	linux-arm-msm, phone-devel, David Heidelberg

From: David Heidelberg <david@ixit.cz>

Main rear camera uses Dongwoon DW9714V actuator. Add regulator and
actuator node.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
 arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 61 +++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
index e31c784eff3de..8ac43dff976c0 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
@@ -81,16 +81,42 @@ ramoops: ramoops@b0000000 {
 	battery: battery {
 		compatible = "simple-battery";
 
 		charge-full-design-microamp-hours = <3850000>;
 		voltage-min-design-microvolt = <3600000>;
 		voltage-max-design-microvolt = <4400000>;
 	};
 
+	/* SGM2036-2.8YUDH4G/TR */
+	cam_bus_2p8: regulator-cam-bus-2p8 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "cam_bus_2p8";
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+		regulator-enable-ramp-delay = <100>;
+
+		gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-0 = <&cam_bus_avdd_default_state>;
+		pinctrl-1 = <&cam_bus_avdd_sleep_state>;
+		pinctrl-names = "default", "sleep";
+
+		vin-supply = <&vreg_bob>;
+
+		/*
+		 * TODO: This node represent bus supply to the cam i2c module.
+		 * Others DT do in similar fashion, but should be addressed
+		 * by the bus-supply in the future
+		 */
+		regulator-always-on;
+	};
+
 	vph_pwr: vph-pwr-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vph_pwr";
 		regulator-min-microvolt = <3700000>;
 		regulator-max-microvolt = <3700000>;
 	};
 
 	vreg_s4a_1p8: pm8998-smps4 {
@@ -447,16 +473,36 @@ vreg_s3c_0p6: smps3 {
 };
 
 &cdsp_pas {
 	firmware-name = "qcom/sdm845/SHIFT/axolotl/cdsp.mbn";
 
 	status = "okay";
 };
 
+&camss {
+	vdda-phy-supply = <&vreg_l1a_0p875>;
+	vdda-pll-supply = <&vdda_mipi_csi_1p25>;
+
+	status = "okay";
+};
+
+&cci {
+	status = "okay";
+};
+
+&cci_i2c0 {
+	rear_camera_actuator: actuator@c {
+		compatible = "dongwoon,dw9714v", "dongwoon,dw9714a", "dongwoon,dw9714";
+		reg = <0x0c>;
+
+		vcc-supply = <&vreg_lvs1a_1p8>;
+	};
+};
+
 &gcc {
 	protected-clocks = <GCC_QSPI_CORE_CLK>,
 			   <GCC_QSPI_CORE_CLK_SRC>,
 			   <GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
 			   <GCC_LPASS_Q6_AXI_CLK>,
 			   <GCC_LPASS_SWAY_CLK>;
 };
 
@@ -699,16 +745,31 @@ &slpi_pas {
 	firmware-name = "qcom/sdm845/SHIFT/axolotl/slpi.mbn";
 
 	status = "okay";
 };
 
 &tlmm {
 	gpio-reserved-ranges = <0 4>, <81 4>;
 
+	cam_bus_avdd_default_state: cam-bus-avdd-default-state {
+		pins = "gpio8";
+		function = "gpio";
+		bias-disable;
+		drive-strength = <2>;
+	};
+
+	cam_bus_avdd_sleep_state: cam-bus-avdd-sleep-state {
+		pins = "gpio8";
+		function = "gpio";
+		bias-disable;
+		drive-strength = <2>;
+		output-low;
+	};
+
 	sdc2_default_state: sdc2-default-state {
 		clk-pins {
 			pins = "sdc2_clk";
 			drive-strength = <16>;
 			bias-disable;
 		};
 
 		cmd-pins {

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/2] arm64: dts: qcom: sdm845-shift-axolotl: Add actuator for main rear camera
  2026-07-29 22:20 ` [PATCH v2 2/2] arm64: dts: qcom: sdm845-shift-axolotl: Add actuator for main rear camera David Heidelberg via B4 Relay
@ 2026-07-31 15:41   ` Konrad Dybcio
  2026-07-31 16:46     ` David Heidelberg
  0 siblings, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2026-07-31 15:41 UTC (permalink / raw)
  To: david, Sakari Ailus, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Konrad Dybcio,
	Alexander Martinz
  Cc: Krzysztof Kozlowski, linux-media, devicetree, linux-kernel,
	linux-arm-msm, phone-devel

On 7/30/26 12:20 AM, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
> 
> Main rear camera uses Dongwoon DW9714V actuator. Add regulator and
> actuator node.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---

[...]

> +	/* SGM2036-2.8YUDH4G/TR */
> +	cam_bus_2p8: regulator-cam-bus-2p8 {
> +		compatible = "regulator-fixed";
> +
> +		regulator-name = "cam_bus_2p8";
> +		regulator-min-microvolt = <2800000>;
> +		regulator-max-microvolt = <2800000>;
> +		regulator-enable-ramp-delay = <100>;
> +
> +		gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +
> +		pinctrl-0 = <&cam_bus_avdd_default_state>;
> +		pinctrl-1 = <&cam_bus_avdd_sleep_state>;
> +		pinctrl-names = "default", "sleep";
> +
> +		vin-supply = <&vreg_bob>;
> +
> +		/*
> +		 * TODO: This node represent bus supply to the cam i2c module.
> +		 * Others DT do in similar fashion, but should be addressed
> +		 * by the bus-supply in the future
> +		 */

I can't quite parse the second sentence..

[...]

> +&cci_i2c0 {
> +	rear_camera_actuator: actuator@c {
> +		compatible = "dongwoon,dw9714v", "dongwoon,dw9714a", "dongwoon,dw9714";

1 a line would be neater

[...]

> +	cam_bus_avdd_default_state: cam-bus-avdd-default-state {
> +		pins = "gpio8";
> +		function = "gpio";
> +		bias-disable;
> +		drive-strength = <2>;

Other nodes have drive-strength first, then bias

> +	};
> +
> +	cam_bus_avdd_sleep_state: cam-bus-avdd-sleep-state {
> +		pins = "gpio8";
> +		function = "gpio";
> +		bias-disable;
> +		drive-strength = <2>;
> +		output-low;

Drop output-low, the regulator driver will set that

Konrad

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/2] arm64: dts: qcom: sdm845-shift-axolotl: Add actuator for main rear camera
  2026-07-31 15:41   ` Konrad Dybcio
@ 2026-07-31 16:46     ` David Heidelberg
  2026-07-31 16:55       ` Konrad Dybcio
  0 siblings, 1 reply; 6+ messages in thread
From: David Heidelberg @ 2026-07-31 16:46 UTC (permalink / raw)
  To: Konrad Dybcio, Sakari Ailus, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Konrad Dybcio,
	Alexander Martinz
  Cc: Krzysztof Kozlowski, linux-media, devicetree, linux-kernel,
	linux-arm-msm, phone-devel


On 31/07/2026 17:41, Konrad Dybcio wrote:
> On 7/30/26 12:20 AM, David Heidelberg via B4 Relay wrote:
>> From: David Heidelberg <david@ixit.cz>
>>
>> Main rear camera uses Dongwoon DW9714V actuator. Add regulator and
>> actuator node.
>>
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
> 
> [...]
> 
>> +	/* SGM2036-2.8YUDH4G/TR */
>> +	cam_bus_2p8: regulator-cam-bus-2p8 {
>> +		compatible = "regulator-fixed";
>> +
>> +		regulator-name = "cam_bus_2p8";
>> +		regulator-min-microvolt = <2800000>;
>> +		regulator-max-microvolt = <2800000>;
>> +		regulator-enable-ramp-delay = <100>;
>> +
>> +		gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
>> +		enable-active-high;
>> +
>> +		pinctrl-0 = <&cam_bus_avdd_default_state>;
>> +		pinctrl-1 = <&cam_bus_avdd_sleep_state>;
>> +		pinctrl-names = "default", "sleep";
>> +
>> +		vin-supply = <&vreg_bob>;
>> +
>> +		/*
>> +		 * TODO: This node represent bus supply to the cam i2c module.
>> +		 * Others DT do in similar fashion, but should be addressed
>> +		 * by the bus-supply in the future
>> +		 */
> 
> I can't quite parse the second sentence..

I'll rephrase, I noticed that other device-trees where there is also i2c 
level-shifter also introduce always-on regulator. I let clanker check impact on 
power consumption, it's likely irrelevant, but in the future would be nice to 
have proper bus-supply property in use instead of always-on.

> 
> [...]
> 
>> +&cci_i2c0 {
>> +	rear_camera_actuator: actuator@c {
>> +		compatible = "dongwoon,dw9714v", "dongwoon,dw9714a", "dongwoon,dw9714";
> 
> 1 a line would be neater
> 
> [...]
> 
>> +	cam_bus_avdd_default_state: cam-bus-avdd-default-state {
>> +		pins = "gpio8";
>> +		function = "gpio";
>> +		bias-disable;
>> +		drive-strength = <2>;
> 
> Other nodes have drive-strength first, then bias
> 
>> +	};
>> +
>> +	cam_bus_avdd_sleep_state: cam-bus-avdd-sleep-state {
>> +		pins = "gpio8";
>> +		function = "gpio";
>> +		bias-disable;
>> +		drive-strength = <2>;
>> +		output-low;
> 
> Drop output-low, the regulator driver will set that

Sure, all noted and next version will include these changes.>
> Konrad

-- 
David Heidelberg


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/2] arm64: dts: qcom: sdm845-shift-axolotl: Add actuator for main rear camera
  2026-07-31 16:46     ` David Heidelberg
@ 2026-07-31 16:55       ` Konrad Dybcio
  0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-07-31 16:55 UTC (permalink / raw)
  To: David Heidelberg, Sakari Ailus, Mauro Carvalho Chehab,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio, Alexander Martinz
  Cc: Krzysztof Kozlowski, linux-media, devicetree, linux-kernel,
	linux-arm-msm, phone-devel

On 7/31/26 6:46 PM, David Heidelberg wrote:
> 
> On 31/07/2026 17:41, Konrad Dybcio wrote:
>> On 7/30/26 12:20 AM, David Heidelberg via B4 Relay wrote:
>>> From: David Heidelberg <david@ixit.cz>

[...]

>>> +        /*
>>> +         * TODO: This node represent bus supply to the cam i2c module.
>>> +         * Others DT do in similar fashion, but should be addressed
>>> +         * by the bus-supply in the future
>>> +         */
>>
>> I can't quite parse the second sentence..
> 
> I'll rephrase, I noticed that other device-trees where there is also i2c level-shifter also introduce always-on regulator. I let clanker check impact on power consumption, it's likely irrelevant, but in the future would be nice to have proper bus-supply property in use instead of always-on.

Aaah level shifters.. got it

Konrad

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-31 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 22:20 [PATCH v2 0/2] Enable DW9714V camera focus coil on SHIFT 6MQ David Heidelberg via B4 Relay
2026-07-29 22:20 ` [PATCH v2 1/2] dt-bindings: media: i2c: dongwoon,dw9714: Document DW9714A and V variant David Heidelberg via B4 Relay
2026-07-29 22:20 ` [PATCH v2 2/2] arm64: dts: qcom: sdm845-shift-axolotl: Add actuator for main rear camera David Heidelberg via B4 Relay
2026-07-31 15:41   ` Konrad Dybcio
2026-07-31 16:46     ` David Heidelberg
2026-07-31 16:55       ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox