From patchwork Fri Apr 5 08:27:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 786200 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1101:b0:343:f27d:c44e with SMTP id z1csp54708wrw; Fri, 5 Apr 2024 01:27:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV65IMkPT5k7ML9JWdto2+cLQnE0cqSgRYhok1c0UwogJV2mV4djLXAzInG6p+xWzGj+dtrl460nE4abhjOXcWh X-Google-Smtp-Source: AGHT+IGeLuXfBW4yYmk2StQvR8WR29l/n9eZsKcejV1FA34T+Sr6sOHYZG7TSxJcnTbb5jJCp6Di X-Received: by 2002:a17:906:260d:b0:a4e:61ac:c3e9 with SMTP id h13-20020a170906260d00b00a4e61acc3e9mr424512ejc.31.1712305679546; Fri, 05 Apr 2024 01:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712305679; cv=none; d=google.com; s=arc-20160816; b=MyC1yY88nQdawhip58xPWirI+m8W9G38qZqCKds8jUjbqyOa4Bu96Tl4IiUulsRhl1 k+gAjs6uK7c2gzeMarNXA359AMsG1SNNB0n+LqBcHIoSdebM+xm6A7Ihj/aV4zS7Hl7b RMS1lmXp1htXI0gq1F1g7fyFEaeXA6WD653L4d8/XWPTGy/a5vOjQhC+QJiBORGgMqfd uCdg6mjXg2JPzTRcgPrxxd/YF2JNjqSrivrIQNraeKCrbQ9oYkehq6gFHgmTU3xPaY2z 0QShoNnkJxmr1xbj+A0S2ddcKa99S9yxMjtFzeuI8z9UBTS+Y+SPSQtfyvKYarHduXvW O84g== 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=PUa2jS9ewfWLrBpdAbB+JHzljYSnIAk6QET7uMcSglA=; fh=y0POlIXJecwqoNcbCPvw+3TUnABdVL07VhiAHap2cn4=; b=K3kowHeKDfDZwBfXdZmYT1LTj7Vc6vOxdTglh4LW/825ems+xlPhMbBn1HmdcjwyLf Q7Z2ASf8fFFqv6Yb1JqHFgUvR9EtL4BCt7TNUyBGURs2z0v4DK01Nd3AkWpKMEPek73k yQMwVkscpoNiXWfGCLFIpdJqM131+cBMKQL6+A3SjVmXWmM7mEFYGoL/JFyE+z9Rw+tK CFvpD4nfn9K5My70TaQbwFkdv8uJMUDMD83jiHppE70Xd1t0kxQjLFXf2RoIP/2qD8QX zCRAqMdcM0TST2DXDDeLG0VeZcouBbQ7YbrA7lRLqUPLIFDyShCE7PxB82pBmUeyYfa6 holg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ls36ZdF7; 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 le30-20020a170907171e00b00a46485678b2si463730ejc.651.2024.04.05.01.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 01:27:59 -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=Ls36ZdF7; 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 F2F41884C4; Fri, 5 Apr 2024 10:27:36 +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="Ls36ZdF7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2562888433; Fri, 5 Apr 2024 10:27:34 +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-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (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 1C07688433 for ; Fri, 5 Apr 2024 10:27:32 +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-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4162b7f197cso9454245e9.3 for ; Fri, 05 Apr 2024 01:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712305651; x=1712910451; 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=PUa2jS9ewfWLrBpdAbB+JHzljYSnIAk6QET7uMcSglA=; b=Ls36ZdF7glhOM4Qb1Eb7vsBMhf8fpXr5ABjhuhN4tPYgguniPxlLm7xmXUCwsyM460 5q+ZbrYOGVoqyL0q01o18G0lX5rfni3q5xbXdM/WY3Flzr+XIC33rKakoSUYgg6nmwrt CMgHoVMAkyOMoaBhPTiyz/7EivJDLXoZjTU51mdw91SFis/nPGNJWNK0KM80EGZs+i1p gMj4Ek73Wc4Fe56GBRlkotceR5m58s+pbwzD1iRRgJQSp6B5LLDnLwZ70CquFIY08bEc D+/49lC4Cw+PMKALpA5+KUs2Peq3ib73krSQQlvyYMMEz4F2Jf0TDREAxdbr0V3sE9iq pj9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712305651; x=1712910451; 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=PUa2jS9ewfWLrBpdAbB+JHzljYSnIAk6QET7uMcSglA=; b=aZU7Z+aP3BCe3UjcfraBze2YjbOwXwQ8TMUHbNhOjr9EikrAv4oNdJaODyRI5LEyrP Ufb67OT5vYvt/8YLlBLcyt4UxSWO7GUjubLBbPLeJ1rA9CK69IFvfR42OFIu022WribL qoFan9w3c/3kRZxR6ny477djAV3800ODwPJpd73eUTo/tBwKuJILxVL2dN5oJW8qCTNj voEPA6qqkA+E4J5S55Wceb1/EXYe9IsHghsMRRswb5erKR2VFeLhFP02gD3pWyWmG575 U59J6+VXZDgi43eay+GYNe4erVIVOcqzlsvgRAU0wrndwrXmRCBJ4wFMYd2JDiFZwlVm f87Q== X-Gm-Message-State: AOJu0YxqXdP8EdiXY+2a3N0F8HdrP09IA38/IWqyTu1Qh/l12ww5Pt0x pSpdIt1pQ0aMFFAOsUDo+/FfdM/ZaookdLGOWKzAXdJ3SZ5Q9faG+iGxg+O4nzk= X-Received: by 2002:a05:600c:1f82:b0:414:bfd:379d with SMTP id je2-20020a05600c1f8200b004140bfd379dmr639532wmb.22.1712305650595; Fri, 05 Apr 2024 01:27:30 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id s11-20020a05600c45cb00b004162d06768bsm2721593wmo.21.2024.04.05.01.27.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 01:27:30 -0700 (PDT) From: Neil Armstrong Date: Fri, 05 Apr 2024 10:27:26 +0200 Subject: [PATCH 3/3] button: qcom-pmic: add support for pmk8350 button configs MIME-Version: 1.0 Message-Id: <20240405-topic-sm8x50-spmi-clients-v1-3-c28603ebcf18@linaro.org> References: <20240405-topic-sm8x50-spmi-clients-v1-0-c28603ebcf18@linaro.org> In-Reply-To: <20240405-topic-sm8x50-spmi-clients-v1-0-c28603ebcf18@linaro.org> To: Caleb Connolly , Sumit Garg , Tom Rini Cc: u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1321; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=wCokJfViuQinUBF5rdS3P5CD0DYzO3mK3/6aTEbP6Wk=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmD7XvyKKW40bGR7EotITQAOt2s3Kd0LF/D6tSecPC GBRc2iiJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZg+17wAKCRB33NvayMhJ0eNbD/ 9zpuTFoSStnheFq80xA5XbnZwBfc6rbylVCl+y7Sbaeb1G4gZkY4h1N9QBFZUQseqEhWRAWUoQf3kr bsGZo0D4wNgdY7FXTC7HJnFzTufA2OE0X9ckHjDivBF4Maqej7bpKgCW8IXSJELNj/Tl1BzIyXzF22 3SSdbNLMtiSfdJXNWePBkT1XGPQ/wIz1VfBWRgqqUqmulw6LyshLYA6YAAYI5A5vWOBIVjBCYrDkcF 3raYr36xhiD81scsy9b1FAmXRmdcw+McF//Xt4Jicu+PD2bc8l2PCDAtZAjffD8arbCRhVGJtFdfs7 QrG+ZSF2BnO+BU8S84XSOdhFExYJXiQgC47VqSMjCnjJDDFI+YP0GKmdxq8V8w5+v7DMVfqEmZYEkl Pg3wj5NxxsY3SZoHouNaqzAsc9bq7UVG6UD+6RgOVL6CokpSUSEIvyOTvpp/zLZB7UhVQpHZYq+bwH D7OGyWe1wYg2Xg1DJ1yYMMk9vN2lm+Hmvu/FAEthib6VEzETnFM5z4vuYUHgRaRRxuCyD7czui79mK gsNaSrzXWRnaZHLjH1tQxrSNdZX2Pe17vSxHCOoi0G7YtyE2GRfaIUsfcRum8j/J08LdfVvg3OJUYb N9iRhkY20yYOuAXRwirzIuEDfgkMIbU2wnz7T8NX5pqmyFskOdD4sfV9znQw== 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/button/button-qcom-pmic.c b/drivers/button/button-qcom-pmic.c index f6da958097c..6153601017b 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)