allwinner i2c (twsi)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Aug 2023 07:56:22 UTC
Hello, I have this H616 based android tv/media box with a H616 soc which has an AXP305 power management IC. The pmic is controlled via i2c (not RSB). The problem is that for some reason iicbus_transfer does not work properly before kernel boots. The twsi (allwinner i2c) driver sets up the interrupt late via config_intrhook_oneshot and while the interrupt is not available (during boottime) twsi_transfer falls back to iicbus_transfer_gen which will read bogus values instead of the real AXP305 registers which will cause the axp driver to cut the cpu power (reads bogus val, do some bitops, write back, ending up turning off some regulators) enabling twsi interrupt at device/iicbus attach time causes a panic due to a call to msleep_sbt which will panic because timers are not available replacing msleep_sbt with mtx_sleep with 0 as waittime and enabling the interrupt at attach time works but Im not sure this is the best/only way to fix it i can provide twsi debug logs if anyone is interested