From nobody Sun Oct 5 14:34:04 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF313248F5F; Fri, 1 Aug 2025 13:16:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754054217; cv=none; b=sFUetNTWQ/QJxA8DOlRYNFKYwmGozPMOSdbVJZ5sdSVnAnC2Wub0aT2oPBGfy0V8G7uiQ1PIXckXdNASi4c27u7TXXISSkSlZQK6drIGw0562JBG2NTX7U1/WlagaauOuhHnOc3Jpd3164MmMs5vew2Rx+B5aUkjCySMMR5UZUE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754054217; c=relaxed/simple; bh=5ietD06f8Z2UeewCIdXHPrS5WF1AM8TGkC/CX4qWjOU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NSu/hA8rd3yGLKb384SbVKuTtDRRTArqiKugJzWwaKKUOjDzaAQ9joHEqR6+jgU5Dd2JSSdABp7wh2j1VjJgsa/pEmwUcgyGJTw1AtA75Gd0hBreHJsWkfxbdmiNRPD6ic8MLDbMmeD3MEni/9pLvQuUDSo+iK/N3PqhxLTVTyI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=KpXd8Kbt; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="KpXd8Kbt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1754054213; bh=5ietD06f8Z2UeewCIdXHPrS5WF1AM8TGkC/CX4qWjOU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KpXd8KbtYIbC53CV9/bcGCey1JzAGtn6x3OO5N98xTgrg1IeDe2C8YthWcPUhfGyE eI9quD6l6FzrXt1ILTbSibNwbcfNI0i+Q+qLjkAGisU+klqbsdQ+CH8Gj1kSz5nceL 2QrXgEl2pt9CKrCW6+Rc5YnhM72Tto3/e1ue2S4j6y6C58rlzZZx/12MK0OFDWB2zw A71ac4k9WddICRILXNb2SSFIXX58uIDEDeImTH2+uHPLuj1jNHzZkd1rXmBm1HNInB nKgC5pixmsB95nKIl7xUmG1Hqaj2VYeCCp/tXjPQrTJ06w9Fn1NvYmTsDBym6Y/egh D5B7pW0PnUbxQ== Received: from 2a01cb0892f2d600c8f85cf092d4af51.ipv6.abo.wanadoo.fr (2a01cb0892f2d600c8f85cf092d4af51.ipv6.abo.wanadoo.fr [IPv6:2a01:cb08:92f2:d600:c8f8:5cf0:92d4:af51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jmassot) by bali.collaboradmins.com (Postfix) with ESMTPSA id C529417E0DD7; Fri, 1 Aug 2025 15:16:52 +0200 (CEST) From: Julien Massot Date: Fri, 01 Aug 2025 15:16:49 +0200 Subject: [PATCH 1/3] Input: mtk-pmic-keys - MT6359 has a specific release irq Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250801-radxa-nio-12-l-gpio-v1-1-d0840f85d2c8@collabora.com> References: <20250801-radxa-nio-12-l-gpio-v1-0-d0840f85d2c8@collabora.com> In-Reply-To: <20250801-radxa-nio-12-l-gpio-v1-0-d0840f85d2c8@collabora.com> To: kernel@collabora.com, Dmitry Torokhov , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, Julien Massot X-Mailer: b4 0.14.2 A recent commit in linux-next added support for key events. However, the key release event is not properly handled: only key press even= ts are generated, leaving key states stuck in "pressed". This patch ensures that both key press and key release events are properly emitted by handling the release logic correctly. Note: the code was introduced in linux-next by commit bc25e6bf032e ("Input: mtk-pmic-keys - add support for MT6359 PMIC keys") and is not yet present in mainline. Signed-off-by: Julien Massot Reviewed-by: AngeloGioacchino Del Regno --- drivers/input/keyboard/mtk-pmic-keys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboar= d/mtk-pmic-keys.c index 50e2e792c91d2626d3f282d04a1db60845827ef2..0f9a589306482265f1f65c5a100= b3f4aba0a2ed3 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -129,6 +129,7 @@ static const struct mtk_pmic_regs mt6359_regs =3D { MTK_PMIC_HOMEKEY_RST), .pmic_rst_reg =3D MT6359_TOP_RST_MISC, .rst_lprst_mask =3D MTK_PMIC_RST_DU_MASK, + .key_release_irq =3D true, }; =20 struct mtk_pmic_keys_info { --=20 2.50.1 From nobody Sun Oct 5 14:34:04 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF379248F6A; Fri, 1 Aug 2025 13:16:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754054217; cv=none; b=O1zkNFOOiUTfqi3hbb1oKb6bXv0hPpKPs++JnuQqeHUI6KJxJmS1oN/XskhpeHM6SePuAD18Zf0uygujLD78Hqug52VEEgLdKRW7UBoQMdFSB+GuhOBZ/w4xtxeRII18BsXEy+nsACifeEoevADK94ubSZN2kgmkfEBRM2c+wPQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754054217; c=relaxed/simple; bh=KXWB/BbVESzaULTtNNY4Nclu2iCefeG1Uv0TWkv7OIk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Z+e7xG+e/8W5Px5A+OyVd3ZrmjBnmXnH79yVmmmrf+BbCtAs/NbJz0vY/mol6jZB/5XhBrtfzLD7VVdbEYkap4JHqn3S3mxmE0ORDGfQiUNzdPVc4fju5B3odkezRklZJdkjhZQR1sKkAsAk8+WztaYqEpcD5XGfT6qwHDgY9jA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=IwsF/Bg4; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="IwsF/Bg4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1754054214; bh=KXWB/BbVESzaULTtNNY4Nclu2iCefeG1Uv0TWkv7OIk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IwsF/Bg4ucxHBGMXzMqLVvfhcy0AZ5pDjNci7u3wImdZ1heyjZ3DN593B4NCoI4ol 4dR5RMjjIPkPR2BgVRCtKyDOzEd4EwXKo2JNvhAn0ENhsiYDNwFMxQSDg/elCWnHgh ujOaZ9qrH2+Et7Y4RpYffzJmntFEg2IOq8QFMlmg54PtBg464KCz66DxuWadduMrBp PGcbh8OvvaDpdzSj6AldS3LrbjezfKUO8JhOa8BDQTHVCy427ZEUzijgDO+SM5DN+O aPefURvHBuvLbJqx8jX7xMNF0IATzcTUjntWv5xAdeg+bbJIbSx4ix6lEtt6vUzhx5 jFI878MOtI8MA== Received: from 2a01cb0892f2d600c8f85cf092d4af51.ipv6.abo.wanadoo.fr (2a01cb0892f2d600c8f85cf092d4af51.ipv6.abo.wanadoo.fr [IPv6:2a01:cb08:92f2:d600:c8f8:5cf0:92d4:af51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jmassot) by bali.collaboradmins.com (Postfix) with ESMTPSA id 8E6DE17E0FFA; Fri, 1 Aug 2025 15:16:53 +0200 (CEST) From: Julien Massot Date: Fri, 01 Aug 2025 15:16:50 +0200 Subject: [PATCH 2/3] arm64: dts: mediatek: mt8395-nio-12l: add PMIC and GPIO keys support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250801-radxa-nio-12-l-gpio-v1-2-d0840f85d2c8@collabora.com> References: <20250801-radxa-nio-12-l-gpio-v1-0-d0840f85d2c8@collabora.com> In-Reply-To: <20250801-radxa-nio-12-l-gpio-v1-0-d0840f85d2c8@collabora.com> To: kernel@collabora.com, Dmitry Torokhov , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, Julien Massot X-Mailer: b4 0.14.2 Add support for PMIC and GPIO keys on the Radxa NIO 12L board: Declare a gpio-keys node for the Volume Up button using GPIO106. Add the corresponding pin configuration in the pinctrl node. Add a mediatek,mt6359-keys subnode under the PMIC to handle the power and home buttons exposed by the MT6359. Signed-off-by: Julien Massot --- .../boot/dts/mediatek/mt8395-radxa-nio-12l.dts | 36 ++++++++++++++++++= ++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/a= rm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts index 329c60cc6a6be0b4be8c0b8bb033b32d35302804..fd596e2298285361ad7c2fb828f= eec598d75a73e 100644 --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -8,6 +8,7 @@ #include "mt8195.dtsi" #include "mt6359.dtsi" #include +#include #include #include #include @@ -60,6 +61,18 @@ backlight: backlight { status =3D "disabled"; }; =20 + keys: gpio-keys { + compatible =3D "gpio-keys"; + + button-volume-up { + wakeup-source; + debounce-interval =3D <100>; + gpios =3D <&pio 106 GPIO_ACTIVE_LOW>; + label =3D "volume_up"; + linux,code =3D ; + }; + }; + wifi_vreg: regulator-wifi-3v3-en { compatible =3D "regulator-fixed"; regulator-name =3D "wifi_3v3_en"; @@ -626,6 +639,14 @@ pins-txd { }; }; =20 + gpio_key_pins: gpio-keys-pins { + pins { + pinmux =3D ; + bias-pull-up; + input-enable; + }; + }; + i2c2_pins: i2c2-pins { pins-bus { pinmux =3D , @@ -880,6 +901,21 @@ &pciephy { =20 &pmic { interrupts-extended =3D <&pio 222 IRQ_TYPE_LEVEL_HIGH>; + + mt6359keys: keys { + compatible =3D "mediatek,mt6359-keys"; + mediatek,long-press-mode =3D <1>; + power-off-time-sec =3D <0>; + + power-key { + linux,keycodes =3D ; + wakeup-source; + }; + + home { + linux,keycodes =3D ; + }; + }; }; =20 &scp { --=20 2.50.1 From nobody Sun Oct 5 14:34:04 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B058B253B64; Fri, 1 Aug 2025 13:16:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754054218; cv=none; b=Qsp5JS+fEB9uV+43LnKVjr1waMcyPc20usX6y2Gz6BFZ13wJToKmQwqiblS50vudXphWJ8S/A3lcR6dJ/epc24Z3tmtGqmj+SvxWpXzbvTvzZkOQDU2VCoda88xa9Ip5yQSCn2DVGkxRLW3R6Ya9tr/Md/RVzVqk67LrStTtVIw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754054218; c=relaxed/simple; bh=8dchQqi4TIXOkNjmPENd+y2u2n3RjTnFEQP+olfB+Xs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nVeRM2aFtUw5j1RcHfeAcXrwNE/NwvB3L6r0J+eIyEOxVLPC3X+gv22WuRcaZPxS6Z9iOzA7ZEOcIfrJ6Eg8BhM9DUb6u5vQVWOgq4L3uwqmIW1PlgxK5MIhh7B/khyltPi2+ODiMqzraJy1Py5IGrBBnE8mkvY1pFzjyERkEAg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=ZRHanWdp; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="ZRHanWdp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1754054214; bh=8dchQqi4TIXOkNjmPENd+y2u2n3RjTnFEQP+olfB+Xs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZRHanWdpElEYhuQM6x/oecXJEwYMmV3QA5K+YiepFDMRKXLxMZIxmDjTzUk/J/RbJ R1Kd0VxPCYsgLdrLk+DJCh9USPbSP4J7wsD3EBJ53Eau6pstXjomdV9zzeK+O6O7Hw NMUjQS+3HLw5joqFVz5K6r6ppXNkXAZC3IhKiv6XWCt9I+uCbrEAbEjptxkqE7cESL Xzd3ZKtE7qSqdxFTFassl3WwCGEmg0V1bAubUnjcGVeahR+bt7TcuFIRYHiWBRdfD4 q+cs6V0ejX8zYqZ54U0S8/NQlRGM8gRiFTb4F5pzU7F3S50WRwZrWhRCppv6McA3LR 1AXz6yZRzfpqw== Received: from 2a01cb0892f2d600c8f85cf092d4af51.ipv6.abo.wanadoo.fr (2a01cb0892f2d600c8f85cf092d4af51.ipv6.abo.wanadoo.fr [IPv6:2a01:cb08:92f2:d600:c8f8:5cf0:92d4:af51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jmassot) by bali.collaboradmins.com (Postfix) with ESMTPSA id 53A5917E129D; Fri, 1 Aug 2025 15:16:54 +0200 (CEST) From: Julien Massot Date: Fri, 01 Aug 2025 15:16:51 +0200 Subject: [PATCH 3/3] arm64: dts: mediatek: mt8395-nio-12l: add support for blue and red LEDs Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250801-radxa-nio-12-l-gpio-v1-3-d0840f85d2c8@collabora.com> References: <20250801-radxa-nio-12-l-gpio-v1-0-d0840f85d2c8@collabora.com> In-Reply-To: <20250801-radxa-nio-12-l-gpio-v1-0-d0840f85d2c8@collabora.com> To: kernel@collabora.com, Dmitry Torokhov , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, Julien Massot X-Mailer: b4 0.14.2 The Radxa NIO 12L board has an RGB LED, of which only red and blue are controllable. Red and blue LEDs: no need to choose, both are enabled. Signed-off-by: Julien Massot --- .../boot/dts/mediatek/mt8395-radxa-nio-12l.dts | 31 ++++++++++++++++++= ++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/a= rm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts index fd596e2298285361ad7c2fb828feec598d75a73e..12288ad4d2932b7f78c96c0efe3= 66a046721f919 100644 --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -73,6 +74,28 @@ button-volume-up { }; }; =20 + gpio-leds { + compatible =3D "gpio-leds"; + pinctrl-0 =3D <&gpio_leds_pins>; + pinctrl-names =3D "default"; + + /* + * This board has a RGB LED, of which only R and B + * are controllable. + */ + led-0 { + label =3D "rgb-blue"; + color =3D ; + gpios =3D <&pio 6 GPIO_ACTIVE_HIGH>; + }; + + led-1 { + label =3D "rgb-red"; + color =3D ; + gpios =3D <&pio 7 GPIO_ACTIVE_HIGH>; + }; + }; + wifi_vreg: regulator-wifi-3v3-en { compatible =3D "regulator-fixed"; regulator-name =3D "wifi_3v3_en"; @@ -647,6 +670,14 @@ pins { }; }; =20 + gpio_leds_pins: gpio-leds-pins { + pins { + pinmux =3D , + ; + output-low; + }; + }; + i2c2_pins: i2c2-pins { pins-bus { pinmux =3D , --=20 2.50.1