hisilicon-osdrv-hi3516cv200: add GC2023 MIPI sensor variant - #2248
hisilicon-osdrv-hi3516cv200: add GC2023 MIPI sensor variant#2248phedoreanu wants to merge 1 commit into
Conversation
Some GC2023 boards wire the sensor to the MIPI CSI-2 interface, not DVP - e.g. VStarcam Hi3518EV200 cameras (2-lane RAW10). For those boards the existing gc2023 entry in load_hisilicon is fatal: it muxes the parallel VI pads (0x200f007c..0x200f0094) to VI_DATA/VI_VS/VI_HS, which disables the MIPI PHY. The tell is /proc/umap/vi showing IntCnt=0 with TmgErr=0 and ccErrN=0 - VI receives no VSYNC at all, while bad ini timings would at least raise the error counters. Following the OV2710 precedent (OpenIPC#2035/OpenIPC#2038), add a gc2023_mipi sensor identity that only muxes I2C0 and sets the 24MHz sensor clock, plus a gc2023_mipi_1080p.ini cloned from ov2735_mipi_1080p.ini (same SoC, same 2-lane RAW10 MIPI geometry) with the sensor identity swapped and Isp_Bayer corrected to 0 (RGGB - GC2023 is SRGGB10; the tell for getting this wrong is red and blue swapping). The plain gc2023 DVP entry is left untouched. Verified on a VStarcam Hi3518EV200: with this identity and ini, VI IntCnt climbs and majestic delivers 1920x1080 at the sensor's native timing. Note the shipped closed-source libsns_gc2023.so did not produce frames on that unit (VENC timeout; it appears to program the sensor for DVP output) - the working setup used the vendor's MIPI libsns. The platform side this commit fixes is required either way, and the sensor init details recovered from the vendor lib are documented in the matching issue for a future open-source driver.
PR Summary by QodoAdd GC2023 MIPI (CSI-2) sensor variant for Hi3516CV200
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record |
Some GC2023 boards wire the sensor to MIPI CSI-2, not DVP — e.g. VStarcam Hi3518EV200 pan/tilt cameras (2-lane RAW10). For those boards the existing
gc2023entry inload_hisiliconis fatal: it muxes the parallel VI pads (0x200f007c..0x200f0094), which disables the MIPI PHY. The tell is/proc/umap/vishowingIntCnt=0withTmgErr=0andccErrN=0— VI receives no VSYNC at all, while bad ini timings would at least raise the error counters.Following the OV2710 precedent (#2035/#2038), this adds:
gc2023_mipisensor identity that only muxes I2C0 and sets the 24 MHz sensor clock — the plaingc2023DVP entry is untouched;gc2023_mipi_1080p.ini, cloned fromov2735_mipi_1080p.ini(same SoC, same 2-lane RAW10 MIPI geometry) with the sensor identity swapped andIsp_Bayercorrected to 0 (RGGB — GC2023 is SRGGB10; the symptom of getting this wrong is red and blue swapping).Verified on a VStarcam Hi3518EV200: with this identity and ini, VI
IntCntclimbs and majestic delivers 1920×1080 at the sensor's native timing.One honest caveat, detailed in #2243: the shipped closed-source
libsns_gc2023.sodid not produce frames on the tested unit (VENC timeout; it appears to program the sensor for DVP output) — the working setup used the vendor's MIPI libsns plus an init-table replay. The platform side fixed here is required either way, and #2243 carries the full recovered init table (123 writes, including the digital-gain0xb1trap) toward an open-source driver.