[PATCH v2 00/11] media: Add Lenovo Yoga Book YB1-X91 camera support

Maurizio Casciano posted 11 patches 1 month ago
There is a newer version of this series
MAINTAINERS                                   |   1 +
drivers/media/i2c/Kconfig                     |  11 +
drivers/media/i2c/Makefile                    |   1 +
drivers/media/i2c/ov2740.c                    | 177 ++++++++++++---
drivers/media/i2c/ov8858.c                    | 156 ++++++++++++--
drivers/media/i2c/wv517s.c                    | 204 ++++++++++++++++++
drivers/media/pci/intel/ipu-bridge.c          |  19 +-
.../staging/media/atomisp/pci/atomisp_cmd.c   |  33 ++-
.../staging/media/atomisp/pci/atomisp_csi2.c  |  17 +-
.../staging/media/atomisp/pci/atomisp_csi2.h  |   2 +
.../media/atomisp/pci/atomisp_csi2_bridge.c   |  65 +++++-
.../media/atomisp/pci/atomisp_internal.h      |   3 +
.../staging/media/atomisp/pci/atomisp_ioctl.c |  22 +-
.../staging/media/atomisp/pci/atomisp_v4l2.c  |   9 +
include/media/ipu-bridge.h                    |   2 +
15 files changed, 648 insertions(+), 74 deletions(-)
create mode 100644 drivers/media/i2c/wv517s.c
[PATCH v2 00/11] media: Add Lenovo Yoga Book YB1-X91 camera support
Posted by Maurizio Casciano 1 month ago
The Lenovo Yoga Book YB1-X91L exposes an OV2740 front sensor and an
OV8858 rear sensor through the Cherry Trail AtomISP. Its firmware does
not provide enough information for the existing sensor and IPU bridge
drivers to construct the complete camera links.

Add the ACPI IDs and bridge data, describe both AtomISP camera links,
support the Yoga Book sensor clocks and modes, expose raw Bayer capture,
add per-channel white-balance controls, and add the WV517S rear-camera
lens actuator.

Raw capture is selected through the normal V4L2 raw pixel formats. There
is no module parameter or separate private ABI. Processed formats retain
the existing behavior, while raw formats expose the complete CSI-2
transport frames required by the ISP2401 copy pipeline.

Changes since v1:

- split the sensor ACPI IDs into one patch per driver, add a preparatory
  C99-initializer cleanup, avoid ACPI_PTR, and retain the existing acpi.h
  include because ov2740 already calls acpi_dev_state_d0();
- split the existing OV8858 digital-gain programming into a preparatory
  patch and simplify the 19.2 MHz clock/gain changes;
- use standard frequency units, cleaner declaration ordering and bridge
  quirk data instead of duplicated firmware-string parsing;
- remove the allow_raw_output module parameter and use normal VIDIOC_S_FMT
  raw-format selection;
- represent sensor padding with struct v4l2_area, simplify the raw-format
  conditions, and expose full raw transport dimensions;
- simplify the OV2740 white-balance arithmetic, cluster the three gain
  controls, and apply them together during runtime resume; and
- convert WV517S register access to regmap, correct runtime-PM handling,
  restore controls on resume, and clarify copyright and board comments.

The series is based on mainline at 73e3f0710014. All patches pass strict
checkpatch with no errors, warnings or checks. Pahole reports a 64-byte
ov2740_mode with no holes and a 792-byte ov8858 with the new clock-rate
field naturally aligned. A clean 20-job bindeb-pkg build containing the
same final source state completed successfully.

Runtime testing used a Lenovo Yoga Book YB1-X91L. Both sensors, AtomISP
and WV517S bound. Focus position 300 was accepted. Captures passed with:

- front raw BG10: 1932x1092, 4472832 bytes;
- rear raw BG10: 3264x2448, 16293888 bytes;
- front processed YU12: 1920x1080; and
- rear processed JPEG: 3248x2432, 1530647 bytes.

The raw format was selected and streamed in the same v4l2-ctl invocation,
as reopening the video node restores its default format. Both raw files
were non-empty and distinct, and the rear full-resolution JPEG completed
without AtomISP, sensor or runtime-PM errors.

Maurizio Casciano (11):
  media: ov8858: Extract digital gain programming
  media: ov8858: support 19.2 MHz clock and CHT gain setup
  media: ov2740: Use C99 initializers for ACPI IDs
  media: ov2740: Add OVTI2740 ACPI ID
  media: ov8858: Add INT3477 ACPI ID
  media: intel: ipu-bridge: Add Yoga Book camera sensors
  media: atomisp: Add Yoga Book camera configuration
  media: atomisp: support the Yoga Book OV2740 link
  media: ov2740: add manual white balance controls
  media: atomisp: allow raw Bayer capture
  media: i2c: Add WV517S lens actuator driver

 MAINTAINERS                                   |   1 +
 drivers/media/i2c/Kconfig                     |  11 +
 drivers/media/i2c/Makefile                    |   1 +
 drivers/media/i2c/ov2740.c                    | 177 ++++++++++++---
 drivers/media/i2c/ov8858.c                    | 156 ++++++++++++--
 drivers/media/i2c/wv517s.c                    | 204 ++++++++++++++++++
 drivers/media/pci/intel/ipu-bridge.c          |  19 +-
 .../staging/media/atomisp/pci/atomisp_cmd.c   |  33 ++-
 .../staging/media/atomisp/pci/atomisp_csi2.c  |  17 +-
 .../staging/media/atomisp/pci/atomisp_csi2.h  |   2 +
 .../media/atomisp/pci/atomisp_csi2_bridge.c   |  65 +++++-
 .../media/atomisp/pci/atomisp_internal.h      |   3 +
 .../staging/media/atomisp/pci/atomisp_ioctl.c |  22 +-
 .../staging/media/atomisp/pci/atomisp_v4l2.c  |   9 +
 include/media/ipu-bridge.h                    |   2 +
 15 files changed, 648 insertions(+), 74 deletions(-)
 create mode 100644 drivers/media/i2c/wv517s.c


base-commit: 73e3f0710014fe6d4ed98cfc02292f6121db7558
-- 
2.53.0
Re: [PATCH v2 00/11] media: Add Lenovo Yoga Book YB1-X91 camera support
Posted by Andy Shevchenko 1 month ago
On Thu, Aug 27, 2026 at 08:17:45PM +0200, Maurizio Casciano wrote:
> The Lenovo Yoga Book YB1-X91L exposes an OV2740 front sensor and an
> OV8858 rear sensor through the Cherry Trail AtomISP. Its firmware does
> not provide enough information for the existing sensor and IPU bridge
> drivers to construct the complete camera links.
> 
> Add the ACPI IDs and bridge data, describe both AtomISP camera links,
> support the Yoga Book sensor clocks and modes, expose raw Bayer capture,
> add per-channel white-balance controls, and add the WV517S rear-camera
> lens actuator.
> 
> Raw capture is selected through the normal V4L2 raw pixel formats. There
> is no module parameter or separate private ABI. Processed formats retain
> the existing behavior, while raw formats expose the complete CSI-2
> transport frames required by the ISP2401 copy pipeline.

Do not start new version in the email thread of the previous one!

> The series is based on mainline at 73e3f0710014.

Unneeded statement, the --base puts data (and it did) in the cover letter.
Tools know about it.

> All patches pass strict
> checkpatch with no errors, warnings or checks. Pahole reports a 64-byte
> ov2740_mode with no holes and a 792-byte ov8858 with the new clock-rate
> field naturally aligned. A clean 20-job bindeb-pkg build containing the
> same final source state completed successfully.
> 
> Runtime testing used a Lenovo Yoga Book YB1-X91L. Both sensors, AtomISP
> and WV517S bound. Focus position 300 was accepted. Captures passed with:
> 
> - front raw BG10: 1932x1092, 4472832 bytes;
> - rear raw BG10: 3264x2448, 16293888 bytes;
> - front processed YU12: 1920x1080; and
> - rear processed JPEG: 3248x2432, 1530647 bytes.
> 
> The raw format was selected and streamed in the same v4l2-ctl invocation,
> as reopening the video node restores its default format. Both raw files
> were non-empty and distinct, and the rear full-resolution JPEG completed
> without AtomISP, sensor or runtime-PM errors.

-- 
With Best Regards,
Andy Shevchenko