From patchwork Tue Oct 1 13:46:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Semkowicz X-Patchwork-Id: 13818011 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4E7DCEACC3 for ; Tue, 1 Oct 2024 13:49:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=tAj/ZcJsteYyfCk2vYENrMCwftIRTgZfWUbq7u955gU=; b=exmeYArkuvDe58I2j3PL/4ktRA W7+UXImkt+gevMeVeXcHF6UXkdyCcTjkl2d5RMbeyyc9mcX7SbhFAK1Ckbq/9h+C2XSpb8iehWfVT lN7UsrvBdaJGyqrkBp/fyowBhW5aNe4rd9kvxaeyrQSN0G0n6zAqiEuP4P8RhPQAjo/DHxJkhxas+ dajMu+5NJ8TB2yCuMY4MHfjoKF0kAn22drweTxRCq6niIFBeMf/zOfQlOFSiQWRjprwjrF78LEPwS 33UZ3kHQ6d8VAgNTwQSWwNiqpWuhjE74ElysdNsvi03A4Hn7Gk6/K+NXzrVNBHyEWsRCb7bRapCNl oXcXwN/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svdFb-0000000305h-3RZP; Tue, 01 Oct 2024 13:49:15 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svdEO-00000002ztX-1PDZ for linux-arm-kernel@bombadil.infradead.org; Tue, 01 Oct 2024 13:48:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=tAj/ZcJsteYyfCk2vYENrMCwftIRTgZfWUbq7u955gU=; b=c6TJk5Kbo3ZX49Feel2LPVesEt tpVu9nTzrWRjtOF85F0AjaZoLTgnqWENgddc7hT7PTLExl96uEDqKhyaOMTkKUjstKx7CI4y3n2VR zuZAabohul7Q+xY0ubUxjo9HsPAi9Zmx+6d21rk0J3XGxzuTOO3VGBd6Ef/T8aU+6Cle+NCbG9ysa YvXARcVR77TfxTA8TmI+9Nqu7e3f51pHcDS/I+Psv22QEuZ3kveyJi7zeHz5bFI2XtcRNwobJhTQk 1wlPgCegnaY3dmfbZPTBbFfqXyiITW+hd9n0UMWPAZlE+iRB0pWUfIp21oNujgtxPfx+gRYSszzhs aAKngvBQ==; Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svdEK-00000003877-1Tsi for linux-arm-kernel@lists.infradead.org; Tue, 01 Oct 2024 13:47:58 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a8d56155f51so712428566b.2 for ; Tue, 01 Oct 2024 06:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thaumatec-com.20230601.gappssmtp.com; s=20230601; t=1727790473; x=1728395273; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tAj/ZcJsteYyfCk2vYENrMCwftIRTgZfWUbq7u955gU=; b=gyxKg6zJu0T8wFpSkEVpK3wDeIlXfM3jyWE5twfoA3N4xt3bb3QpJfpExNv8RZBrzw 2NwZKsT/Gp8v0HQueQCfvbJNkuVgARD5eXqE2aVPtJd/QxyNMLS2JkIv7hBnD7EJ9VNH KBvzChQoZkDzwKMB7TPbHSnZVi+5xIcnUKAA9sOpeKtFbsaOiSXXrZ4rZkpWEmAKAY8P /fKEFl2BlhM29VUxdLXVZH+YTuDrTb9GzTZGYMeratRf8s0lKtCroR6poyWGcIHbgKGe S+DH6vjmue6wRd5klo++b5HFJkYGtn4PFuIScJaQf8fcyR4HFb+y2RvsLzHhHEFSL4mJ TJsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727790473; x=1728395273; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tAj/ZcJsteYyfCk2vYENrMCwftIRTgZfWUbq7u955gU=; b=nbHHBVBiwyfb0hV9ZcpaUxBPsghdQd5aVDxp4y6KY3Ehp7GOpRwHY2t31d9tPVgEnd IsN59eCu4kgq2NRzNni8Z9iK0oRkf+uuq0FYEulCRRX8dTnMmZd1SvYBnl5MJ5BhvqWS Yxq401Hg0+wnKsAewNxknQUm6tJnmESdZ5gsnME8Ntz8swL8VaqkdtPp9zzg/S9nlQ3H cfcr5TKAw6Ot/lMJtMv+JOSBkgBeGvA7vwoU+Be/Uc6KOVFQebsNN9AKe8kXVjhVl9sy 3tYow1yaeSRzav2+qIcn1oCjVoyixvMN0Nni5KkcIIwtgI54zt3ktakDWYv7epukS1WN FGNg== X-Forwarded-Encrypted: i=1; AJvYcCWbxByBTUQF/WCtMvZLgUMopNcx05RAJ5PY0LpCDMnMJX0MDYbU0b3+5KjGRjSKl8MGUb+r8y06jOmi4pstjPS2@lists.infradead.org X-Gm-Message-State: AOJu0Ywdiow9chV8aIq1DjM3ZBtAOySDS/J6YK9tmYR8SUKTOMWvMqIG //jb7PoZYp12gXuOnLLucsX1jnAyfdGxZ/aiS1So59AHFoPgAREXMCtXjiVy42o= X-Google-Smtp-Source: AGHT+IH+MuAg6zAQWZk+ikg3Qoz0ip32Sj7sS0ZDEO60KFiCvlYuo67UTzu/A1PJsNONwI6GY//WlA== X-Received: by 2002:a17:907:6d20:b0:a8a:8c92:1c9c with SMTP id a640c23a62f3a-a93c4967869mr1500151266b.29.1727790473172; Tue, 01 Oct 2024 06:47:53 -0700 (PDT) Received: from localhost.localdomain ([91.90.172.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c27cafc8sm715413666b.84.2024.10.01.06.47.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 06:47:52 -0700 (PDT) From: Daniel Semkowicz To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Daniel Semkowicz , Farouk Bouabid , Quentin Schulz , Vahe Grigoryan , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v2] arm64: dts: rockchip: Add power button for puma-haikou Date: Tue, 1 Oct 2024 15:46:32 +0200 Message-ID: <20241001134741.210979-1-dse@thaumatec.com> X-Mailer: git-send-email 2.46.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241001_144756_657541_680D0FFC X-CRM114-Status: GOOD ( 14.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is a PWRBTN# input pin exposed on a Q7 connector. The pin is routed to a GPIO0_A1 through a diode. Q7 specification describes the PWRBTN# pin as a Power Button signal. Configure the pin as KEY_POWER, so it can function as power button and trigger device shutdown. Signed-off-by: Daniel Semkowicz Reviewed-by: Quentin Schulz --- Changes in v2: - Move button definition from puma to puma-haikou dts arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts index f6f15946579e..c04bb98a45e5 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts @@ -30,6 +30,12 @@ button-batlow-n { linux,code = ; }; + button-pwrbtn-n { + gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_LOW>; + label = "PWRBTN#"; + linux,code = ; + }; + button-slp-btn-n { gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>; label = "SLP_BTN#"; @@ -203,6 +209,8 @@ &pinctrl { buttons { haikou_keys_pin: haikou-keys-pin { rockchip,pins = + /* PWRBTN# */ + <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, /* LID_BTN */ <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, /* BATLOW# */