Skip to content

hisi: name the Hi3531A DVR/NVR die - #304

Merged
dimerr merged 1 commit into
masterfrom
hisilicon/hi3531a
Dec 2, 2026
Merged

dimerr merged 1 commit into
masterfrom
hisilicon/hi3531a

Conversation

@dimerr

@dimerr dimerr commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Names the Hi3531A (SC_SYSID 0x3531A100, the vendor U-Boot's _HI3531A_V100), as #301 named the Hi3521A, Hi3535 and Hi3536 V100. OpenIPC now ports U-Boot and firmware to it (XiongMai AHB7016T-MH-V2).

Like the other DVR dies, it gets no chip_generation: only the name is reported. Its UART0 and system controller are the Hi3521A's. ipctool decoder treats it as a die with analog video inputs.

Built on the host; every *_test passes, hal_hisi_test with the new case. Not run on a board.

OpenIPC now builds U-Boot and firmware for the Hi3531A (dual Cortex-A9,
the Hi3521A's bigger sibling; XiongMai's AHB7016T-MH-V2 board), and
ipcinfo on it would print "Got unexpected ID ... for HiSilicon". Its
SC_SYSID is the vendor U-Boot's _HI3531A_V100, 0x3531A100 (the Hi3531A
target in the Hi3521A SDK V1.0.5.0's U-Boot, chip.c and cpu.c; the
XiongMai U-Boot in the board's flash is built for the same ID). Like the
Hi3521A, it has no chip_generation: ipctool has no pad, sensor or ISP
tables for it, so only the name is reported. Its UART0 (0x12080000) and
system controller (0x12050000) are the Hi3521A's, which already route to
the right SC_CTRL.

ipctool decoder takes it as a die with analog video inputs, as it does
the Hi3521A.

Built on the host; every *_test passes, hal_hisi_test with the new
case. Not run on a board.
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

hisi: name the Hi3531A DVR/NVR die

✨ Enhancement 🧪 Tests 🕐 Less than 10 minutes

Grey Divider

AI Description

• Maps SC_SYSID 0x3531A100 to the name "3531AV100", so ipcinfo stops reporting an unknown ID.
• Adds no chip_generation, matching the other DVR dies; only the name is reported.
• Treats 3531AV100 as a DVR die with analog video inputs in ipctool decoder, and adds a test case.
Merge Risk 🟢 Low

Blast radius 🟡 Medium 💥 2 capabilities

  • 2 affected capabilities within one bounded functional scope: HiSilicon DVR hardware identification and analog decoder discovery.
  • The new family-ID mapping produces the chip name later copied into the shared chip_name used by report generation; this is the originating identification behavior.
  • The decoder behavior is a bounded part of the same HiSilicon DVR discovery integration: the chip-name result controls whether decoder buses are inspected and reported.
  • It is a distinct user-visible operation from naming the chip.
Sources

src/hal/hisi/hal_hisi.c[1297-1303]

    case 0x3521A100:
        /* Hi3520DV300 is the same die with the same ID: the vendor tells
         * the two apart by build, not at run time. */
        return "3521AV100";
    case 0x3531A100:
        /* Hi3531A: dual Cortex-A9, the Hi3521A's bigger sibling. */
        return "3531AV100";
Behavioral complexity 🟢 Low 🧩 Straightforward

  • Before, family ID 0x3531A100 fell through the identification switch and the resulting name was not accepted by the analog-decoder eligibility list.
  • After, one exact ID maps to 3531AV100 and that literal is added to the existing name list.
  • The new correctness conditions are exact family-ID matching and consistent reuse of the returned name; no new state machine, transformation, ordering, compatibility protocol, or invariant coordination is introduced.
Sources

src/hal/hisi/hal_hisi.c[1297-1303]

    case 0x3521A100:
        /* Hi3520DV300 is the same die with the same ID: the vendor tells
         * the two apart by build, not at run time. */
        return "3521AV100";
    case 0x3531A100:
        /* Hi3531A: dual Cortex-A9, the Hi3521A's bigger sibling. */
        return "3531AV100";
Potential damage 🟡 Medium 🩹 Incorrect results

  • If the new mapping regresses, a Hi3531A can be reported with an unknown or incorrect model instead of 3531AV100.
  • This affects identification output, not persistent state or external effects.
  • Reverting or rerunning the software restores correct future identification; no stored data repair is indicated.
Sources

src/hal/hisi/hal_hisi.c[1297-1303]

    case 0x3521A100:
        /* Hi3520DV300 is the same die with the same ID: the vendor tells
         * the two apart by build, not at run time. */
        return "3521AV100";
    case 0x3531A100:
        /* Hi3531A: dual Cortex-A9, the Hi3521A's bigger sibling. */
        return "3531AV100";
Assessed commit e272119
Diagram

graph TD
    A["SC_SYSID 0x3531A100"] --> B["get_hisi_chip_id"] --> C["3531AV100 name"] --> D["soc_has_analog_vi"] --> E["ipctool decoder"]
Loading
High-Level Assessment

The PR follows the existing pattern used for the Hi3521A, Hi3535 and Hi3536 names: a switch case that returns a name, with no chip_generation and a DVR-list entry for analog VI. Adding a generation table would need pad, sensor and ISP data that is not available, so the minimal change is the right one.

Files changed (3) +7 / -3

Enhancement (2) +6 / -3
decoders.cAdd 3531AV100 to the DVR die list in soc_has_analog_vi +1/-1

Add 3531AV100 to the DVR die list in soc_has_analog_vi

• Adds "3531AV100" to the dvr[] array so that soc_has_analog_vi returns true for the Hi3531A. The decoder then treats the die as having analog video inputs, as it does for the Hi3521A.

src/decoders.c

hal_hisi.cMap SC_SYSID 0x3531A100 to the 3531AV100 name +5/-2

Map SC_SYSID 0x3531A100 to the 3531AV100 name

• Adds a case for 0x3531A100 in get_hisi_chip_id that returns "3531AV100". The ID comes from the vendor U-Boot's _HI3531A_V100, and no chip_generation is set. The comment is also updated to list the Hi3531A with the other vendor U-Boot IDs.

src/hal/hisi/hal_hisi.c

Tests (1) +1 / -0
hal_hisi_test.cAdd test case for the 0x3531A100 chip ID +1/-0

Add test case for the 0x3531A100 chip ID

• Adds a CHECK asserting that get_hisi_chip_id(0x3531A100, 0) returns "3531AV100". It sits next to the other DVR/NVR die cases, and no register is read.

src/hal/hisi/hal_hisi_test.c

@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 see how risky a PR is at a glance with blast radius labels

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@dimerr
dimerr merged commit b8ef02f into master Dec 2, 2026
5 checks passed
@dimerr
dimerr deleted the hisilicon/hi3531a branch December 2, 2026 20:55
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