Skip to content

Add hi3516dv100_lite_xm-n81820 device profile (MS41908M SPI lens) - #171

Merged
widgetii merged 1 commit into
masterfrom
hi3516dv100-xm-n81820
Sep 26, 2026
Merged

widgetii merged 1 commit into
masterfrom
hi3516dv100-xm-n81820

Conversation

@widgetii

Copy link
Copy Markdown
Member

New profile for the Xiongmai HI3516D_N81820 (HiSilicon Hi3516A/D V100,
hi3516dv100 / family hi3516av100) — Sony IMX291 DC sensor, 16 MB NOR
(W25Q128), Ethernet-only — with a Panasonic MS41908M motorized zoom/focus
lens. Modeled on the proven hi3516ev300_lite_xm-85h50ai, but the motor is an
SPI stepper (/dev/spidev1.0), driven by majestic-af's ms41908 actuator —
not a UART Pelco lens — so there's no console-UART sharing to work around. All
facts confirmed on the live board (devid 00014914).

Files

  • defconfig — from hi3516dv100_lite, plus BR2_PACKAGE_MAJESTIC_AF=y,
    BR2_OPENIPC_FLASH_SIZE="16", and the WiFi packages dropped (wired board).
  • customizer.sh — sensor imx291 pinned to the DC ini
    (imx291_i2c_dc_1080p.ini; the MIPI default would give no video); autofocus
    enabled with actuator=ms41908 (the SPI backend isn't reachable via the
    pelco-only ptz_control env, so it's set directly in majestic config).
  • excludes — keep libsns_imx291_dc.so + the DC ini, strip the other
    hi3516av100-osdrv sensors.
  • README device-table row.

ci-matrix.py --self-test passes (device registered).

Dependency chain (for motors to work OOTB)

  • majestic #905 (adds ms41908 to the isp.autofocus.actuator enum) — merged.
  • firmware #2485 (bumps the majestic-af package to the ms41908 backend) —
    merged, so this device's image links the SPI-capable plugin.
  • The prebuilt majestic.hi3516av100.* S3 binary must be rebuilt by the OpenIPC
    nightly to pick up the #905 enum before actuator=ms41908 validates on-device;
    /dev/spidev1.0 is present OOTB and the majestic binary already has the plugin
    loader. Final on-hardware flash/verify pending on the board.

New profile for the Xiongmai HI3516D_N81820 (HiSilicon Hi3516A/D V100,
hi3516dv100 / family hi3516av100) with a Sony IMX291 DC sensor and a Panasonic
MS41908M motorized zoom/focus lens on SPI. Modeled on hi3516ev300_lite_xm-85h50ai,
but the motor is an SPI stepper (/dev/spidev1.0), driven by majestic-af's
`ms41908` actuator — not a UART Pelco lens — so there is no console-UART sharing
to work around.

- defconfig: from hi3516dv100_lite, + BR2_PACKAGE_MAJESTIC_AF=y, FLASH_SIZE=16
  (Winbond W25Q128, confirmed on the unit), and WiFi packages dropped
  (Ethernet-only board).
- customizer: sensor imx291 pinned to the DC ini (imx291_i2c_dc_1080p.ini; the
  MIPI default would give no video), autofocus enabled with actuator=ms41908
  (the SPI backend isn't reachable via the pelco-only ptz_control env, so it is
  set directly in majestic config).
- excludes: keep libsns_imx291_dc.so + imx291_i2c_dc_1080p.ini, strip the other
  hi3516av100-osdrv sensors.

Needs the companion firmware majestic-af bump (OpenIPC/firmware#2485) so the
packaged plugin carries the ms41908 backend, and a majestic rebuild carrying the
isp.autofocus.actuator=ms41908 enum (majestic#905, merged).
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add XiongMai N81820 profile with MS41908M SPI autofocus

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

Grey Divider

AI Description

• Adds a 16 MB Ethernet-only HI3516DV100 profile for XiongMai N81820 cameras.
• Pins the IMX291 DC sensor configuration and removes incompatible sensor assets.
• Enables MS41908 SPI autofocus using updated Majestic and majestic-af artifacts.
Diagram

graph TD
  P["Device Profile"] -->|"builds"| I["Firmware Image"] -->|"runs"| C["Device Customizer"] -->|"selects"| S["IMX291 DC"]
  C -->|"configures"| M["Majestic"] -->|"loads"| A["ms41908 Backend"] -->|"writes"| D["SPI Device"] -->|"drives"| L["Zoom Lens"]
Loading
High-Level Assessment

The dedicated profile follows the repository’s established device-specific configuration model and is appropriate for this board’s distinct flash, sensor, and actuator requirements. Reusing the generic profile would not safely enforce the IMX291 DC configuration or sensor pruning, while the existing Pelco environment path cannot address an SPI actuator; direct Majestic configuration is therefore the best approach.

Files changed (4) +131 / -0

Enhancement (1) +38 / -0
customizer.shConfigure the DC sensor and SPI autofocus +38/-0

Configure the DC sensor and SPI autofocus

• Pins the IMX291 DC/parallel sensor configuration, sets the device-specific upgrade URL, and enables Majestic autofocus with the ms41908 actuator. The settings avoid the incompatible MIPI default and Pelco-only control path before rebooting the camera.

devices/hi3516dv100_lite_xm-n81820/general/overlay/usr/share/openipc/customizer.sh

Documentation (1) +1 / -0
README.mdRegister the XiongMai HI3516D_N81820 device +1/-0

Register the XiongMai HI3516D_N81820 device

• Adds the camera to the device table with its HI3516DV100 SoC, IMX291 sensor, 16 MB NOR flash, and MS41908 SPI motorized lens status.

README.md

Other (2) +92 / -0
hi3516dv100_lite_xm-n81820_defconfigDefine the N81820 firmware build profile +65/-0

Define the N81820 firmware build profile

• Adds a lite HI3516DV100/HI3516AV100 Buildroot configuration targeting 16 MB flash and wired networking. It includes Majestic, majestic-af, motor support, and the required Hisilicon platform packages without Wi-Fi packages.

devices/hi3516dv100_lite_xm-n81820/br-ext-chip-hisilicon/configs/hi3516dv100_lite_xm-n81820_defconfig

hi3516dv100_lite.listPrune incompatible HI3516AV100 sensor assets +27/-0

Prune incompatible HI3516AV100 sensor assets

• Excludes unused sensor libraries and configuration files while retaining the IMX291 DC library and its 1080p configuration, reducing the device image to the required sensor support.

devices/hi3516dv100_lite_xm-n81820/general/scripts/excludes/hi3516dv100_lite.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 type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@widgetii
widgetii merged commit 04b32e0 into master Sep 26, 2026
7 checks passed
@widgetii
widgetii deleted the hi3516dv100-xm-n81820 branch September 26, 2026 20:19
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.

1 participant