Skip to content

device: add AYANEO Pocket S Mini support - #3177

Merged
loki666 merged 3 commits into
ROCKNIX:nextfrom
mydanyi:agent/ayaneo-pocket-s-mini-support
Aug 22, 2026
Merged

device: add AYANEO Pocket S Mini support#3177
loki666 merged 3 commits into
ROCKNIX:nextfrom
mydanyi:agent/ayaneo-pocket-s-mini-support

Conversation

@mydanyi

@mydanyi mydanyi commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Add ROCKNIX support for the AYANEO Pocket S Mini (SM8550).

This includes:

  • a device tree for the 1280x960 AR16 panel, CST66xx touchscreen, panel/backlight power rails, and the two GPIO buttons;
  • AR16 panel and Hynitron CST66xx touchscreen drivers;
  • InputPlumber support for the built-in controller, AYANEO/Guide button, and quick-access button;
  • reuse of the existing Pocket S 2K device quirks;
  • an opt-in ath12k device-tree quirk for Wi-Fi scan failures after 11d offload;
  • 180-degree Steam/Gamescope display handling and matching touch calibration.

The Pocket S Mini uses the swapped AYANEO MCU capability map to normalize its raw face-button events to the Xbox-style prompts shown by ROCKNIX.

Testing

  • Built the SM8550 Linux package and qcs8550-ayaneo-pocketsmini.dtb with the ROCKNIX Docker build environment.
  • After the review update, reapplied the SM8550 kernel patch series, rebuilt ath12k/mac.o and the Pocket S Mini DTB, and confirmed the new property in the final DTB.
  • Compiled the AR16 panel driver, CST66xx touchscreen driver, ath12k module, kernel image, modules, and perf.
  • Parsed the InputPlumber YAML and config.xml, checked the Steam launcher with bash -n, and ran Git whitespace checks.
  • Booted ROCKNIX on a retail Pocket S Mini from both SD card and internal storage.
  • Tested the display, backlight, touchscreen, built-in controls, Guide and quick-access buttons, force feedback, audio, Steam/Gamescope, and Wi-Fi reconnect/scan behavior.
  • Deployed the final model-gated InputPlumber profile and verified A/B/X/Y against the on-screen prompts in both ROCKNIX and Steam.

Known Limitations

  • The LC and RC buttons are not mapped yet and will be handled in follow-up work.

Additional Context

  • The CST66xx is enumerated at I2C address 0x5a; its runtime report protocol uses address 0x58, matching the stock device behavior.
  • The 11d workaround is opt-in through qcom,skip-11d-scan-offload; only the Pocket S Mini DTS enables it.
  • The Steam touch rule is limited to the Pocket S Mini, the CST66xx input device, and the 180-degree orientation, and is removed when the Gamescope session exits.

AI Usage

Did you use AI tools to help write this code? YES

@mydanyi
mydanyi force-pushed the agent/ayaneo-pocket-s-mini-support branch from e26d6a1 to ed9c9bf Compare August 13, 2026 17:58
@mydanyi
mydanyi marked this pull request as ready for review August 13, 2026 18:06
@xiaodoudou

Copy link
Copy Markdown
Contributor

@mydanyi you can try on your local build my PR #3189 which should resolve the issue you did encounter and should patch the 11d feature for the AYANEO too.

@mydanyi
mydanyi force-pushed the agent/ayaneo-pocket-s-mini-support branch from ed9c9bf to 7423047 Compare August 16, 2026 14:27
@mydanyi

mydanyi commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Updated as requested.

The workaround is now selected by the qcom,skip-11d-scan-offload property on the Pocket S Mini Wi-Fi node. The ath12k code no longer checks the root model string.

I built the updated ath12k module and DTB from commit 7423047 and tested them on a retail AYANEO Pocket S Mini:

  • cold boot succeeded, the DT property was present, and ath12k logged skipping 11d scan offload
  • connected to a 5 GHz network at 160 MHz
  • repeated scans continued to return both 2.4 GHz and 5 GHz networks
  • three disconnect/reconnect cycles reconnected on 5 GHz
  • no WMI_SCAN_EVENT_START_FAILED was observed

The device is currently running this revision.

@loki666

loki666 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

@mydanyi resolve conflicts please

@mydanyi
mydanyi force-pushed the agent/ayaneo-pocket-s-mini-support branch from 7423047 to 8c20172 Compare August 20, 2026 17:38
@mydanyi

mydanyi commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@loki666 Done. I rebased the PR onto the latest next and resolved the start_steam.sh conflict. GitHub now reports the PR as mergeable.

@loki666

loki666 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@tiopex can you review the changes for start_steam.sh

@tiopex

tiopex commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

+1

@loki666
loki666 requested a review from spycat88 August 21, 2026 16:21
@mydanyi
mydanyi force-pushed the agent/ayaneo-pocket-s-mini-support branch from 2278855 to 1b04b33 Compare August 21, 2026 20:53
@mydanyi

mydanyi commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@loki666 @spycat88 Could you also review ROCKNIX/emulationstation-next#28 when you have a chance? It adds the Simplified Chinese localization, and the merge conflicts have now been resolved with the branch updated to the latest master. Thanks!

@loki666
loki666 added this pull request to the merge queue Aug 22, 2026
Merged via the queue into ROCKNIX:next with commit b2cfce5 Aug 22, 2026
2 checks passed
@loki666

loki666 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Thanks

loki666 added a commit to Nova-Deck/os-build that referenced this pull request Aug 22, 2026
HW-FOUND on an AYANEO Pocket ACE, 2026-08-22. The controller MCU has two
modes -- Xbox, where it enumerates as `045e:028e` "Microsoft X-Box 360 pad",
and AYANEO, where it enumerates as `4001:0428` "AYANEO Controller". A UART
frame switches them and the switch is not reliable, so which one a unit
presents is not ours to decide. Our composite device listed only the first,
so on a unit in AYANEO mode the actual pad was claimed by nothing: the
composite matched only `event4` (the 1c4f:0002 MCU), and the face buttons
never reached the capability map or the virtual Xbox pad.

NOTHING IN THE SYSTEM NOTICED. Steam still worked, because Steam Input reads
raw evdev with its own database -- the only visible trace was the board
presenting two Steam virtual pads instead of one. What does not survive it is
anything going through SDL's game-controller layer: there is no
gamecontrollerdb entry for 4001:0428 (checked against 2059), so SDL does not
consider it a controller at all. Any SDL client -- the internal installer's
consent screen is the first one we ship -- finds no pad on such a unit.

Same shape as ROCKNIX/distribution#3177, which added this row upstream for
the Pocket S Mini. Both modes carry the SAME capability map, because both
emit the same raw codes. Deliberately NOT added to the Xbox-layout config: no
board of that layout has been observed in AYANEO mode, upstream did not add
it either, and the map it would need is unverified.

VERIFIED ON THE DEVICE, live: config copied into /etc (a writable overlay) +
`systemctl restart inputplumber` -> "adding source device evdev://event5 to
existing composite device", Steam's duplicate virtual pad disappeared, and
the virtual pad then reported, pressing by position, bottom=BTN_SOUTH
right=BTN_EAST left=BTN_NORTH top=BTN_WEST -- byte-identical to a Pocket S2.

That also settles a question the fleet had never answered: the MCUs emit by
LABEL (the ACE's bottom button, printed B, reports BTN_EAST) and the
capability map exists to turn that back into position. Once both modes are
claimed, a Nintendo-layout board and an Xbox-layout board produce the same
positional output at the layer SDL reads.
@mydanyi

mydanyi commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@loki666 @spycat88 Follow-up font support is now in #3235. It installs Noto Sans CJK SC system-wide for Steam and uses the same font for the Chinese EmulationStation UI. This complements the Pocket S Mini support here and ROCKNIX/emulationstation-next#28.

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.

5 participants