devices: add CP Plus CP-UNC-TA21L2C (gk7205v200_lite, SC223A) (#106)
Dahua-OEM 2 MP camera. The SC223A is on hardware I2C0 routed to the VI-RAW pads (0x112c0060/0x64 func2) rather than the default mipi-sensor pads (0x30/0x34 func1) the SDK probes, and needs a 27 MHz MCLK (0x120100f0=0x19; SDK default 0x11/div4 leaves it unresponsive). S71devmem re-muxes the pads, selects the SENSOR_RSTN reset (GPIO8_7 func2) and fixes MCLK after S70vendor/load_goke; the stock open_sensor_i2c then reaches the sensor over /dev/i2c-0. No kernel module needed. Verified on hardware: chip-id 0xcb3e over HW I2C0, MIPI lock 1920x1080 zero errors, majestic streams correct colour 1080p. Co-authored-by: build <build@local> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
build
Claude Opus 4.8
parent
d6a1c32761
commit
edb7251bf3
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# CP Plus CP-UNC-TA21L2C (Goke gk7205v200, SmartSens SC223A) board pinmux.
|
||||
#
|
||||
# Runs after S70vendor (load_goke), overriding the SDK board=demo defaults
|
||||
# for this board's actual wiring:
|
||||
# - the SC223A i2c is on hardware I2C0 routed to the VI-RAW pads
|
||||
# (0x60/0x64 func2), not the default mipi-sensor pads (0x30/0x34 func1);
|
||||
# - sensor reset/enable is GPIO8_7 (SENSOR_RSTN, func2);
|
||||
# - the SC223A needs a 27 MHz MCLK (div6 = 0x19); the SDK default 0x11
|
||||
# (div4) is wrong, so the sensor never ACKs without this.
|
||||
# (load_goke already muxes SENSOR_CLK 0x112c0028 to func1, so it is left as-is.)
|
||||
#
|
||||
case "$1" in
|
||||
start)
|
||||
devmem 0x112c0030 32 0x0 # default I2C0 SDA -> GPIO (de-mux)
|
||||
devmem 0x112c0034 32 0x0 # default I2C0 SCL -> GPIO (de-mux)
|
||||
devmem 0x112c0060 32 0x2 # GPIO7_2 -> I2C0_SDA (func2, VI-RAW)
|
||||
devmem 0x112c0064 32 0x2 # GPIO7_3 -> I2C0_SCL (func2, VI-RAW)
|
||||
devmem 0x112c0048 32 0x2 # GPIO8_7 -> SENSOR_RSTN (func2)
|
||||
devmem 0x120100f0 32 0x19 # sensor MCLK = 27 MHz (div6)
|
||||
;;
|
||||
|
||||
stop)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Perform basic settings on a known IP camera
|
||||
#
|
||||
#
|
||||
# Set sensor
|
||||
#
|
||||
fw_setenv sensor sc223a
|
||||
#
|
||||
# Set custom upgrade url
|
||||
#
|
||||
fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/gk7205v200_lite_cpplus-cp-unc-ta21l2c-nor.tgz'
|
||||
#
|
||||
#
|
||||
# Set custom majestic settings
|
||||
#
|
||||
cli -s .system.maxFps 30
|
||||
cli -s .video0.fps 30
|
||||
cli -s .video0.codec h265
|
||||
cli -s .osd.enabled true
|
||||
cli -s .osd.template "OpenIPC | %F %T %Z"
|
||||
#
|
||||
# Night mode / IR-cut and audio: the GPIO pins for the IR-cut filter and
|
||||
# IR LEDs on this board are not characterised yet, so they are left at
|
||||
# defaults (TODO).
|
||||
#
|
||||
#
|
||||
# This device is wired-only (no wlan).
|
||||
#
|
||||
adduser viewer -s /bin/false -D -H
|
||||
echo viewer:123456 | chpasswd
|
||||
#
|
||||
exit 0
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
/etc/sensors/60fps/720p_imx307_i2c_2l.ini
|
||||
/etc/sensors/WDR/5M_imx335.ini
|
||||
/etc/sensors/WDR/imx335_i2c_4M.ini
|
||||
/etc/sensors/4l_sc223a_i2c_1080p.ini
|
||||
/etc/sensors/5M_imx335.ini
|
||||
/etc/sensors/bt656_720p.ini
|
||||
/etc/sensors/gc1054_i2c_720p.ini
|
||||
/etc/sensors/gc2053_i2c_1080p.ini
|
||||
/etc/sensors/gc4023_i2c_4M.ini
|
||||
/etc/sensors/gc4653_i2c_4M.ini
|
||||
/etc/sensors/gc5603_i2c_5M.ini
|
||||
/etc/sensors/imx307_i2c_2l_1080p.ini
|
||||
/etc/sensors/imx335_i2c_4M.ini
|
||||
/etc/sensors/jxf23_i2c_1080p.ini
|
||||
/etc/sensors/jxf23_i2c_dc_1080p.ini
|
||||
/etc/sensors/sc200ai_i2c_1080p.ini
|
||||
/etc/sensors/sc2232h_i2c_1080p.ini
|
||||
/etc/sensors/sc2239_i2c_1080p.ini
|
||||
/etc/sensors/sc2335_i2c_1080p.ini
|
||||
/etc/sensors/smtsec_imx307_i2c_4l_1080p.ini
|
||||
/etc/sensors/jxh63_i2c_720p.ini
|
||||
#
|
||||
/etc/sensors/iq/imx335.ini
|
||||
/etc/sensors/iq/sc2232.ini
|
||||
#
|
||||
/usr/lib/sensors/libsns_bt656.so
|
||||
/usr/lib/sensors/libsns_f23.so
|
||||
/usr/lib/sensors/libsns_f37.so
|
||||
/usr/lib/sensors/libsns_gc2053.so
|
||||
/usr/lib/sensors/libsns_gc4653_2l.so
|
||||
/usr/lib/sensors/libsns_imx307.so
|
||||
/usr/lib/sensors/libsns_imx307_2l.so
|
||||
/usr/lib/sensors/libsns_imx335.so
|
||||
/usr/lib/sensors/libsns_sc200ai.so
|
||||
/usr/lib/sensors/libsns_sc2239.so
|
||||
/usr/lib/sensors/libsns_sc223a_4l.so
|
||||
/usr/lib/sensors/libsns_sc2335.so
|
||||
/usr/lib/sensors/libsns_sc2232h.so
|
||||
/usr/lib/sensors/libsns_sc3235.so
|
||||
/usr/lib/sensors/libsns_sc3335.so
|
||||
/usr/lib/sensors/libsns_h63.so
|
||||
#
|
||||
/lib/modules/4.9.37/kernel/drivers/i2c/busses/i2c-tiny-usb.ko
|
||||
/lib/modules/4.9.37/kernel/drivers/scsi/scsi_mod.ko
|
||||
/lib/modules/4.9.37/kernel/drivers/scsi/scsi_transport_fc.ko
|
||||
/lib/modules/4.9.37/kernel/drivers/scsi/sd_mod.ko
|
||||
/lib/modules/4.9.37/kernel/fs/f2fs/f2fs.ko
|
||||
Reference in New Issue
Block a user