| Message ID | 20260923105208.198-1-anykey196@gmail.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-26169-sunxi=pue.re@lists.linux.dev>
X-Original-To: noreply@patchwork.local
Delivered-To: noreply@patchwork.local
Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mxe881.netcup.net (Postfix) with ESMTPS id 22FB91C11EF
for <noreply@patchwork.local>; Wed, 23 Sep 2026 13:02:42 +0200 (CEST)
Authentication-Results: mxe881;
dkim=pass header.d=gmail.com;
spf=pass (sender IP is 172.105.105.114)
smtp.mailfrom=linux-sunxi+bounces-26169-noreply=patchwork.local@lists.linux.dev
smtp.helo=tor.lore.kernel.org
Received-SPF: pass (mxe881: domain of lists.linux.dev designates
172.105.105.114 as permitted sender) client-ip=172.105.105.114;
envelope-from=linux-sunxi+bounces-26169-noreply=patchwork.local@lists.linux.dev;
helo=tor.lore.kernel.org;
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org
[100.90.174.1])
by tor.lore.kernel.org (Postfix) with ESMTP id AC6D02BD59
for <noreply@patchwork.local>; Wed, 23 Sep 2026 10:54:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D14F3AB498;
Wed, 23 Sep 2026 10:52:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
header.b="ZuJb4KWP"
X-Original-To: linux-sunxi@lists.linux.dev
Received: from mail-lf2-f13.google.com (mail-lf2-f13.google.com
[74.125.229.205])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66B8638DC68
for <linux-sunxi@lists.linux.dev>; Wed, 23 Sep 2026 10:52:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
arc=none smtp.client-ip=74.125.229.205
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1790160743; cv=none;
b=RYvhGG+JGPMTUGbGPjO1pECRfVByU+TJtmXXdJ8+KyP7AwHIhBhNHHtOcy9JXVd5vRwCoqk4/srqvTw7sM8NPvtvWoSlULqXtpTwjBRLQCh7RTKu0mIrVJET7V/vVn5fhpjemMi3JFvI4QgjDmIdzIy7/Qfu0f3d4/AeWLWx5CQ=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1790160743; c=relaxed/simple;
bh=OYgwkeWjfaPzXeZYfd3LbE9wNpgo6gIQfwCz7/uINqk=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version;
b=Fcc8ohsDkH4H6kKKf7WBKUvQChMHbsQKOqoM2T4IAj5IQUlXAl/vyu76Motv6EsY/gbLAy0ZEGTBDQMinBL2ecbTj+EfdIh+RqBLgMzuS5PHrGK/5aVYI0h4MdJWJE/pJjrHQjs3QQlAKxYzRcejqHT9eil6vucQypihg9mMPIo=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
header.b=ZuJb4KWP; arc=none smtp.client-ip=74.125.229.205
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org;
spf=pass smtp.mailfrom=gmail.com
Received: by mail-lf2-f13.google.com with SMTP id
2adb3069b0e04-5b8c7a1aeecso604616e87.3
for <linux-sunxi@lists.linux.dev>;
Wed, 23 Sep 2026 03:52:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1790160734; x=1790765534;
darn=lists.linux.dev;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=Jd3pD5snZnHs7zfXJzo2aSY9ZvIn735yOScE5LBtrBM=;
b=ZuJb4KWPLk4g8j7TFh0a73ivmi3y1DaQ9e5KY27bYL6f0X22nGG+qf/Y6+Pa4U4JS0
LJ0nM8mVS8aTVvBeAWeBfUOcNdOduuJArCvbzcLJy9COGFG2wNzNCiwukpRyulRvl1M5
fK5t68jwaX45HbkR1m8lQ4wvo17ikjzp8IV3TO3q1qWkqmrX1SgdxFhZNGlKUURTvHGs
sUMbkOLZLKG8QsjMJpBsoXvjHpgj4N1WN4ZTruFSMK9i2VcLCHPxpjZth6NF7eBzpHZ/
49Cnr4ukFfoaW5+NaLfwRRJGv2zL0JcpYa9G5hVYDN8WiDEf5VApHnh4w5PCCnzht2Tj
W/Qg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1790160734; x=1790765534;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=Jd3pD5snZnHs7zfXJzo2aSY9ZvIn735yOScE5LBtrBM=;
b=PSFBqo1zyXSRT8TZ/N0MULZMa7YENUQ18HiOMZfmWB/K8e9PYCxuKWB9dZQzOTvL63
ZHvGIAwI+1uoLwFUU+VvioPTGaxRc28japfkUJKRJnGjuL4yaKjJtbDGHSpZJwjdJSNK
4RHEanhtJbePNHh6jB4cXaJy8yiQBm1l5hONrpuQlK47L6RDfhuhm4WTMDcG4X5GZAok
JtVJT8xXa3JstX22hMz6taVVnEvmzbz7N4d2mRJWN4lkkY72254QQ1JeCRneVav0LkTH
CUbKEbFlirehBC8dFzOTSGGrGeh4KRcCEVQADJ8SEoPZ5JAfrL3Ley8PBg51S3DxsuTu
Camw==
X-Gm-Message-State: AFuF++lvJEsf/sAveW9hW4Z6uf+qZ8e2icWTbiqaXsEeBtNf8x4+ihmf
V+0PGnfpMtEIAbXHEyeYnJ8kqlAsFMWkKRFH7keAcmMRK0B4k++tqqoM
X-Gm-Gg: AYBFou3SEGCvSY88LvoPycthzl67tHfC9bT7Lc+ZjX1BfBUbxCqFEiwPXpQ79xqtIBD
gfEfveoK1u1bPBjw1SM4bamZ8Z95qtPX1UAEA4M93mUfWGRrx2WfJelRl2FckplhUnREipOkBMu
XygenjkhMCN8pqIcorTOPc2ZtC0zpY6okI172ntc3xxySIdnjz3+8EQg/EIaHb+b3VeXh/esXwS
UVHzY7p2vTP8tNBL1MDELJT59jle2eMw4S7JsPoC3MjQfXck8Zf110GuQsuGyi7JA1C5DM4UPjo
nD1oGma3bc17ReFaYvdrvtCeUQHWbP316KlvoxLK2c4mUhJq4J6V8LYFAABfaL8T6Z1wO/BbBcC
qDwFYwe4ui4wWqVtiZx8CfDuhNaG8ZhRfbeqABshI7zr0vec05bRP6Y8eqISknltKyaYRbkwkeg
geeRLXl1tOVPGrrfWdfQHN1VdRjctjsZQpHzClPbeg/A5NZw+7isBJNKK73JKgpisdZOLKElnEG
A5pBVubbSvYeJNVIYjKFyCBWBu5RK2GL9sh9TnN
X-Received: by 2002:ac2:5696:0:b0:5b8:bc5e:b583 with SMTP id
2adb3069b0e04-5b8d89c6344mr856658e87.59.1790160733833;
Wed, 23 Sep 2026 03:52:13 -0700 (PDT)
Received: from DESKTOP-7GRJKK0 ([188.226.104.175])
by smtp.gmail.com with ESMTPSA id
2adb3069b0e04-5b8d8552dafsm497428e87.7.2026.09.23.03.52.11
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 23 Sep 2026 03:52:13 -0700 (PDT)
From: Vladimir <anykey196@gmail.com>
To: Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>
Cc: linux-sunxi@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org,
Vladnwx <vladnwx@users.noreply.github.com>
Subject: [PATCH] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin
expansion buttons and IR
Date: Wed, 23 Sep 2026 15:52:07 +0500
Message-ID: <20260923105208.198-1-anykey196@gmail.com>
X-Mailer: git-send-email 2.55.0.windows.3
Precedence: bulk
X-Mailing-List: linux-sunxi@lists.linux.dev
List-Id: <linux-sunxi.lists.linux.dev>
List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev>
List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Rspamd-Server: rspamd-worker-8404
X-Spamd-Result: default: False [0.34 / 15.00];
BAYES_HAM(-5.50)[99.99%];
RBL_SENDERSCORE(2.00)[172.105.105.114:from];
SUSPICIOUS_RECIPS(1.50)[];
DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed),
No valid DKIM,none];
MID_CONTAINS_FROM(1.00)[];
R_MISSING_CHARSET(0.50)[];
MAILLIST(-0.15)[generic];
MIME_GOOD(-0.10)[text/plain];
BAD_REP_POLICIES(0.10)[];
HAS_LIST_UNSUB(-0.01)[];
FORGED_SENDER_MAILLIST(0.00)[];
RCVD_COUNT_FIVE(0.00)[6];
FROM_HAS_DN(0.00)[];
PRECEDENCE_BULK(0.00)[];
DBL_BLOCKED_OPENRESOLVER(0.00)[tor.lore.kernel.org:rdns,tor.lore.kernel.org:helo];
TAGGED_RCPT(0.00)[];
FROM_NEQ_ENVFROM(0.00)[anykey196@gmail.com,linux-sunxi@lists.linux.dev];
TAGGED_FROM(0.00)[bounces-26169-noreply=patchwork.local];
ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1];
TO_DN_SOME(0.00)[];
FREEMAIL_FROM(0.00)[gmail.com];
RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.90.174.1:received,188.226.104.175:received,74.125.229.205:received];
RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.105.105.114:from];
ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG];
R_SPF_ALLOW(0.00)[+ip4:172.105.105.114];
FREEMAIL_TO(0.00)[kernel.org,gmail.com,sholland.org];
RCVD_TLS_LAST(0.00)[];
RCPT_COUNT_SEVEN(0.00)[7];
MIME_TRACE(0.00)[0:+];
FORGED_RECIPIENTS_MAILLIST(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[]
X-Rspamd-Queue-Id: 22FB91C11EF
X-MORS-Enabled: yes
X-MORS-DOMAIN: patchwork.local
X-MORS-HOSTING: hosting172546
X-MORS-USER: hosting172546
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
|
| Series |
arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
|
|
Commit Message
Влад СВН
Sept. 23, 2026, 10:52 a.m. UTC
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> ---
Comments
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?
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
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.
--- 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"; +};