From patchwork Wed Apr 10 15:59:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 787508 Delivered-To: patch@linaro.org Received: by 2002:adf:fdd2:0:b0:346:15ad:a2a with SMTP id i18csp761540wrs; Wed, 10 Apr 2024 09:00:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV3PIZkkWLyf4YDbqDk2GSIjrwh7UA1FrIHJuDw/EACnC1hz7BBDX177NcVWg4aC6pzyrbLkCBqPEnV/LfOkz1V X-Google-Smtp-Source: AGHT+IFpCXOZ/4GEhf5TIpXLgGqrO9ULGH+UK1anLhsqsKfqoskuibpyrNxHh4l7gNC/Ggy+Z0VP X-Received: by 2002:a17:907:6d1f:b0:a52:1820:103b with SMTP id sa31-20020a1709076d1f00b00a521820103bmr523195ejc.2.1712764827158; Wed, 10 Apr 2024 09:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712764827; cv=none; d=google.com; s=arc-20160816; b=KotfftqABCS8iYYqrssnkdpqEUOoijyTAsQ5sz0eAItKlluH2+TOlT1ZoQEurKFAcs KmNQDyrGb4J/R5HWReuzMbeywwG4XPEICnFZrCbz0N390JCVRxv+dwAMizoBLy7KHVBJ mm/C+85PeG4OcN3DnoqUlqobVn5zbSO3PkMcELr7sznnf0jqA17oQ8G0mI7TOw9X8ux7 rjM/t1LK5gC2D6LinoDHZRYJW3hL2WHvQ81DTg9I5svcWoHniHp6h3wzEGsXWY/EhrAS l6TUb/GnALaMbsBAiSURAk5VBPpoqZsAX/pnJ+AtaY+QUage8ARckNNOB5fAvj0uBdqL 4XkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=3FZxgBrC8KxfYtQvW62bs/elUi8gPOkzQrUnPtR7gPk=; fh=w3XPBZeqJntfsjap7BOyGXw8YYuVBSjaYDJQjQgdAcA=; b=nPKDwTWNReHXpeuL2HfN4mG+as5FJONNUh3LpWv0h9o3/F50Nue9X3x31O0n1xozAN DfgeMZ/hiCjpEWuzmG7CMlVfPLOlJ/97uqVIf4FGcdGFuExvm4XAamlQsmrgVFu8V7A6 N04Cm50V2Bh2R1QmEeTXodusN9DG0lvrF0ec6SlirbZMengb7SkjUc+ua2FBD4yPCLzi h2B3rA05ZdO+7hlR0pdrGuy0HxihIc3SV3YExGQ8OfVTe0TAVIdReUmxxLv8IHuSiBbU d6Xy3e9E3eJSW2upF27DIih+8MVHCwDDsQqtqfuViSy4RaTYsx1OvbZiPA1jNH5Cx3p7 PDag==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L21kE0R3; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id hd16-20020a170907969000b00a4e3dc7d36esi6382917ejc.77.2024.04.10.09.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 09:00:27 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L21kE0R3; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 10F61881C1; Wed, 10 Apr 2024 17:59:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="L21kE0R3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D0CD68815B; Wed, 10 Apr 2024 17:59:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E043481EEF for ; Wed, 10 Apr 2024 17:59:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-343e7c20686so3884561f8f.1 for ; Wed, 10 Apr 2024 08:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712764789; x=1713369589; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3FZxgBrC8KxfYtQvW62bs/elUi8gPOkzQrUnPtR7gPk=; b=L21kE0R3+/c/iL4PCZQa471Q2AzEtb2lm3Pz4uPEMcnG9GzaC7JPH7htKIvH9NFDTI Cp2U/Y7TR1uXAgD4jyp5Z+3JHJsO/VcttVejIpoG8kjvKFVvds5vd7of8D6FsXYTCgIM oXS/tUITxAYzKSR+Dd8jqfPmthmCnGVwRd9tAjTU9lMUa157Tf3BD6HMC3lty+MdOiU0 s6ntauI/fEcfG+kItMorlAA6I/K/4WTnd/IjfF99qokvj7YVAwTJD5c84XY1ndEAEtgJ PjS3rEFDf5VcM4k/LHYPVXG2y77J5WLqT+AqR0yr77u3vB+WXP17UkNZkXqy2HjIHYzv sNnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712764789; x=1713369589; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3FZxgBrC8KxfYtQvW62bs/elUi8gPOkzQrUnPtR7gPk=; b=wQsQz02jUGlU1ZQ+nZWekm945HypYUs+ONsjvSq7OqbEoQRo4p83Jx2PTAAfqozGGP NVn1a5mfIEdM6HrR0HPdFZDnApOQn5ryceY/hvlNM0QwZn34bWQ+cnefnn6+S3eapG3a Ms5Z2Z03SXVxZw4yjkrymi9a+DcCFA0nAFlf+QcSrJ8iA9Z3zKTukng65S3BxwUXbNkL uOXHa+qrNvWOUxP0WoZeUDT4oER5TiWMblCMDkMN024IFSbgq2zQVXerUrjuTCbP26Iq 9MB58saSz5bj+xhV+hQx6oIOPlcc78uli9KMzeQ2HKRrZgqA6l08+XVhD6Ng7wpxeAQL Nu7w== X-Gm-Message-State: AOJu0YzTfDgyyFBmcWfZVss80ci3FVn9MQSMFC1w1YBbkymJHtyH08rc 3Y22Edfo/CLsW5QWygHKip4IzxR1lkdv7VBB24T5e0G/U9o/+PdDr+8gQvjUYNxDHdOkjMcm4hR TpLk= X-Received: by 2002:adf:e98a:0:b0:343:af1f:491f with SMTP id h10-20020adfe98a000000b00343af1f491fmr2258665wrm.14.1712764789039; Wed, 10 Apr 2024 08:59:49 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id p13-20020a5d638d000000b00343ad4bca7dsm14039431wru.85.2024.04.10.08.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 08:59:48 -0700 (PDT) From: Neil Armstrong Date: Wed, 10 Apr 2024 17:59:45 +0200 Subject: [PATCH v2 3/3] button: qcom-pmic: add support for pmk8350 button configs MIME-Version: 1.0 Message-Id: <20240410-topic-sm8x50-spmi-clients-v2-3-783e20d66c25@linaro.org> References: <20240410-topic-sm8x50-spmi-clients-v2-0-783e20d66c25@linaro.org> In-Reply-To: <20240410-topic-sm8x50-spmi-clients-v2-0-783e20d66c25@linaro.org> To: Caleb Connolly , Sumit Garg , Tom Rini Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1572; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=deSMcSYkix4cJpASgfIcHwoL3jgHF+QbOb+NbvbmeAY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmFrdx88MDbDc8D/dj5xRXNcc8lb/aZioCuPGwgq9O FS+Gk3iJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZha3cQAKCRB33NvayMhJ0ewmD/ 41FQ/F15gW26ElSbcgSNuGtraylI6LZJoBtnEHAW1KZ6w1w8WUqqawF559pX43THB6J78Jhnh3qtj6 jtMRFobDqJJvL6rvSGOzZnTBzV2tX1/RhL06HgR6CCb0gk2KaQj763v3LKfdk+AaxD67pDhmWIQzWX Ryo+9nBxfc913p5d6/67B0d5H+rFQAzQauULehewBbkwCvMR1mIbbsk0JkPmd4pmqlKRmXMxkw3Lxr 08UlmDaedv+njv00mctJ4FUeoMRmgrcqwz2oKmgJRbbwDUQxJr5v6VKaXUNAkAI1jIe/V/nnQtVQzs ai7eCJj+86rzJ62o8AUswcDTWsWDoK4qUAVc09LyzOdPtd6KDNKsIfdAgnW4z8OVa82wop4fTQou0p 7pwIiN2Pf8cKlK2cyKNWgtEATBZfrhb8s3T9AHFjfYhhxXm322amyN8T4FZ6ny/bJmdXwyv22nXZOf yhn9sOhGT2eSlXeH6rIJINZPoEmldaemna+pwPKuAxbFQqbzikmw0Js2MPwWWetpMmHWQq+rLaUZCA u26+JK296uHSnG1YyjO4Ees1I8VEueamq+03W0qLZjGExjTYxrTwKtUA2+4adcNeKh92ELV+0yHraL ejeomCieI7zaDdjN0PTW6E5aynYwROXmiRBlgSuCR83jmM8vGVqMTNGoXJmw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Finally add the entries for the qcom,pmk8350-pwrkey and qcom,pmk8350-resin found on PMICs used with SM8350 and later SoCs. Signed-off-by: Neil Armstrong --- drivers/button/button-qcom-pmic.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/button/button-qcom-pmic.c b/drivers/button/button-qcom-pmic.c index f6da958097c..ad7fed3ddaa 100644 --- a/drivers/button/button-qcom-pmic.c +++ b/drivers/button/button-qcom-pmic.c @@ -36,6 +36,8 @@ struct qcom_pmic_btn_priv { #define PON_INT_RT_STS 0x10 #define PON_KPDPWR_N_SET 0 #define PON_RESIN_N_SET 1 +#define PON_GEN3_RESIN_N_SET 6 +#define PON_GEN3_KPDPWR_N_SET 7 static enum button_state_t qcom_pwrkey_get_state(struct udevice *dev) { @@ -69,6 +71,18 @@ static const struct qcom_pmic_btn_data qcom_pmic_btn_data_table[] = { .code = KEY_DOWN, .label = "vol_down", }, + { + .compatible = "qcom,pmk8350-pwrkey", + .status_bit = PON_GEN3_KPDPWR_N_SET, + .code = KEY_ENTER, + .label = "pwrkey", + }, + { + .compatible = "qcom,pmk8350-resin", + .status_bit = PON_GEN3_RESIN_N_SET, + .code = KEY_DOWN, + .label = "vol_down", + }, }; static const struct qcom_pmic_btn_data *button_qcom_pmic_match(ofnode node) @@ -179,6 +193,7 @@ static const struct udevice_id qcom_pwrkey_ids[] = { { .compatible = "qcom,pm8916-pon" }, { .compatible = "qcom,pm8941-pon" }, { .compatible = "qcom,pm8998-pon" }, + { .compatible = "qcom,pmk8350-pon" }, { } };