Add TP-Link Kasa KC110 (HI3518EV200 + OV2735)#99
Open
moontwister wants to merge 1 commit into
Open
Conversation
New device variant: hi3518ev200_ultimate_tplink-kasa-kc110.
Contents:
- kc110-board-support package: PTZ binary (mmap'd PL061), gpio-motors
shim for the openipc web GUI, IR control script, and a boot-time
pinmux init that writes 0x1 to the chip7/chip8 pads (0x200f00e8/ec/
f0/fc/100/104). The OpenIPC kernel pinctrl driver does not auto-set
these for the KC110's pan motor / IR-cut / IR-LED pads — the vendor
firmware writes them explicitly in hn_config.sh. Without this,
PL061 GPIODATA writes succeed silently but the pads never drive
the ULN2803 / solenoid / LED.
- Device overlay:
* etc/sensors/ov2735_i2c_1080p.ini — input_mode=0 (MIPI), 1-lane
(was input_mode=4 / 4-lane in upstream cv200 osdrv, which is
wrong for OV2735).
* usr/bin/load_hisilicon — adds an "ov2735" case that mirrors
ov2710_mipi (same MIPI pinmux + clock).
* usr/share/openipc/customizer.sh — first-boot configuration:
RTL8188FU wlandev, sensor config path, IR-cut pin 64, backlight
pin 63, lightMonitor true (AE recovery after IR-cut toggle).
- README.md row.
Hardware notes:
- SoC: Hi3518EV200; Sensor: OV2735 (MIPI 1-lane, RAW10);
Wi-Fi: RTL8188FU (USB); Flash: W25Q128 16 MB NOR.
- PTZ: 4-phase unipolar steppers via ULN2803 darlington array.
Pan = vendor base-10 GPIO 81/74/73/72 = OpenIPC PL061 65/60/59/58;
tilt = 0/1/2/44 = 0/1/2/36 (vendor's "44" is bank 4 pin 4 — i.e.
pin 36 in OpenIPC's PL061 numbering, NOT 44).
- IR-cut filter: GPIO 64 (vendor 80) active-low; IR-LED: GPIO 63
(vendor 77).
Status: PTZ + GPIO + IR fully functional. Video pipeline currently
needs an LD_PRELOAD shim around HI_MIPI_SET_DEV_ATTR because upstream
majestic builds combo_dev_attr_t with enIntfMode=DC / raw_data_type=0
for MIPI sensors that need RAW10. The shim is downstream-only pending
a real fix to majestic upstream; this PR delivers the rest of the
KC110 board support and will produce a fully-functional camera once
the majestic fix lands.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new device variant for the TP-Link Kasa KC110 pan-tilt IP camera.
Re-files OpenIPC/firmware#2151 here per @widgetii's review, which correctly pointed out that single-model board packages belong in
builder(per-board defconfigs, no impact on the firmware-repo CI matrix, noBR2_PACKAGE_GPIO_MOTORSpath collisions).Hardware
GPIO map (verified on hardware, OpenIPC PL061 numbering):
What's in this PR
New device:
devices/hi3518ev200_ultimate_tplink-kasa-kc110/BR2_PACKAGE_KC110_BOARD_SUPPORT=yandBR2_PACKAGE_RTL8188FU_OPENIPC=y(noBR2_PACKAGE_GPIO_MOTORS— replaced by our package)..ini/libsns_*.so(keeps OV2735).etc/sensors/ov2735_i2c_1080p.ini—input_mode = 0(MIPI; upstream cv200 osdrv hasinput_mode = 4which is wrong for OV2735), 1-lane.usr/bin/load_hisilicon— addsov2735case that mirrorsov2710_mipi(same MIPI pinmux + clock; sensor differentiation in libsns).usr/share/openipc/customizer.sh— sets RTL8188FUwlandev, sensor config path, IR-cut pin 64, backlight pin 63,lightMonitor: true(for AE recovery after IR-cut toggle in daylight).New shared package:
package/kc110-board-support/ptz— C binary, mmap'd PL061 GPIODATA pages, full-step drive with phase continuity, state persisted to/etc/ptz_state. CLI:ptz pan ±N,ptz tilt ±N,ptz home,ptz ir on|off,ptz daynight,ptz status.gpio-motors— small shell shim that forwards web-GUI calls (gpio-motors X Y N) toptz. Drop-in replacement for the upstreamBR2_PACKAGE_GPIO_MOTORSbinary, which uses sysfs + base-10 pin numbers that don't match this hardware.ir-control.sh— convenience wrapper for IR-LED + IR-cut.S94pinmux-pan-ir— boot-time pinmux init. Writes0x1to pinmux registers0x200f00e8/ec/f0/fc/100/104(pads 58-64 in chip7/8 region). The OpenIPC kernel pinctrl driver doesn't auto-set these for KC110's pan motor / IR-cut / IR-LED pads — vendor firmware writes them explicitly inhn_config.sh. Without this fix, PL061GPIODATAwrites succeed silently but the pads never drive the ULN2803 / solenoid / LED, which looks indistinguishable from a hardware fault.Status
HI_MIPI_SET_DEV_ATTRThe shim works around upstream
majesticbuildingcombo_dev_attr_twithenIntfMode=DCandraw_data_type=0for MIPI sensors that need RAW10. The shim is intentionally not included in this PR per the review feedback on #2151 that LD_PRELOAD wrappers don't belong in the OpenIPC tree. The proper fix lives inmajestic; once landed upstream, this builder image produces a fully-functional KC110 binary with no further changes.Test plan
motor.cgipress-and-hold drivesptzviagpio-motorsshim.fw_setenv wlandev rtl8188fu-generic.0x27 / 0x35reads back correctly./proc/driver/hi_mipishows LaneNum=2 RAW10 MIPI, mean RGB ~122/129/141 (proper exposure), 10 fps H.264 1080p stable.cc @widgetii — re-targeted at builder per your review on OpenIPC/firmware#2151. Happy to address review feedback.
🤖 Generated with Claude Code