Skip to contentSkip to conversation

media: Add the ST VD55G0 global shutter sensor

PATCH Superseded Sergey Lebedev 5 participants 22 messages Oct 19 – Oct 25

Subsystems (2)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover media: Add the ST VD55G0 global shutter sensor

The ST VD55G0 is a 644x604 monochrome global shutter sensor. It is the infrared camera of the Microsoft Surface Pro 11 for Business with Intel (Lunar Lake, IPU7), ACPI device SMO55F0, and other machines use it under the same ID. Without a driver the camera does not appear at all.

  1/4  dt-bindings: media: i2c: Add ST VD55G0 camera sensor
  2/4  media: i2c: Add ST VD55G0 global shutter sensor driver
  3/4  media: ipu-bridge: Add ST VD55G0
  4/4  media: ipu-bridge: Add the Surface Pro 11 infrared illuminator

The driver is a port of ST's own downstream driver, firmware patch included, as vd55g1 carries its own:
https://github.com/STMicroelectronics/vd55g0-linux-driver

Benjamin reviewed every version of it off-list and ran the previous one on a Raspberry Pi 5; 1/4 and 2/4 carry his Co-developed-by, and the clock tree in 2/4 is based on his. Peter Marshall's series adds the VD55G0 to vd55g1 instead, and Benjamin preferred a separate driver:
https://lore.kernel.org/all/[email protected]/
Peter's series also adds SMO55F0 to ipu-bridge, at a link frequency this driver refuses from a 24 MHz clock; 3/4 says why it uses 396 MHz.

4/4 gives the sensor st,leds from a DMI match, as this machine's ACPI tables do not say which sensor GPIO drives the illuminator. Sakari preferred this in ipu-bridge to a quirk in the sensor driver:
https://lore.kernel.org/all/[email protected]/

On this machine the sensor needs Hao Yao's int3472 fix, reviewed and waiting for its v3:
https://lore.kernel.org/all/[email protected]/
The SSDB asks for 24 MHz, but INT3472 enables the clock at 19.2 MHz, so without the fix the sensor runs at four fifths of every rate this series computes, its MIPI output below the 750 Mbps minimum.

While it streams, the IPU7 CSI-2 receiver logs "Received packet is too long" in Y10 at 644x604 and Y8 at 640x480, though not in Y8 at 644x604 or 320x240, and the frames are complete. With the staging ipu7 driver, the machine's two other cameras, an IMX681 and an OV13858, log it too, so it does not look specific to this sensor.

Tested on the Surface Pro 11 for Business, on media next d7e7bca7169 with Hao Yao's int3472 v2, KASAN and lockdep, IPU7 run by the ipu6 driver:
- probe defers until ipu-bridge has made the endpoint, then binds;
- every mode runs at 59.14 fps, as the controls give;
- Y8 and Y10 at all four sizes, and Y10 packed at full size;
- exposure, gains, flips and test patterns, vertical blanking changed during a stream, set_fmt refused while streaming, runtime suspend after it;
- under auto exposure, exposure and the gains read back the values the sensor applies, as its registers show, and carry over to manual mode;
- the illuminator through led_mode, on and off during a stream;
- v4l2-compliance 46 of 46, and 54 of 54 through the media device, with two warnings for the read-only crop;
- no KASAN report, and no lockdep report from vd55g0; the ipu6 driver's lockdep_assert_held(&stream->mutex) in ipu6_isys_buffer_list_get() fires at every stream start, from ipu6_isys_csi2_enable_streams();
- W=1 and sparse clean, dt_binding_check clean.

Sergey Lebedev (4):
dt-bindings: media: i2c: Add ST VD55G0 camera sensor
media: i2c: Add ST VD55G0 global shutter sensor driver
media: ipu-bridge: Add ST VD55G0
media: ipu-bridge: Add the Surface Pro 11 infrared illuminator

 .../bindings/media/i2c/st,vd55g0.yaml         |  137 +
 MAINTAINERS                                   |   10 +
 drivers/media/i2c/Kconfig                     |   11 +
 drivers/media/i2c/Makefile                    |    1 +
 drivers/media/i2c/vd55g0.c                    | 2434 +++++++++++++++++
 drivers/media/pci/intel/ipu-bridge.c          |   62 +-
 include/media/ipu-bridge.h                    |    2 +-
 7 files changed, 2654 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/st,vd55g0.yaml
 create mode 100644 drivers/media/i2c/vd55g0.c

base-commit: d7e7bca7169873b46e857c025c10f3336c1258d8

Signature · 1 line
2.54.0
#1 lore raw

PATCH 1/4 dt-bindings: media: i2c: Add ST VD55G0 camera sensor

The VD55G0 is a monochrome global shutter sensor with a 644x604 active array, sending over a single MIPI CSI-2 lane.

Merged from ST's own binding in STMicroelectronics/vd55g0-linux-driver, which gives the supply voltages, and st,vd55g1.yaml, whose conventions and property list it follows. ST's st,out-sync and st,in-sync are left out, as in vd55g1. Link frequencies run from 375 to 600 MHz, for the sensor's MIPI rate of 750 to 1200 Mbps (UM2829, 13.1).

Assisted-by Claude:claude-opus-5-5

---
The properties follow st,vd55g1.yaml nearly line for line. If a compatible in that file is preferred, with an if/then for the link-frequency minimum, I can fold it in there.

 .../bindings/media/i2c/st,vd55g0.yaml         | 137 ++++++++++++++++++
 1 file changed, 137 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/st,vd55g0.yaml
