From patchwork Mon May 8 16:04:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680145 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0879C7EE2F for ; Mon, 8 May 2023 16:05:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232527AbjEHQE7 (ORCPT ); Mon, 8 May 2023 12:04:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232838AbjEHQEw (ORCPT ); Mon, 8 May 2023 12:04:52 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0891E5588 for ; Mon, 8 May 2023 09:04:51 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4eed764a10cso5212064e87.0 for ; Mon, 08 May 2023 09:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683561889; x=1686153889; 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=QLu6la4M2S+eq30bRBxEn3j3JQWM6yeWV3xnHdJprV4=; b=U1T92bLP9KjsMOvz+8xGEjU3pO6jpYbf7knLt2es3jGHdIWQ+fHuOrfMSfzK8I0pDD HeQbQh55+iE5rRlGRgw0dety+6AaVR+I7ACbCOwgJLl8CY0EfqF7Sb7Yp4e1iWYpFMr0 j6OK3/2T/3IzhhRZNi/JdAgClF2ADY7KpsFQqTxdkO5u54amHm9PiTgrENVhRUnHRGyp esM2rZ0FwNx9ve4FkqvMQHq82zmYVhoKTG4zAODs3EIcdmrZAs5+aA2PZEIOrxDJEx2m 0J91hBqCSNprTwa637cDer8MnpP355jsTE/JC21EImykDm8RywaiBzRmugN4dswuh6f0 USCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683561889; x=1686153889; 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=QLu6la4M2S+eq30bRBxEn3j3JQWM6yeWV3xnHdJprV4=; b=GpcoKovd9oBZc+OAL+m+YZu6Or1jizGHXPmBB/9lbhagCHhYkYDMdqd8JRb4fDn2Dl vwX9mqMVeK6VuJFE1kaMSrudTiVAiZAVMDyRuKe19Eh7VIgAbp094lpUbFN3M05jLOcz yayMWqPlkh4NV7MCKXCYfPG60NaMH/eRJY3JoyJq4ZVPZaBaqNo1dTRiqoE0XnDZinsS fTmZTmVnai7XLuT7Zncm61zgZj/k7VE3WANO39b2y+Oq16aL8isCJsxwMgfyg6JfYwhA wv50z0pDsKHO1T5LlU5jCzlIcsEXvB0+8Ac0OexVjmg6MB1JFiT8auAaPx8DaL3jsZmm yMqg== X-Gm-Message-State: AC+VfDwFb1QEhtBdAq0L+5woNohRXd+P72Bpy82T/sGiALVylJx863hs xlvvVVgK2yxT/IMS0eE+6Uim5A== X-Google-Smtp-Source: ACHHUZ4QiKu8q75nnHDsmzWRA51cCxJapIE1UKFcsWVd9AN5EFpzV7cAVjfBbVdy+ljY/NLWUCJg2g== X-Received: by 2002:ac2:44c3:0:b0:4f1:36fb:7533 with SMTP id d3-20020ac244c3000000b004f136fb7533mr2476376lfm.66.1683561889310; Mon, 08 May 2023 09:04:49 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id h3-20020ac25963000000b004eff4ea8dd3sm32372lfp.76.2023.05.08.09.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 09:04:48 -0700 (PDT) From: Dmitry Baryshkov To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH v2 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon Date: Mon, 8 May 2023 19:04:41 +0300 Message-Id: <20230508160446.2374438-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> References: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On PM8941 pon doesn't store the reset reason. However we still need the wrapping node for pwrkey and resin nodes. Add bindings for pm8941-pon device. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/power/reset/qcom,pon.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml index d96170eecbd2..0f4f55dd4eac 100644 --- a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml +++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml @@ -19,6 +19,7 @@ properties: compatible: enum: - qcom,pm8916-pon + - qcom,pm8941-pon - qcom,pms405-pon - qcom,pm8998-pon - qcom,pmk8350-pon @@ -63,6 +64,7 @@ allOf: contains: enum: - qcom,pm8916-pon + - qcom,pm8941-pon - qcom,pms405-pon - qcom,pm8998-pon then: From patchwork Mon May 8 16:04:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680445 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F390C7EE30 for ; Mon, 8 May 2023 16:05:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232906AbjEHQFA (ORCPT ); Mon, 8 May 2023 12:05:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232900AbjEHQEx (ORCPT ); Mon, 8 May 2023 12:04:53 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33A3159FC for ; Mon, 8 May 2023 09:04:52 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4f24d4900bbso1707564e87.3 for ; Mon, 08 May 2023 09:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683561890; x=1686153890; 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=M8of//y9tmokmOnW15e6yt8zqMt9fsDSSEcIh47rbdE=; b=eTLjQN7KPiurBrzl05+P3S387ZXWCaGKIioWBTS6+95lvzq2wJ5/C8aRF8k6nCI9Le 0t26xqBGys0EuOY56Zl1uaWr8M3HzcD60E14GY7MY1mkDBiEkulysBA8bPMJr1/7Ai/b CHm+uVPJF8fJIiD8yvg9J22vcHp8qf2xQO5Evc/FgHMZ+vCXRWAlVPPEF+ByFBTfntNC JJmmA3I/FEaGnA8UWlm5ez82T7RdcnOkEEBw9t5KK85K8ZDPgKDkhSE6ePOoPappEpvG 0b6jWL9GVcDIK2hdH/iiiNIUqZ9RrRWGxsm+CXcFahKKWeHfQg5Dgk2k0KbXfj4S8Ojg 50tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683561890; x=1686153890; 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=M8of//y9tmokmOnW15e6yt8zqMt9fsDSSEcIh47rbdE=; b=XKx+Mgpgmp7B+7gxGhEQGNVrqswQ9LlBYa3rjeU1PeIrSpC5O0BpG2AJmK7nu56/ce KGzRnPYs2oJtEqqvjQuQhYWmQImeyweavCosD69BPEuVM0takM0GGOpAAK05HMzPhHWM 38nS21QDOfD9WHTfCXJwR0NtC9ZKG4HYBcu/QLct7D4UNTBRLo2o9S43nth9t7PwXyML /rOcDT43OqZNUuG490Vtsw3EvcBfIvO9q6C2vnr1exM7+DG96OnZFA/5UNzXxn3TVlId j03aJtkSzPQyl39IaWL4YMZ22OaGCT4uvqDKXn0+XJH/UvqIxRG+B4XLUFoevy8idjt3 +p5A== X-Gm-Message-State: AC+VfDycpDsQUt451JRD5ktOwhfYNCGA8HBBLNqN5fSZD44re/qV1jCG mMYIZnL1V9bXKtHu2Ut3tTw7zg== X-Google-Smtp-Source: ACHHUZ5hNIcKRvQOvkbwN59i3v7bngFSbc/m8iqKcD4PdTMefxF9Zc3coCf8oPDk4eLZgVerE8FGUg== X-Received: by 2002:a05:6512:79:b0:4ef:f5fe:bc76 with SMTP id i25-20020a056512007900b004eff5febc76mr2686233lfo.14.1683561890425; Mon, 08 May 2023 09:04:50 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id h3-20020ac25963000000b004eff4ea8dd3sm32372lfp.76.2023.05.08.09.04.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 09:04:49 -0700 (PDT) From: Dmitry Baryshkov To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 2/6] power: reset: qcom-pon: add support for pm8941-pon Date: Mon, 8 May 2023 19:04:42 +0300 Message-Id: <20230508160446.2374438-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> References: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org For PM8941 we don't have a defined field to store the reset reason. Support wrapping pwrkey and resin, but without writing the reset reason. Signed-off-by: Dmitry Baryshkov --- drivers/power/reset/qcom-pon.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/power/reset/qcom-pon.c b/drivers/power/reset/qcom-pon.c index 16bc01738be9..d42475bc0ee6 100644 --- a/drivers/power/reset/qcom-pon.c +++ b/drivers/power/reset/qcom-pon.c @@ -17,6 +17,8 @@ #define GEN1_REASON_SHIFT 2 #define GEN2_REASON_SHIFT 1 +#define NO_REASON_SHIFT 0 + struct pm8916_pon { struct device *dev; struct regmap *regmap; @@ -45,6 +47,7 @@ static int pm8916_reboot_mode_write(struct reboot_mode_driver *reboot, static int pm8916_pon_probe(struct platform_device *pdev) { struct pm8916_pon *pon; + long reason_shift; int error; pon = devm_kzalloc(&pdev->dev, sizeof(*pon), GFP_KERNEL); @@ -64,13 +67,17 @@ static int pm8916_pon_probe(struct platform_device *pdev) if (error) return error; - pon->reboot_mode.dev = &pdev->dev; - pon->reason_shift = (long)of_device_get_match_data(&pdev->dev); - pon->reboot_mode.write = pm8916_reboot_mode_write; - error = devm_reboot_mode_register(&pdev->dev, &pon->reboot_mode); - if (error) { - dev_err(&pdev->dev, "can't register reboot mode\n"); - return error; + reason_shift = (long)of_device_get_match_data(&pdev->dev); + + if (reason_shift != NO_REASON_SHIFT) { + pon->reboot_mode.dev = &pdev->dev; + pon->reason_shift = reason_shift; + pon->reboot_mode.write = pm8916_reboot_mode_write; + error = devm_reboot_mode_register(&pdev->dev, &pon->reboot_mode); + if (error) { + dev_err(&pdev->dev, "can't register reboot mode\n"); + return error; + } } platform_set_drvdata(pdev, pon); @@ -80,6 +87,7 @@ static int pm8916_pon_probe(struct platform_device *pdev) static const struct of_device_id pm8916_pon_id_table[] = { { .compatible = "qcom,pm8916-pon", .data = (void *)GEN1_REASON_SHIFT }, + { .compatible = "qcom,pm8941-pon", .data = (void *)NO_REASON_SHIFT }, { .compatible = "qcom,pms405-pon", .data = (void *)GEN1_REASON_SHIFT }, { .compatible = "qcom,pm8998-pon", .data = (void *)GEN2_REASON_SHIFT }, { .compatible = "qcom,pmk8350-pon", .data = (void *)GEN2_REASON_SHIFT }, From patchwork Mon May 8 16:04:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680444 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3D7FC7EE33 for ; Mon, 8 May 2023 16:05:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232876AbjEHQFB (ORCPT ); Mon, 8 May 2023 12:05:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233033AbjEHQEy (ORCPT ); Mon, 8 May 2023 12:04:54 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D95459F1 for ; Mon, 8 May 2023 09:04:53 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4f139de8cefso28658671e87.0 for ; Mon, 08 May 2023 09:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683561891; x=1686153891; 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=xKq23YAf45bB0TY5A8OYCdd/tqcQK4TJNEhLnPPrGR8=; b=fMejH7OI3jTpCpUsJRMmUV4I00OHmD8ftPe30OWp84O+fa/MjW/fNXnoie1kAa7bZx 785wggFXlUGLB/ZJ4SrKzb9v6EQrqmHc3drrnMR4m5i6sHxODC7d+JsTIrwkqxBsYhTI J6/B0PVlAPr6pE5VfDE1CthunRXHeFruSfGOnb4i/91em2iStnAXFNYnJaDDV2xmc1Pl Mfyea7N03uveuhDaGlQeGOD/Nqdc2kfQq4rbcLRQ9fo1O8TO1Tr/MicR0GvkXlDZIn22 HlCTHAGyUVCl8HJqSS7gmIeaxZ/t64nV7mBMoRd3CfBGOPE7SR52jZbsEkx/WoyXyKAX 7lpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683561891; x=1686153891; 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=xKq23YAf45bB0TY5A8OYCdd/tqcQK4TJNEhLnPPrGR8=; b=MN0IZsG3cyTYMDYcIicJl7oOtJUeazOcEcQTACY5lQNZqtZPgUVTn7U4Jarv0LeHVx ccr6NJnREG1G+MV1a5RPiLa/vqc0vblgVgd39JEF6efu5FiwHtA7pe7H9xbFmILzrv5T Zyyo/EgX+pyvqWx+dyKe8tnzXutyZyfRyof7vW4GNVg/2KQ9Cvg6rqOK40Tak2yAAU3I 1iohDf7IoZ+BKDjnCtrOIKPjx513MnKA0owlVeWmV0klnxAoxYo7/1eOEKUpjBRwK2im 0uzCi0AypR3nA1TuZSHr1qlI6n8BOa8N61qYof5T4XMdMqbefioi2Q8pLZ7YPCs14+px Rq8w== X-Gm-Message-State: AC+VfDyC5NgNUw99TnjIyQFvPk73acQO73PSVhkeh/bJDrpnokCYsvdX IVz1Sy9IarthR1mapU7a4HXwXA== X-Google-Smtp-Source: ACHHUZ67HLlNh7sz9XqBc5R+t1LfTYoV3VXRMEklPkO33kY/pgfGyU1P2d6KcQIh8NcphpWz3SBL9w== X-Received: by 2002:a05:6512:2351:b0:4eb:412e:b06a with SMTP id p17-20020a056512235100b004eb412eb06amr4019579lfu.22.1683561891620; Mon, 08 May 2023 09:04:51 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id h3-20020ac25963000000b004eff4ea8dd3sm32372lfp.76.2023.05.08.09.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 09:04:50 -0700 (PDT) From: Dmitry Baryshkov To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 3/6] ARM: dts: qcom-pm8941: add resin support Date: Mon, 8 May 2023 19:04:43 +0300 Message-Id: <20230508160446.2374438-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> References: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Wrap existing pwrkey and new resin nodes into the new pon node to enable volume-down key support on platforms using pm8941 PMIC. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- arch/arm/boot/dts/qcom-pm8941.dtsi | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi index a821f0368a28..cf1fcf97fa88 100644 --- a/arch/arm/boot/dts/qcom-pm8941.dtsi +++ b/arch/arm/boot/dts/qcom-pm8941.dtsi @@ -19,12 +19,24 @@ rtc@6000 { interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; }; - pwrkey@800 { - compatible = "qcom,pm8941-pwrkey"; + pon@800 { + compatible = "qcom,pm8941-pon"; reg = <0x800>; - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; - debounce = <15625>; - bias-pull-up; + + pwrkey { + compatible = "qcom,pm8941-pwrkey"; + interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + }; + + pm8941_resin: resin { + compatible = "qcom,pm8941-resin"; + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + status = "disabled"; + }; }; usb_id: usb-detect@900 { From patchwork Mon May 8 16:04:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680144 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2722AC7EE2A for ; Mon, 8 May 2023 16:05:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232924AbjEHQFC (ORCPT ); Mon, 8 May 2023 12:05:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233259AbjEHQEz (ORCPT ); Mon, 8 May 2023 12:04:55 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A68759D8 for ; Mon, 8 May 2023 09:04:54 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4f139de8cefso28658755e87.0 for ; Mon, 08 May 2023 09:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683561892; x=1686153892; 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=rnmYe/rfjlFDwKC2E96nnEEwnllE4sqeDHA7mWjMQiY=; b=cmp37D61hWml6a51Z27nYwA4HADUospjypZtS0cEKwgfVX+5fJGJJ3VOH/nlVOYHPZ OjkdFNS/LvKPaJeOzmhwBH49RCIEPqfdX/1i895RQfY/pnSEVt5BcTeuqHrIOyc/ytuc s/Xiz3WWiCFQa9uMvntLX4I37mAFS/Gnhk5B83xD35YHzbglM6ukVEpXP4rWp+0i4y6x vsae/NEEa04MVlS8C+XbDKpq7KmCsQsrXhJUA1ornTgzp2ItrUOPZO9T3ioBcvIG+s8f +mkPwtMqCoAUVEU9B3BNdJau+hIJ/v1GcPJAN11lhcrLCm0ndv3cMsqUt0VsRkRgIns8 Ic0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683561892; x=1686153892; 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=rnmYe/rfjlFDwKC2E96nnEEwnllE4sqeDHA7mWjMQiY=; b=Fq0P90nmszAwAjcrkkhG7u3a7IvXcYjLUQUDjHj+dDU/F3BqZvL9yqy+XUcSan+Hrk 4ODwlugAhQIVwilY2qHEWfjHvb5OZhoEvKJgkK7CWhKfT84drpvh8kokw0PBNrPW0bYM QZWdtonXiPdgpluvXJbMzqhFxXzKP91gJ5Q64HN/FGWFEhez2r6wTcz7wAADm/zoo9ai iCGyCU7blrdSW+0Pue2/qRnuxQiW+Xj2zJGKjuJlTEmgJf6aP0Xkgjm8tUp/2me55C7v SCO2QfqD8P3o9KZbWIaYBjjxDqH9GdsMMGnsdoNsD+epSrFJpKhy6X20eyZQ+1N6qgAt lsbg== X-Gm-Message-State: AC+VfDxgTv9v97jQQkhHm5vyHNLhG2sxa50/ryXRkxPn4EJoXiGusZ3m jAYff505W7cYOINZo1fHIvzf3GR6VmFOTyIC344= X-Google-Smtp-Source: ACHHUZ55UN8LocS9K5LB+b6IEOtnUml9blYqaysfVDqZ0xzxCIa6A3ORKmaMdJPH0sxE7WfahSlYXg== X-Received: by 2002:ac2:4c36:0:b0:4f1:4a5f:8595 with SMTP id u22-20020ac24c36000000b004f14a5f8595mr2106021lfq.15.1683561892555; Mon, 08 May 2023 09:04:52 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id h3-20020ac25963000000b004eff4ea8dd3sm32372lfp.76.2023.05.08.09.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 09:04:51 -0700 (PDT) From: Dmitry Baryshkov To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 4/6] ARM: dts: qcom: apq8074-dragonboard: add resin and gpio keys Date: Mon, 8 May 2023 19:04:44 +0300 Message-Id: <20230508160446.2374438-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> References: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add device nodes for resin (reset, volume-down) and gpio-keys (volume-up, general key) device nodes. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts index 1345df7cbd00..630180edecfd 100644 --- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts +++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include +#include #include "qcom-msm8974.dtsi" #include "qcom-pm8841.dtsi" #include "qcom-pm8941.dtsi" @@ -17,6 +19,26 @@ aliases { chosen { stdout-path = "serial0:115200n8"; }; + + gpio-keys { + compatible = "gpio-keys"; + autorepeat; + + pinctrl-0 = <&msm_keys_default>; + pinctrl-names = "default"; + + button-volup { + label = "Volume Up"; + linux,code = ; + gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>; + }; + + button-general { + label = "General"; + linux,code = ; + gpios = <&pm8941_gpios 23 GPIO_ACTIVE_LOW>; + }; + }; }; &blsp1_uart2 { @@ -35,6 +57,23 @@ eeprom: eeprom@52 { }; }; +&pm8941_gpios { + msm_keys_default: pm8941-gpio-keys-state { + pins = "gpio5", "gpio23"; + function = "normal"; + input-enable; + drive-push-pull; + bias-pull-up; + qcom,drive-strength = ; + power-source = ; /* 1.8V */ + }; +}; + +&pm8941_resin { + linux,code = ; + status = "okay"; +}; + &rpm_requests { regulators-0 { compatible = "qcom,rpm-pm8841-regulators"; From patchwork Mon May 8 16:04:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680443 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC0E9C7EE39 for ; Mon, 8 May 2023 16:05:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233188AbjEHQFE (ORCPT ); Mon, 8 May 2023 12:05:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233405AbjEHQE4 (ORCPT ); Mon, 8 May 2023 12:04:56 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D33259FC for ; Mon, 8 May 2023 09:04:55 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f14ec4efb0so3170780e87.2 for ; Mon, 08 May 2023 09:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683561893; x=1686153893; 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=a9HN1H558PhfKYKfm5BiqgL21021Q6dT3PuvuWu0KWM=; b=iLpng3WcqMQNlVNEqhZ4dCAeWemAv+iJDE7RAguDue7qX0RWa2MZlXhrRoVamcdYXW VSFQ4iqKqYUK1BdRHmKmTlgpA6+UZPepC1ZVByB1wkt0pBsAorsKElpV1/2SUMKecTCV FxQMOAXZevACc7ZH3XH+CpxpJ4Ml2DcQllL3mLcSWP7jB3pIYKehm9YZUNyCJ9mUtjSj zFEDj5wrpW+iSnCQ/kd33MpPDIyW2UeeYthKDm7FY3HYTIKx/Y0QUO9I30sjFvlgskxb dMz610GjuwxeFxTAwWi6Q63/0D74UFOhO0c51wEjBNUFXpgdWepQNc0JMrkvH+IuwBwW 25xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683561893; x=1686153893; 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=a9HN1H558PhfKYKfm5BiqgL21021Q6dT3PuvuWu0KWM=; b=RgzGE3vFkFAQUjtO4MQEEX0Qf/aFTRO8di376zh+dkwkBHtEj8zzDJtV9InfwhGlFN eAVM7OF10b1Qchto/UqjzbA4zr1DSg+u5sD2rRLBTDb8EZyJympahYEQ6STD5Q7zUkrN rTbJgKVDiByLjItri70grr7x+Q0IPetdBzBboQ+BJWx3g4VcQpMjAOp4ALo6P4Hih6/Z 46yhUv9As1/5dww+OEH58dybMmRLGgiUi1HyV6ADoqBvXc4zFtJHq86P4xfxkNLe8giZ fFbdCw7HrQ5odDRGaPMVGckGQpMVOd5M4D5Xng0APNHsD/eunD+UMXEPqog2xDa7C6Vr OU6w== X-Gm-Message-State: AC+VfDxaYtQAiHcLJPgpC+JdAzpkvjgrGKkX/OcCPtN10AYmQ+AXF17b /hXJH0ZiXpSqv6A6e64uZ9lXmQ== X-Google-Smtp-Source: ACHHUZ7o3rILQZjtyfFGkXWHXnPp7L5F+dvYR/1OTkcyTvfZjoKIhEaUxgt0oVpr8ZFW3WVJUbAk6Q== X-Received: by 2002:ac2:5399:0:b0:4f0:c0c:36d9 with SMTP id g25-20020ac25399000000b004f00c0c36d9mr2419614lfh.12.1683561893543; Mon, 08 May 2023 09:04:53 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id h3-20020ac25963000000b004eff4ea8dd3sm32372lfp.76.2023.05.08.09.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 09:04:52 -0700 (PDT) From: Dmitry Baryshkov To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 5/6] ARM: dts: qcom: apq8074-dragonboard: add onboard leds Date: Mon, 8 May 2023 19:04:45 +0300 Message-Id: <20230508160446.2374438-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> References: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The dragonboard as three LEDs: red, green and blue. Add corresponding description. Signed-off-by: Dmitry Baryshkov --- .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts index 630180edecfd..07db6451f273 100644 --- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts +++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include #include "qcom-msm8974.dtsi" #include "qcom-pm8841.dtsi" @@ -69,6 +70,29 @@ msm_keys_default: pm8941-gpio-keys-state { }; }; +&pm8941_lpg { + qcom,power-source = <1>; + status = "okay"; + + led@5 { + reg = <5>; + color = ; + function = LED_FUNCTION_INDICATOR; + }; + + led@6 { + reg = <6>; + color = ; + function = LED_FUNCTION_INDICATOR; + }; + + led@7 { + reg = <7>; + color = ; + function = LED_FUNCTION_INDICATOR; + }; +}; + &pm8941_resin { linux,code = ; status = "okay"; From patchwork Mon May 8 16:04:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680143 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A4F3C7EE32 for ; Mon, 8 May 2023 16:05:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233059AbjEHQFD (ORCPT ); Mon, 8 May 2023 12:05:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233498AbjEHQE5 (ORCPT ); Mon, 8 May 2023 12:04:57 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A2F855B6 for ; Mon, 8 May 2023 09:04:56 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4ecb137af7eso5329225e87.2 for ; Mon, 08 May 2023 09:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683561894; x=1686153894; 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=Z+Jhe48VXAoN+8wGaqTOooemilYAfgL+ZuJTPfMlkfg=; b=TTypQOY+hHf3wO324ueVxAch2AT6S/ea9n9ojC3nDAJa//ZeKbhvoDg9Qc6oiJRs/z EurZywZXEK3V8VIIoX6hdy6T2zvDXKlu6pVryNV22xBgwSZeuC9mZCU+fFy+5kZMuJna 9az+ATyULir7gLKnRp2k/d+4kKVXBYAio/SfehztA5iphcnl54J5VV9iYQnKQgQF1CXw AgoaNxA9azUsNz5Cl39fQhsY8eiCBQjywtpQC0FibEPnXsa0CqP2C1GTXbGqJ2Ziqcbe 43RVpkZUR6+c+FNXZeJpUaitMFsF517n+vQiu+kmjoUFVSpN1mMg3EwAUYyxqLfANO1U Jn+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683561894; x=1686153894; 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=Z+Jhe48VXAoN+8wGaqTOooemilYAfgL+ZuJTPfMlkfg=; b=R1nrRUmTguHFXH99ro2oW5c1UIv+7y0519pJHuLTLhCWNI03SpeM2ppCTc70VBWX8o rS8rAbeKLP4dTs8II8eOTY0YsD+oYVYlfvoNYjAy7aQsXlafoktPRLv3E400hNUyOJUW M/YQW3RSimGX2gann2NjFauImOOHbu9oW0VaOhDg0yrELHA9CXY6k/FZz6dAwzbxrZlL 84/cSkKhFVKsbBQgfo1haiBvmiXFZJMW91PPaV9Os6T/WEwjza662cjoyelE3Yv5hvek cuun/64jf+TtM1++/Nuteuhxk1NaD0K4pw///nbLxpn13HpbMiKXUSvNsh/9yHjXHltZ YkQw== X-Gm-Message-State: AC+VfDyCt8AUTzPLkRRGiePRTvSH+pJj/nPIBwNKjWyt9o14KnHhXGIm F7iZ1vSh0E4qlUVZ0V1+Ekog2Q== X-Google-Smtp-Source: ACHHUZ5+5DsVvjw0JvnA7oomUxPS+m38axatsdA/piUWxUQ3chP4cbNENEf1Gzs+rCD6LYZbeco5uA== X-Received: by 2002:a19:f007:0:b0:4ed:b061:18ee with SMTP id p7-20020a19f007000000b004edb06118eemr2697395lfc.22.1683561894413; Mon, 08 May 2023 09:04:54 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id h3-20020ac25963000000b004eff4ea8dd3sm32372lfp.76.2023.05.08.09.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 09:04:53 -0700 (PDT) From: Dmitry Baryshkov To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 6/6] ARM: dts: qcom: apq8074-dragonboard: enable coincell charger Date: Mon, 8 May 2023 19:04:46 +0300 Message-Id: <20230508160446.2374438-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> References: <20230508160446.2374438-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Enable coincell charger for the coin battery which can be installed on the APQ8074 dragonboard. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts index 07db6451f273..93a059641957 100644 --- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts +++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts @@ -58,6 +58,12 @@ eeprom: eeprom@52 { }; }; +&pm8941_coincell { + qcom,rset-ohms = <2100>; + qcom,vset-millivolts = <3000>; + status = "okay"; +}; + &pm8941_gpios { msm_keys_default: pm8941-gpio-keys-state { pins = "gpio5", "gpio23";