arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
Subsystems (2)
PATCH 1/1 arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
From: Vladnwx <[email protected]>
The optional 24-pin expansion board exposes two LRADC buttons and an IR receiver. KEY1/KEY2 are on LRADC channel 0 (measured ~1.0 V / ~1.6 V) and are wired to KEY_1 / KEY_ENTER; the IR receiver is on the SoC ir controller (PH10).
Tested on: OrangePi Zero 2W (Allwinner H618).
---
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +29 -0
@@ -10,6 +10,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/input/input.h> #include <dt-bindings/leds/common.h> / {
@@ -189,3 +190,31 @@ usb1_vbus-supply = <®_vcc5v>; status = "okay"; }; + +/* + * Buttons and IR receiver on the optional 24-pin expansion board. + * KEY1 -> KEY_1, KEY2 -> KEY_ENTER (LRADC channel 0). + */ +&lradc { + vref-supply = <®_vcc3v3>; + status = "okay"; + wakeup-source; + + button-1000 { + label = "KEY_1"; + linux,code = <KEY_1>; + channel = <0>; + voltage = <1000000>; + }; + + button-1600 { + label = "KEY_ENTER"; + linux,code = <KEY_ENTER>; + channel = <0>; + voltage = <1600000>; + }; +}; + +&ir { + status = "okay"; +};
Signature · 1 line
2.45.0
PATCH 1/1 arm64: dts: allwinner: h616: orangepi-zero2w: add SDIO WiFi/BT (AW859A)
From: Vladnwx <[email protected]>
Enable the SDIO bus (mmc1) and power the on-board AW859A (UWE5622) WiFi/BT combo through an mmc-pwrseq-simple that resets WL_REG_ON (PG18), with the 3.3 V and 1.8 V supplies and the RTC 32 kHz clock.
Tested on: OrangePi Zero 2W (Allwinner H618) with the out-of-tree uwe5622 driver.
---
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +40 -0
@@ -218,3 +218,43 @@ &ir { status = "okay"; }; + +/ { + reg_vcc33_wifi: vcc33-wifi { + /* Always-on 3.3V regulator for WiFi and BT */ + compatible = "regulator-fixed"; + regulator-name = "vcc33-wifi"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + vin-supply = <®_vcc5v>; + }; + + reg_vcc_wifi_io: vcc-wifi-io { + /* Always-on 1.8V regulator for WiFi and BT IO */ + compatible = "regulator-fixed"; + regulator-name = "vcc-wifi-io"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + vin-supply = <®_vcc33_wifi>; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rtc 1>; + clock-names = "osc32k-out"; + reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */ + post-power-on-delay-ms = <200>; + }; +}; + +&mmc1 { + vmmc-supply = <®_vcc33_wifi>; + vqmmc-supply = <®_vcc_wifi_io>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + mmc-ddr-1_8v; + status = "okay"; +};
Signature · 1 line
2.45.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] arm64: dts: unconditionally enabling optional expansion board risks phantom inputs and IRQ storms --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: unconditionally enabling optional expansion board risks phantom inputs and IRQ storms --
commit 51b58a06db4b29809dc98ff86ac9cae923d63f7c
Author: Vladnwx <[email protected]>
arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
This commit adds device tree nodes for the LRADC buttons and IR receiver on the OrangePi Zero 2W. It maps the buttons to KEY_1 and KEY_ENTER and enables both the LRADC and IR controller hardware.
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +0
-0
[ ... ]
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts &usbphy { · line 200
Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +8
-0@@ -189,3 +190,31 @@ &usbphy { usb1_vbus-supply = <®_vcc5v>; status = "okay"; }; + +/* + * Buttons and IR receiver on the optional 24-pin expansion board. + * KEY1 -> KEY_1, KEY2 -> KEY_ENTER (LRADC channel 0). + */ +&lradc { + vref-supply = <®_vcc3v3>; + status = "okay";
[Severity: High]
Could unconditionally enabling the optional LRADC on the base board cause phantom key presses? If the 24-pin expansion board is not attached, it seems the floating LRADC pin could drift into the configured 1.0V/1.6V voltage thresholds and trigger unexpected button presses for users out of the box. Should this be enabled via a device tree overlay instead?
Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +3
-0+ wakeup-source; + + button-1000 {
[ ... ]
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts line 220
Quoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +11
-0+ button-1600 { + label = "KEY_ENTER"; + linux,code = <KEY_ENTER>; + channel = <0>; + voltage = <1600000>; + }; +}; + +&ir { + status = "okay"; +};
[Severity: High]
Does unconditionally enabling the IR receiver risk interrupt storms? If the optional board is missing, a floating IR RX pin lacking an internal pull-up might pick up electrical noise and oscillate rapidly. This could severely degrade system performance. Would it be safer to relegate this to an overlay rather than the base device tree?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
A message that is not in the archive (sent off-list or not yet received): CANHPwARNHjh92DFd30rdbkqzGw6jhQQoKdQhHUx09gTTu1C5YA@mail.gmail.com
Thanks for the review - you are right. The two buttons and the IR receiver are on the optional 24-pin expansion board. With the board detached the LRADC input and the IR receiver pin are undriven and float, which can lead to phantom key presses and interrupt storms.
v2 drops them from the base board .dts and provides them as a devicetree overlay (sun50i-h618-orangepi-zero2w-24pin.dtso) with a Makefile entry, following the existing sun8i-orangepi-zero-interface-board.dtso approach.
Tested on: OrangePi Zero 2W (Allwinner H618) with the 24-pin expansion board.
ср, 23 сент. 2026 г. в 16:11, Влад СВН <[email protected]>:
Quoted 72 lines
Thanks for the review - you are right. The two buttons and the IR receiver are on the optional 24-pin expansion board. With the board detached the LRADC input and the IR receiver pin are undriven and float, which can lead to phantom key presses and interrupt storms.
v2 drops them from the base board .dts and provides them as a devicetree overlay (sun50i-h618-orangepi-zero2w-24pin.dtso) with a
Makefileentry, following the existing sun8i-orangepi-zero-interface-board.dtso approach.Tested on: OrangePi Zero 2W (Allwinner H618) with the 24-pin expansion board.
ср, 23 сент. 2026 г. в 15:59, <[email protected]>:
Quoted 64 lines
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: unconditionally enabling optional expansion board risks phantom inputs and IRQ storms --commit
51b58a06db4b29809dc98ff86ac9cae923d63f7c
Author: Vladnwx <[email protected]>arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
This commit adds device tree nodes for the LRADC buttons and IR receiver on the OrangePi Zero 2W. It maps the buttons to
KEY_1andKEY_ENTERand enables both the LRADC and IR controller hardware.Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +0
-0[ ... ]
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts &usbphy { · line 200
Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +8
-0@@ -189,3 +190,31 @@ &usbphy { usb1_vbus-supply = <®_vcc5v>; status = "okay"; }; + +/* + * Buttons and IR receiver on the optional 24-pin expansion board. + * KEY1 -> KEY_1, KEY2 -> KEY_ENTER (LRADC channel 0). + */ +&lradc { + vref-supply = <®_vcc3v3>; + status = "okay";[Severity: High]
Could unconditionally enabling the optional LRADC on the base board cause phantom key presses? If the 24-pin expansion board is not attached, it seems the floating LRADC pin could drift into the configured 1.0V/1.6V voltage thresholds and trigger unexpected button presses for users out of the box. Should this be enabled via a device tree overlay instead?Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +3
-0+ wakeup-source; + + button-1000 {[ ... ]
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts line 220
Quoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +11
-0+ button-1600 { + label = "KEY_ENTER"; + linux,code = <KEY_ENTER>; + channel = <0>; + voltage = <1600000>; + }; +}; + +&ir { + status = "okay"; +};[Severity: High]
Does unconditionally enabling the IR receiver risk interrupt storms? If the optional board is missing, a floating IR RX pin lacking an internal pull-up might pick up electrical noise and oscillate rapidly. This could severely degrade system performance. Would it be safer to relegate this to an overlay rather than the base device tree?--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Thanks for the review - you are right. The two buttons and the IR receiver are on the optional 24-pin expansion board. With the board detached the LRADC input and the IR receiver pin are undriven and float, which can lead to phantom key presses and interrupt storms.
v2 drops them from the base board .dts and provides them as a devicetree overlay (sun50i-h618-orangepi-zero2w-24pin.dtso) with a Makefile entry, following the existing sun8i-orangepi-zero-interface-board.dtso approach.
Tested on: OrangePi Zero 2W (Allwinner H618) with the 24-pin expansion board.
Thanks for the review - you are right. The two buttons and the IR receiver are on the optional 24-pin expansion board. With the board detached the LRADC input and the IR receiver pin are undriven and float, which can lead to phantom key presses and interrupt storms.
v2 drops them from the base board .dts and provides them as a devicetree overlay (sun50i-h618-orangepi-zero2w-24pin.dtso) with a Makefile entry, following the existing sun8i-orangepi-zero-interface-board.dtso approach.
Tested on: OrangePi Zero 2W (Allwinner H618) with the 24-pin expansion board.