Repository navigation
Conversation
The board is a Hi3518EV200 with an OV2710 over one MIPI lane, 16 MB of flash and an MT7601U on the USB bus. Nothing here is new hardware support: the point of the device entry is the muxes.sh, which is the other half of OpenIPC/openhisilicon#305. On this board the Darlington array that drives the pan stepper (CHMC 1J2003EF) takes its inputs from GPIO3_7 and GPIO4_0..GPIO4_2 - pads 31 to 34 - and the BSP leaves them as inputs with the internal pull-up. They read 1 from the first second of uptime, every coil carries current, and the motor heats up without ever turning. A coil is on when its input is high here, so muxes.sh claims those four pads as outputs and drives them low. Pads 35 and 36 sit in the same block and are left untouched: what they drive is not identified. The four phases were identified without a multimeter, by stepping the motor with gpio-motors and watching the camera's own image move: 30 steps at 4 ms change the frame by 25.6 (mean absolute difference on a 160x90 grey copy) on a noise floor of 3.3, and stepping back returns it to 3.4. Sets that leave 34 out do not move anything. This is also how `ptz_gpio` was settled, so the entry writes `31 32 33 34` twice and `ptz_coil_active 1`; the tilt phases are not on these pads, so tilt steps must stay 0 until someone identifies them. gpio-motors is built in (BR2_PACKAGE_GPIO_MOTORS=y): it is the tool majestic drives the head through, and on this image it was absent. The customizer also records the IR-cut pins, 65 and 64, measured the same way: pulsing 65 gives mean luma 154 with R/G 1.50 (filter out, infrared through), pulsing 64 gives 130 with R/G 0.99 (filter in). Those are the pins the C8892WIP device already carries, and this board is the same vendor and SoC family. The kernel config is the hi3518ev200 generic one, copied as the other devices in this family do. The flash size is 16 MB, from /proc/mtd on the board: 1024k boot, 3072k kernel, 8192k rootfs, the rest rootfs_data.
PR Summary by QodoAdd VStarcam C23S profile and switch off pan coils at boot
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1.
|
- do not force video0.codec h264: the H.264 channel wedges this board (OpenIPC/majestic#377) and video is taken from /mjpeg, so the codec is left at the image default - do not set ptz_gpio: gpio-motors wants two axes and writing the pan set twice would make a tilt request drive the pan coils. The four pan phases and how to enable them once the tilt ones are known are in a comment instead - add the C23S row to the device table in README.md
|
Addressed the three findings in the branch.
|
openipc-ai
left a comment
There was a problem hiding this comment.
This is the right home for it, and the pad and polarity work is solid: you used the frame difference as the sensor, and stepped back to the start. A few notes, none of them blocking.
muxes.sh: it leaves pads 31–34 exported, but that doesn't get ingpio-motors' way. Its export of an already-exported pin fails silently and it carries on, and when it releases the pins it drives them low before unexporting, which is the off level here. So the two coexist.- Not setting
ptz_gpiountil the tilt phases are known is the right call. One consequence: nothing in the web UI will pan this camera out of the box, sopan-okin the README row reads stronger than what ships. Something likepan coils held off (pins known), tilt-nowould match it. - The quieter
[3dnr]from OpenIPC/firmware#2884 belongs here rather than in the shared cv200 package. Add it asgeneral/overlay/etc/sensors/iq/c23s.ini(or any name) and select it incustomizer.shwithcli -s .isp.iqProfile /etc/sensors/iq/c23s.ini.isp.iqProfileis the key that picks the IQ file, and it's documented in the wiki'smajestic-config.md.hi3516ev300_ultimate_xm-85h50aiandhi3518cv100_lite_xm-n51813lalready ship their own IQ file the same way. Every C23S then gets the tuning you measured, and no other cv200 board changes. - On OpenIPC/majestic#377: in the lab it hasn't reproduced as "H.264 wedges the pipeline" (36 restarts, with and without clients streaming). It's still open pending your clean-boot run. Leaving the codec at the image default is fine; I'd just not state it as settled in the comment.
…EADME row to what ships - add general/overlay/etc/sensors/iq/c23s.ini, the [3dnr] ladder measured on this board, and select it from the customizer with isp.iqProfile. Without the key the streamer opens default.ini, which is the AR0130 ladder on every cv200 image, so the tuning would ship unread. - README row: "pan coils held off (pins known)" instead of "pan-ok", since ptz_gpio is deliberately not set until the tilt phases are known. - do not state the H.264 channel as settled: it has not been reproduced in the lab (OpenIPC/majestic#377).
|
All four points taken, in
|
openipc-ai
left a comment
There was a problem hiding this comment.
All four points addressed. Thanks, especially for checking isp.iqProfile on the board before relying on it.
One small thing, which can go in now or in a follow-up: your clean run on OpenIPC/majestic#377 didn't reproduce it, and that issue is now closed as not reproducible. The customizer's "H.264 channel is suspected on this board" comment can go. Leaving the codec at the image default needs no reason attached.
OpenIPC/majestic#377 is closed as not reproducible, and leaving the codec at the image default needs no reason attached.
|
Gone. The codec is left at the image default, with no reason attached. |
|
One thing this board needs, found after the last review question about The fix belongs in the sensor file, not here: OpenIPC/firmware#2898. The device Worth knowing while testing this board: the mask does not corrupt the signal, it |
What this adds
devices/hi3518ev200_lite_vstarcam-c23s, a device entry for the VStarcam C23S(HI3518EV200, OV2710 over one MIPI lane, 16 MB flash, MT7601U on USB).
The reason it exists is
muxes.sh, the other half ofOpenIPC/openhisilicon#305.
The coils
The Darlington array that drives the pan stepper (CHMC 1J2003EF, foot board)
takes its inputs from GPIO3_7 and GPIO4_0..GPIO4_2 - pads 31 to 34 - and the BSP
leaves them as inputs with the internal pull-up. They read 1 from the first
second of uptime, every coil carries current, and the motor heats without ever
turning. On this board a coil is on when its input is high, so
muxes.shclaimsthose four pads as outputs and drives them low. Pads 35 and 36 sit in the same
block and are left untouched: what they drive is not identified.
Which four, and in which order, was settled without a multimeter. The head
carries the image sensor, so a pan that turns is visible in the frame, and
gpio-motorsfrom OpenIPC/firmware was driven with a stand-infw_printenvonPATHso nothing was written to the U-Boot environment:So
ptz_gpiois'31 32 33 34 31 32 33 34'- the pan set twice, becausegpio-motorswants two axes - andptz_coil_activeis 1, the default. The tiltphases are not on these pads (the head has its own 5-pin connector and no driver
of its own), so tilt steps must stay at 0 until someone identifies them.
The rest of the entry
BR2_PACKAGE_GPIO_MOTORS=y: the tool majestic drives the head through, absentfrom this board's image today.
65 gives mean luma 154 with R/G 1.50 (filter out, infrared through), 64 gives
130 with R/G 0.99 (filter in). The same pair the C8892WIP device carries.
fw_setenv sensor ov2710_mipi: the defaultov2710_mipi_1080p.inidescribesthe parallel interface, so the streamer moves on to
ov2710_mipi_1lane_1080p.iniby itself (the fallback added in #2871). Namingthe sensor is enough.
/proc/mtd: 1024k boot, 3072k kernel, 8192k rootfs,the rest rootfs_data. The kernel config is the hi3518ev200 generic one, copied
as the neighbouring devices do.
Verified on hardware, and not
Verified on the board: SoC, sensor and lane count, flash layout, the four motor
pads and their order, the coil polarity, the IR-cut pins, the MT7601U
(
148f:7601on the USB bus).Not verified: the LED pins, the light sensor pin, and the tilt driver. None of
them is set here; they fall back to the image defaults.
Testing
After flashing,
gpio-motors statusshould answer instead of reporting amissing package, pads 31-34 should read
out 0right after boot(
ipctool gpio dump), andgpio-motors 20 0 4should turn the head without themotor warming up. Video is
/mjpeg; the H.264 stream wedges the pipeline onthis board (OpenIPC/majestic#377), so
mp4.enableis better left off.