Skip to content

hi3516cv6xx: the CV2003, GC4653 and VS4388, wired to the second MIPI port - #2722

Merged
widgetii merged 1 commit into
masterfrom
hi3516cv6xx-cv2003-gc4653-vs4388
Oct 29, 2026
Merged

widgetii merged 1 commit into
masterfrom
hi3516cv6xx-cv2003-gc4653-vs4388

Conversation

@widgetii

@widgetii widgetii commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Three CV610/CV608 cameras from one vendor had no picture on OpenIPC: OpenIPC/majestic#355 (CV2003), #356 (GC4653) and #357 (VS4388). There were two causes:

  • No driver for any of these sensors on cv6xx. The vendor firmware compiles its drivers into its application, so there is no blob to ship.
  • Unusual wiring: the sensor sits on a MIPI port nothing here could use.

What this ships

openhisilicon pin b0d848e → 6e6729a1a, which brings:

openhisilicon
#283 CV2003 driver, 24 MHz sensor clock
#285 GC4653 driver, 27 MHz sensor clock
#286 VS4388 driver, 24 MHz sensor clock
#287 GC4653 DNG CFA corrected to RGGB
#284 IMX335 mirror/flip through its own orientation bit (unrelated, landed in between)

Each driver was written from that vendor's own firmware: its init tables and its exposure, gain and frame-length registers, limits and sync order.

Three profiles, installed on lite and ultimate, since these are 8 MB boards:

profile mode lines @30 fps bayer
cv2003_i2c_1080p.ini 1920x1080p30 RAW10 2400 RGGB
gc4653_i2c_4M.ini 2560x1440p30 RAW10 1501 RGGB
vs4388_i2c_4M.ini 2560x1440p30 RAW10 1482 RGGB

Wiring

All three boards wire the sensor the same way: the second MIPI port in 2+2 mode, lanes 1 and 3, clock on the second clock lane, into VI device 1. The stock umap shows it, and the owner confirmed it for all three. The profiles express that as devno = 1, lane_divide_mode = 1, lane_id = 1|3. majestic reads these keys, and the VI device follows devno.

sys_config already muxes MIPI_RX0_CK1N/P to MIPI with the same 0x1430 the vendor firmware uses, so the second clock lane reaches the receiver.

Naming

ipcinfo --short-sensor reports cv2003, gc4653 and vs4388; the VS4388 is found at 0x6c since OpenIPC/ipctool#256, and ipctool is built from HEAD. load_hisilicon stores that name and hands it to open_sys_config, which picks the clock by it. majestic finds each profile by the same name.

Checked

Local builds

  • hi3516cv6xx_lite: firmware.bin 7360 KB of 7616 KB, uImage 2021 KB of 2048 KB.
  • hi3516cv6xx_ultimate: 9408 KB of 15808 KB, uImage 2029 KB.
  • Both include /usr/lib/sensors/libsns_{cv2003,gc4653,vs4388}.so and the three profiles in /etc/sensors.

On a Hi3516CV608 (ultimate, split NOR, SP2308 sensor on port 0). It has none of the three new sensors. What it does show is that the image upgrades, boots, and leaves an existing cv6xx board unchanged. The ultimate image was flashed with this tree's sysupgrade 1.0.80:

before (local-20261028-build) after (this PR, local-20261029-build)
upgrade — no OOM, firmware.bin written and read back in 2m12s, settings staged at 0x980000, boots
ipcinfo --short-sensor / fw_printenv sensor sp2308 / sp2308 sp2308 / sp2308
/etc/sensors imx335, imx662, sp2308 + cv2003_i2c_1080p.ini, gc4653_i2c_4M.ini, vs4388_i2c_4M.ini
/usr/lib/sensors 10 drivers + libsns_cv2003.so, libsns_gc4653.so, libsns_vs4388.so
open_sys_config.ko in the image (/rom) — carries cv2003, gc4653, vs4388; md5 matches the build
majestic / VI running, 1920x1080 detected running, 1920x1080 detected
HTTP / 200 200

Not yet tested: none of the three new sensors has been run, because no CV2003, GC4653 or VS4388 board is available here. These go into the nightly so the owner of the three cameras (majestic#355/#356/#357) can test them; the issues ask for umap, logs and a picture.

…port

Three CV610/CV608 cameras from one vendor (OpenIPC/majestic#355, #356,
#357) had no picture on OpenIPC: no driver for their sensors, and the
sensor on a MIPI port nothing here could use. Their drivers are now in
openhisilicon (the pin moves to 6e6729a1a): CV2003, GC4653 and VS4388,
each written from that vendor's own firmware, with the sensor clock in
sys_config (24, 27 and 24 MHz). majestic takes the port from the profile.

All three boards wire the sensor the same way, which the owner confirmed
and the stock umap shows: the second MIPI port in 2+2 mode, lanes 1 and 3,
clock on the second clock lane, into VI device 1. The profiles say so --
devno 1, lane_divide_mode 1, lane_id 1|3 -- and RGGB, RAW10, linear:

  cv2003_i2c_1080p.ini  1920x1080p30, 2400 lines
  gc4653_i2c_4M.ini     2560x1440p30, 1501 lines
  vs4388_i2c_4M.ini     2560x1440p30, 1482 lines

These are 8 MB boards, so the drivers and profiles ship on lite as well as
ultimate. hi3516cv6xx_lite stays inside its cap: firmware.bin 7360 KB of
7616 KB, uImage 2021 KB of 2048 KB. ipcinfo names the sensors cv2003,
gc4653 and vs4388 -- the VS4388 at 0x6c since OpenIPC/ipctool#256 -- and
those are the names load_hisilicon hands sys_config and majestic looks
the profiles up by.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Enable three Hi3516CV6xx sensors on the second MIPI port

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Add CV2003, GC4653, and VS4388 sensor drivers and profiles for CV610/CV608 cameras.
• Configure their shared second-port MIPI wiring so video reaches VI device 1.
• Ship drivers and profiles on lite and ultimate; hardware validation remains pending.
Diagram

graph TD
  SDK["Pinned openhisilicon"] --> LIB["Sensor drivers"] --> APP["majestic"] --> VI["MIPI and VI 1"]
  DET["Detected sensor"] --> LOAD["load_hisilicon"] --> SYS["open_sys_config"] --> VI
  DET --> APP
  PRO["Sensor profiles"] --> APP
Loading
High-Level Assessment

Keep the upstream source-built drivers and express board wiring in the existing sensor profiles. This follows the current packaging and profile-selection paths without introducing vendor blobs or a separate port-selection mechanism. Camera testing is the remaining validation step.

Files changed (5) +232 / -3

Enhancement (1) +5 / -2
hisilicon-opensdk.mkPin new SDK revision and package three CV6xx drivers +5/-2

Pin new SDK revision and package three CV6xx drivers

• Advances the openhisilicon pin to 6e6729a1a and adds CV2003, GC4653, and VS4388 to the Hi3516CV6xx source-built sensor list. The pin also includes upstream sensor clock support and other intervening changes.

general/package/hisilicon-opensdk/hisilicon-opensdk.mk

Other (4) +227 / -1
cv2003_i2c_1080p.iniDefine CV2003 1080p30 capture profile +71/-0

Define CV2003 1080p30 capture profile

• Adds a linear RAW10, RGGB profile for 1920×1080 at 30 fps with 2400 standard lines. Selects lanes 1 and 3 in 2+2 mode on MIPI device 1.

general/package/hisilicon-osdrv-hi3516cv6xx/files/sensor/config/cv2003_i2c_1080p.ini

gc4653_i2c_4M.iniDefine GC4653 1440p30 capture profile +71/-0

Define GC4653 1440p30 capture profile

• Adds a linear RAW10, RGGB profile for 2560×1440 at 30 fps with 1501 standard lines. Selects lanes 1 and 3 in 2+2 mode on MIPI device 1.

general/package/hisilicon-osdrv-hi3516cv6xx/files/sensor/config/gc4653_i2c_4M.ini

vs4388_i2c_4M.iniDefine VS4388 1440p30 capture profile +71/-0

Define VS4388 1440p30 capture profile

• Adds a linear RAW10, RGGB profile for 2560×1440 at 30 fps with 1482 standard lines. Selects lanes 1 and 3 in 2+2 mode on MIPI device 1.

general/package/hisilicon-osdrv-hi3516cv6xx/files/sensor/config/vs4388_i2c_4M.ini

hisilicon-osdrv-hi3516cv6xx.mkInstall new profiles on lite and ultimate images +14/-1

Install new profiles on lite and ultimate images

• Installs all three profiles into /etc/sensors without a variant gate, matching the drivers shipped on lite and ultimate. Documents their source-built status and shared board wiring.

general/package/hisilicon-osdrv-hi3516cv6xx/hisilicon-osdrv-hi3516cv6xx.mk

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. New camera support lacks hardware proof 📘 Rule violation ☼ Reliability
Description
HISILICON_OSDRV_HI3516CV6XX_INSTALL_TARGET_CMDS installs three new sensor profiles and the SDK pin
adds their drivers, changing firmware behavior. The PR explicitly says it was not yet run on a
camera, so no real-camera image or boot evidence covers the affected CV610/CV608 boards.
Code

general/package/hisilicon-osdrv-hi3516cv6xx/hisilicon-osdrv-hi3516cv6xx.mk[R125-128]

+	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors \
+		$(HISILICON_OSDRV_HI3516CV6XX_PKGDIR)/files/sensor/config/cv2003_i2c_1080p.ini \
+		$(HISILICON_OSDRV_HI3516CV6XX_PKGDIR)/files/sensor/config/gc4653_i2c_4M.ini \
+		$(HISILICON_OSDRV_HI3516CV6XX_PKGDIR)/files/sensor/config/vs4388_i2c_4M.ini
Evidence
The checklist requires real-camera evidence for any PR that can change firmware behavior. This diff
adds and installs three sensor profiles and updates the OpenIPC HiSilicon SDK revision to include
their drivers, while the PR description states that no camera test has been run.

Rule 3: Hardware evidence is present and honest
general/package/hisilicon-osdrv-hi3516cv6xx/hisilicon-osdrv-hi3516cv6xx.mk[117-128]
general/package/hisilicon-opensdk/hisilicon-opensdk.mk[8-8]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
Issue description
The PR adds CV2003, GC4653, and VS4388 drivers and sensor profiles that change firmware behavior, but the description states the changes have not been tested on a real camera.
Fix Focus Areas
- general/package/hisilicon-osdrv-hi3516cv6xx/hisilicon-osdrv-hi3516cv6xx.mk[117-128]
- general/package/hisilicon-opensdk/hisilicon-opensdk.mk[8-8]
Recommended Fix
Test the resulting firmware on an affected CV610/CV608 camera and update the PR description with the board identity, before/after image or boot/stream output, and web-login results where applicable.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@widgetii
widgetii merged commit b3b35a0 into master Oct 29, 2026
87 of 91 checks passed
@widgetii
widgetii deleted the hi3516cv6xx-cv2003-gc4653-vs4388 branch October 29, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant