Repository navigation
sensors: detect SmartSens SC1135 by 0x3008/0x3005 - #257
Conversation
The SC1135 has no ID in 0x3107/0x3108, so the SmartSens probe gave up
on it ("SC1135 catches here") and the camera reported no sensor. It is
told by 0x3008 = 0x60 and 0x3005 = 0x22: that is the pair the Xiongmai
XM510 isp daemon accepts as an SC1135 once 0x3107/0x3108 matched none of
its IDs. Under emulation (qemu-bench's xm510 machine with its generic
xm-sensor), every 0x3005 value was tried with 0x3008 = 0x60 and the
daemon accepted 0x22 alone, logging "SC1135 sensor init OK"; the open
XM510 ISP in OpenIPC/openxiongmai carries that sensor's scripts.
The check runs only when 0x3107/0x3108 names no known part, after the
SOI, onsemi, OmniVision and Sony probes, so nothing identified today is
read differently. Unknown IDs other than 0 and 0xffff still report
their value.
Tested in the same emulator: SC1135 registers give SmartSens SC1135,
0x3005 = 0x23 gives no sensor, SC1235 registers still give SC1235. On
two real XM510 cameras the JX-H62 and the AR0130 are unchanged. Not
tested on SC1135 hardware.
PR Summary by QodoDetect SmartSens SC1135 using its fallback register signature
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
The two extra reads are 16-bit addressed, which an 8-bit device takes as a register write, so they are made only where 0x3107/0x3108 read 0x0000 or 0xffff, where SC1135 was noted to land. An unknown non-zero ID is reported as before and reads nothing more. sensors_test gets a smartsens-sc1135 path: 0x3107/0x3108 empty, every 0x3008/0x3005 value swept. The fingerprint gains one line, 6022 SC1135, and nothing else changes.
The SC1135 has no ID in 0x3107/0x3108, so the SmartSens probe gave up on it ("SC1135 catches here") and the camera reported no sensor. It is told by 0x3008 = 0x60 and 0x3005 = 0x22: that is the pair the Xiongmai XM510 isp daemon accepts as an SC1135 once 0x3107/0x3108 matched none of its IDs. Under emulation (qemu-bench's xm510 machine with its generic xm-sensor), every 0x3005 value was tried with 0x3008 = 0x60 and the daemon accepted 0x22 alone, logging "SC1135 sensor init OK"; the open XM510 ISP in OpenIPC/openxiongmai carries that sensor's scripts.
The check runs only where 0x3107/0x3108 read 0x0000 or 0xffff, after the SOI, onsemi, OmniVision and Sony probes: those reads are 16-bit addressed, which an 8-bit device takes as a register write, so nothing identified or reported today sees an extra transaction.
sensors_testgets asmartsens-sc1135path; the fingerprint gains one line,6022 SC1135, and nothing else changes.Tested in the same emulator: SC1135 registers give SmartSens SC1135, 0x3005 = 0x23 gives no sensor, SC1235 registers still give SC1235. On two real XM510 cameras the JX-H62 and the AR0130 are unchanged. Not tested on SC1135 hardware.