* [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
@ 2026-09-23 10:52 Vladimir
2026-09-23 10:52 ` [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add SDIO WiFi/BT (AW859A) Vladimir
2026-09-23 10:59 ` [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR sashiko-bot
0 siblings, 2 replies; 6+ messages in thread
From: Vladimir @ 2026-09-23 10:52 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: linux-sunxi, linux-arm-kernel, devicetree, Vladnwx
From: Vladnwx <vladnwx@users.noreply.github.com>
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).
Signed-off-by: Vladnwx <vladnwx@users.noreply.github.com>
---
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
@@ -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";
+};
--
2.45.0
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add SDIO WiFi/BT (AW859A)
2026-09-23 10:52 [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR Vladimir
@ 2026-09-23 10:52 ` Vladimir
2026-09-23 10:59 ` [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR sashiko-bot
1 sibling, 0 replies; 6+ messages in thread
From: Vladimir @ 2026-09-23 10:52 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: linux-sunxi, linux-arm-kernel, devicetree, Vladnwx
From: Vladnwx <vladnwx@users.noreply.github.com>
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.
Signed-off-by: Vladnwx <vladnwx@users.noreply.github.com>
---
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
@@ -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";
+};
--
2.45.0
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
2026-09-23 10:52 [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR Vladimir
2026-09-23 10:52 ` [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add SDIO WiFi/BT (AW859A) Vladimir
@ 2026-09-23 10:59 ` sashiko-bot
[not found] ` <CANHPwARNHjh92DFd30rdbkqzGw6jhQQoKdQhHUx09gTTu1C5YA@mail.gmail.com>
` (2 more replies)
1 sibling, 3 replies; 6+ messages in thread
From: sashiko-bot @ 2026-09-23 10:59 UTC (permalink / raw)
To: Vladimir; +Cc: robh, conor+dt, devicetree, linux-sunxi
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 <vladnwx@users.noreply.github.com>
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.
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> index ff9b40352a545..1b690e3cd041e 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
[ ... ]
> @@ -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?
> + wakeup-source;
> +
> + button-1000 {
[ ... ]
> + 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/20260923105208.198-1-anykey196@gmail.com?part=1
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <CANHPwARNHjh92DFd30rdbkqzGw6jhQQoKdQhHUx09gTTu1C5YA@mail.gmail.com>]
* Re: [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
[not found] ` <CANHPwARNHjh92DFd30rdbkqzGw6jhQQoKdQhHUx09gTTu1C5YA@mail.gmail.com>
@ 2026-09-23 11:22 ` Влад СВН
0 siblings, 0 replies; 6+ messages in thread
From: Влад СВН @ 2026-09-23 11:22 UTC (permalink / raw)
To: sashiko-reviews; +Cc: robh, conor+dt, devicetree, linux-sunxi
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, Влад СВН <anykey196@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 г. в 15:59, <sashiko-bot@kernel.org>:
>>
>> 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 <vladnwx@users.noreply.github.com>
>>
>> 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.
>>
>> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
>> > index ff9b40352a545..1b690e3cd041e 100644
>> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
>> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
>> [ ... ]
>> > @@ -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?
>>
>> > + wakeup-source;
>> > +
>> > + button-1000 {
>> [ ... ]
>> > + 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/20260923105208.198-1-anykey196@gmail.com?part=1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
2026-09-23 10:59 ` [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR sashiko-bot
[not found] ` <CANHPwARNHjh92DFd30rdbkqzGw6jhQQoKdQhHUx09gTTu1C5YA@mail.gmail.com>
@ 2026-09-23 11:24 ` Влад СВН
2026-09-23 11:42 ` Влад СВН
2 siblings, 0 replies; 6+ messages in thread
From: Влад СВН @ 2026-09-23 11:24 UTC (permalink / raw)
To: sashiko-reviews; +Cc: robh, conor+dt, devicetree, linux-sunxi
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.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
2026-09-23 10:59 ` [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR sashiko-bot
[not found] ` <CANHPwARNHjh92DFd30rdbkqzGw6jhQQoKdQhHUx09gTTu1C5YA@mail.gmail.com>
2026-09-23 11:24 ` Влад СВН
@ 2026-09-23 11:42 ` Влад СВН
2 siblings, 0 replies; 6+ messages in thread
From: Влад СВН @ 2026-09-23 11:42 UTC (permalink / raw)
To: sashiko-reviews; +Cc: robh, conor+dt, devicetree, linux-sunxi
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-23 11:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-23 10:52 [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR Vladimir
2026-09-23 10:52 ` [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add SDIO WiFi/BT (AW859A) Vladimir
2026-09-23 10:59 ` [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR sashiko-bot
[not found] ` <CANHPwARNHjh92DFd30rdbkqzGw6jhQQoKdQhHUx09gTTu1C5YA@mail.gmail.com>
2026-09-23 11:22 ` Влад СВН
2026-09-23 11:24 ` Влад СВН
2026-09-23 11:42 ` Влад СВН
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox