Skip to content

Add ssc337de_lite_zte-k543 device profile (ZTE K543, SC401AI, MT7601U Wi-Fi) - #152

Open
tagbug wants to merge 1 commit into
OpenIPC:masterfrom
tagbug:device/ssc337de_lite_zte-k543
Open

Add ssc337de_lite_zte-k543 device profile (ZTE K543, SC401AI, MT7601U Wi-Fi)#152
tagbug wants to merge 1 commit into
OpenIPC:masterfrom
tagbug:device/ssc337de_lite_zte-k543

Conversation

@tagbug

@tagbug tagbug commented Sep 9, 2026

Copy link
Copy Markdown

Adds a device profile for the ZTE K543 PTZ camera — SigmaStar SSC337DE (Infinity6B0), SC401AI sensor, 16 MiB NOR, and MT7601U USB Wi-Fi.

The board needs a few device-specific settings beyond the standard SSC337DE lite configuration:

  • MT7601U initialization requires a GPIO 14 toggle before loading mt7601sta; the device-specific wireless overlay implements this and is tracked in firmware-drift.json.
  • Pan/tilt motors use GPIO 0-7 via gpio-motors.
  • IR-cut uses GPIO 79/78, with the IR backlight on GPIO 52.
  • Speaker enable is GPIO 15, active low.
  • The profile selects SC401AI explicitly and excludes unused sensor/NFS kernel modules.

Tested on a physical ZTE K543: the firmware builds, flashes and boots successfully; SC401AI video, MT7601U Wi-Fi, IR-cut/night mode, speaker output, and both PTZ axes are working.

All repository checks pass (ci-matrix, check-firmware-drift --self-test, lint-cli-paths, lint-workflow-shell, and shell syntax validation).

Copilot AI lite review requested due to automatic review settings September 9, 2026 16:53
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add ZTE K543 SSC337DE Lite device profile

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Adds a complete SSC337DE Lite profile for the ZTE K543 camera.
• Configures SC401AI, MT7601U, PTZ, night mode, and active-low speaker hardware.
• Trims unused modules and documents tested 16 MiB NOR support.
Diagram

graph TD
  A["ZTE K543 Profile"] --> B["Build Config"] --> C["Firmware Image"]
  A --> D["Module Excludes"] --> C
  A --> E["Device Customizer"] --> C
  A --> F["Wi-Fi Overlay"] --> C
  C --> G["GPIO Peripherals"]
  C --> H["MT7601U Driver"]
Loading
High-Level Assessment

The device-local profile is the appropriate approach because the GPIO assignments and MT7601U reset sequence are specific to the ZTE K543. A shared wireless overlay was considered, but localizing the quirk avoids affecting other boards while firmware-drift tracking preserves synchronization with the shared firmware source.

Files changed (6) +165 / -0

Enhancement (1) +16 / -0
usbInitialize the K543 MT7601U adapter +16/-0

Initialize the K543 MT7601U adapter

• Adds a device-specific wireless handler that toggles GPIO 14 before loading the mt7601sta kernel module.

devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb

Documentation (1) +1 / -0
README.mdList ZTE K543 hardware support +1/-0

List ZTE K543 hardware support

• Adds the completed ZTE K543 profile to the device matrix with its SSC337DE SoC, SC401AI sensor, MT7601U adapter, and 16 MiB NOR flash.

README.md

Other (4) +148 / -0
firmware-drift.jsonTrack the K543 wireless overlay drift +7/-0

Track the K543 wireless overlay drift

• Registers the device-local wireless script against its shared firmware counterpart and records the reconciled blob revision.

.github/firmware-drift.json

ssc337de_lite_zte-k543_defconfigDefine the K543 Buildroot firmware profile +71/-0

Define the K543 Buildroot firmware profile

• Configures the SSC337DE Infinity6B0 platform, SC401AI sensor, 16 MiB Lite image, and required camera packages. Enables MT7601U wireless support and GPIO motor control.

devices/ssc337de_lite_zte-k543/br-ext-chip-sigmastar/configs/ssc337de_lite_zte-k543_defconfig

customizer.shConfigure K543 camera peripherals +46/-0

Configure K543 camera peripherals

• Sets the firmware upgrade target and Majestic video, night-mode, audio, and active-low speaker settings. Configures the custom wireless identifier and GPIO 0–7 PTZ motor mapping.

devices/ssc337de_lite_zte-k543/general/overlay/usr/share/openipc/customizer.sh

ssc337de_lite.listRemove unused K543 kernel modules +24/-0

Remove unused K543 kernel modules

• Excludes unused SigmaStar sensor drivers while retaining the selected SC401AI module. Also removes NFS, lock manager, and SunRPC modules from the constrained image.

devices/ssc337de_lite_zte-k543/general/scripts/excludes/ssc337de_lite.list

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Wireless setup failures report success 🐞 Bug ☼ Reliability
Description
set_gpio loses each GPIO command's status after sleep, and the matching wireless branch follows
modprobe mt7601sta with an unconditional exit 0. If either GPIO 14 transition or module
insertion fails, the selected startup path still reports success even though the wireless driver was
not initialized correctly.
Code

devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb[R12-13]

+	modprobe mt7601sta
+	exit 0
Evidence
The customizer selects this exact wireless profile, whose handler performs two GPIO transitions and
loads mt7601sta; however, sleep replaces the GPIO command status and the explicit success exit
replaces the module-loading status. The defconfig confirms this path is intended to initialize the
selected MT7601U package.

devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb[3-14]
devices/ssc337de_lite_zte-k543/general/overlay/usr/share/openipc/customizer.sh[29-33]
devices/ssc337de_lite_zte-k543/br-ext-chip-sigmastar/configs/ssc337de_lite_zte-k543_defconfig[63-66]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The device-specific wireless initializer discards failures from both GPIO operations and `modprobe`, ultimately returning success after an unsuccessful initialization.

## Issue Context
Preserve the required delays while capturing and propagating GPIO command failures. Return the actual `modprobe` status instead of unconditionally exiting zero; using an explicit conditional or `exec modprobe mt7601sta` is appropriate.

## Fix Focus Areas
- devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb[3-13]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
Review mode: ⚖️ Balanced: This adds a new firmware device profile with boot configuration, wireless initialization, GPIO/PTZ/audio runtime settings, and module exclusions, creating several behaviorally significant paths that warrant a complete single-pass review.

Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are a couple of correctness/consistency issues to address (notably a future “reconciled” date and excludes-list convention/size-trimming alignment).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new OpenIPC builder device overlay for the ZTE K543 PTZ camera (SigmaStar SSC337DE / SC401AI / MT7601U, 16 MiB NOR), providing per-device Buildroot defconfig, first-boot customizer settings, wireless init override, and a device-specific excludes list.

Changes:

  • Add ssc337de_lite_zte-k543 device directory with defconfig, customizer, wireless init script, and rootfs exclude list.
  • Register the device in the README device table.
  • Record the device’s etc/wireless/usb shadow in .github/firmware-drift.json.
File summaries
File Description
README.md Adds ZTE K543 to the supported devices table.
devices/ssc337de_lite_zte-k543/general/scripts/excludes/ssc337de_lite.list New device-specific rootfs trimming list (sensor/NFS modules).
devices/ssc337de_lite_zte-k543/general/overlay/usr/share/openipc/customizer.sh First-boot runtime configuration (Majestic, PTZ GPIOs, audio, upgrade URL).
devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb Device-specific MT7601U init (GPIO 14 toggle + modprobe).
devices/ssc337de_lite_zte-k543/br-ext-chip-sigmastar/configs/ssc337de_lite_zte-k543_defconfig Buildroot/OpenIPC configuration for SSC337DE lite + SC401AI + MT7601U + gpio-motors.
.github/firmware-drift.json Adds a shadow entry for the device-local wireless script.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tagbug
tagbug force-pushed the device/ssc337de_lite_zte-k543 branch from 349aeb7 to 3dbe169 Compare September 9, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants