[v3,1/2] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion overlay
Commit Message
The optional 24-pin expansion board carries two buttons on LRADC channel 0
and an IR receiver. Keep them out of the base board .dts: with the board
detached the LRADC input and the IR receiver pin are not driven and float,
which can produce phantom key presses and interrupt storms.
Provide them as a devicetree overlay instead, following the existing
sun8i-orangepi-zero-interface-board.dtso approach.
Tested on: OrangePi Zero 2W (Allwinner H618) with the 24-pin expansion board.
Signed-off-by: Vladimir <anykey196@gmail.com>
---
arch/arm64/boot/dts/allwinner/Makefile | 2 +
.../sun50i-h618-orangepi-zero2w-24pin.dtso | 42 +++++++++++++++++++
2 files changed, 44 insertions(+)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w-24pin.dtso
Comments
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dts: missing USB 2.0 nodes in 24-pin expansion board overlay
--
commit 1a9550663d27bb916af61d191100635d3dbfb863
Author: Vladimir <anykey196@gmail.com>
arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion overlay
This adds a devicetree overlay for the optional 24-pin expansion board, which
provides two buttons on LRADC channel 0 and an IR receiver.
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w-24pin.dtso b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w-24pin.dtso
> new file mode 100644
> index 0000000000000..2d7e98e4b66d8
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w-24pin.dtso
[ ... ]
> +&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";
> +};
[Severity: Medium]
Are the USB 2.0 nodes missing here?
The base board device tree (sun50i-h618-orangepi-zero2w.dts) explicitly leaves
USB 2 and 3 disabled, expecting them to be enabled by an overlay. Without
references to &ehci2, &ehci3, &ohci2, and &ohci3, the physical USB ports on the
24-pin expansion board will remain disabled and non-functional when this
overlay is applied.
Could these nodes be added so the expansion board is fully supported?
Hi Vladimir,
thanks for your patches, but please do not send new revisions that
quickly! The kernel doc says to leave *at least* 24 hours between
respins, but I would wait even longer: we are all humans, mostly
hobbyists, so please give all the reviewers some time to have a look!
Thanks,
Andre
On 9/23/26 13:20, Vladimir wrote:
> The optional 24-pin expansion board carries two buttons on LRADC channel 0
> and an IR receiver. Keep them out of the base board .dts: with the board
> detached the LRADC input and the IR receiver pin are not driven and float,
> which can produce phantom key presses and interrupt storms.
>
> Provide them as a devicetree overlay instead, following the existing
> sun8i-orangepi-zero-interface-board.dtso approach.
>
> Tested on: OrangePi Zero 2W (Allwinner H618) with the 24-pin expansion board.
>
> Signed-off-by: Vladimir <anykey196@gmail.com>
> ---
> arch/arm64/boot/dts/allwinner/Makefile | 2 +
> .../sun50i-h618-orangepi-zero2w-24pin.dtso | 42 +++++++++++++++++++
> 2 files changed, 44 insertions(+)
> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w-24pin.dtso
>
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
> index d1f768dd646..e4576030276 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -57,6 +57,8 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-longanpi-3h.dtb
> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w-24pin.dtb
> +sun50i-h618-orangepi-zero2w-24pin-dtbs := sun50i-h618-orangepi-zero2w.dtb sun50i-h618-orangepi-zero2w-24pin.dtbo
> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb
> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-transpeed-8k618-t.dtb
> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-yuzukihd-chameleon.dtb
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w-24pin.dtso b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w-24pin.dtso
> new file mode 100644
> index 00000000000..2d7e98e4b66
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w-24pin.dtso
> @@ -0,0 +1,42 @@
> +// SPDX-License-Identifier: (GPL-2.0-or-later OR X11)
> +/*
> + * Device tree overlay for the Orange Pi Zero 2W 24-pin expansion board.
> + *
> + * The expansion board provides two buttons wired to LRADC channel 0 and an
> + * IR receiver. These are only present when the board is attached, so they
> + * are deliberately kept out of the base .dts: on a bare board the LRADC
> + * input and the IR receiver pin are not driven and float, which can cause
> + * phantom key presses and interrupt storms.
> + *
> + * Apply on top of:
> + * arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +#include <dt-bindings/input/input.h>
> +
> +&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";
> +};
@@ -57,6 +57,8 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-longanpi-3h.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w-24pin.dtb
+sun50i-h618-orangepi-zero2w-24pin-dtbs := sun50i-h618-orangepi-zero2w.dtb sun50i-h618-orangepi-zero2w-24pin.dtbo
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-transpeed-8k618-t.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-yuzukihd-chameleon.dtb
new file mode 100644
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR X11)
+/*
+ * Device tree overlay for the Orange Pi Zero 2W 24-pin expansion board.
+ *
+ * The expansion board provides two buttons wired to LRADC channel 0 and an
+ * IR receiver. These are only present when the board is attached, so they
+ * are deliberately kept out of the base .dts: on a bare board the LRADC
+ * input and the IR receiver pin are not driven and float, which can cause
+ * phantom key presses and interrupt storms.
+ *
+ * Apply on top of:
+ * arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/input/input.h>
+
+&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";
+};