Documentation/devicetree/bindings/media/i2c/st,vd55g0.yaml new file +137 -0
new file mode 100644
index 00000000000..be03d7e8b9c
@@ -0,0 +1,137 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright (c) 2026 STMicroelectronics SA.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/st,vd55g0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics VD55G0 Global Shutter Image Sensor
+
+maintainers:
+  - Benjamin Mugnier <[email protected]>
+  - Sylvain Petinot <[email protected]>
+
+description: |-
+ The STMicroelectronics VD55G0 is a monochrome global shutter image sensor
+ with an active array size of 644H x 604V. It is programmable through an I2C
+ interface.
+
+ Image data is sent through MIPI CSI-2, over a single data lane. The sensor
+ provides 4 GPIOs, which can drive a strobe light source synchronised with the
+ exposure period.
+
+allOf:
+  - $ref: /schemas/media/video-interface-devices.yaml#
+
+properties:
+  compatible:
+    const: st,vd55g0
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  vcore-supply:
+    description: Digital core power supply (1.2V)
+
+  vddio-supply:
+    description: Digital IO power supply (1.8V)
+
+  vana-supply:
+    description: Analog power supply (2.8V)
+
+  reset-gpios:
+    description: Sensor reset active low GPIO (XSHUTDOWN)
+    maxItems: 1
+
+  st,leds:
+    description:
+      List of sensor GPIOs used to control strobe light sources during the
+      exposure time. The numbers identify the sensor pin on which the
+      illumination system is connected. GPIOs are active-high.
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    minItems: 1
+    maxItems: 4
+    items:
+      minimum: 0
+      maximum: 3
+
+  port:
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    additionalProperties: false
+
+    properties:
+      endpoint:
+        $ref: /schemas/media/video-interfaces.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          data-lanes:
+            items:
+              - const: 1
+
+          link-frequencies:
+            maxItems: 1
+            items:
+              minimum: 375000000
+              maximum: 600000000
+            description:
+              The MIPI output runs at twice the link frequency, 750 to 1200
+              Mbps, and at an integer multiple of the input clock frequency.
+
+          lane-polarities:
+            minItems: 1
+            maxItems: 2
+
+        required:
+          - data-lanes
+          - link-frequencies
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - vcore-supply
+  - vddio-supply
+  - vana-supply
+  - reset-gpios
+  - port
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interface-devices.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        camera-sensor@60 {
+            compatible = "st,vd55g0";
+            reg = <0x60>;
+
+            clocks = <&camera_clk_12M>;
+
+            vcore-supply = <&camera_vcore_v1v2>;
+            vddio-supply = <&camera_vddio_v1v8>;
+            vana-supply = <&camera_vana_v2v8>;
+
+            reset-gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+            st,leds = <1>;
+
+            orientation = <MEDIA_ORIENTATION_FRONT>;
+            rotation = <0>;
+
+            port {
+                endpoint {
+                    data-lanes = <1>;
+                    link-frequencies = /bits/ 64 <402000000>;
+                    remote-endpoint = <&csiphy0_ep>;
+                };
+            };
+        };
+    };
Signature · 1 line
2.54.0
#2 lore raw

Re: [PATCH 1/4] dt-bindings: media: i2c: Add ST VD55G0 camera sensor

Quoted 9 lines · Sergey Lebedev

The VD55G0 is a monochrome global shutter sensor with a 644x604 active array, sending over a single MIPI CSI-2 lane.

Merged from ST's own binding in STMicroelectronics/vd55g0-linux-driver, which gives the supply voltages, and st,vd55g1.yaml, whose conventions and property list it follows. ST's st,out-sync and st,in-sync are left out, as in vd55g1. Link frequencies run from 375 to 600 MHz, for the sensor's MIPI rate of 750 to 1200 Mbps (UM2829, 13.1).

Quoted 8 lines
Assisted-by Claude:claude-opus-5-5

---
The properties follow st,vd55g1.yaml nearly line for line. If a compatible in that file is preferred, with an if/then for the link-frequency minimum, I can fold it in there.

https://lore.kernel.org/all/[email protected]/

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH 1/4] dt-bindings: media: i2c: Add ST VD55G0 camera sensor

Hi Krzysztof,

Quoted 5 lines · Krzysztof Kozlowski
Quoted 3 lines

The properties follow st,vd55g1.yaml nearly line for line. If a compatible in that file is preferred, with an if/then for the link-frequency minimum, I can fold it in there.

https://lore.kernel.org/all/[email protected]/

Thank you. I read it as: no new file, the compatible goes into st,vd55g1.yaml. So in v2, 1/4 becomes one patch to st,vd55g1.yaml that:

- adds st,vd55g0 to the compatible enum;
- moves allOf below required, together with an if/then that sets the 375 MHz link-frequency minimum for st,vd55g0, as in Peter's patches squashed per your review of his v2;
- says in the description that the VD55G0 array is 644x604 and that its I2C address comes from its NVM rather than being fixed at 0x10.

If you meant something else, please say so.

Sergey

#4 lore raw

PATCH 2/4 media: i2c: Add ST VD55G0 global shutter sensor driver

In reply to Sergey Lebedev

The VD55G0 is a 644x604 monochrome global shutter sensor from STMicroelectronics. It streams Y8 or Y10 over one CSI-2 lane, runs its own auto exposure, can strobe an illuminator from its GPIOs, and needs a firmware patch at every power-on, carried in the driver as vd55g1 does.

The driver is ported from ST's own, GPL-2.0, to current interfaces: CCI register access, .enable_streams with the subdev state, fwnode properties, devm_v4l2_sensor_clk_get(), and an ACPI match for x86 machines where the sensor sits behind ipu-bridge:
https://github.com/STMicroelectronics/vd55g0-linux-driver
ST's st,out-sync and st,in-sync and its two private controls are left out, as vd55g1 has none of them. With the ACPI ID the supplies take the names INT3472 registers, avdd and dovdd; a PRP0001 device keeps the DT names.

The clock tree is computed from the input clock and the one link frequency the endpoint gives, as in vd55g1. The MIPI rate must be an integer multiple of the input clock, or the sensor would run at another one, so any other link frequency fails probe.

Exposure and the two gains form an auto cluster with auto exposure, as in
vd55g1: while auto exposure runs, they read back what the sensor applies.

