diff --git a/src/hal/hisi/hal_hisi.c b/src/hal/hisi/hal_hisi.c index 94a5a27..d3744bf 100644 --- a/src/hal/hisi/hal_hisi.c +++ b/src/hal/hisi/hal_hisi.c @@ -1280,6 +1280,19 @@ static const char *get_hisi_chip_id(uint32_t family_id, uint8_t scsysid0) { return "3520DV200"; case 0x35210100: 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). */ + 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 0x35350100: + return "3535V100"; + case 0x35360100: + /* Hi3536 V100, not the Hi3536DV100 (0x3536D100) or CV100. */ + return "3536V100"; case 0x3559A100: return "3559AV100"; case 0xBDA9D100: diff --git a/src/hal/hisi/hal_hisi_test.c b/src/hal/hisi/hal_hisi_test.c index e44149e..16cf384 100644 --- a/src/hal/hisi/hal_hisi_test.c +++ b/src/hal/hisi/hal_hisi_test.c @@ -560,6 +560,11 @@ int main(void) { CHECK(peek(GK7206_CRG_OTP) == 0x286); CHECK(writes == 0); + /* 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(0x35350100, 0), "3535V100") == 0); + CHECK(strcmp(get_hisi_chip_id(0x35360100, 0), "3536V100") == 0); + static const struct { uint32_t chip_id, efuse; const char *model;