Skip to content

Instantly share code, notes, and snippets.

View TheGammaSqueeze's full-sized avatar

TheGammaSqueeze

View GitHub Profile
@TheGammaSqueeze
TheGammaSqueeze / mangmiairx.dts
Created December 8, 2025 21:33
Mangmi Air X - Running Kernel Device Tree dump (Android)
/dts-v1/;
/ {
#address-cells = <0x02>;
model = "Qualcomm Technologies, Inc. Panda PVT IDP";
qcom,board-id = <0x22 0x02>;
#size-cells = <0x02>;
interrupt-parent = <0x01>;
compatible = "qcom,bengal-idp", "qcom,bengal", "qcom,idp";
qcom,msm-id = <0x1a1 0x10000 0x1bc 0x10000>;
@TheGammaSqueeze
TheGammaSqueeze / RG_DS.dts
Created November 24, 2025 22:53
Anbernic RG DS - Android running kernel device tree dump
/dts-v1/;
/ {
#address-cells = <0x02>;
model = "Anbernic RG DS (rk3568)";
serial-number = "72ece2687e9c7853";
#size-cells = <0x02>;
interrupt-parent = <0x01>;
compatible = "rockchip,rk3566-rk817-tablet", "rockchip,rk3566";
@TheGammaSqueeze
TheGammaSqueeze / thor.dts
Created November 4, 2025 10:45
Ayn Thor - Running Kernel Device Tree - Android 13
This file has been truncated, but you can view the full file.
/dts-v1/;
/ {
#address-cells = <0x02>;
model = "Qualcomm Technologies, Inc. KalamaP HDK";
qcom,board-id = <0x1001f 0x00>;
#size-cells = <0x02>;
interrupt-parent = <0x01>;
compatible = "qcom,kalamap-hdk", "qcom,kalamap", "qcom,hdk";
qcom,msm-id = <0x25b 0x20000>;
@TheGammaSqueeze
TheGammaSqueeze / RetroidPad.c
Last active July 9, 2025 10:59
Retroid Pocket 4 - controller userspace driver
/*
* RetroidPad.c
*
* − Uses select() + ioctl(FIONREAD) to batch‐read all available bytes in one
* go (instead of VMIN) so that we only wake up once per MCU‐burst.
* − Adds an “idle skip” mechanism: if the button state remains unchanged for
* several consecutive packets, we skip the detailed per-packet parsing until
* a new packet arrives or a threshold is reached.
* − Performs a simple 50‐frame auto‐center calibration of both analog sticks
* at startup.
@TheGammaSqueeze
TheGammaSqueeze / RetroidPad.c
Created July 8, 2025 22:42
Retroid Pocket Classic - Userspace controller driver
/*
* RetroidPad.c
*
* − Uses select() + ioctl(FIONREAD) to batch‐read all available bytes in one
* go (instead of VMIN) so that we only wake up once per MCU‐burst.
* − Adds an “idle skip” mechanism: if the button state remains unchanged for
* several consecutive packets, we skip the detailed per-packet parsing until
* a new packet arrives or a threshold is reached.
*
* Compile (on AArch64):
@TheGammaSqueeze
TheGammaSqueeze / gist:81cead1c77746a83af676c1de4fde212
Created June 3, 2025 00:52
Retroid Pocket Classic - Running Device Tree - Android 14
/dts-v1/;
/ {
model = "Qualcomm Technologies, Inc. Ravelin IDP Overlay";
#size-cells = <0x02>;
qcom,msm-id = <0x28d 0x10000 0x28e 0x10000>;
#address-cells = <0x02>;
interrupt-parent = <0x01>;
compatible = "qcom,ravelin-idp\0qcom,ravelin\0qcom,idp";
qcom,board-id = <0x22 0x00>;
@TheGammaSqueeze
TheGammaSqueeze / Retroid_RPMini_v2_Android13.dts
Created April 23, 2025 22:16
Retroid Pocket Mini V2 (new panel) - Android 13 - Running Kernel Device Tree Dump
This file has been truncated, but you can view the full file.
/dts-v1/;
/ {
model = "Qualcomm Technologies, Inc. kona HDK";
#size-cells = <0x02>;
qcom,msm-id = <0x164 0x20001>;
#address-cells = <0x02>;
interrupt-parent = <0x01>;
compatible = "qcom,kona-hdk\0qcom,kona\0qcom,hdk";
qcom,board-id = <0x1001f 0x01>;
@TheGammaSqueeze
TheGammaSqueeze / Retroid_Flip2_Android13_V02.07.001.01.dts
Created April 23, 2025 15:14
Retroid Flip2 Running Kernel Device Tree - Android 13 - V02.07.001.01
This file has been truncated, but you can view the full file.
/dts-v1/;
/ {
model = "Qualcomm Technologies, Inc. kona HDK";
#size-cells = <0x02>;
qcom,msm-id = <0x164 0x20001>;
#address-cells = <0x02>;
interrupt-parent = <0x01>;
compatible = "qcom,kona-hdk\0qcom,kona\0qcom,hdk";
qcom,board-id = <0x1001f 0x01>;
@TheGammaSqueeze
TheGammaSqueeze / trimui_corrected.c
Created January 15, 2025 13:15
TrimUI smart pro android joypad userspace driver
/*******************************************************************************
* File: trimui_corrected.c
*
* Changes vs previous:
* - #define VENDOR_ID, PRODUCT_ID, VERSION_ID => 0x0000,0x0000,0x0001
* - Use ABS_Z, ABS_RZ instead of ABS_RX, ABS_RY
* - If L2 or R2 pressed => emit additional "gas" or "brake" events
* - Clamping from ±900 => ±32760
* - No repeated SYN if values are unchanged
******************************************************************************/
@TheGammaSqueeze
TheGammaSqueeze / miyoostick.c
Created January 3, 2025 11:45
Miyoo Flip userland joystick application
/*******************************************************************************
* File: miyoostick.c
*
* Example userland joystick application:
* - Sets up a virtual gamepad via /dev/uinput
* - Opens /dev/ttyS1, reads stick frames, calibrates them
* - Publishes the results as analog axes (two sticks)
* - Provides a few example buttons
*
* Build (example):