From patchwork Thu Dec 29 10:32:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 37353 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2333243wrt; Thu, 29 Dec 2022 02:34:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXugvsj0Y8Q9lrSMNMZdOWZldLzveSGfkE9oF5oIN+86/FUhyRf+rMQH5GAo40Eky7IzovQp X-Received: by 2002:a17:906:38c6:b0:7c0:dcc2:e7b1 with SMTP id r6-20020a17090638c600b007c0dcc2e7b1mr23575562ejd.43.1672310082845; Thu, 29 Dec 2022 02:34:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672310082; cv=none; d=google.com; s=arc-20160816; b=EEq8T9FDS6k5qHK0MF8iltpQVjpCP0GQnyOpe+in3I+ZjU+dSlDozqIR4VNvI8Bpl9 0HwfGBc1wos1jEFFP9PCuiOHPxtf3FKDEG7Ji4bEr9Cio1hkoKRsdeTdG6cLkFpHeHHn 5lopArT1cTKuGddcfHOqBsKUrbbc3xSF/ml4vcuD7H1BvzPD5oholC65LvedM3922Zzn on42w9RZOBBEG9msmKrpW48GKOHe7MrxUMJY8aGU+3pZcuINIy2E/sP/oIiJCta37eeG asY3/M0hbGBefuhrEpbkQf0BipnvA02itK3LGJbRvcizOJGj2SPWoLQhOAgxbdtHdW/i EZXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VHanGwSynG3aJ8MgOjQFcgeBuUBWc0OK0AqB0H99D9A=; b=frmvvEKTNim+2L/utEfeLh5QulJRvoZQtb+9yKQ3zU9GhKQBanxtIqkr0tw7XY1DGX M7qigu8nDoVU6l02LZ7EY3TbPRBEcG49Pcg2onMevSeK8fv6Og0HQkSLzivy25zatcZi CIZ1UZfyqpAC1U1METpGAM7bb3w6CLGmvtRIrxV5wqAdajhXUuZqVxCBs6x8Eq/pnzkX DtQ1EZEm78HHAw7SPERorDVEoCvUbb7SIOyNxap5wawxVZjWkxq0IxptdGk1QklGJkpQ XTvOlZUndRIM9Co8ofRk+6Clc1R3tgYD1W33rIFQEvu0ClfYpl3VpL9Op+oWHLj/vn0I aErQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a4XC2KdC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs40-20020a1709072d2800b007b7eb087819si17183059ejc.200.2022.12.29.02.34.19; Thu, 29 Dec 2022 02:34:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a4XC2KdC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233255AbiL2Kce (ORCPT + 99 others); Thu, 29 Dec 2022 05:32:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233099AbiL2KcW (ORCPT ); Thu, 29 Dec 2022 05:32:22 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAFE6BE18 for ; Thu, 29 Dec 2022 02:32:20 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id 1so26965622lfz.4 for ; Thu, 29 Dec 2022 02:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VHanGwSynG3aJ8MgOjQFcgeBuUBWc0OK0AqB0H99D9A=; b=a4XC2KdC6rbpuiEOnN+0RJCv+E9FxYdvUUialvoSNzL8JrAGBDd4ACwvu8BHudLBSQ GFKX3NyYL+BERBoOqv3ui4G3q85Z7Mcdvoj54HRgg6X7OUXLiXRV2q7+8zC34cidQoXj RQD2N7lXX8hJ5z9ybrQgSPvkhNJtq++4l8ia+uxTsFy/DEac/MG1pJIKrPUocEfO4h5f QmNLeVDynGSxkeAUMJ2jT00iYEJo/gfrI8hhJT3kLAdmiENN7hoLZ5MA9nn/LcLIMS0e f0W9sVFLsC42f4/KPlx0fp8kOWwCKTecVytKHqDewAqj4wXmESleiggT9BXFm8zbnTzm xRuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VHanGwSynG3aJ8MgOjQFcgeBuUBWc0OK0AqB0H99D9A=; b=rinihP58cA1Na1vwplVmAvXNteYxUpvbHTSPprHd+3t2qRDlfFRyCJZFRhWiRmB5wu tk1JQwkg4ZMvJ1/PDwAME6zKmtHoNLRYZ8OWWjE5e0t5Js0jFcAOy139pz0T4Wk2eQ+q Q4bMKq/anNHGGuktNU1bw0wCUldkzTM1PS8/joiGaQXMUicE4ijkRC+xMhS7h5sRNwkd UFuorbC+M4M3eaOpwrG0o9YbQelR6l0Ue/j8hypj6AECrqb0XeKzVBfckLiez6782tOz b+VL+JsrHnYX8UD6IhMb08FZVt1nKIZOZGHK2Sr9EDq7HAxeEBIQpUSXBC+3VztJB19M ERiQ== X-Gm-Message-State: AFqh2krDCYtRXZDBtezUzjihd92NfcaWSzvRRknGD2vXBrWOIu017TZv 47JhgwO9v3QpsRK19lBXC41vcA== X-Received: by 2002:a05:6512:398c:b0:4b5:7a91:70f5 with SMTP id j12-20020a056512398c00b004b57a9170f5mr9076858lfu.63.1672309940348; Thu, 29 Dec 2022 02:32:20 -0800 (PST) Received: from localhost.localdomain (abyl184.neoplus.adsl.tpnet.pl. [83.9.31.184]) by smtp.gmail.com with ESMTPSA id m1-20020a056512114100b004a478c2f4desm2993526lfg.163.2022.12.29.02.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 02:32:20 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Vinod Koul , Konrad Dybcio , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/7] arm64: dts: qcom: sm8450-nagara: Add GPIO keys Date: Thu, 29 Dec 2022 11:32:09 +0100 Message-Id: <20221229103212.984324-4-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221229103212.984324-1-konrad.dybcio@linaro.org> References: <20221229103212.984324-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753544217392010649?= X-GMAIL-MSGID: =?utf-8?q?1753544217392010649?= With PMIC GPIOs now available, set up required pin settings and add gpio-keys. Signed-off-by: Konrad Dybcio --- v1 -> v2: - gpio-key,wakeup -> wakeup-source .../dts/qcom/sm8450-sony-xperia-nagara.dtsi | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi index 8e128efcb128..0e139921b3e3 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi @@ -27,6 +27,41 @@ chosen { stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&focus_n &snapshot_n &vol_down_n>; + + key-camera-focus { + label = "Camera Focus"; + linux,code = ; + gpios = <&pm8350b_gpios 8 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + linux,can-disable; + wakeup-source; + }; + + key-camera-snapshot { + label = "Camera Snapshot"; + linux,code = ; + gpios = <&pm8350b_gpios 5 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + linux,can-disable; + wakeup-source; + }; + + key-volume-down { + label = "Volume Down"; + linux,code = ; + gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + linux,can-disable; + wakeup-source; + }; + }; + reserved-memory { adsp_mem: memory@85700000 { reg = <0x0 0x85700000 0x0 0x2800000>; @@ -562,6 +597,32 @@ &pm8350_gpios { "NC", "NC", "PM8350_OPTION"; /* GPIO_10 */ + + vol_down_n: vol-down-n-state { + pins = "gpio6"; + function = "normal"; + power-source = <1>; + bias-pull-up; + input-enable; + }; +}; + +&pm8350b_gpios { + snapshot_n: snapshot-n-state { + pins = "gpio5"; + function = "normal"; + power-source = <0>; + bias-pull-up; + input-enable; + }; + + focus_n: focus-n-state { + pins = "gpio8"; + function = "normal"; + power-source = <0>; + bias-pull-up; + input-enable; + }; }; &pm8450_gpios {