Skip to content

RK3566 inputplumber and related fixes - #2685

Draft
sydarn wants to merge 3 commits into
ROCKNIX:nextfrom
sydarn:rk3566-inputplumber
Draft

RK3566 inputplumber and related fixes#2685
sydarn wants to merge 3 commits into
ROCKNIX:nextfrom
sydarn:rk3566-inputplumber

Conversation

@sydarn

@sydarn sydarn commented May 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • What is the goal of this PR? Port rk3566 to use upstream DTS input and inputplumber for controls.

Testing

  • How was this tested? WIP
  • Test results:

Additional Context

  • Add any other information that might be helpful for the reviewer

AI Usage

While ROCKNIX doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.

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

@sydarn
sydarn marked this pull request as draft May 10, 2026 14:08
@sydarn
sydarn force-pushed the rk3566-inputplumber branch from 365f23c to 99514f8 Compare May 10, 2026 19:03
@sydarn
sydarn force-pushed the rk3566-inputplumber branch from 99514f8 to b8a849a Compare August 11, 2026 18:06
@spycat88
spycat88 force-pushed the next branch 2 times, most recently from c93f6bd to 135d112 Compare August 13, 2026 00:00
@sydarn
sydarn force-pushed the rk3566-inputplumber branch from 315bc50 to 0e519f8 Compare August 23, 2026 14:38
@Jacob-Matthew-Cook

Jacob-Matthew-Cook commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Only the RG353M is affected, and it's a mechanism change rather than a bad mapping.

The RG353M has no device tree of its own — mainline has zero rg353m references. u-boot detects it by a board-ID resistor on SARADC ch1 (~517), loads rk3566-anbernic-rg353p.dtb, then in ft_board_setup() overwrites just the root model with Anbernic RG353M. So it reports model = Anbernic RG353M but compatible = anbernic,rg353p. It's the only board in the RGxx3 table that does this.

Hence the regression: 0005-arm64-dts-rockchip-fixup-anbernic-controls.patch keyed on the DTB, which the RG353M shares with the RG353P, so it was covered for free. InputPlumber keys on the model string, which it doesn't share. It matches none of the five configs, gets no CompositeDevice, and the raw gpio-keys-control / adc-keys / adc-joystick nodes land unmapped — hence "buttons all over the place". Every other shipped DTB maps 1:1 onto the five configs, so this is the only gap.

One match block in 01-anbernic-gen1.yaml fixes it:

--- a/projects/ROCKNIX/devices/RK3566/filesystem/usr/share/inputplumber/devices/01-anbernic-gen1.yaml
+++ b/projects/ROCKNIX/devices/RK3566/filesystem/usr/share/inputplumber/devices/01-anbernic-gen1.yaml
@@ -15,6 +15,11 @@
       sys_path: /sys/firmware/devicetree/base
       attributes:
         - name: model
+          value: Anbernic RG353M
+  - udev:
+      sys_path: /sys/firmware/devicetree/base
+      attributes:
+        - name: model
           value: Anbernic RG353P
   - udev:
       sys_path: /sys/firmware/devicetree/base

Confirmed on hardware — controls come up correct using the unmodified anbernic_gen1 map, so no capability-map, DTS or u-boot change is needed.

@sydarn
sydarn force-pushed the rk3566-inputplumber branch from 0e519f8 to 3aee11b Compare August 24, 2026 20:35
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