Skip to content

hi3516cv6xx_ultimate_sip-k662c6s: add the IMX662 module - #226

Merged
openipc-ai merged 2 commits into
OpenIPC:masterfrom
dimerr:sip-k662c6s
Nov 6, 2026
Merged

openipc-ai merged 2 commits into
OpenIPC:masterfrom
dimerr:sip-k662c6s

Conversation

@dimerr

@dimerr dimerr commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Adds the SIP-K662C6S, a Hi3516CV610 + Sony IMX662 module with 16 MB NOR (OpenIPC/defib#148, OpenIPC/u-boot#71), as hi3516cv6xx_ultimate_sip-k662c6s.

Not run on a camera. Marked ready only so CI builds the first image to test; the checks below are still open.

What is in it

  • Defconfig: identical to firmware's hi3516cv6xx_ultimate. There is no Wi-Fi driver: the stock config has WIFI_TYPE = 0.
  • customizer.sh: fw_setenv sensor imx662, because ipcinfo's IMX662 check is untested and this skips the probe at first boot. Also the upgrade URL, the IR-cut and lamp pins, and lightMonitor.
  • gpio.conf: the pin map below.
  • Excludes: every sensor library and profile except the IMX662's.
  • README: a row, as testing.

Pins

From a stock dump of this module (firmware 22.010.30.6_MAIN_V46(260616), xipc). That binary serves several products, so not every pin below is known to be connected here.

Function GPIO Pad Stock behaviour
IR-cut 60 (GPIO7_4), 61 (GPIO7_5) 0x11130054, 0x11130050 200 ms pulse, 60 for night and 61 for day
IR lamp 63 (GPIO7_7) 0x11130038 Lights on a low pad with stock config
White LED 8 (GPIO1_0) 0x1113003c gpio.conf only
Reset button 10 (GPIO1_2) 0x11130040 Input, reads as active-low
Alarm in 12 (GPIO1_4) 0x11130004 Input
Alarm out 6 (GPIO0_6) 0x11130030 Output

Stock decides day and night from exposure, so no light sensor pin is set.

reset-button is deliberately not enabled. If pin 10 turns out not to be wired on this module, a floating input could read as a held button, and that daemon can factory-reset.

There is no muxes.sh. It runs at S30, and open_sys_config loads at S70 and sets 0x11130050/54 to I2C2 (0x1133), so a pad write there would not last. That makes the first check below the one that matters.

To check on a K662C6S

  1. With majestic running, ipctool reginfo shows [GPIO7_4] on 0x11130054 and [GPIO7_5] on 0x11130050. If those pads are still on I2C2, the filter will not move and this device needs a pad write after S70.
  2. The filter test from en/ircut-filter.md. The 60/61 order is untested; swap them in both files if it reports "wired backwards".
  3. The IR lamp lights at night, not by day, with backlightInvert on.
  4. The module boots this image. On the module in hi3516cv610:20s — bootrom upload fails after DDR training ("Failed to send U-Boot"), stock boot prints "DDR size" but burn never does defib#148, Linux has so far stopped at spi nor register fail!.

The IMX662 3DNR profile is separate, in OpenIPC/firmware#2776. This device does not need it to build, and keeps it when it lands.

Evidence

No board output. Offline only:

ci-matrix: self-test ok (131 devices, 16 smoke, 39 cases)
ok   cli setting paths well formed in 97 script(s)

A Hi3516CV610 + IMX662 module with 16 MB NOR. The IR-cut, lamp and button pins
come from its stock firmware; the sensor is named so the first boot skips the
probe. Not yet run on a camera.
@dimerr
dimerr marked this pull request as ready for review November 6, 2026 16:47
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add SIP K662C6S IMX662 camera configuration

✨ Enhancement ⚙️ Configuration changes 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Add a Hi3516CV610/IMX662 build target for the 16 MB NOR SIP K662C6S.
Diagram

graph TD
  B["Builder"] --> C["Device defconfig"] --> F["Firmware image"] --> H["K662C6S module"]
  B --> E["Sensor excludes"] --> F
  B --> S["Boot customizer"] --> F
  B --> G["GPIO map"] --> F
Loading
High-Level Assessment

The device-local defconfig and overlays follow the builder's existing convention, while excluding unrelated sensor assets suits the 16 MB NOR target. A shared generic image would retain unnecessary assets; validate boot and IR-cut behavior on hardware before treating the configuration as proven.

Files changed (5) +152 / -0

Documentation (1) +1 / -0
README.mdList SIP K662C6S as a testing device +1/-0

List SIP K662C6S as a testing device

• Adds the Hi3516CV610/IMX662 module to the device table with its 16 MB NOR flash and no Wi-Fi. Notes that IR-cut remains untested and video evidence comes from the source driver.

README.md

Other (4) +151 / -0
hi3516cv6xx_ultimate_sip-k662c6s_defconfigDefine the SIP K662C6S firmware target +87/-0

Define the SIP K662C6S firmware target

• Adds a 16 MB Hi3516CV6xx ultimate Buildroot configuration with CV610/CV608 aliases, kernel and toolchain settings, and the existing package selection. Wireless packages remain omitted because the referenced kernel configuration disables the wireless stack.

devices/hi3516cv6xx_ultimate_sip-k662c6s/br-ext-chip-hisilicon/configs/hi3516cv6xx_ultimate_sip-k662c6s_defconfig

customizer.shSet first-boot sensor and night-mode settings +27/-0

Set first-boot sensor and night-mode settings

• Sets IMX662 explicitly to avoid relying on an untested sensor probe and points upgrades to the device image. Configures IR-cut pins, the active-low IR lamp, and light monitoring.

devices/hi3516cv6xx_ultimate_sip-k662c6s/general/overlay/usr/share/openipc/customizer.sh

gpio.confRecord K662C6S peripheral GPIO assignments +13/-0

Record K662C6S peripheral GPIO assignments

• Maps alarm, button, IR-cut, white-light, and IR-lamp pins from stock firmware observations. Marks unavailable or unused peripherals, including the light sensor, with -1.

devices/hi3516cv6xx_ultimate_sip-k662c6s/general/overlay/usr/share/openipc/gpio.conf

hi3516cv6xx_ultimate.listExclude unrelated sensor assets +24/-0

Exclude unrelated sensor assets

• Lists non-IMX662 sensor profiles, modes, and shared libraries for removal from this device's image. This limits packaged sensor assets for the 16 MB NOR target.

devices/hi3516cv6xx_ultimate_sip-k662c6s/general/scripts/excludes/hi3516cv6xx_ultimate.list

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

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

The built image still carried the GC4023 profile and the CV2003, GC4023,
GC4653, MIS20S1 and VS4388 tuning files, none of which this IMX662 module can
use.
@openipc-ai

Copy link
Copy Markdown
Contributor

Reviewed against firmware d872b99 and the CI image.

One fix pushed to the branch (fa15fba): the exclude list missed gc4023_i2c_4M.ini and the iq/ files for CV2003, GC4023, GC4653, MIS20S1 and VS4388, all of which were in the first image. The rebuilt image's sensor files are now exactly imx662_i2c_1080p.ini, iq/imx662.ini (from firmware#2776) and libsns_imx662.so.

Checked and fine: the defconfig matches firmware's, -nor.tgz in upgrade resolves to the published -nor-split.tgz, sensor is set at S30 ahead of load_hisilicon at S70, the cli keys exist in majestic, and sys_config does write 0x1133 to 0x11130050/54, so check 1 in the description is a real risk.

The four hardware checks are still open; this merge doesn't close them.

@openipc-ai
openipc-ai merged commit 4f99ade into OpenIPC:master Nov 6, 2026
7 checks passed
@dimerr
dimerr deleted the sip-k662c6s branch November 7, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants