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
@@ -60,6 +60,7 @@ jobs:
|
||||
- gk7202v300_lite_cootli_camv0103
|
||||
- gk7202v300_lite_ipg-g3-wr
|
||||
- gk7202v300_lite_xg521
|
||||
- gk7205v200_lite_cpplus-cp-unc-ta21l2c
|
||||
- gk7205v200_lite_tiandy-tc-c321n
|
||||
- gk7205v200_lite_vixand-ipc-1
|
||||
- gk7205v200_lite_vixand-iph-5-4g
|
||||
|
||||
@@ -28,6 +28,7 @@ CMCC HDC-51 A5-V12 T21N SC2235 RTL8189FTV_SDIO NOR_16M done
|
||||
CMCC HDC-51 A6-V10 T31L JXF37 RTL8188FU_USB NOR_16M done
|
||||
CMCC HDC-51 A6-V11 T31L SC2332 RTL8188FU_USB NOR_16M done
|
||||
Cootli CAMV0103 GK7202V300 SC223A SSV6355_USB NOR_8M in progress
|
||||
CP Plus CP-UNC-TA21L2C GK7205V200 SC223A - NOR_16M video-ok, ir-cut-no, audio-no
|
||||
Emax Wyvern Link SSC338Q IMX415 NOR_16M done
|
||||
Foscam X5 SSC337DE GC4653 RTL8188FU_USB NOR_16M done
|
||||
G.Craftsman GCA50 T31ZX GC4653 - NOR_16M done
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
![OpenIPC logo][logo]
|
||||
|
||||
## OpenIPC Builder
|
||||
_Experimental system for building OpenIPC firmware for known devices_
|
||||
|
||||
|
||||
### Release notes for the device
|
||||
|
||||
**CP Plus CP-UNC-TA21L2C** — Dahua-OEM 2 MP full-colour bullet/turret camera.
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| SoC | Goke **gk7205v200** (lite), ARM Cortex-A7 |
|
||||
| Sensor | SmartSens **SC223A** (chip-id `0xcb3e`), 2-lane MIPI, 1080p30 |
|
||||
| Flash | 16 MiB SPI-NOR (XM25QH128); built with the standard 8 MiB layout |
|
||||
| Wi-Fi | none (wired-only) |
|
||||
| Audio | present on the hardware; not wired up in this profile yet |
|
||||
|
||||
#### Board specifics
|
||||
The SC223A on this board is on the SoC's **hardware I2C0**, routed to the
|
||||
**VI-RAW** pads (`0x112c0060/0x64`, func2) instead of the default mipi-sensor
|
||||
pads (`0x112c0030/0x34`, func1) that the SDK `board=demo` bring-up probes. The
|
||||
sensor also needs a 27 MHz MCLK (`0x120100f0 = 0x19`, div6); the SDK default
|
||||
`0x11` (div4) leaves it unresponsive. Both are handled in
|
||||
`general/overlay/etc/init.d/S71devmem`, which runs after `S70vendor`
|
||||
(`load_goke`) and before `S95majestic`. No kernel module is required — the
|
||||
stock `open_sensor_i2c` reaches the sensor over `/dev/i2c-0` once the pads are
|
||||
muxed. Sensor reset/enable is `GPIO8_7` (`SENSOR_RSTN`, func2).
|
||||
|
||||
Verified on hardware: chip-id `0xcb3e` over HW I2C0, MIPI PHY lock at
|
||||
1920x1080 with zero error counters, majestic streams correct colour 1080p.
|
||||
|
||||
#### TODO
|
||||
- Characterise and wire up the IR-cut / night-mode GPIOs.
|
||||
- Enable audio.
|
||||
|
||||
|
||||
[logo]: https://openipc.org/assets/openipc-logo-black.svg
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
# Architecture
|
||||
BR2_arm=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
|
||||
# Toolchain
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-musleabi"
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_KERNEL).tar.gz"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/gk7205v200.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
|
||||
# Filesystem
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL)/package/busybox/busybox.config"
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_ZLIB=y
|
||||
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
|
||||
BR2_PACKAGE_MOSQUITTO=y
|
||||
# BR2_PACKAGE_MOSQUITTO_BROKER is not set
|
||||
BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y
|
||||
BR2_PACKAGE_WIREGUARD_TOOLS=y
|
||||
BR2_TARGET_ROOTFS_CPIO=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
|
||||
# OpenIPC
|
||||
BR2_OPENIPC_SOC_VENDOR="goke"
|
||||
BR2_OPENIPC_SOC_MODEL="gk7205v200"
|
||||
BR2_OPENIPC_SOC_FAMILY="gk7205v200"
|
||||
BR2_OPENIPC_VARIANT="lite"
|
||||
BR2_OPENIPC_FLASH_SIZE="8"
|
||||
|
||||
# Packages
|
||||
BR2_PACKAGE_DROPBEAR_OPENIPC=y
|
||||
BR2_PACKAGE_GOKE_OSDRV_GK7205V200=y
|
||||
BR2_PACKAGE_HISILICON_OPENSDK=y
|
||||
BR2_PACKAGE_IPCTOOL=y
|
||||
BR2_PACKAGE_JSONFILTER=y
|
||||
BR2_PACKAGE_LIBCURL_OPENIPC=y
|
||||
BR2_PACKAGE_LIBCURL_OPENIPC_CURL=y
|
||||
# BR2_PACKAGE_LIBCURL_OPENIPC_PROXY_SUPPORT is not set
|
||||
# BR2_PACKAGE_LIBCURL_OPENIPC_COOKIES_SUPPORT is not set
|
||||
# BR2_PACKAGE_LIBCURL_OPENIPC_EXTRA_PROTOCOLS_FEATURES is not set
|
||||
BR2_PACKAGE_LIBEVENT_OPENIPC=y
|
||||
BR2_PACKAGE_LIBOGG_OPENIPC=y
|
||||
BR2_PACKAGE_MAJESTIC_FONTS=y
|
||||
BR2_PACKAGE_MAJESTIC_WEBUI=y
|
||||
BR2_PACKAGE_MAJESTIC=y
|
||||
BR2_PACKAGE_MBEDTLS_OPENIPC=y
|
||||
BR2_PACKAGE_OPUS_OPENIPC=y
|
||||
BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
|
||||
BR2_PACKAGE_VTUND_OPENIPC=y
|
||||
BR2_PACKAGE_YAML_CLI=y
|
||||
+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