From e272119f50170af96fa48d11b367c99f09e03769 Mon Sep 17 00:00:00 2001 From: Dmitry Ermakov <7954832+dimerr@users.noreply.github.com> Date: Wed, 2 Dec 2026 19:29:12 +0000 Subject: [PATCH] hisi: name the Hi3531A DVR/NVR die 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. --- src/decoders.c | 2 +- src/hal/hisi/hal_hisi.c | 7 +++++-- src/hal/hisi/hal_hisi_test.c | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/decoders.c b/src/decoders.c index b615455..14ecca1 100644 --- a/src/decoders.c +++ b/src/decoders.c @@ -668,7 +668,7 @@ bool soc_has_analog_vi(void) { /* DVR dies ipctool names without a generation: their kernel and * gpioi2c buses can still be read. */ static const char *const dvr[] = {"3521V100", "3521DV100", "3520DV400", - "3521AV100"}; + "3521AV100", "3531AV100"}; for (size_t i = 0; i < ARRCNT(dvr); i++) if (strstr(chip_name, dvr[i])) return true; diff --git a/src/hal/hisi/hal_hisi.c b/src/hal/hisi/hal_hisi.c index 6cbf034..cf99fa8 100644 --- a/src/hal/hisi/hal_hisi.c +++ b/src/hal/hisi/hal_hisi.c @@ -1292,12 +1292,15 @@ static const char *get_hisi_chip_id(uint32_t family_id, uint8_t scsysid0) { return "3521V100"; /* The DVR/NVR dies below have no chip_generation: ipctool has no pad, * sensor or ISP tables for them, so only the name is reported. The IDs - * are the vendor U-Boot's (_HI3521A_V100, _HI3535_V100, _HI3536_V100 in - * the Hi3521A, Hi3535 and Hi3536 SDKs). */ + * are the vendor U-Boot's (_HI3521A_V100, _HI3531A_V100, _HI3535_V100 and + * _HI3536_V100 in the Hi3521A, Hi3535 and Hi3536 SDKs). */ 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"; case 0x35350100: return "3535V100"; case 0x35360100: diff --git a/src/hal/hisi/hal_hisi_test.c b/src/hal/hisi/hal_hisi_test.c index 16cf384..a1c772e 100644 --- a/src/hal/hisi/hal_hisi_test.c +++ b/src/hal/hisi/hal_hisi_test.c @@ -562,6 +562,7 @@ int main(void) { /* The DVR/NVR dies named without a generation: no register is read. */ CHECK(strcmp(get_hisi_chip_id(0x3521A100, 0), "3521AV100") == 0); + CHECK(strcmp(get_hisi_chip_id(0x3531A100, 0), "3531AV100") == 0); CHECK(strcmp(get_hisi_chip_id(0x35350100, 0), "3535V100") == 0); CHECK(strcmp(get_hisi_chip_id(0x35360100, 0), "3536V100") == 0);