Assisted-by Claude:claude-opus-5-5 sparse

---
On ACPI the supplies take the names INT3472 registers, avdd and dovdd, through acpi_match_device(); vd55g1 is served by an entry in int3472's map instead. I did not add one, as it would have to say which rail each pin feeds, and that is not known here: INT3472 calls pin type 0x10 DOVDD, while Windows' camera driver calls it Avdd. If a map entry is preferred, I can move the names there.

 MAINTAINERS                |   10 +
 drivers/media/i2c/Kconfig  |   11 +
 drivers/media/i2c/Makefile |    1 +
 drivers/media/i2c/vd55g0.c | 2434 ++++++++++++++++++++++++++++++++++++
 4 files changed, 2456 insertions(+)
 create mode 100644 drivers/media/i2c/vd55g0.c
MAINTAINERS +10 -0
index 760791e3635..7745ad9ef81 100644
@@ -26036,6 +26036,15 @@ F:	Documentation/devicetree/bindings/hwmon/st,tsc1641.yaml
 F:	Documentation/hwmon/tsc1641.rst
 F:	drivers/hwmon/tsc1641.c
 
+ST VD55G0 DRIVER
+M:	Benjamin Mugnier <[email protected]>
+M:	Sergey Lebedev <[email protected]>
+M:	Sylvain Petinot <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/media/i2c/st,vd55g0.yaml
+F:	drivers/media/i2c/vd55g0.c
+
 ST VD55G1 DRIVER
 M:	Benjamin Mugnier <[email protected]>
 M:	Sylvain Petinot <[email protected]>
@@ -28683,6 +28692,7 @@ F:	drivers/media/i2c/mt*
 F:	drivers/media/i2c/og*
 F:	drivers/media/i2c/ov*
 F:	drivers/media/i2c/s5*
+F:	drivers/media/i2c/vd55g0.c
 F:	drivers/media/i2c/vd55g1.c
 F:	drivers/media/i2c/vd56g3.c
 F:	drivers/media/i2c/vgxy61.c
drivers/media/i2c/Kconfig +11 -0
index 7de2d095c96..05343f82ec6 100644
@@ -891,6 +891,17 @@ config VIDEO_T4KA3
 	  To compile this driver as a module, choose M here: the
 	  module will be called t4ka3.
 
+config VIDEO_VD55G0
+	tristate "ST VD55G0 sensor support"
+	select V4L2_CCI_I2C
+	depends on GPIOLIB
+	help
+	  This is a Video4Linux2 sensor driver for the ST VD55G0
+	  camera sensor.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called vd55g0.
+
 config VIDEO_VD55G1
 	tristate "ST VD55G1 sensor support"
 	select V4L2_CCI_I2C
drivers/media/i2c/Makefile +1 -0
index 59e31af457c..a7e990ec650 100644
@@ -171,6 +171,7 @@ obj-$(CONFIG_VIDEO_TW9910) += tw9910.o
 obj-$(CONFIG_VIDEO_UDA1342) += uda1342.o
 obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
 obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
+obj-$(CONFIG_VIDEO_VD55G0) += vd55g0.o
 obj-$(CONFIG_VIDEO_VD55G1) += vd55g1.o
 obj-$(CONFIG_VIDEO_VD56G3) += vd56g3.o
 obj-$(CONFIG_VIDEO_VGXY61) += vgxy61.o
drivers/media/i2c/vd55g0.c new file +2434 -0

2,434 lines not on this page · raw message

Signature · 1 line
2.54.0
#5 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

Quoted 4 lines · Sergey Lebedev

The clock tree is computed from the input clock and the one link frequency the endpoint gives, as in vd55g1. The MIPI rate must be an integer multiple of the input clock, or the sensor would run at another one, so any other link frequency fails probe.

Thank you for posting this. I tested v1 on the Snapdragon Surface Pro 11 (X1E80100), where the endpoint is 420 MHz link frequency (840 Mbps) with a 19.2 MHz xclk.

As posted, patch 2/4 fails probe at the integer-multiple check because 840 MHz is not an integer multiple of 19.2 MHz.

For a test only, I removed that rejection and left the rest of the driver unchanged. The sensor then probes, the CAMSS media graph completes, and capture delivers one complete 644x604 Y10 frame. A continuous five-frame capture then times out waiting for frame 2.

The 1200-pixel line length below 900 Mbps is already present in this standalone driver, so this is not the earlier line-length issue. I also tried the ST one-lane OIF_CTRL value 0x81; the behaviour was unchanged.

For comparison, Peter's generalized vd55g1 series, with the 1200-pixel line-length fix, streams continuously on this same machine with the same 19.2 MHz xclk and nominal 840 Mbps endpoint setting. Whether the sensor internally rounds that rate is a separate question, but rejecting the configuration outright prevents this Snapdragon model from probing.

There also appears to be a second difference to narrow down after the first frame. I'm continuing to bisect that and will report the exact cause/delta once I have it, so I can't give this a Tested-by yet.

Best regards,
George

#6 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

Hi George,

Thank you for trying it on the Snapdragon model.

Quoted 2 lines · George Neacsu

As posted, patch 2/4 fails probe at the integer-multiple check because 840 MHz is not an integer multiple of 19.2 MHz.

That refusal is deliberate. The MIPI rate is an integer multiple of the input clock, and the sensor rounds a request down (UM2829 13.6): asked for 840 Mbps from 19.2 MHz, it runs at 825.6 while the receiver is set up for 840. camera-sensor.rst asks a sensor driver to use only the link frequencies the firmware gives, so the driver refuses one it cannot produce. From 19.2 MHz, 403.2 MHz (806.4 Mbps, 42 times the clock) and 384 MHz (768 Mbps, 40 times) are exact, so the change is one value in your board's DT, in the sensor endpoint:

	link-frequencies = /bits/ 64 <403200000>;

