From nobody Wed Dec 17 01:27:33 2025 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (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 35FE01442ED for ; Tue, 23 Jul 2024 19:56:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721764604; cv=none; b=dh8oZfW3FwsAvO5sRh8ZpMTWj5emfn6jWVgrrR2VejVWhhUHRczgzAEZjlhrcR/ORhbUVyyVRRG2Hb3JWMzjUhb30xiOw5xsQ00AARPWNBunhL9DJxwh4PowtwK/1QJ9682OF590Rw07phGbw7RyORJj0BSWLPizXs8UXIgm/cM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721764604; c=relaxed/simple; bh=CK5oqUywZaoe3khyZudk2BNNWMAzJiA5zSYb5ZOZLv4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=nYHHUR+7B0IkzBlVEZsvxGOTzQczQ80LL1SIKJPe04peQ9oVX3yszKWUvWxO+jUVi5NWY//k7zUMpDujDn7vYM/VsKY0ik+uiO0uQQyaEzI/DYZQ9gMhdU69e8XyhHysAQ08A5HlK4yHSONpUEiBXRZpSfKwqCkrNSfSSbJlr64= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Received: from i5e860cd3.versanet.de ([94.134.12.211] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sWLbu-0005iD-NE; Tue, 23 Jul 2024 21:55:46 +0200 From: Heiko Stuebner To: heiko@sntech.de Cc: ukleinek@debian.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 10/14] arm64: dts: rockchip: add gpio-keys to Qnap-TS433 Date: Tue, 23 Jul 2024 21:55:34 +0200 Message-Id: <20240723195538.1133436-11-heiko@sntech.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240723195538.1133436-1-heiko@sntech.de> References: <20240723195538.1133436-1-heiko@sntech.de> 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 The TS433 has 3 buttons, power and copy in the front as well as a reset pinhole button on the back. The power-button is connected to the embedded controller while the other two buttons are just gpio connected. Add the gpio-keys definition for the two buttons we can handle right now. Tested-by: Uwe Kleine-K=C3=B6nig Signed-off-by: Heiko Stuebner --- .../boot/dts/rockchip/rk3568-qnap-ts433.dts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm6= 4/boot/dts/rockchip/rk3568-qnap-ts433.dts index 34fc31ea9a39a..9f964b6f411c9 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts @@ -6,6 +6,7 @@ =20 /dts-v1/; =20 +#include #include #include #include "rk3568.dtsi" @@ -24,6 +25,24 @@ chosen { stdout-path =3D "serial2:115200n8"; }; =20 + keys { + compatible =3D "gpio-keys"; + pinctrl-0 =3D <©_button_pin>, <&reset_button_pin>; + pinctrl-names =3D "default"; + + key-copy { + label =3D "copy"; + gpios =3D <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + key-reset { + label =3D "reset"; + gpios =3D <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + }; + leds { compatible =3D "gpio-leds"; =20 @@ -202,6 +221,16 @@ &pcie3x2 { }; =20 &pinctrl { + keys { + copy_button_pin: copy-button-pin { + rockchip,pins =3D <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + reset_button_pin: reset-button-pin { + rockchip,pins =3D <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + leds { hdd1_led_pin: hdd1-led-pin { rockchip,pins =3D <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; --=20 2.39.2