From patchwork Mon May 8 00:33:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680167 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 3BA0EC7EE2C for ; Mon, 8 May 2023 00:33:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231879AbjEHAdT (ORCPT ); Sun, 7 May 2023 20:33:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231882AbjEHAdQ (ORCPT ); Sun, 7 May 2023 20:33:16 -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 97E0A8A63 for ; Sun, 7 May 2023 17:33:12 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f24ceae142so900842e87.3 for ; Sun, 07 May 2023 17:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683505991; x=1686097991; 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=kDKMbXnJIvuQzh8ILfzPlhqGHSGT1sdNjiXjnJAa1jI=; b=aOemtY/voHimGspIjk8noHBn5hdmmzfEOdTHyeecc1aXVlP+fmw9Fip+qw2awvUiCq AQ+46uiFRlP4pdjzKl2vGzV2gd9ySyzZcDyJ19FabROYOCNvxxD7/97uSaWZIbMLSHGV KB+GibLShnJfFndq8WzhJCdGs+W6G6HJr4FoQ4IehX3D0KhFMsKN0FKVfmRfVF5/IFQK bArQy0hcEGjIVTI2NpJnm9mA1cnUfHB0fYa8REK4Kg8dGo9XOOnUuTXbBWldmArWTChi aP3TQPZ7rDAcvdYTa5tw3TezJTK3a1nCvrN3iaI599pEX0b2DJUBFPsLfgQbH2VjIxI8 hUnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683505991; x=1686097991; 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=kDKMbXnJIvuQzh8ILfzPlhqGHSGT1sdNjiXjnJAa1jI=; b=RrVwjT5HBpmAeG+p/8Oi/DgRPiz2domu5aHlbc+aE05seJdijWU2fQcifBexbItUmD vGVSs7s2ct9BUFRIySOD0SbfHOA671i4NCtfVOjDEsJ5UlmFoiQL8Kuu0vuMAm2t+tLk hvKbGJXBs2QUog1dxiZTRVUjuRxP0Qol6VmWITkQIrFevEt9dVouSg0lGypA0MBMiu66 3x6+yOsvWr2RqGmS+JRo5hZLekyGoJTGi0bKRafAs6SRE9YCAGg2vBRRAHcjEgIXnnV1 uZBlnNnBbJKXZaAzaRfDAUVVAcNri/QxGfx2B1e77joGQPQfRv3cch1xyM28o3P2M4Oa Z+gg== X-Gm-Message-State: AC+VfDzT+lh8DWp2aQ2v4oNXUIPZXzPyR8WxE4Be/W1OgWEfVdf/WEkq q66tNzvKL7Xh+XIKDPjwRfidlA== X-Google-Smtp-Source: ACHHUZ5L5mYXfYEX4glhtdoGY9YXd7EcX8HGqt297P7fo7SQRPt2pynB4Zuto+fc42F00r+NP1ofgw== X-Received: by 2002:a05:6512:983:b0:4ec:8d50:d124 with SMTP id w3-20020a056512098300b004ec8d50d124mr1811831lft.48.1683505990904; Sun, 07 May 2023 17:33:10 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id m22-20020ac24256000000b004eca2b8b6bdsm1114807lfl.4.2023.05.07.17.33.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 17:33:10 -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 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon Date: Mon, 8 May 2023 03:33:04 +0300 Message-Id: <20230508003309.2363787-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508003309.2363787-1-dmitry.baryshkov@linaro.org> References: <20230508003309.2363787-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. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski --- 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 00:33:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680465 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 E0F3FC7EE22 for ; Mon, 8 May 2023 00:33:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232131AbjEHAdS (ORCPT ); Sun, 7 May 2023 20:33:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231879AbjEHAdO (ORCPT ); Sun, 7 May 2023 20:33:14 -0400 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 3A2DB8A77 for ; Sun, 7 May 2023 17:33:13 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4ecb137af7eso4409115e87.2 for ; Sun, 07 May 2023 17:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683505991; x=1686097991; 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=ukzmHOvAzKhbsC+vRRu8jnk5KuhLDT8OPvpzT7L5H1KT2yrZ18KyLdRB0g1SL9AuNi uoz6lT90CVsqvoovRcDnDHXtZFT3X3eQTz0uLXELkImq6Rx8HqMYOKTQXg3kmmvsORoF AWNlV3tWPggfh9hlG/lrTX0ZN4WzP7lCkqFhn4H3RHlgz34OoF4+7tePiQZ2z19ZJNAC Qn2ymMC4nVLPSD9nVo+tLO4r+05Ce3fj7rAyL8TKMFIxlYeQG5ZMkP8feUNV6xFhB/8c r7RjYXeFT6C0xs6xUncjF68l9OXx674isYnZw+NyWUsCaobOaniuCGydHYLyq/6eri4k 5KQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683505991; x=1686097991; 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=BCVnhFtohyk86luE8tc/ggNmomLP4d4yhp6lGZHbxJDtZjW1Ah3pFuOOerhATvI04G hmbuCiJ6tzdcSSlv/aRIZw8t38kIpRthHVEn+LKjNlIOGFKa26gJ+yujrWzTe0KzleUO WcliaNwFVOh6oBTLhshslivIooODaPsFhTPW7stSj7V2oJdTclDStYccGpuF2DdjRpM3 EkRucEPcrON/iJxmo7/eVEz61twjp7WLsWSi7lbSDKLEWxTB7Y0hTW3cclOcW6A2vxIE U5GK4hR+rhrfi74JLqlmRVD8+1Lb8lPnQ9/NusmpdSMgScxAgzZut3IGpsz8TgN8jizo +bXQ== X-Gm-Message-State: AC+VfDzgzqn6pVI/w89ZJ4MvbRzTtgzc7wBZm79FZ4G5wzcpmrVFve4c lx86FXhNIg/n3M6GaduR1AoC7w== X-Google-Smtp-Source: ACHHUZ44NqiQ1895aRzXNFMIqcgVMZnXUn1OTYCnD9yL63LfBMUD/9kIqLcMvXZ3h5jGYN74eZ4msA== X-Received: by 2002:ac2:4907:0:b0:4ee:c134:8220 with SMTP id n7-20020ac24907000000b004eec1348220mr2187824lfi.30.1683505991620; Sun, 07 May 2023 17:33:11 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id m22-20020ac24256000000b004eca2b8b6bdsm1114807lfl.4.2023.05.07.17.33.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 17:33:11 -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 2/6] power: reset: qcom-pon: add support for pm8941-pon Date: Mon, 8 May 2023 03:33:05 +0300 Message-Id: <20230508003309.2363787-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508003309.2363787-1-dmitry.baryshkov@linaro.org> References: <20230508003309.2363787-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 00:33:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680464 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 62DD0C7EE2C for ; Mon, 8 May 2023 00:33:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232024AbjEHAdU (ORCPT ); Sun, 7 May 2023 20:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232060AbjEHAdR (ORCPT ); Sun, 7 May 2023 20:33:17 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 059D69034 for ; Sun, 7 May 2023 17:33:14 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4ec8133c59eso4426502e87.0 for ; Sun, 07 May 2023 17:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683505992; x=1686097992; 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=60+RN5IXt2QTmhFV4LWN/OmeuPm2E4Pe1J71Zr5me3w=; b=VRc/4nSOlsan7d95XurHx2XuEyg2u4WeTOOrMobCoystpLkzP7H4oOUHrAwulYkjT8 Ga6Tky/TcYzYOJvnoDyXB68K28tjtt3Pw2XOU0s+c6dqpD17Q6TcJooWMay/6yxKzqD4 pD4rjXO5GP4IdG8J8GE6pNBe9QCNC7Lz+O616dV+4hnV/2q08dFoaVczjDScxr6+CoGq yi0fhJl7rRiJEu6MQmkrhc7OY9ULn0kLipL1+TM/AgsraxVDEm9p/KfwucBQDalB4IzL 4nGmjARqWezxExK/KuPVH1ljHkrjeCFCG4eyAIZCpxZc+6pOrdwzWWj9VyOTfD2fKgGI yk6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683505992; x=1686097992; 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=60+RN5IXt2QTmhFV4LWN/OmeuPm2E4Pe1J71Zr5me3w=; b=DTNgMYcE+q3YIIgj+Drh3XkXdEzQzyEZ2PfSn+EXmcmouR2G4/BctxRXXJePgRO8oc D3K1MtNJZ+y9ENxPQFqO/exVxFUGAwq33aU4n7cR/nF7aydnRNdf3CExvY6O8QteKU2R rbOLQvw0KbxIoM6zWcvB/nD4WUiJOdI3+BYshFUeM21ky0FpO8K+nZTE5qxz415Wx8Qd Z0s6wUmRhlFJUAFU+MpVPAWEaHQ40lCMIaB8p24sfTjgsQNfYGxuafMu8fG8UD8pl86m nAFTyXZBxzgXrlrkQmSHTBPetwt+XdeSfoqFqhzcspBej9+Pn+zybpyevw5Ejwyy9wN+ oFaQ== X-Gm-Message-State: AC+VfDz/oySKSHG/1wQpIu5GhFMtVCTFXLYwWpTImLJAvvAO4IE5xUzq uOqB1w1fUP7+Z6Swd/+YT5ZqTZTxmbkAwfEmgWU= X-Google-Smtp-Source: ACHHUZ56IuHCb9krnV3H/zXiOep0NRvIJfd3WAi6IPzpjviYdMipBpeWAdBdOwYbLXyEEfklfQhRVQ== X-Received: by 2002:a19:ae06:0:b0:4db:3927:e2bc with SMTP id f6-20020a19ae06000000b004db3927e2bcmr1993106lfc.50.1683505992334; Sun, 07 May 2023 17:33:12 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id m22-20020ac24256000000b004eca2b8b6bdsm1114807lfl.4.2023.05.07.17.33.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 17:33:11 -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 3/6] ARM: dts: qcom-pm8941: add resin support Date: Mon, 8 May 2023 03:33:06 +0300 Message-Id: <20230508003309.2363787-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508003309.2363787-1-dmitry.baryshkov@linaro.org> References: <20230508003309.2363787-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 --- 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..ce30946ccf58 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,pm8916-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 00:33:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680165 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 086CEC7EE22 for ; Mon, 8 May 2023 00:33:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232202AbjEHAdV (ORCPT ); Sun, 7 May 2023 20:33:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232098AbjEHAdR (ORCPT ); Sun, 7 May 2023 20:33:17 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B809893CD for ; Sun, 7 May 2023 17:33:14 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4f13ef4ad91so4485408e87.3 for ; Sun, 07 May 2023 17:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683505993; x=1686097993; 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=K1wI9viazUk4MMRKC5k2TgaknGOtp8xfB+NZ3J6gsmc=; b=nLabFqI7hTdKlm1IOb+KK/Nehh3xTJNzcDQ+59LuNs4UBVDgAMuVHD6O3FwUi0C2Kw u//lmqQoxDv0tmFklaKfIUeSVIU3QTgDXW1O0t+0WK2j7hYjhGEr32IdynKFzgg6xA/d ox7TAFbZnfAR/BwYozAG+ie/MFkatbzoYY4TETIrW4CK4RpdqvVQK5aXkRjWmvOprd+l AvIGMgQ3soKaSkCZ8le8wPBzRiAQLz/IjiJFy7plu6lq5cfhc+LLWE3zVABIqNz8O5c7 UTXwT5mI+6R9KUIRxfQAzW4PIO+IV0t4N45hLwjeARiiwzniW/M6RyB/yMU4tKvuxyLH GvFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683505993; x=1686097993; 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=K1wI9viazUk4MMRKC5k2TgaknGOtp8xfB+NZ3J6gsmc=; b=e+iPVq48/6wbr7E2nEVb8UB3ncdRwVStaChxxT9+ywIalUS2LQACsDHGOS80WSsX1R O8TRKt2RcnUVTAWzDOdxaAUhtTTe4fI8fqlXka1aAS1S7oIOLhFYSPwKU2+zehtV2Gqt xM2BLx87/KyJiW3yO4zTlfWg0mRVGB1gzsUgo2Kr2YIy1e19MNjmN4Akn0O/pn0V9F2m WrhhsinrO8EBe8UmY8THEMDklKLs+YmzXF3WaHErhpGHvrGe57DL7DBkdINfB2LfHJUg 5N94hgfBsaNH40ETi7o4T+kzDlwjubtFf65dFr+t5iTU4LIMiu6ZcjulEWPcZQoJfjf8 WJ0g== X-Gm-Message-State: AC+VfDwDRczOU1DP9cq+gBdEXrYw4QZTFKloHOmm0vwqWLiidAZ6A+AH S33Rk6EVls39Vgo+nWllyRnXzpNoImenalyNvSU= X-Google-Smtp-Source: ACHHUZ6/q1j48+E9petP95PUM7S1AuOFAS4TsIXUxGaajCHK9jzPr1hWaEAujUmJR7acyKn2NLQrow== X-Received: by 2002:ac2:4428:0:b0:4ef:f670:3bd with SMTP id w8-20020ac24428000000b004eff67003bdmr2115844lfl.18.1683505993013; Sun, 07 May 2023 17:33:13 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id m22-20020ac24256000000b004eca2b8b6bdsm1114807lfl.4.2023.05.07.17.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 17:33:12 -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 4/6] ARM: dts: qcom: apq8074-dragonboard: add resin and gpio keys Date: Mon, 8 May 2023 03:33:07 +0300 Message-Id: <20230508003309.2363787-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508003309.2363787-1-dmitry.baryshkov@linaro.org> References: <20230508003309.2363787-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 --- .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts index 72f7e09a5bbf..2017bdf81677 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" @@ -20,6 +22,26 @@ chosen { stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + autorepeat; + + pinctrl-names = "default"; + pinctrl-0 = <&msm_keys_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>; + }; + }; + reserved-memory { mpss_region: mpss@ac00000 { reg = <0x0ac00000 0x2500000>; @@ -90,6 +112,25 @@ &mdss { status = "okay"; }; +&pm8941_gpios { + msm_keys_default: pm8941-gpio-keys-state { + pinconf { + pins = "gpio5", "gpio23"; + function = "normal"; + input-enable; + drive-push-pull; + bias-pull-up; + qcom,drive-strength = ; + power-source = ; /* 1.8V */ + }; + }; +}; + +&pm8941_resin { + status = "okay"; + linux,code = ; +}; + &pm8941_wled { qcom,cs-out; qcom,switching-freq = <3200>; From patchwork Mon May 8 00:33:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680463 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 2A8ACC7EE32 for ; Mon, 8 May 2023 00:33:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232050AbjEHAdW (ORCPT ); Sun, 7 May 2023 20:33:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232154AbjEHAdS (ORCPT ); Sun, 7 May 2023 20:33:18 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE2629ECD for ; Sun, 7 May 2023 17:33:15 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f13bfe257aso4388918e87.3 for ; Sun, 07 May 2023 17:33:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683505994; x=1686097994; 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=eZ39LePwzfXGUX5T8kPy8FR1120Whr91g1ULF3PXJPQ=; b=fLv/w6nSTVC2C1/Q7ISdCiQd7n5tS52T31v/Pb3ESMpuqcloYojscVSDZXKzQfFsCZ 2ba5zR2IZ6K8Cc2AP5BzpwqXMj2gf2GaARC99uaI0AwCIrc0L/vH7yqFSHU2Epx9gE77 1JT0RoMjePLD8+hkEiiIII58kODj10fehq5/q3n7yIr3x98EVoa9xKLAUahL3bQ4zLL0 hpDaKw6ZnypE1llninsKKb83EERQ+FXS0grE07bdYPjlzuvVZNBaviFAegC1SaMtY2Mo iF9hj5QOWwrhF/P3GUJ/zia3qejbJleh4W2IbJl4hktKKVBhhaIIX3+6nU02jTtGMu/g Ux1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683505994; x=1686097994; 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=eZ39LePwzfXGUX5T8kPy8FR1120Whr91g1ULF3PXJPQ=; b=GM62H0yusSoZonr7BRCoiA0gcenTRU5S0WXlx32yZUjxwYEG8pJ8i1kX5ET8aiQO0b 262itc0axR+c5hLkHXWaawWTFsrPGrCO936BcBFMYH8JlUXTymXWOCZj8M5SxC5MAcSB ASSrMo+lrb0frEmhoExebnqxkLv3Sk+2CvOpDNqDhFSFiC1/4g2toqYgs8AWl1bODEkE R/EV5SMpnAtCQRZYAPZKE/aOjCXVpKmPfqbaz2DI5qghqgQpWl905eh/RLmULJGLvkLn N2EdEnPfKBPQfn6QFsY+TuRcuO2bKcatrNgrma6RplvCN7w3B2+OARs8kEdD5tdNgsB4 cixg== X-Gm-Message-State: AC+VfDwN4pZUVAEtZtCiuO1YdpExfJ3+lwMGkXY9TkDkYw6vYCflAV3v uAUgoCDXle5DfiHjw7BJyf4Zpw== X-Google-Smtp-Source: ACHHUZ6c46A+L0LTHo+BJXLdpuWw6r0Yxf/FeK0ARsHgolnU7SgB6GwinbyprvwCrIKIEmaTbM0+dg== X-Received: by 2002:ac2:442a:0:b0:4dd:afd7:8f1 with SMTP id w10-20020ac2442a000000b004ddafd708f1mr2070131lfl.52.1683505993858; Sun, 07 May 2023 17:33:13 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id m22-20020ac24256000000b004eca2b8b6bdsm1114807lfl.4.2023.05.07.17.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 17:33:13 -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 5/6] ARM: dts: qcom: apq8074-dragonboard: add onboard leds Date: Mon, 8 May 2023 03:33:08 +0300 Message-Id: <20230508003309.2363787-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508003309.2363787-1-dmitry.baryshkov@linaro.org> References: <20230508003309.2363787-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 2017bdf81677..16d609b85dfe 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" @@ -126,6 +127,29 @@ pinconf { }; }; +&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 { status = "okay"; linux,code = ; From patchwork Mon May 8 00:33:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 680164 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 A32EFC7EE3A for ; Mon, 8 May 2023 00:33:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232087AbjEHAdW (ORCPT ); Sun, 7 May 2023 20:33:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232161AbjEHAdS (ORCPT ); Sun, 7 May 2023 20:33:18 -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 A80588A60 for ; Sun, 7 May 2023 17:33:16 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f00d41df22so26053377e87.1 for ; Sun, 07 May 2023 17:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683505994; x=1686097994; 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=oEQDCOyFW88AgofKdbGFwc945Q39RQOUdRFCRSDEy4A=; b=y9IkXDsAwbqXPLy4CCV5z82g+CmkqqbXvOuEKwpKwRK26EljXvzOqDXIgiDkIRYKVB 0CPVca372LKAWy8VvibYZ8UnwO8DCraceJKCtZsgNmR+uBCtvjeQ8j6spnsblxY22PBu 2lblNOJFYLu73gZwBFo+ULelUnDGDSqNnasLrWvaMLgaxja5JwGpgoOc494XSc1mARZ3 ndcyA1Hi9AE/aq6sHfjShEplyIZOzRwMH9I7CaK7yHNhq2Ed2dKurudO6OkX9KIMCsYn Xz4Jo3bF+qs/zLAOkzmmRJWheDx8YHQ8kH/VFFYUZEexfUWfw7SEL0WVlquzcMGD+ZNJ dc+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683505994; x=1686097994; 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=oEQDCOyFW88AgofKdbGFwc945Q39RQOUdRFCRSDEy4A=; b=ilKXN3aVQ43rOyIWDOUGXBJ2C/LrU8BV4nm1XyGfbr0qJZiYgm83lv53779agSOVmg 2HpkQX04H7QvtDb1UaWxh/4SxAMnQFlufDA1aj7DUTU43XR9sjbKNuTaMJ5siKdB1mrR 8+EqzeZ5oEiINa/QzDGWAcl1OBwsAcNm6RFjLi5s4zesd+G4j9D1dka+VZg0XaCEFwVE MLVwMXt0QpYUBbFLEAjcTeXccfd+GbjEcldpv2qvBm/dav+SDiuC4Lf5nys+GIK/hbO1 ib4OiLobpswRyoSF0TK/xXu/Jpem48AqJuCL3gmfpIKWniUbkafRiDWYpWM6O2gsE4+z YI9w== X-Gm-Message-State: AC+VfDy8K1vemVkpDpBPLr/2mp0i+jutFcOy5DgTPUOWU45cD1xZMroi kXtsePkOvMaM5RtgaihqS81mjg== X-Google-Smtp-Source: ACHHUZ56enFA9XXTyqGS4NKHXMm5OwkUAErfoCMn0N+pG4Pzb5367H6gEqKnmtEID/UCoHRjBDMSuw== X-Received: by 2002:a05:6512:3983:b0:4eb:41ac:e33 with SMTP id j3-20020a056512398300b004eb41ac0e33mr4860293lfu.19.1683505994800; Sun, 07 May 2023 17:33:14 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id m22-20020ac24256000000b004eca2b8b6bdsm1114807lfl.4.2023.05.07.17.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 17:33:14 -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 6/6] ARM: dts: qcom: apq8074-dragonboard: enable coincell charger Date: Mon, 8 May 2023 03:33:09 +0300 Message-Id: <20230508003309.2363787-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508003309.2363787-1-dmitry.baryshkov@linaro.org> References: <20230508003309.2363787-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. 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 16d609b85dfe..1d1c08674254 100644 --- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts +++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts @@ -113,6 +113,12 @@ &mdss { status = "okay"; }; +&pm8941_coincell { + qcom,rset-ohms = <2100>; + qcom,vset-millivolts = <3000>; + status = "okay"; +}; + &pm8941_gpios { msm_keys_default: pm8941-gpio-keys-state { pinconf {