On the Intel model I ran it at 403.2 MHz with a 19.2 MHz clock, and every mode ran at 60.22 fps, as the controls give.

Quoted 4 lines

For a test only, I removed that rejection and left the rest of the driver unchanged. The sensor then probes, the CAMSS media graph completes, and capture delivers one complete 644x604 Y10 frame. A continuous five-frame capture then times out waiting for frame 2.

With the check removed, the sensor runs at 825.6 Mbps against a receiver set up for 840, and the driver reports a pixel rate of 140 MHz where it is 137.6. I do not know whether CAMSS minds, but a run at 403.2 MHz with the driver as posted would take that out of the question. If it still stops after one frame, I would be glad to compare what the two drivers write at stream start.

Sergey

#7 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

Quoted 8 lines · Sergey Lebedev

From 19.2 MHz, 403.2 MHz (806.4 Mbps, 42 times the clock) and 384 MHz (768 Mbps, 40 times) are exact, so the change is one value in your board's DT, in the sensor endpoint:

	link-frequencies = /bits/ 64 <403200000>;

If it still stops after one frame, I would be glad to compare what the two drivers write at stream start.

That took the clock mismatch out of the experiment. With 403.2 MHz in the DT and your v1 otherwise as posted, the sensor probes cleanly and reports link_frequency=403200000 and pixel_rate=134400000, but capture still delivers exactly one 644x604 Y10 frame and then times out waiting for frame 2.

I then went back to the earlier VD55G0 A/B tests on this same Snapdragon machine. One result was particularly useful: the 1200-pixel line length alone still stalled, and omitting the 0x0329 write with the old line length still stalled, but 1200 plus leaving 0x0329 untouched streamed continuously. Your driver already has the 1200-pixel line length, but it also has:

	vd55g0_write(sensor, VD55G0_REG_ISL_ENABLE, 0, &ret);

I rebuilt v1 with only that single write omitted, keeping the 403.2 MHz DT setting and everything else unchanged. That fixes continuous capture here:

- 5/5 frames in the initial Y10 644x604 capture
- 120/120 frames in a continuous run at about 60.2 fps
- immediate stream restart: 10/10 frames
- v4l2-compliance on the sensor subdev: 46/46, 0 failures, 0 warnings

There were no new CAMSS/CSID/VFE errors during the runs.

So the link-frequency correction is needed, but the one-frame stall is a separate issue caused here by clearing VD55G0_REG_ISL_ENABLE (0x0329). I have not tried to infer yet why clearing it prevents subsequent frames on this sensor, but the A/B is repeatable and agrees with the older VD55G0 results on this machine.

Would you be comfortable dropping that write in the next revision? I can retest the revision on the Snapdragon model and add a Tested-by once it is clean.

Best regards,
George

#8 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

Hi George,

Quoted 3 lines · George Neacsu

Would you be comfortable dropping that write in the next revision? I can retest the revision on the Snapdragon model and add a Tested-by once it is clean.

Yes, I will drop that write in v2 and leave 0x0329 at its default, and Cc you on it. Thank you for narrowing it down to one line.

On the Intel model it makes no difference. In one boot, with the sensor held powered and 0x0329 set to 1, then 0, then 1 again, each state streamed 150 of 150 frames at 59.14 fps and restarted 10 of 10 times. The test-pattern frames showed no shift or extra lines in any state, so IPU7 does not put the status lines into the buffer, and its error count did not change. The full test run without the write matches the run with it, v4l2-compliance 46 of 46 included.

One thing I cannot explain: on 16/10 your vd55g1 build streamed 2/2 with 0x0329 = 0 written once per power-on, as v1 does it. So the write alone may not be what stops CAMSS; something else in v1 may take part. Leaving the register alone is simpler either way.

Sergey

#9 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

Hi,

Le 20/10/2026 à 10:52, Sergey Lebedev a écrit :

Quoted 18 lines

Hi George,

Quoted 3 lines · George Neacsu

Would you be comfortable dropping that write in the next revision? I can retest the revision on the Snapdragon model and add a Tested-by once it is clean.

Yes, I will drop that write in v2 and leave 0x0329 at its default, and Cc you on it. Thank you for narrowing it down to one line.

On the Intel model it makes no difference. In one boot, with the sensor held powered and 0x0329 set to 1, then 0, then 1 again, each state streamed 150 of 150 frames at 59.14 fps and restarted 10 of 10 times. The test-pattern frames showed no shift or extra lines in any state, so IPU7 does not put the status lines into the buffer, and its error count did not change. The full test run without the write matches the run with it, v4l2-compliance 46 of 46 included.

Quoted 4 lines

One thing I cannot explain: on 16/10 your vd55g1 build streamed 2/2 with 0x0329 = 0 written once per power-on, as v1 does it. So the write alone may not be what stops CAMSS; something else in v1 may take part. Leaving the register alone is simpler either way.

I'm a bit puzzled on this.

ISL are output on a different data type than regular data. They are output with 0x12, which translates to MIPI_CSI2_DT_EMBEDDED_8B in V4L2. Your receiver should drop these frames regardless as it only waits for data and not ISL. Outputting them doesn't affect sensor timings either.

I guess there could be an issue on the receiver side ? Maybe your receiver is ignoring data types and completes the frame with ISL data, effectively filling up the DMA ?

Quoted 2 lines

Sergey

Signature · 2 lines
Regards,
Benjamin
#10 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

Hi Benjamin,

Quoted 3 lines · Benjamin Mugnier

I guess there could be an issue on the receiver side ? Maybe your receiver is ignoring data types and completes the frame with ISL data, effectively filling up the DMA ?

Not on the Intel model: IPU7 drops them, as you expect. With 0x0329 at 1, the test-pattern frames match those at 0 with no shift, and the top rows hold image data, not the embedded lines.

