goke: add GK7205V510 PTZ (GPIO pan/tilt stepper) support + gpiostep-openipc#2199
Conversation
…penipc GK7205V510 PTZ cameras (e.g. NC-IPTC2200_DL) drive their pan/tilt via two 4-wire GPIO stepper coils. The SoC is firmware-compatible with the existing gk7205v500 family (same kernel, osdrv, toolchain), so this adds a thin gk7205v510_lite alias defconfig and wires up two motor-driver options that share one pin map: pan (roll) = GPIO 3,4,72,73 tilt (pitch)= GPIO 69,59,58,57 (from the vendor /proc/devcfg motor block) Track A - userspace gpio-motors (sysfs bit-bang, already proven on GK7205V200): enable BR2_PACKAGE_GPIO_MOTORS on gk7205v500/gk7205v510_lite and document the device pin map: fw_setenv gpio_motors '3 4 72 73 69 59 58 57' Track B - new gpiostep-openipc package: an in-kernel GPIO half-step stepper driver (misc /dev/motorDev + single GPIOSTEP_MOVE ioctl) plus a gpiostep-ctl CLI. Same 8-phase half-step sequence as gpio-motors but driven from kernel context (gpio_set_value + usleep_range) for steadier timing and lower CPU. Pins default to the GK7205V510 layout and are overridable via module params. The CLI mirrors gpio-motors' "<pan> <tilt> <delay_ms>" signature so the two implementations can be compared 1:1. Builds clean for gk7205v500_lite and gk7205v510_lite; fits 8MB NOR (uImage 1852/2048KB, rootfs.squashfs 4460/5120KB). The static gpio-motors / gpiostep-ctl binaries were confirmed to run on real GK7205V510 hardware; on-gimbal motion / phase-order tuning is left to bring-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Hardware bring-up note (from probing a real GK7205V510 / NC-IPTC2200_DL)The pan/tilt pin map is confirmed from the vendor
The pan coil needs a GPIO bank that is currently disabled. GPIO 72/73 live in group 9 ( So for the pan axis to work via either driver (sysfs The tilt axis (GPIO 69,59,58,57 → chips 7/8, already enabled) works as-is. This is a kernel/DT change (openipc/linux), tracked separately from this packaging PR. On-gimbal motion + phase-order tuning to be done on OpenIPC hardware (Phase 2) — bit-banging on the live vendor firmware is not viable (it races the vendor motor stack's HW step timers and trips the 60s hardware watchdog). |
…penipc (#2199) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Adds PTZ (pan/tilt) support for Goke GK7205V510 cameras such as the NC-IPTC2200_DL, whose pan/tilt is driven by two 4-wire GPIO stepper coils (no Pelco/serial/I²C motor IC). The SoC is firmware-compatible with the existing gk7205v500 family (same kernel 4.9.37, osdrv, toolchain), so this ships a thin
gk7205v510_litealias defconfig plus two motor-driver options that share one pin map.Pin map (taken from the vendor
/proc/devcfgmotor block):3, 4, 72, 7369, 59, 58, 57Two driver tracks (share the pin map)
Track A — userspace
gpio-motors(sysfs bit-bang, already proven on GK7205V200)BR2_PACKAGE_GPIO_MOTORSongk7205v500_lite/gk7205v510_lite.gpio-motors/Readme.md:fw_setenv gpio_motors '3 4 72 73 69 59 58 57'.Track B — new
gpiostep-openipcpackage/dev/motorDev+ a singleGPIOSTEP_MOVEioctl, plus agpiostep-ctlCLI.gpio-motors, but driven from kernel context (gpio_set_value+usleep_range) for steadier timing and lower CPU.insmod gpiostep.ko pan_gpios=... tilt_gpios=...).gpio-motors'<pan> <tilt> <delay_ms>signature, so the two implementations can be A/B compared 1:1.Changes
br-ext-chip-goke/configs/gk7205v510_lite_defconfig(new, alias of v500;SOC_MODEL=gk7205v510,SOC_FAMILY=gk7205v500)br-ext-chip-goke/configs/gk7205v500_lite_defconfig(+GPIO_MOTORS, +GPIOSTEP_OPENIPC)general/package/gpiostep-openipc/(new package: Config.in, .mk, src/{gpiostep.c,gpiostep.h,gpiostep-ctl.c,Kbuild}, Readme)general/package/gpio-motors/Readme.md(GK7205V510 device entry)general/package/Config.in(register new package)Testing
make BOARD=gk7205v500_liteandmake BOARD=gk7205v510_litebuild clean (exit 0).uImage 1852/2048 KB,rootfs.squashfs 4460/5120 KB.gpiostep.kolinks against the goke 4.9.37 kernel (only benign-Wmissing-attributes).gpio-motors/gpiostep-ctl(goke toolchain) confirmed to run on real GK7205V510 hardware.[0,2,1,3]coil-order fallback is documented in both Readmes).🤖 Generated with Claude Code