media: i2c: st-vd55g: Genericize driver and add VD55G0 support - #169
Open
petm5 wants to merge 10 commits into
Open
media: i2c: st-vd55g: Genericize driver and add VD55G0 support#169petm5 wants to merge 10 commits into
petm5 wants to merge 10 commits into
Conversation
Switch compatible from a const to an enum to accommodate both the vd55g1 and the vd65g4, which is the color variant. Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
The vd65g4 is the bayer version of the vd55g1. As opposed to the vd55g1, the vd65g4 does not need any patch. Check the sensor id at probe and choose to patch or not on power_on() according to it. It's bayer matrix's order is RGGB. This commit handles hflip and vflip by switching the bayer pattern accordingly. Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
A firmware patch consisting of an array of bytes is uploaded to the chip during its boot sequence. Declutter the driver source by moving it to a separate header file.
Document the STMicroelectronics VD55G0 camera sensor. Rename the device tree bindings to represent a generic VD55G family sensor. Signed-off-by: Peter Marshall <pm@petermarshall.ca>
Add SMO55F0 ACPI HID for the ST VD55G0 sensor to the list of supported sensors. The sensor is found with this HID on a Microsoft Surface Pro 9 tablet. Use the lowest supported link frequency. Signed-off-by: Peter Marshall <pm@petermarshall.ca>
The vd55g sensor drivers / DT bindings expect non-standard supply names. Add a mapping to enable them. Signed-off-by: Peter Marshall <pm@petermarshall.ca>
Rewrite the existing vd55g1 module supporting ST VD55G1 and VD65G4 to make it generic for ST VD55G family global-shutter camera sensors. Registers and supported features differ between sensor generations. Replace the static register addresses and revision-specific branches with a per-chip info struct. Add support for the VD55G0 monochrome camera sensor. The VD55G0 has a native resolution of 644 x 604 pixels and does not support HDR via internal subtraction. Add a quirk limiting exposure duty cycle with strobe illumination enabled to avoid tripping overcurrent protection. Co-authored-by: Fernando Rimoli <119756054+femito1@users.noreply.github.com> Signed-off-by: Peter Marshall <pm@petermarshall.ca>
vd55g1 is superseded by the generic vd55g driver supporting the same hardware and feature set. Remove it. Signed-off-by: Peter Marshall <pm@petermarshall.ca>
Point to the updated vd55g sources and documentation, and add myself as a maintainer. Signed-off-by: Peter Marshall <pm@petermarshall.ca>
The system's ring bus / RAM is clocked down during low power states, causing flickering and FIFO timeut errors with some sensors when the CPU is idle. This was originally noticed by Hans de Goede on the linux-media mailing list (see https://marc.info/?l=linux-media&m=175999034702772). Tighten the PM QoS value during IPU6 streaming to work around the issue. A value of 50ms appears to work fine. The IPU6 fails to start streaming with modes using 384 bytes per line or less. Bump the minimum frame width up to a safe pixel limit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This set of changes refactors the STMicroelectronics VD55G1 and VD65G4 image sensor driver (
vd55g1) into a generic VD55G family driver (vd55g) and adds support for the VD55G0 monochrome sensor.The VD55G0 sensor is found in devices such as the Microsoft Surface Pro 9 under ACPI HID
SMO55F0. It features a native resolution of 644 x 604 pixels and differs from later variants in the family in several ways:requiring specification of generational feature differences.
to limit illuminator current and avoid tripping overcurrent protection.
Key changes:
st,vd55g0compatibility string.SMO55F0ACPI HID to the list of supported sensors on IPU6 platforms.vd55g1into genericvd55g, introduce per-chip abstractions, load firmware externally, and implement VD55G0 support.vd55g1code remnants.Tested on a Microsoft Surface Pro 9 (an Intel IPU6 platform with ACPI HID
SMO55F0) running libcamera. Validated binding schemas usingmake dt_binding_check.