On the Snapdragon model it runs the other way: George's stream stops with the status lines off and runs with them on, and on 16/10 his vd55g1 build streamed with them off. So I agree the register itself should not matter there; something else in v1 probably does, and George can narrow it down on CAMSS better than I can. v2 leaves the register at its default, which changes nothing on IPU7.

Sergey

#11 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

Hi Benjamin, Sergey,

Quoted 3 lines · Sergey Lebedev

So I agree the register itself
should not matter there; something else in v1 probably does, and George can narrow it down on CAMSS better than I can.

You were both right, and I have to correct my earlier report.

I looked at the receiver side with a CSID change that only reads registers at stream start. RDI0 is set up for data type 0x2b (RAW10), VC 0, with no ECC or CRC errors, so CAMSS filters on the data type and the ISL lines (DT 0x12) should not reach the buffer.

With that in place I reran the exact v1 module that stalled this morning:
same build, 403.2 MHz in the DT, and the ISL_ENABLE=0 write still in. It streamed 5/5 frames, 120/120 at about 60.2 fps, and 10/10 on an immediate restart. Builds that wrote 0 and builds that left the default behaved the same, and read back 0x00 and 0x01 respectively.

To rule out the diagnostic reads changing the timing, I then booted again with the unmodified CAMSS module and the same exact v1 module:
three rounds of 5, 120 and 10 frames, all complete, at about 60.2 fps, with no CAMSS errors.

So clearing 0x0329 does not cause the stall on this machine. My earlier A/B was a correlation, not the cause; something else in those runs made the difference, and I have not pinned it down yet.

I tried to count the DT 0x12 packets directly with the CSID's long-packet capture, but enabling that capture changed the behaviour itself (one frame only), so it could not serve as a passive observer.

Sergey, the write can stay or go as you prefer; the Snapdragon model does not need it dropped. The 403.2 MHz link frequency still stands. I will test v2 on the X1E80100 and send a Tested-by if it passes.

Sorry for the noise.

Thanks,
George

#12 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

Hi George,

Quoted 2 lines · George Neacsu

Sergey, the write can stay or go as you prefer; the Snapdragon model does not need it dropped.

Thank you for going back to it, and no need to apologise.

Then v2 keeps the write, as vd55g1 does: the driver does not expose the status lines, and on IPU7 it makes no difference either way.

Sergey

#13 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

Hi,

Le 20/10/2026 à 20:14, Sergey Lebedev a écrit :

Quoted 5 lines

Hi George,

Quoted 2 lines · George Neacsu

Sergey, the write can stay or go as you prefer; the Snapdragon model does not need it dropped.

Glad you got it sorted, I was starting to wonder.

Quoted 5 lines

Thank you for going back to it, and no need to apologise.

Then v2 keeps the write, as vd55g1 does: the driver does not expose the status lines, and on IPU7 it makes no difference either way.

Could we keep it disabled instead ? I'm afraid some receiver could catch all data types and therefore messing up the frame. Better safe than sorry.

I should update vd55g1 too.

Quoted 2 lines

Sergey

Signature · 2 lines
Regards,
Benjamin
#14 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

Le 21/10/2026 à 11:02, Benjamin Mugnier a écrit :

Quoted 14 lines

Hi,

Le 20/10/2026 à 20:14, Sergey Lebedev a écrit :

Quoted 5 lines

Hi George,

Quoted 2 lines · George Neacsu

Sergey, the write can stay or go as you prefer; the Snapdragon model does not need it dropped.

Glad you got it sorted, I was starting to wonder.

Quoted 3 lines

Thank you for going back to it, and no need to apologise.

Quoted 8 lines
Quoted 2 lines

Then v2 keeps the write, as vd55g1 does: the driver does not expose the status lines, and on IPU7 it makes no difference either way.

Could we keep it disabled instead ? I'm afraid some receiver could catch all data types and therefore messing up the frame. Better safe than sorry.

I should update vd55g1 too.

I misread your message. We're on the same page then.

Quoted 4 lines
Quoted 3 lines

Sergey

Signature · 2 lines
Regards,
Benjamin
#15 lore raw

Re: [PATCH 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

In reply to Benjamin Mugnier

Hi Benjamin,

Quoted 3 lines · Benjamin Mugnier

Could we keep it disabled instead ? I'm afraid some receiver could catch all data types and therefore messing up the frame. Better safe than sorry.

Yes, that is what v2 does: the write that stays is ISL_ENABLE = 0, so the status lines stay off, as in v1. I should have said "disabled" rather than "keeps the write".

Quoted 1 line

I should update vd55g1 too.

vd55g1 already turns them off: vd55g1_enable_streams() writes 0 to VD55G1_REG_ISL_ENABLE at each stream start, in media next.

Sergey

#16 lore raw

PATCH 3/4 media: ipu-bridge: Add ST VD55G0

In reply to Sergey Lebedev

The infrared camera of the Surface Pro 11 with Intel is an ST VD55G0, enumerated by ACPI as SMO55F0 and wired to the IPU7 over one CSI-2 data lane.

The vd55g0 driver takes only a link frequency whose MIPI rate, twice it, is an integer multiple of the input clock. 396 MHz gives 792 Mbps, 33 times the 24 MHz the sensor's SSDB lists on the Surface Pro 8, 9, 10 and 11, and within the sensor's 750 to 1200 Mbps. Peter Marshall's earlier patch for the Surface Pro 9 used 380 MHz, 760 Mbps, which is not a multiple of 24 MHz, so the driver would refuse it:
https://lore.kernel.org/all/[email protected]/

Assisted-by Claude:claude-opus-5-5 sparse
---
 drivers/media/pci/intel/ipu-bridge.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/pci/intel/ipu-bridge.c +2 -0
index 3739c4a2a8c..cb1d1582fa1 100644
@@ -120,6 +120,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
 	IPU_SENSOR_CONFIG("OVTI5693", 1, 419200000),
 	/* Omnivision OV8856 */
 	IPU_SENSOR_CONFIG("OVTI8856", 3, 180000000, 360000000, 720000000),
+	/* STMicroelectronics VD55G0 */
+	IPU_SENSOR_CONFIG("SMO55F0", 1, 396000000),
 	/* Sony IMX471 */
 	IPU_SENSOR_CONFIG("SONY471A", 1, 200000000),
 	/* Sony IMX471 (found on Lenovo X1 Carbon G14) */
Signature · 1 line
2.54.0
#17 lore raw

PATCH 4/4 media: ipu-bridge: Add the Surface Pro 11 infrared illuminator

In reply to Sergey Lebedev

On the Surface Pro 11 with Intel the infrared illuminator is driven by the VD55G0's GPIO 1, which strobes it during the exposure. The ACPI tables do not describe it, so the sensor driver finds no st,leds and offers no V4L2_CID_FLASH_LED_MODE.

Give the sensor's software node st,leds from a DMI match, as the upside-down quirk gives a rotation. dev_properties gains an entry for it, as a sensor can also have a lens-focus reference.

Assisted-by Claude:claude-opus-5-5 sparse
---
 drivers/media/pci/intel/ipu-bridge.c | 60 +++++++++++++++++++++++++++-
 include/media/ipu-bridge.h           |  2 +-
 2 files changed, 59 insertions(+), 3 deletions(-)
drivers/media/pci/intel/ipu-bridge.c +58 -2
index cb1d1582fa1..05aa6d92bbf 100644
@@ -283,6 +283,39 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
 	{} /* Terminating entry */
 };
 
