SM8550: AYN Odin 2 - expose the two back buttons as gpio-keys#3050
Open
xiaodoudou wants to merge 1 commit into
Open
SM8550: AYN Odin 2 - expose the two back buttons as gpio-keys#3050xiaodoudou wants to merge 1 commit into
xiaodoudou wants to merge 1 commit into
Conversation
Make the AYN Odin 2's M1/M2 back buttons work; on stock ROCKNIX they emit nothing. Same scheme as the AYN Odin 3 (ROCKNIX#2940): They are not on the gamepad MCU UART (rsinput) and not ADC despite AYN's Android "adckey"/keydetect.ko naming - they are plain active-low SoC TLMM GPIOs: M1 = GPIO 57 -> BTN_Z, M2 = GPIO 58 -> BTN_C (TLMM base 301 + offsets 57/58, RE'd from AYN's keydetect.ko gpio_request 358/359 and confirmed on hardware by watching the TLMM GPIO_IN registers while pressing the buttons). Mirror the Odin 3 integration on SM8550: - add a gpio-keys-paddles node to the Odin 2 dts - source it in the AYN composite device config - route BTN_Z/BTN_C to Left/RightPaddle2 in ayn_mcu.yaml and switch the target to ds5-edge so the buttons are emitted as the DualSense Edge's real back-lever buttons (hid-playstation Edge support is already in the shared patches/mainline/0006) Only the base Odin 2 wiring was verified on hardware; the Odin 2 Mini/Portal very likely share it but were not available for testing.
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
gpio-keys-paddlesnode in the Odin 2 dts so they report buttons.rsinput) and not ADC despite AYN's Androidadckey/keydetect.konaming — they are plain active-low SoC TLMM GPIOs: M1 = GPIO 57 →BTN_Z, M2 = GPIO 58 →BTN_C(TLMM base 301 + offsets 57/58, RE'd from AYN'skeydetect.kogpio_request(358/359)and confirmed on hardware by watching the TLMMGPIO_INregisters while pressing the buttons).02-ayn-controller.yaml, routeBTN_Z/BTN_Cto Left/RightPaddle2 inayn_mcu.yaml, and switch the target tods5-edgeso the buttons are emitted as the DualSense Edge's real back-lever buttons (hid-playstation Edge support frompatches/mainline/0006already applies to SM8550 kernels).Testing
next20260701: an equivalent runtime GPIO driver for pins 57/58 produces clean press/release (evtest) with no chatter, and the events reach the virtual controller through InputPlumber's AYN composite.qcs8550-ayn-odin2.dtbbuilds; decompiled blob contains the node). I could not build a full image — happy to flash a CI artifact on my Odin 2 and report back.Additional Context
<&tlmm 57>,<&tlmm 58>), input + pull-up, 15ms debounce.ds5-edgetarget / Paddle2 changes are in the shared SM8550 AYN files also covering Odin 2 Mini / Odin 2 Portal / Retroid Pocket 6 — cosmetic for devices without the buttons (presents as an Edge with unused levers), same situation as SM8750. Happy to split per-device if preferred.AI Usage
Did you use AI tools to help write this code? PARTIALLY — reverse-engineering and patch authoring assisted by AI; hardware findings verified on-device.