Skip to content

hi3518ev100: add HiWatch DS-I203 device profile - #159

Open
ArthurKoba wants to merge 2 commits into
OpenIPC:masterfrom
ArthurKoba:hi3518ev100-lite-hiwatch-ds-i203
Open

ArthurKoba wants to merge 2 commits into
OpenIPC:masterfrom
ArthurKoba:hi3518ev100-lite-hiwatch-ds-i203

Conversation

@ArthurKoba

@ArthurKoba ArthurKoba commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds an OpenIPC device profile for the HiWatch DS-I203 camera.

Tested hardware:

  • HI3518EV100
  • Sony IMX122
  • 256 MiB DDR3
  • GD25Q128 16 MiB SPI NOR
  • RTL8201F Ethernet PHY at address 3

The 256 MiB physical memory is configured as 128 MiB Linux + 128 MiB MMZ.

This hardware requires the DDR3/256M U-Boot variant added in OpenIPC/u-boot-hi3516cv100#6.

Device configuration

The profile provides the board-specific configuration required by the DS-I203:

  • osmem=128M
  • 16 MiB NOR partition layout
  • PHY address 3 / MDIO interface 0
  • IMX122 sensor selection
  • /etc/sensors/imx122_spi_dc_1080p.ini
  • IR-cut control on GPIO 6/5
  • IR backlight on GPIO 42

The first-boot customizer writes the required U-Boot environment and performs a delayed reboot so the memory layout and Ethernet configuration take effect on the next boot.

The IR illumination hardware also supports PWM brightness control and PWM0 was verified working on the camera. The current hi3516cv100 Majestic HAL does not provide PWM backlight control, so the profile uses GPIO ON/OFF control for now.

Native PWM support is tracked in OpenIPC/majestic#321.

Hardware validation

Tested end-to-end on a physical HiWatch DS-I203, starting from the original Hikvision firmware and completing the full migration to OpenIPC.

After the first-boot customizer and automatic reboot:

  • U-Boot detects 256 MiB RAM
  • Linux boots with mem=128M
  • MMZ is 128 MiB
  • the 16 MiB MTD layout is correct
  • Ethernet works with PHY address 3 / MDIO interface 0
  • the factory MAC address is preserved
  • IMX122 is selected with the expected sensor configuration
  • Majestic starts successfully
  • IR-cut control works
  • IR backlight control works

Final firmware build size:

  • kernel: 1819 KiB / 2048 KiB
  • rootfs: 4056 KiB / 8192 KiB

The full device build and repository checks pass.

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

Copy link
Copy Markdown

PR Summary by Qodo

Add HiWatch DS-I203 HI3518EV100 device profile

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Adds a Lite OpenIPC profile for the HI3518EV100-based HiWatch DS-I203.
• Configures 256 MiB memory, 16 MiB NOR, Ethernet, IMX122, and infrared hardware.
• Applies boot and Majestic settings on first startup, then reboots automatically.
Diagram

graph TD
  A["Device Defconfig"] -->|builds| B["Lite Firmware"] -->|boots| C["First-Boot Customizer"] -->|writes| D["U-Boot Environment"] -->|applies after reboot| E["Board Boot"]
  C -->|configures| F["Majestic Settings"] -->|controls| G["Camera Hardware"]
  E -->|initializes| G
Loading
High-Level Assessment

A dedicated device profile follows the repository's established model and is preferable to a generic HI3518EV100 profile because the board requires specific DDR sizing, partitions, PHY addressing, sensor selection, and GPIO assignments. Runtime autodetection would add complexity without clear benefit for these fixed hardware characteristics.

Files changed (4) +87 / -0

Enhancement (1) +27 / -0
customizer.shApply DS-I203 boot and camera settings +27/-0

Apply DS-I203 boot and camera settings

• Configures the upgrade image, 128 MiB Linux memory allocation, NOR partitions, PHY address, MDIO interface, and IMX122 sensor. Sets Majestic's sensor, IR-cut, and backlight GPIO configuration before scheduling a reboot to activate boot-time settings.

devices/hi3518ev100_lite_hiwatch-ds-i203/general/overlay/usr/share/openipc/customizer.sh

Documentation (1) +1 / -0
README.mdList HiWatch DS-I203 as a supported device +1/-0

List HiWatch DS-I203 as a supported device

• Adds the DS-I203 hardware profile to the supported-device table, including its SoC, IMX122 sensor, 16 MiB NOR flash, completion status, and required DDR3/256M U-Boot variant.

README.md

Other (2) +59 / -0
hi3518ev100_lite_hiwatch-ds-i203_defconfigDefine the DS-I203 Lite firmware build +58/-0

Define the DS-I203 Lite firmware build

• Adds the Buildroot configuration for a 16 MiB HI3518EV100 Lite image using the hi3516cv100 kernel and Hisilicon SDK. Enables the OpenIPC packages needed for device management, streaming, networking, and configuration.

devices/hi3518ev100_lite_hiwatch-ds-i203/br-ext-chip-hisilicon/configs/hi3518ev100_lite_hiwatch-ds-i203_defconfig

hi3518ev100_lite.listRetain all files in the 16 MiB image +1/-0

Retain all files in the 16 MiB image

• Adds an empty exclusion policy documenting that the DS-I203 firmware requires no file removals for its 16 MiB image.

devices/hi3518ev100_lite_hiwatch-ds-i203/general/scripts/excludes/hi3518ev100_lite.list

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

qodo-free-for-open-source-projects Bot commented Sep 14, 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. Firmware targets the wrong chip model 📘 Rule violation ≡ Correctness
Description
The new defconfig sets BR2_OPENIPC_SOC_MODEL to hi3516cv100 even though the device directory and
documented hardware identify an hi3518ev100. Builds using this value identify the board as the
wrong model while the separate BR2_OPENIPC_SOC_FAMILY value already supplies the shared
hi3516cv100 family.
Code

devices/hi3518ev100_lite_hiwatch-ds-i203/br-ext-chip-hisilicon/configs/hi3518ev100_lite_hiwatch-ds-i203_defconfig[34]

+BR2_OPENIPC_SOC_MODEL="hi3516cv100"
Evidence
Compliance rule 3 requires the defconfig SoC selection to match the target hardware. The defconfig
declares hi3516cv100, while the newly documented device row identifies the tested chip as
HI3518EV100; the adjacent family setting separately represents the shared hi3516cv100 platform.

CLAUDE.md: Device Defconfig Must Match the Target Hardware: CLAUDE.md: Device Defconfig Must Match the Target Hardware: CLAUDE.md: Device Defconfig Must Match the Target Hardware: CLAUDE.md: Device Defconfig Must Match the Target Hardware: CLAUDE.md: Device Defconfig Must Match the Target Hardware: CLAUDE.md: Device Defconfig Must Match the Target Hardware: CLAUDE.md: Device Defconfig Must Match the Target Hardware: CLAUDE.md: Device Defconfig Must Match the Target Hardware
devices/hi3518ev100_lite_hiwatch-ds-i203/br-ext-chip-hisilicon/configs/hi3518ev100_lite_hiwatch-ds-i203_defconfig[33-35]
README.md[36-36]

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

## Issue description
The HiWatch DS-I203 defconfig declares `hi3516cv100` as its SoC model, although the target hardware is `hi3518ev100`; the shared compatibility family is configured separately.
## Fix Focus Areas
- devices/hi3518ev100_lite_hiwatch-ds-i203/br-ext-chip-hisilicon/configs/hi3518ev100_lite_hiwatch-ds-i203_defconfig[34-35]
## Recommended Fix
Change `BR2_OPENIPC_SOC_MODEL` to `hi3518ev100`. Keep `BR2_OPENIPC_SOC_FAMILY="hi3516cv100"` if that is the shared kernel and driver family required by this chip.

ⓘ 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 ask Qodo to dismiss a finding you disagree with, with your reason on record

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo


# OpenIPC
BR2_OPENIPC_SOC_VENDOR="hisilicon"
BR2_OPENIPC_SOC_MODEL="hi3516cv100"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Firmware targets the wrong chip model 📘 Rule violation ≡ Correctness

The new defconfig sets BR2_OPENIPC_SOC_MODEL to hi3516cv100 even though the device directory and
documented hardware identify an hi3518ev100. Builds using this value identify the board as the
wrong model while the separate BR2_OPENIPC_SOC_FAMILY value already supplies the shared
hi3516cv100 family.
Agent Prompt
## Issue description
The HiWatch DS-I203 defconfig declares `hi3516cv100` as its SoC model, although the target hardware is `hi3518ev100`; the shared compatibility family is configured separately.

## Fix Focus Areas
- devices/hi3518ev100_lite_hiwatch-ds-i203/br-ext-chip-hisilicon/configs/hi3518ev100_lite_hiwatch-ds-i203_defconfig[34-35]

## Recommended Fix
Change `BR2_OPENIPC_SOC_MODEL` to `hi3518ev100`. Keep `BR2_OPENIPC_SOC_FAMILY="hi3516cv100"` if that is the shared kernel and driver family required by this chip.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. BR2_OPENIPC_SOC_MODEL is now hi3518ev100, while BR2_OPENIPC_SOC_FAMILY remains hi3516cv100 as required by the shared SDK family. I also aligned the kernel config path with the upstream hi3518ev100_lite_defconfig.

@ArthurKoba
ArthurKoba force-pushed the hi3518ev100-lite-hiwatch-ds-i203 branch from 8f15291 to 0e46480 Compare September 14, 2026 09:49
@ArthurKoba
ArthurKoba force-pushed the hi3518ev100-lite-hiwatch-ds-i203 branch from 0e46480 to dff6a96 Compare September 14, 2026 09:52

This branch has not been deployed

No deployments
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