[PATCH] arm64: dts: rockchip: Fix adc-keys wiring for Orange Pi 5 family
Dennis Gilmore
dennis at ausil.us
Sun Oct 11 20:39:29 PDT 2026
When working on u-boot for the Orange Pi 5 Pro it was called out that
the Pro does not have a recovery button and was missing the definition
for the maskrom button.
The shared rk3588s-orangepi-5.dtsi describes a "Recovery" adc-keys
button on SARADC channel 1. This is correct for the Orange Pi 5 and
5B, but the Orange Pi 5 Pro schematic shows channel 1 is pulled up
with no button ever wired to it, so the key can never be pressed.
Each board's schematic also shows SARADC channel 0 is connected to
a real, populated Maskrom button, but no board described it.
Fix this by moving the common hardware (Maskrom on channel 0) into
the shared base used by all three boards, and keeping the
board-specific hardware (Recovery on channel 1) only in the dtsi
shared by the Orange Pi 5 and 5B, which the Pro does not include:
- rk3588s-orangepi-5.dtsi (OPi5, OPi5B, OPi5 Pro): adc-keys-0,
button-maskrom on &saradc 0.
- rk3588s-orangepi-5-5b.dtsi (OPi5, OPi5B only): adc-keys-1,
button-recovery on &saradc 1.
Verified against the Orange Pi 5, 5B and 5 Pro v1.2 schematics:
the Maskrom button is wired identically on all three (button -> 22R
-> SARADC_IN0_BOOT, AW15, pulled up to VCCA_1V8_S0), while the
Recovery button only exists as a populated pull-up with no button
attached on the Pro (the board's "RESET"-silkscreened pushbutton
is wired to PMIC_RESET_L, not to the SARADC).
Signed-off-by: Dennis Gilmore <dennis at ausil.us>
---
.../boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi | 15 +++++++++++++++
.../boot/dts/rockchip/rk3588s-orangepi-5.dtsi | 12 ++++++------
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi
index 6e081bc06cfe..d73f671b8f5f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-5b.dtsi
@@ -4,10 +4,25 @@
* but not the Orange Pi 5 Pro.
*/
+#include <dt-bindings/input/input.h>
#include <dt-bindings/usb/pd.h>
#include "rk3588s-orangepi-5.dtsi"
/ {
+ adc-keys-1 {
+ compatible = "adc-keys";
+ io-channels = <&saradc 1>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-recovery {
+ label = "Recovery";
+ linux,code = <KEY_VENDOR>;
+ press-threshold-microvolt = <1800>;
+ };
+ };
+
aliases {
ethernet0 = &gmac1;
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
index fd0efa8d1bfb..709efa709b7a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
@@ -14,17 +14,17 @@ chosen {
stdout-path = "serial2:1500000n8";
};
- adc-keys {
+ adc-keys-0 {
compatible = "adc-keys";
- io-channels = <&saradc 1>;
+ io-channels = <&saradc 0>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <1800000>;
poll-interval = <100>;
- button-recovery {
- label = "Recovery";
- linux,code = <KEY_VENDOR>;
- press-threshold-microvolt = <1800>;
+ button-maskrom {
+ label = "Mask Rom";
+ linux,code = <KEY_SETUP>;
+ press-threshold-microvolt = <2000>;
};
};
--
2.56.0
More information about the linux-arm-kernel
mailing list