+/*
+ * Sensor GPIOs that drive an illuminator, for machines whose ACPI tables do
+ * not say which. They reach the sensor driver as its own leds property.
+ */
+struct ipu_sensor_leds {
+	const char *hid;
+	const char *property;
+	const u32 *gpios;
+	unsigned int nr_gpios;
+};
+
+/* The infrared illuminator, strobed by the VD55G0's GPIO 1 */
+static const u32 surface_pro_11_ir_gpios[] = { 1 };
+
+static const struct ipu_sensor_leds surface_pro_11_ir_leds = {
+	.hid = "SMO55F0",
+	.property = "st,leds",
+	.gpios = surface_pro_11_ir_gpios,
+	.nr_gpios = ARRAY_SIZE(surface_pro_11_ir_gpios),
+};
+
+static const struct dmi_system_id sensor_leds_dmi_ids[] = {
+	{
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME,
+					"Surface Pro for Business 11th Edition with Intel"),
+		},
+		.driver_data = (void *)&surface_pro_11_ir_leds,
+	},
+	{} /* Terminating entry */
+};
+
 static const struct ipu_property_names prop_names = {
 	.clock_frequency = "clock-frequency",
 	.rotation = "rotation",
@@ -563,6 +596,22 @@ int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor)
 }
 EXPORT_SYMBOL_NS_GPL(ipu_bridge_parse_ssdb, "INTEL_IPU_BRIDGE");
 
