Skip to content

Hi, need help with OS04D10 sensor on SSC377D (infinity6c) + OpenIPC. #1995

@byfaruk

Description

@byfaruk

OS04D10 sensor on SSC377D (infinity6c) - Pink/magenta color cast, ISP color pipeline issue

Hardware

  • SoC: SigmaStar SSC377D (infinity6c family)
  • Sensor: OmniVision OS04D10 (2560x1440 MIPI 2-lane RAW10, I2C 0x3c/0x78, A8D8 page-based)
  • Original firmware: Uniview (working correctly with proper colors)
  • Kernel: 5.10.61, OpenIPC lite build

Current Status: Partially working

  • ✅ Custom sensor driver compiles and loads
  • ✅ Sensor detected on i2c-1 @ 0x3c, chip ID 0x530444 verified
  • ✅ Video stream works, AE auto-exposure functional
  • ✅ Majestic runs, HTTP/RTSP servers OK
  • ✅ ISP shows GR_10BPP pixel format (was G1_8BPP before fixing data_mode=0)
  • Strong pink/magenta color cast on all images
  • ❌ Saturation=0 gives perfectly clean B&W (proves sensor data is correct, ISP chroma processing is wrong)

Driver Source

Custom driver based on offset-based approach (mi.ko's struct layout mismatches OpenIPC header):

  • I2C via Linux kernel i2c_transfer (mi.ko's I2C API broken due to struct mismatch)
  • Handle offsets: data_prec=0x7C, data_mode=0x80, bayer_id=0x84, RGBIR=0x88
  • Settings that produced GR_10BPP: data_prec=1, data_mode=0, bayer_id=1, RGBIR=1
  • data_mode=4 (CUS_SEN_10TO12_9098) produced G1_8BPP (wrong)
  • Based on gc4653 disassembly comparison

What I've Tried

Bayer pattern experiments

  • bayer_id = 0, 1, 2, 3 via module param
  • Changed via sensor mirror/flip register (page 1 reg 0x12)
  • Direct ISP register writes: 0x1f26040c, 0x1f2a7004, 0x1f2a7e04
  • Result: Always pink, bayer doesn't affect output

IQ files tested

  • /etc/sensors/os04a10.bin (139KB, OpenIPC v2) → pink
  • /etc/sensors/gc4653.bin → pink
  • /etc/sensors/imx335.bin → worse
  • /etc/sensors/imx415.bin → pink
  • Original Uniview iqfile0.bin (38KB, v1 format) → still pink (IQ version mismatch warning)
  • No IQ file → still pink
  • Conclusion: Pink is NOT from IQ file

ISP-level attempts

  • HalIspSenBayerFmt() call - it's a STUB (mov r0, #0; bx lr) in this mi.ko
  • DrvIspSetSegBayerFmt() - also STUB
  • mi.ko handle modification at offset 0x7C/0x80/0x84 - writes succeed but ISP ignores
  • devmem ISP register writes - no effect on color

Cross-cam backup approach

  • Spare unit available (same series, same SoC family)
  • Extracted Uniview mi_common.ko, mi_sys.ko, mi_sensor.ko, mi_isp.ko, mi_vif.ko via U-Boot + network boot
  • Kernel vermagic mismatch: Uniview 5.10.117 vs OpenIPC 5.10.61
  • Patched vermagic via binary replace → modules load but OpenIPC sensor driver incompatible
  • Result: color bar test pattern (no sensor init)

mi.ko Disassembly Findings

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions