hi3516cv6xx: add OS02M10 + IMX307 sensor drivers#2175
Merged
Conversation
The Hi3516CV608 DEMO Board ships with an OmniVision OS02M10 sensor (boot log: "vi_pipe:0,== os02m10 24Mclk 1080P30fps(MIPI) 2LANE 10bit linear Init OK!"), and the closely-related Hi3516CV610 DEMO Board ships IMX307. Neither sensor has source available in the Hi3516CV610_SDK_V1.0.2.0 sensor tree (which only covers gc4023, os04d10, sc4336p, sc450ai, sc500ai, sc431hai — already source-built via openhisilicon), so we ship the vendor's prebuilt libsns_*.so blobs from the original CV608 flash dump alongside the source-built six. Also adds a libsns_sp2308.so -> libsns_os02m10.so symlink so devices whose u-boot env was set via ipctool resolve to the correct driver without a manual fw_setenv: ipctool's i2c probe reports the OS02M10 chip ID (0x5302) as "SP2308" — SuperPix rebadge of the same silicon (see ipctool/src/sensors.c:899-901 "or OS02M10" comment). Updates the load_hisilicon "Available sensors" hint to enumerate all 8 sensor names the package now ships. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
libsns_os02m10.soandlibsns_imx307.soto the cv6xx osdrv package — sensor sources don't exist in the Hi3516CV610 SDK so we ship the vendor blobs (same pattern as our otherlibss_*.soMPP libs).libsns_sp2308.so -> libsns_os02m10.socompat symlink so devices whose u-boot env carries the legacy ipctool-emitted name resolve to the correct driver without a manualfw_setenv.load_hisilicon"Available sensors" hint to list all 8 sensor names now shipped.Background
The Hi3516CV608 DEMO board (the one we have in the lab at 10.216.128.115) boots fine through the cv6xx open kernel stack, but majestic fails with
sensor autodetection failed → Cannot start SDKbecause none of our 6 source-built sensors (gc4023, os04d10, sc4336p, sc450ai, sc500ai, sc431hai) match the actual physical sensor on the board.The vendor UART boot log is unambiguous:
So the chip is OmniVision OS02M10 (1080p30, 2-lane MIPI, 10-bit linear). The closely-related Hi3516CV610 DEMO board ships IMX307 — also bundled by the same vendor build.
Both sensors' drivers ship as prebuilt blobs (
libs/libsns_os02m10.so,libs/libsns_imx307.so) in the vendor's/mnt/mtd/ipcJFFS2 partition. TheHi3516CV610_SDK_V1.0.2.0source tree does NOT include source for either — only for the 6 we already build from source.SP2308 alias
ipctool's i2c probe identifies the chip via product ID 0x5302 and prints
SP2308(sensors.c:899) with the comment// or OS02M10. SP2308 is SuperPix's rebadge of the same OmniVision silicon — same chip, same registers, just a different marker. Devices that hadipctool dumprun before this fix havesensor=sp2308baked into u-boot env. Symlinkinglibsns_sp2308.so → libsns_os02m10.soresolves that without forcing afw_setenvon every existing unit.Test plan
make BOARD=hi3516cv6xx_ultimate build repacksucceeds at 10112/16384 KBunsquashfs -ll output/images/rootfs.squashfs | grep libsnsshows both new blobs plus the sp2308 symlink under/usr/lib/sensors/fw_setenv sensor os02m10(or leave the legacysp2308→ resolves via symlink) → majestic relocates clean → MIPI sensor initialises → RTSP serveshi3516cv6xx-ultimateWhat was hunted but NOT included
I swept four additional CV6xx flash backups (CamHi/OS02M10, Black Quad/GC4653, Oval/OS04D10, Avantis/IMX662) looking for more harvestable drivers. The CamHi backup's blobs are md5-identical to the ones we already extracted — no new dynamic
libsns_*.sofiles. The Black Quad / Oval / Avantis vendors statically-link their sensor support into a single monolithic ipcam binary, so there's no clean.soto ship. GC4653 + IMX662 remain follow-ups (separate acquisition route needed: newer SDK source, or static-ELF carve).🤖 Generated with Claude Code