kernel/hi3516cv200: recognize the gc2023_mipi sensor type - #207
Conversation
PR Summary by Qodohi3516cv200: add gc2023_mipi sensor handling to open_sys_config
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PR More tips ↗ | Customize Qodo ↗ | Qodo docs ↗ |
widgetii
left a comment
There was a problem hiding this comment.
Verified: patch applies cleanly, insert_sns() compiles warning-free with -Wall -Wextra, and gc2023_mipi now dispatches to a real arm instead of the error print. Register values (0x200f0040=0x2, 0x200f0044=0x2, 0x2003002c=0xc4001) match the ov2710_mipi arm and the companion load_hisilicon arm exactly; 0xc = 24 MHz is correct for GC2023.
The ordering argument in the description holds — insert_ko() insmods sys_config.ko before calling the devmem-based insert_sns, so the script writes last and the values are identical either way. Zero behavioural risk. "Parallel VI pads stay unmuxed" is also accurate: pinmux_hi3518e() never touches 0x200f007c–0x200f0094.
Two notes for follow-up, neither blocking:
- The companion firmware PR extends the existing case arm (
ov2710_mipi | ... | gc2023_mipi) rather than adding a new one; folding this into the existing condition would be a one-liner and mirror that shape. Fine as-is given the board-specific comment. - The tables have drifted further than one name: 17 names
load_hisiliconknows still have nosys_configarm (plaingc2023,ov2735,ov2735_i2c_1080p,imx307/327/291, thesc*/jx*set), and three names present in both disagree on values —9m034(27 vs 24 MHz),ar0130(27 MHz + parallel pinmux vs 37.125 MHz, none),jxf22(24 MHz + parallel pinmux vs 37.125 MHz, none). All dormant for the same last-writer-wins reason.
Mirror of the ov2710_mipi arm: I2C0 pinmux plus 24MHz sensor clock, with the parallel VI pads left alone so the MIPI PHY keeps the pins. Companion to OpenIPC/firmware#2248, which adds the gc2023_mipi identity to load_hisilicon and a gc2023_mipi_1080p.ini; without this arm a gc2023_mipi boot logs "sensor_type 'gc2023_mipi' is error!!!" before the script's devmem writes apply the same values. The register writes themselves are hardware-verified: they are the ones the load_hisilicon arm issues via devmem on a VStarcam Hi3518EV200 (see OpenIPC/firmware#2243 for the bring-up record).
What
Add a
gc2023_mipiarm to the hi3516cv200open_sys_configsensor table: I2C0 pinmux + 24 MHz sensor clock, parallel VI pads left alone so the MIPI PHY keeps the pins. Mechanical mirror of the existingov2710_mipiarm.Why
Companion to OpenIPC/firmware#2248, which adds the
gc2023_mipiidentity toload_hisiliconand agc2023_mipi_1080p.ini.open_sys_configfalls through tosensor_type '%s' is error!!!for names it does not know; that is non-fatal (the script'sdevmemwrites run afterwards and win), but it leaves an alarming line in every boot log and lets the two pinmux tables drift. The OV2710 MIPI addition updated both tables; this restores that symmetry for GC2023.Raised by @widgetii in the review of OpenIPC/firmware#2248.
Verification
The register writes are hardware-verified in their
devmemform: they are exactly what theload_hisiliconarm issues on a VStarcam Hi3518EV200 with the GC2023 wired to MIPI (I2C reaches the sensor, MIPI PHY delivers frames with the vendor MIPI libsns — full bring-up record in OpenIPC/firmware#2243). This kernel arm is a byte-for-byte mirror of theov2710_mipiarm apart from the name and comment; I have not built the cv200 kernel tree standalone.