From 45705b3833327889e59a66903cfe6d4be7964705 Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Sat, 17 Oct 2026 12:41:48 +0300 Subject: [PATCH] hisi: do not probe for a sensor on the Hi3536DV100 The Hi3536DV100 is a decoder with no video input, so a report never finds a sensor there, but the probe was expensive. On a lab NVR i2c0 has nothing on the wire and the kernel's hibvt-i2c driver runs it in polling mode (the device tree gives it no interrupt), so each transfer spins udelay(50) 0x10000 times -- 3.3 s on the SoC's single core -- before "wait idle timeout". The table is 38 transfers: the sensors section took 126 s, and the board stopped answering ping for most of it. Leave possible_i2c_addrs empty on this chip. The whole report now takes 1.0 s on that NVR and issues no i2c transfer. --- src/hal/hisi/hal_hisi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/hal/hisi/hal_hisi.c b/src/hal/hisi/hal_hisi.c index 70fe8701..ac27a384 100644 --- a/src/hal/hisi/hal_hisi.c +++ b/src/hal/hisi/hal_hisi.c @@ -678,6 +678,17 @@ void setup_hal_hisi() { break; } possible_i2c_addrs = my_possible_i2c_addrs; +#ifdef IPCHW_HISI_3536D + /* The Hi3536DV100 is a decoder with no video input, so there is no sensor + * to find, and probing for one is not free. Its i2c0 has nothing on the + * wire on an NVR, and the kernel's hibvt-i2c runs it in polling mode (the + * device tree gives it no interrupt): every transfer spins udelay(50) + * 0x10000 times, 3.3 s on the SoC's only core, before "wait idle timeout". + * The full table is 38 such transfers -- the board stopped answering ping + * for two minutes on every report. */ + if (chip_generation == HISI_3536D) + possible_i2c_addrs = NULL; +#endif hal_temperature = hisi_get_temp; #ifndef STANDALONE_LIBRARY hal_detect_ethernet = hisi_ethdetect;