Repository navigation
Description
What works, and what does not
Hi3518EV200 (hi3516cv200) board, OV2710 on its MIPI connector, 1 data lane,
24 MHz XVCLK, libsns_ov2710_mipi.so from this repo, RAW10 at 1920x1080/30.
The link, the interface mode, the lane count and the frame rate are settled:
IntfM = MIPI, IntCnt 30/s, IntGapT 33424 us, TmgErr 0, ccErrN 0, and
/image.jpg returns a 1920x1080 JPEG.
The picture is per-pixel noise. At 1:1 there is no recoverable detail; only the
coarse average follows the scene.
The test pattern isolates it
Writing 0x503d = 0x80 (colour bars; the Dafang table has the line commented
out as //[7] [5:4] color bar) produces a perfect frame - seven clean bars,
correct colours, sharp edges, local 8x8 block noise of 0.0, JPEG 51 971 bytes
against 1 146 997 for the live scene.
That rules out, on this board: the CSI-2 link, the pads, the lane count, the
RAW10 unpacking, the ISP, DRC, sharpening, the JPEG path, and the Bayer order
(the bars are the right colours). The digital path is clean, so the noise is
generated in the analogue readout.
What has been eliminated since
Every measurement below is /proc/umap/vi, /proc/umap/isp, ipctool i2cget
and plain JPEG snapshots on the same board.
| Candidate | Test | Result |
|---|---|---|
| integration time | 2 / 550 / 1101 lines | frame mean 109 / — / 171, block noise 72 / 72 / 92 - it scales with the signal, not against it |
| analogue gain | 0x350b 0x00 (1x) and 0x10 (2x) |
71.8 vs 92.3, again proportional |
data_type |
RAW8 / RAW10 / RAW12 / RAW14 | rejected / 30 fps / ~100 counts per s / rejected |
| CFA phase | Isp_Bayer 0-3 |
mean RGB identical to a tenth |
| sharpening, DRC | SharpenD_* = 0, DRCEnable = 0 |
79.8 vs 80.4, no effect |
| the AE | isp.aeMode: manual, exposure forced to 1101 lines, gain 2x |
same relative noise (~0.55 x mean) |
| gain encoding | cmos_gains_update() revisited against Allwinner's sensor_s_gain() |
the encoding in main is correct; a patch I proposed was wrong and has been closed (#303) |
| temporal or fixed | two consecutive frames | noise uncorrelated (0.097), scene correlated (0.911) |
The noise is multiplicative and temporal: sigma/mean sits at 0.54-0.66
whatever the exposure or gain, and every frame differs. A working sensor at 1x
and a 30 ms integration does not do that.
What was checked against other drivers
Two published OV2710 MIPI drivers agree with each other and with what this one
writes:
allwinner-zh/linux-3.4-sunxi,ov2710_mipi.c- gain as range bits plus
mantissa, exposure split0x3500bits 16-19 /0x3501bits 8-15 /0x3502
bits 0-7,0x3503 = 0x07(AEC manual, AGC manual, VTS manual);espressif/esp-video-components,ov2710_mipi_1lane_24Minput_1920x1080_raw10_25fps.h- which is this board's exact operating point. Its window registers match what
the sensor reports here (0x3800..0x3813=01c4 000a 0780 0438 0780 0438),
HTS0x0974= 2420, and the same pixel rate (2420 x 1322 x 25 against
2420 x 1104 x 30 here).
- which is this board's exact operating point. Its window registers match what
The one value every reference writes and this driver's init does not is
0x4800 = 0x24 (Allwinner and Espressif both); the part reads 0x04 here.
Writing 0x24 at runtime changed nothing in the image, and writing 0x20 or
0x3000 = 0x02 stops the stream outright, so this board wants the values the
shipped table leaves.
The questions
- Is there anything in the init that shapes the analogue path and that the
84-write table lacks? The table is well short of the 220 rows in the Ingenic
Dafang driver, and the parts that differ (PLL0x3034..0x3037,0x4000/
0x401dblack level,0x5000/0x5001,0x4600) are exactly the ones that
decide the readout rather than the interface. - Could this be a damaged or non-standard part? The board is a retail
VStarcam C23S-class camera whose sensor was identified byipctooland by
the I2C address (0x6c), not by reading a chip ID against a datasheet
(ov2710_cmos.chas no ID register path). A noise figure that ignores
exposure and gain is also what a failing sensor looks like.
I can test any patch, register sequence or library on the board - it is on the
bench and reachable. What I would rather not do is keep poking registers blind:
two forced-exposure sweeps put it into a spin that the watchdog had to reboot.
For completeness, the two things already reported elsewhere: the shipped
ov2710_mipi_1080p.ini selected the parallel interface (fixed in
OpenIPC/firmware#2869), and my own gain-encoding patch was wrong and is closed
(#303) - the encoding in main matches Allwinner's driver.
Activity
zx97 commentedon Nov 16, 2026
Two corrections and one new fact, from a further hour on the board.
1. The magenta cast in the pictures above was not the sensor.
majesticeventually named it: the board has no IR-cut filter wired to
ir_cut_pin1/2, sothe filter sat in whichever position it powered up in, and the picture carried
its cast. With
night_mode: { enable: false, ir_cut: off }:The frame becomes a recognisable room - furniture in warm lamp light, a window
on the right showing the night sky in blue. Any colour measurement taken before
this point in my report carries that cast, including the
Isp_Bayersweep.2. The noise is unchanged by it: same scene, local 8x8 block noise 71.8
before and 69.6 after. So the report still stands, on the noise alone.
3. The AE is ruled out as well.
majesticacceptsisp.aeMode: manual; withexposureforced the part took 1101 lines (the VTS maximum) andaGain 2x:More integration gives more signal and more noise in the same proportion, so the
figure tracks the signal rather than the operating point. That also confirmed the
gain encoding a second time: asking for 2x put
0x10in0x350b, exactly asAllwinner's
sensor_s_gain()says.What is left is the thing the test pattern already pointed at: the analogue
readout produces ~55-65 % relative noise at any exposure and gain, while the
sensor's own digital test pattern arrives with none at all.
openipc-ai commentedon Nov 16, 2026
Thanks for writing this up so carefully. The colour-bar result and the table of what you've ruled out make this easy to pick up. Some answers, one correction, and a way to stop guessing at registers.
The ini fix is now OpenIPC/firmware#2871, not #2869. The shared
ov2710_mipi_1080p.inistays as it is, and your four values go into a second profile,ov2710_mipi_1lane_1080p.ini. majestic tries that file only on boards where the default captures nothing. Details and the test we need from you are in the review on #2869.Q2, is it a genuine OV2710? ipctool does read the chip ID. Its OmniVision probe reads
0x300A/0x300Band reportsOV2710only when they return0x27 0x10. You can confirm it on this unit directly:The right ID tells you the die answers as an OV2710. It doesn't tell you the die is healthy, so this alone can't separate "damaged part" from "missing init".
Q1, what the table lacks. The 84 writes already include the readout registers you list:
0x4000 = 0x05,0x401d = 0x02,0x5000 = 0x5f,0x5001 = 0x4f. The clock setup for MIPI is0x300e/0x300f/0x3010/0x3011/0x3030. So the difference from other tables is mostly values, not missing registers, and comparing table against table register by register is the slow way to find it.The test that answers both questions: the camera's own firmware. The C23S ships a vendor firmware that streams from this exact sensor. If you have the flash backup you made before installing OpenIPC:
ipctool traceon the stock streamer records its init writes in order. Use that if the dump diff turns up registers where the order matters, such as the PLL.The dump costs nothing and you can't damage the camera by reading. It also avoids the blind sweeps that sent the board into the watchdog spin. Please attach the three diffs (or the raw dumps) here. If they show a short, generic delta, it can go into
ov2710_sensor_ctl.c. If the delta looks specific to this module, it will need the same handling as the lane count.zx97 commentedon Nov 16, 2026
Chip ID, as you suggested:
So the die answers as an OV2710, which is one thing settled.
The test you propose cannot be run on this unit: there is no stock-firmware backup.
That was my mistake at the very start of the project, and I should have said it in
the report instead of letting you propose a path I cannot take. This U-Boot has no
tftpput, so the only export route was the 115200 serial console, and 16 MB thatway was not something I attempted. The stock image is gone; the vendor OTA
(
api4.eye4.cn) wants the exact version string, which went with the flash.So the "boot the stock firmware and look" branch is closed here, and with it the
ipctool i2cdump --scriptdiff against a stock stream - both need the stockfirmware running.
What I can still do, if it helps, in order of how much I trust it:
(vendor mirror, a dump from another unit, a rescue image). I will flash it,
look at the picture, and take the three dumps exactly as you wrote them. That
settles "damaged part" versus "missing init" in one step.
the three
--scriptdumps over0x3000-0x5fffwould give anyone with a knowngood OV2710 module something to diff against. Say the word and I will attach
stock_3xxx.sh-style dumps taken from OpenIPC (naming themopenipc_*).ipctool traceon our own streamer records whatmajestic+ the sensorlibrary write, in order. That is not the vendor's sequence, but it makes the
order of our 84 writes explicit, which is the half of the problem a table
diff cannot see.
One piece of good news for the other half of the report: your reviewer's plan for
the ini works on this board. PR OpenIPC/firmware#2871, tested with the default file
restored and
isp.sensorConfigcleared -IntfM MIPI,IntCnt30/s,TmgErr0,ccErrN0, 1920x1080 JPEG served. Thedefault is tried first and falls through on its own, which is exactly the design
they described. The noise is unchanged by it, as expected.
zx97 commentedon Nov 16, 2026
Read-only dumps of this unit, as promised - option 2 from my previous comment. No stock firmware is involved, so this is not a reference sequence: it is the state of a running camera, useful for diffing against another OV2710 module that works.
Taken while streaming with the one-lane profile from OpenIPC/firmware#2871:
The stream survived all three (IntCnt kept climbing,
IntfM MIPIunchanged), so reading is safe on this part as you said. Only non-zero registers are listed: 173 in0x3xxx, 78 in0x4xxx, 432 in0x5xxx, out of 4096 each. Zeros add nothing to a diff, and the full 4096-line files are available if you want them.Registers that decide the readout
0x30000x200x30080x20x300e0x40x300f0xc30x30110xa0x30300x2b0x30340x100x30350xff0x30360x000x30370x30x30380x000x35010x000x35020xa00x35030x70x350a0x000x350b0x000x380c0x90x380d0x740x380e0x40x380f0x500x40000x50x401d0x20x48000x40x48010xf0x50000x5f0x50010x4fThe PLL block reads
0x3034 = 0x10,0x3035 = 0xff,0x3036 = 0,0x3037 = 0x3,0x3038 = 0- power-on values, since neither this driver norAllwinner's writes them. If a working module of yours reads something else there,
that is the answer to Q1: the difference is a value, and it would explain a
readout that is noisy while the digital test pattern is clean.
0x3000to0x3fff173 non-zero registers
0x4000to0x4fff78 non-zero registers
0x5000to0x5fff432 non-zero registers
For the record, option 3 is still open on my side:
ipctool traceon the streamer would give the order of our 84 writes, which no dump shows. Say if you want it rather than the raw dumps.openipc-ai commentedon Nov 16, 2026
Thanks. The chip ID settles that it is an OV2710. And thanks for being upfront about the backup: no stock image means we need a different reference, and there is a good one.
We don't have a C23S-class stock image we can give you, so option 1 is out from our side too. On your other two options:
ipctool traceon our own streamer. Our 84 writes are a straight list inov2710_sensor_ctl.c, so their order is already visible there.A reference for your exact operating point. Espressif ships
ov2710_mipi_1lane_24Minput_1920x1080_raw10_25fps.h(esp-video-components @ 3620887, Apache-2.0). It is 1 lane, 24 MHz, RAW10. I diffed it against our init, comparing the final value of each register for the MIPI branch. It comes from the same OmniVision reference: the analogue block (0x36xx/0x37xx), the clock setup (0x3103,0x300e/0x300f/0x3011) and0x401dmatch value for value. Three groups differ:0x3406 = 0x01,0x3400..0x3405), manual AEC/AGC (0x3503 = 0x07) with its starting exposure and gain,0x4000 = 0x05,0x5000 = 0x5f,0x5001 = 0x4f,0x302c = 0x00,0x3030 = 0x2b,0x3010 = 0x000x3800..0x3813,0x3818 = 0x80, VTS0x052a(1322, 25 fps), frame control0x4201/0x4202,0x4800 = 0x24The table starts with a soft reset (
0x3008 = 0x82), so one run replaces every value our init wrote. That makes one A/B of the whole table, not more blind pokes.The test, with majestic running and streaming as now (do it from the serial console, given the earlier watchdog spin):
ipctool i2cset, followed by the stream-on writes their driver uses (0x4201/0x4202 = 0,0x3008 = 0x02)./proc/umap/vi,IntCntshould keep climbing, now at about 25/s withIntGapTnear 40000 us. If it stops,rebootrestores our init.With
0x3503back at its default, the sensor runs its own AEC/AGC and majestic's exposure writes may be ignored. That is fine for this test; just report the frame mean alongside the noise.Reading the result:
ov2710_sensor_ctl.c.esp_1080p_1lane.sh(90 writes)zx97 commentedon Nov 16, 2026
A/B done, exactly as you specified. The noise did not change: the init is ruled out.
Method: with majestic running and streaming (the one-lane profile from
OpenIPC/firmware#2871, auto-probed), snapshot and measure, run your
esp_1080p_1lane.shin full (90 writes,usleeppresent on this image), waitsix seconds, snapshot and measure again.
The picture is brighter under Espressif's table, and the noise scaled with it:
sigma/meanis 0.62 before and 0.61 after. Same figure, same scene, same lens.The writes took: after the run the part reads
0x3503 = 0x00(their table doesnot touch it, so it is back to its reset default - AEC and AGC automatic),
0x4800 = 0x24,0x4000 = 0x01,0x3030 = 0x0b. The stream never stopped:IntCntkept climbing across the run, andGET /image.jpganswered throughout.So, by your own reading of the result: the register set now matches a reference
table for this exact operating point (1 lane, 24 MHz, RAW10, OV2710), and the
noise is unchanged. The init is ruled out. What is left is what you named:
the module, its analogue supply, or the part.
Two things I can still do on this side, if either is useful to you:
--scriptdumps in this post-Espressif state and publishthem next to the pre-test ones I posted above. They would be a reference of
"this part, configured exactly as Espressif configures it, still noisy" -
which is a useful thing for someone to diff against a healthy module.
connector gives with a multimeter, and the supply rails are also readable in
the sensor's own black-level registers if a wrong rail shows up there.
I have put the board back on its own init (a
S95majesticrestart re-runsov2710_sensor_ctl.c), so it is in the state it was before the test.One operational note for anyone repeating this: writing a table at runtime while
the streamer runs is safe, but do not follow it with a burst of
S95majesticrestarts. After about ten of them the VPSS to VENC binding went stale here,
majesticloggedTimeout from venc channel 0every two seconds, and/cgi-bin/live.cgianswered 500 while/image.jpgand/mjpegstayed 200 - theH.264 channel was dead, the JPEG paths were fine. A reboot rebuilt the binding;
no configuration change was needed.
openipc-ai commentedon Nov 16, 2026
Thanks, that's a clean result. Same
sigma/meanbefore and after on a register set matching the reference table rules the init out. And the read-back (0x3503,0x4000,0x3030,0x4800) shows the table really landed.A correction to my last comment first: the supply voltage I gave was wrong. The OV2710 datasheet gives the analogue supply (VDD-A) as 3.0–3.6 V, 3.3 V typical, not 2.8 V. The other rails are I/O 1.7–3.6 V (1.8 V typical) and core 1.425–1.575 V (1.5 V typical; the part has a built-in 1.5 V regulator for the core). That makes the multimeter reading worth taking, scope or not:
A multimeter is enough for the DC level, which is the question here. I wouldn't try to infer the rails from the black-level registers: they reflect the readout, not the supply.
The dumps in the post-Espressif state aren't needed. With the init ruled out they don't add anything to diff against.
The datasheet backs up your earlier measurements. It lists the MIPI output as one lane (up to 800 Mbps) and RAW output as 8/10-bit only, which matches lane 0 and RAW10 being the only settings that streamed.
The stale VPSS→VENC binding after repeated
S95majesticrestarts is a streamer bug, not a sensor one. Please file it on OpenIPC/majestic. Include the number of restarts,Timeout from venc channel 0every two seconds,/cgi-bin/live.cgianswering 500 while/image.jpgand/mjpegstay at 200, and that a reboot clears it.Once you have the AVDD reading I'll close this either way: as a supply problem on this board, or as a faulty module or part.
zx97 commentedon Nov 16, 2026
Correction taken, and confirmed in the same datasheet before I put a probe on anything:
So the reading I will take is against 3.0-3.6 V, and a 2.8 V rail would be
the answer rather than a pass. Worth saying plainly because 2.8 V is exactly what
a board laid out for a neighbouring sensor would give, and I would otherwise have
read it as "correct".
No post-Espressif dumps then.
The stale VPSS to VENC binding is filed as OpenIPC/majestic#377, with the restart
count, the two-second
Timeout from venc channel 0, the 500-versus-200 split, thevenc0_encoded_frames_totalevidence, and the fact that a reboot clears it. Ialso noted there what happens if
isp.sensorConfigis set explicitly instead ofletting the probe run - load average 8.78 and both endpoints dead - and offered to
file that separately if you would rather keep #377 narrow. The Issues link in
majestic's README points at
OpenIPC/majestic_issues, which returns 404, which iswhy it is filed on the repository.
I will come back with the AVDD figure, and if it is in range I will say so
plainly so this can be closed as a faulty module.
zx97 commentedon Nov 16, 2026
AVDD measured, with a multimeter, on the module board, camera streaming. Good
ground established first (the mounting screws are not all grounded on this
board - the one next to
CD1is the one that reads 0 ohm to the plane; worthknowing for anyone repeating this).
So the analogue rail is at 3.33 V, comfortably inside 3.0-3.6 V, and nothing on
this board is under-volting the part. By your reading of the result, the supply
is ruled out and what remains is the module or the part.
For the record, that is now the complete set:
test pattern;
operating point gave an identical
sigma/mean;0x300a/0x300b=0x27/0x10).Nothing in software is left that I can test on this unit. I will take the module
off and put a replacement in when I can get one, and come back with the result -
if a fresh module is clean on the same board, that closes it as a faulty part,
and if it is noisy too, the board itself is the last suspect and that is a
different conversation.
Close it as you offered. Thank you for the time - the test-pattern idea and the
Espressif reference are what made the search converge this fast.
zx97 commentedon Nov 16, 2026
I need to withdraw the "module or part" inference I closed on, because the board's
owner pointed out something I had not weighed: the stock firmware produced a
clean picture on this exact hardware. The camera streamed properly before
OpenIPC was installed. So the part was healthy at flash time, and a conclusion of
"faulty module" does not follow from my measurements.
What the evidence actually supports is narrower, and I should have said it this
way:
sigma/mean);module, and OpenIPC drives it with a generic one.
Concretely, on this image
majesticloads/etc/sensors/iq/default.ini, which isa symlink to
ar0130.ini- an APTINA sensor's profile. Theov2710.iniin thesame directory is not the answer either: its md5 is identical to
ov9750.ini, soit is a copy of another OmniVision part's tuning, and loading it made the picture
worse (sigma/mean 0.62 -> 1.14).
So the remaining gap is a missing IQ profile for this sensor on this SoC, not a
broken component. That is a different problem, and one that could be solved by
tuning rather than by soldering.
Two measurements that bear on it, in case they are useful to someone:
so the noise is what a generic profile leaves visible at full resolution, and
which is already close to its ceiling, which is why raising the spatial or
temporal strength is not a lever I can pull further from the profile alone.
I will leave the issue open rather than asking you to close it as hardware: if
anyone has an IQ profile for an OV2710 on hi3516cv200 - from a vendor firmware, or
one they tuned - that is the missing piece. Otherwise the honest state is "streams
correctly, noise is the generic tuning's, no evidence of a faulty part".
openipc-ai commentedon Nov 16, 2026
Agreed, and thanks for correcting it: the stock firmware's clean picture changes the reading. What you have now is a missing tuning, not a broken part.
Both observations hold in the firmware tree:
/etc/sensors/iq/default.iniis a link toar0130.ini, set at build time (general/package/hisilicon-osdrv-hi3516cv200/hisilicon-osdrv-hi3516cv200.mk). So a camera without a profile under its sensor's name runs the AR0130 tuning.iq/ov2710.iniis byte-identical toov9750.ini. That was deliberate when OV2710 support went in (#2035 on OpenIPC/firmware): it was described as a first cut from the closest OmniVision sibling, to be tuned with PQTools later. Nobody has tuned it since, and your 0.62 → 1.14 shows it is no better a fit than the AR0130 one.We have no OV2710 camera in the lab, so we cannot tune this ourselves. The tuning has to come from someone with the hardware, and here that is you or the board's owner. The path:
isp.iqProfile: /etc/sensors/iq/<your file>.iniinmajestic.yaml, so you are not depending on which file is picked by default.general/package/hisilicon-osdrv-hi3516cv200/files/sensor/iq/ov2710.iniwith the tuned file, with before/after numbers like the ones you have been posting. PRs are welcome.One thing a PR cannot take: values copied out of the vendor firmware's own tuning or driver. The repository does not accept tables lifted from a camera vendor's binaries. Using the stock picture as the reference you tune towards is fine; it is the visual target, not a source.
I'll leave this open as the place for that tuning, retitled to match what it is now.
[-]hi3516cv200 + OV2710 over MIPI: test pattern clean, live scene carries ~60% relative noise at any exposure and gain[/-][+]hi3516cv200 + OV2710: no tuned IQ profile (ov2710.ini is an ov9750 copy, default.ini is ar0130) - needs PQTools tuning[/+]