+static const struct ipu_sensor_leds *
+ipu_bridge_get_leds(const struct ipu_sensor_config *cfg)
+{
+	const struct dmi_system_id *dmi_id;
+	const struct ipu_sensor_leds *leds;
+
+	for (dmi_id = dmi_first_match(sensor_leds_dmi_ids); dmi_id;
+	     dmi_id = dmi_first_match(dmi_id + 1)) {
+		leds = dmi_id->driver_data;
+		if (!strcmp(cfg->hid, leds->hid))
+			return leds;
+	}
+
+	return NULL;
+}
+
 static void ipu_bridge_create_fwnode_properties(
 	struct ipu_sensor *sensor,
 	struct ipu_bridge *bridge,
@@ -570,7 +619,8 @@ static void ipu_bridge_create_fwnode_properties(
 {
 	struct ipu_property_names *names = &sensor->prop_names;
 	struct software_node *nodes = sensor->swnodes;
-	unsigned int i = 0;
+	const struct ipu_sensor_leds *leds;
+	unsigned int i = 0, d = 3;
 
 	sensor->prop_names = prop_names;
 
@@ -624,10 +674,16 @@ static void ipu_bridge_create_fwnode_properties(
 	if (sensor->vcm_type) {
 		sensor->vcm_ref[0] =
 			SOFTWARE_NODE_REFERENCE(&sensor->swnodes[SWNODE_VCM]);
-		sensor->dev_properties[3] =
+		sensor->dev_properties[d++] =
 			PROPERTY_ENTRY_REF_ARRAY("lens-focus", sensor->vcm_ref);
 	}
 
+	leds = ipu_bridge_get_leds(cfg);
+	if (leds)
+		sensor->dev_properties[d++] =
+			PROPERTY_ENTRY_U32_ARRAY_LEN(leds->property, leds->gpios,
+						     leds->nr_gpios);
+
 	sensor->ep_properties[IPU_BRIDGE_NEXT_PROPERTY(i, EP_BUS_TYPE)] =
 		PROPERTY_ENTRY_U32(names->bus_type,
 				   V4L2_FWNODE_BUS_TYPE_CSI2_DPHY);
include/media/ipu-bridge.h +1 -1
index 3ef94c2b767..f56ac1c4e96 100644
@@ -179,7 +179,7 @@ struct ipu_sensor {
 
 	struct ipu_property_names prop_names;
 	struct property_entry ep_properties[IPU_BRIDGE_EP_NUM_ENTRIES];
-	struct property_entry dev_properties[5];
+	struct property_entry dev_properties[6];
 	struct property_entry ipu_properties[3];
 	struct property_entry ivsc_properties[1];
 	struct property_entry ivsc_sensor_ep_properties[4];
Signature · 1 line
2.54.0
#18 lore raw

Re: [PATCH 4/4] media: ipu-bridge: Add the Surface Pro 11 infrared illuminator

Hi Sergey,

Quoted 6 lines · Sergey Lebedev
drivers/media/pci/intel/ipu-bridge.c +6 -0
+/* The infrared illuminator, strobed by the VD55G0's GPIO 1 */
+static const u32 surface_pro_11_ir_gpios[] = { 1 };
+
+static const struct ipu_sensor_leds surface_pro_11_ir_leds = {
+	.hid = "SMO55F0",
+	.property = "st,leds",

[...]

drivers/media/pci/intel/ipu-bridge.c static void ipu_bridge_create_fwnode_properties( · line 685

Quoted 5 lines
drivers/media/pci/intel/ipu-bridge.c +5 -0
+	leds = ipu_bridge_get_leds(cfg);
+	if (leds)
+		sensor->dev_properties[d++] =
+			PROPERTY_ENTRY_U32_ARRAY_LEN(leds->property, leds->gpios,
+						     leds->nr_gpios);

The property entry keeps pointers to both its name and its values, and here both point into the module image: the "st,leds" literal and the static const surface_pro_11_ir_gpios[]. The bridge never unregisters its software nodes, on purpose, so that a rebind can reuse them. After rmmod ipu-bridge both pointers dangle, and a sensor driver probing again reads freed memory for the property's name and value.

It is the same thing that a20c843c9bc4 ("media: ipu-bridge: Keep the clock-noncontinuous property name out of rodata") fixed for clock-noncontinuous, and that D. Manresa's v4 fixes for the link-frequencies values and the lens-focus name:

https://lore.kernel.org/linux-media/[email protected]/

Following his v4, the name would go in struct ipu_property_names and the GPIO numbers would be copied into struct ipu_sensor, so that nothing the node points at lives in the module.

On the same hunk:

drivers/media/pci/intel/ipu-bridge.c static void ipu_bridge_create_fwnode_properties( · line 678

Quoted 5 lines
drivers/media/pci/intel/ipu-bridge.c +1 -1
 		sensor->vcm_ref[0] =
 			SOFTWARE_NODE_REFERENCE(&sensor->swnodes[SWNODE_VCM]);
-		sensor->dev_properties[3] =
+		sensor->dev_properties[d++] =
 			PROPERTY_ENTRY_REF_ARRAY("lens-focus", sensor->vcm_ref);

Manresa's v4 1/2 changes this same line to use names->lens_focus, so whichever of the two lands second will need a rebase.

The Surface Pro 9 needs an entry too. Its VD55G0 drives the illuminator from GPIO 1, as on your machine. Its DMI strings are:

sys_vendor "Microsoft Corporation"
product_name "Surface Pro 9"

I tested it with your driver by having it fall back to GPIO 1 when no st,leds was found. In a dim room, 640x480 Y8 at exposure 600 and analogue gain 8, the frame mean goes from 22.0 with led_mode off to 64.7 with it set to flash. There is more on how the series runs on the Surface Pro 9 in my reply to the cover letter.

Fernando

#19 lore raw

Re: [PATCH 4/4] media: ipu-bridge: Add the Surface Pro 11 infrared illuminator

Hi Fernando,

Quoted 3 lines · Fernando Rimoli

The property entry keeps pointers to both its name and its values, and here both point into the module image: the "st,leds" literal and the static const surface_pro_11_ir_gpios[].

You are right, thank you. The only other name there that does not come from the per-sensor prop_names copy is "lens-focus", which D. Manresa's v4 moves as well. So v2 will do what your a20c843c9bc4 and his v4 do:
"st,leds" goes into struct ipu_property_names, and the GPIO numbers are copied into struct ipu_sensor.

Quoted 2 lines

Manresa's v4 1/2 changes this same line to use names->lens_focus, so whichever of the two lands second will need a rebase.

Noted; v2 will say so below the ---.

Quoted 2 lines

The Surface Pro 9 needs an entry too. Its VD55G0 drives the illuminator from GPIO 1, as on your machine.

v2 will add it, matching the sys_vendor and product_name you give exactly, as for the Surface Pro 11. I will Cc you; a run of v2 as posted on the Surface Pro 9 would be welcome.

Sergey

#20 lore raw
In reply to Sergey Lebedev

Hi Sergey,

Here is a run of the series on IPU6: a Surface Pro 9 (Alder Lake-P, 8086:465d), whose infrared camera is the same SMO55F0. The sensor reports revision 0x1111, cut 1, and your built-in cut 1 patch is identical to the one I had been using. In short, it works, and I have three findings from the run.

The setup is not media next, so let me say how far it is from it. This machine boots a 6.19-based kernel. I took 2/4 as posted and made three local changes for the test:

- dropped the struct v4l2_subdev_client_info argument from set_fmt and get_selection, which 6.19 does not have;
- renamed "dovdd" to "dvdd" in the ACPI supply names, because the 6.19-based int3472 here registers this sensor's two GPIO supplies as avdd and dvdd, so dovdd got the dummy regulator. Hans's int3472 series reworks these names, so it is worth checking against whatever lands;
- fell back to GPIO 1 when there is no st,leds, since 4/4 has no Surface Pro 9 entry (see my reply to 4/4).

I ran it at the 396 MHz from 3/4, with a cold boot to load the bridge, and at 600 MHz, which is what this machine has used until now.

What works, at both frequencies:

- probe, bind, and v4l2-compliance 44/44 on the subdev, starting from both auto and manual exposure;
- all twelve combinations of R8, R10 and R10_CSI2P with 644x604, 640x600, 640x480 and 320x240 stream 90 of 90 frames through libcamera with --strict-formats. R8 at 320x240 runs at about a third of the rate (15.93 fps at 396 MHz). That is the IPU6 limit on narrow lines in its packed capture path, not the driver; R10 and R10_CSI2P at 320x240 run at full rate;
- the strobe, through led_mode;
- the system relay this machine uses for face unlock, which arms manual exposure and the strobe: it delivers frames through the driver, though see 3 below.

1. The Surface Pro 9 has the same clock problem as your Surface Pro 11. At 396 MHz every mode runs at 47.31 fps where the controls give 59.14, the same numbers you reported on Hao's thread. At 600 MHz it is 57.20 against 71.49. The SSDB says 24 MHz, INT3472 enables the clock through the _DSM with 1, and everything the sensor derives runs at four fifths. The previous driver on this machine behaves the same way at both frequencies, so the cause is the clock.

Unlike on your machine, Hao's v2 does not fix it here. From a cold boot with it applied, nothing changes: 57.20 against 71.49 at 600 MHz, with the clock reported at 24 MHz, so the patch does pass 3 to the _DSM. This firmware seems to give the sensor 19.2 MHz whatever INT3472 asks for. I have reported it on Hao's thread.

That matters for 3/4. On this machine 396 MHz puts the sensor's MIPI output at 633.6 Mbps, below its 750 Mbps minimum. It streams anyway, at every mode above, but it is out of specification, and 600 MHz (960 Mbps here) is not. I had kept this machine at 600 MHz because 380 looked 17% slower, and that turned out to be this clock, not the link frequency, so the frame rate is no argument either way. The specification is, though, as long as the Surface Pro 9 clock cannot be fixed. Since the driver needs a multiple of the clock it believes it has, a separate entry for this IPU (8086:465d) through the per-IPU match in ipu-bridge would let it run in specification without changing yours.

2. Nothing bounds the exposure while the strobe is on, and the illuminator has an overcurrent limit that a long exposure trips. Your maximum is frame length minus 64. At 640x480 Y8 and analogue gain 8, ramping the exposure with led_mode set to flash gives (frame mean, with the same exposure and the LED off in brackets; the room light differed between the first run and the other two):

frame 1860 lines, 600 MHz: lit through 1200 lines (158.2 [119.9])

                              out at 1300 (123.0 [118.3])
  frame 1860 lines, 396 MHz:  lit through 1200 (108.0 [27.2])
                              out at 1300 (42.4 [28.4])
  frame 3480 lines, 396 MHz:  lit through 2100 (159.7)
                              partly at 2400 (97.6 [42.0])
                              out at 2700 (39.9)

So it gives out at about two thirds of the frame length both times:
65-70% for the short frame, 60-78% for the long one. The longest fully lit pulse above is about 24 ms, against about 13.6 ms at the cutoff for the 1860-line frame, so it is the duty cycle that matters, not the pulse length. It recovers by itself: the LED comes back as soon as the exposure is lowered. A ceiling proportional to the frame length while led_mode is flash would keep auto exposure out of that region. Half the frame length, which Peter used, leaves a margin.

3. On IPU6 the stream needs a CPU latency bound, or frames come out corrupted. Through the relay, with a static scene, the frame mean jumped between 150 and 230, and the log showed

intel_ipu6_isys.isys intel_ipu6.isys.40: csi2-3 error: Transfer FIFO overflow intel_ipu6_isys.isys intel_ipu6.isys.40: csi2-3 error: Inter-frame long packet discarded

while holding a 50 us request on /dev/cpu_dma_latency for the same capture gave 60 of 60 frames with a mean of 150 and a deviation of 0.4. That is not this driver's to fix: the ISYS asks for 300 us (ISYS_PM_QOS_VALUE), and Peter has a change to 50 for it in his tree, not yet posted. But anyone trying this driver on IPU6 without that change will see it, and it looks like a sensor problem when it is not. The previous driver on this machine hid it by holding its own PM QoS request while streaming.

I will add a Tested-by for the Surface Pro 9 on v2, if it has an entry for it.

Fernando

#21 lore raw

Hi Fernando,

Thank you for the run, and for the detail.

Quoted 3 lines · Fernando Rimoli

- renamed "dovdd" to "dvdd" in the ACPI supply names, because the 6.19-based int3472 here registers this sensor's two GPIO supplies as avdd and dvdd, so dovdd got the dummy regulator.

The Surface Pro 9's ICL2 has the same two power GPIOs as the Surface Pro 11, types 0x0b and 0x10. Mainline v6.19 has no name for 0x10, so the dvdd comes from your tree; media next calls it dovdd, and the driver as posted should find it there. If the int3472 names change, the driver's ACPI names follow whatever lands.

Quoted 3 lines

Since the driver needs a multiple of the clock it believes it has, a separate entry for this IPU (8086:465d) through the per-IPU match in ipu-bridge would let it run in specification without changing yours.

I would rather fix the clock. With 19.2 MHz reported as 24, the sensor runs at four fifths of every rate the driver computes, so an in-specification link frequency would still leave the controls off by four fifths, as your 57.20 against 71.49 at 600 MHz shows. On Hao's thread I have pointed at the Surface Pro 9's _DSM, which looks like it takes 0 for 24 MHz. If it does, 396 MHz is in specification there too.

Quoted 2 lines

2. Nothing bounds the exposure while the strobe is on, and the illuminator has an overcurrent limit that a long exposure trips.

The same here: on the Surface Pro 11 the illuminator holds up to 68% of an 1860-line frame, fades at 70-72% and goes out at 72-75%. It fades rather than cutting off, which points at the board's LED driver rather than the sensor, so the fraction belongs to the board, like st,leds. The sensor has the means: MAX_EXPOSURE_LINES (UM2829, 13.8.1) bounds its own auto exposure as well as manual exposure. I would do that as a follow-up, with the bound supplied from the same place as st,leds, rather than grow this series. Benjamin, say if you would rather have it in the driver now.

Quoted 2 lines

3. On IPU6 the stream needs a CPU latency bound, or frames come out corrupted.

Thank you. I will mention it in the v2 cover letter, so that IPU6 testers do not take it for the sensor.

Quoted 2 lines

I will add a Tested-by for the Surface Pro 9 on v2, if it has an entry for it.

It will; see my answer on 4/4.

Sergey