From patchwork Mon Jun 26 17:48:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 697530 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 076D6EB64DD for ; Mon, 26 Jun 2023 17:48:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229849AbjFZRsR (ORCPT ); Mon, 26 Jun 2023 13:48:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229847AbjFZRsQ (ORCPT ); Mon, 26 Jun 2023 13:48:16 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 322A41B1 for ; Mon, 26 Jun 2023 10:48:15 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2b6a6f224a1so11135961fa.1 for ; Mon, 26 Jun 2023 10:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687801693; x=1690393693; 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=kuDHCgM7g2J3zSNzGr58n9ZI5DTdi0x0RzFvs9UVe3A=; b=ZByvhThQPzMUBz2+gD+q9KkkN1z9fOwKnYL2U0mqM4J0JCqxc+Jbs6clrszaYtcePu +mnIK0Lw+gu4wwLQj1nYCS5UbodzXCiZA3WffFI1PC8y/UKxayY+7e9b0gPzE/fCnhnW /DAQ2u28NSXtO1araR7ZUnxeVLqeJ67vfdz3sMxozZogpGZTZcaC0E8KiuzhNh5Mk4JV B3FabxzgenZ2Pkz5QVqW3YwxPAx2cQWH7eCb4xrPX5AW+DkQ1t8vJAJOwmqnXaGgIKfW PfW3e/JPptQULKFBDAI0eyymMgRWByOU+MVhDLr9Ld17yE9wyPAhma2kV75tSxifNQmv 9qmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687801693; x=1690393693; 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=kuDHCgM7g2J3zSNzGr58n9ZI5DTdi0x0RzFvs9UVe3A=; b=RSX80qnhBRLigvpvrnCSAhDMp97AiSCsCk+35/gXU7LDEw679K7sM2QHGfAi23DVYT fNl4SmR0y4KC10E55/TH0H/A1qg0bhg4d7d/Xubozdg+YpNIq5SlWmUz2GsRga/jInMs RcxE+ZbcpPKE13Yc5Fi5WXvRZyySNvoVT86eVLlFicC40uR44G9JAc1Guwg0lfvX7xQB v69C6QntvyrPyzRU8wb5NF/eitiI0bqK+UevnETnE0Eobf5XzSfMwsHXOcICb6khUjss amWFawn3CCuSiTZ8l/18GxEk9gpnLF0JZ1hI0RpOTA+pKFY/46om1Lw7UbN/8lOcJbs/ Ivaw== X-Gm-Message-State: AC+VfDz1/Rv3qSQUiEDons8tnWIxb0UrCnCM5y1obWm09tl8ynNVzwpC gMJX3wTK9vN23Em5KuY7P+edyw== X-Google-Smtp-Source: ACHHUZ4g4j4G20eh+MmlOVjf1xLiy+VMmqyS7SLUCqgvImpVLY/AreHq/rYOMMsnevAHHZQCbs4zIA== X-Received: by 2002:a2e:9c82:0:b0:2b4:6678:da57 with SMTP id x2-20020a2e9c82000000b002b46678da57mr16573606lji.6.1687801693411; Mon, 26 Jun 2023 10:48:13 -0700 (PDT) Received: from [192.168.1.101] (abyk179.neoplus.adsl.tpnet.pl. [83.9.30.179]) by smtp.gmail.com with ESMTPSA id h19-20020a2eb0f3000000b002b470afec39sm1337076ljl.48.2023.06.26.10.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 10:48:13 -0700 (PDT) From: Konrad Dybcio Date: Mon, 26 Jun 2023 19:48:06 +0200 Subject: [PATCH v2 1/3] clk: qcom: gcc-sc8280xp: Add missing GDSC flags MIME-Version: 1.0 Message-Id: <20230620-topic-sc8280_gccgdsc-v2-1-562c1428c10d@linaro.org> References: <20230620-topic-sc8280_gccgdsc-v2-0-562c1428c10d@linaro.org> In-Reply-To: <20230620-topic-sc8280_gccgdsc-v2-0-562c1428c10d@linaro.org> To: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Krzysztof Kozlowski , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687801690; l=3705; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=x2HNhRh3bUP7Bf6Yrnh3hjgn57WeQdMIkIFsaKOztGg=; b=J3I05++nImYR2qKxElBiEEQ2a6bdfGYoD27OnkneELgmvNl/nL6kp94PK3mc6rUNC1FPvMVXG dfbMZSVd/yMCzi0rSictoJBocMvTEiTEU5nnBRPKfWsmKRZ3m68lSLF X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org All of the 8280's GCC GDSCs can and should use the retain registers so as not to lose their state when entering lower power modes. Fixes: d65d005f9a6c ("clk: qcom: add sc8280xp GCC driver") Signed-off-by: Konrad Dybcio Acked-by: Manivannan Sadhasivam --- drivers/clk/qcom/gcc-sc8280xp.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c index b90c71637814..64bea886322d 100644 --- a/drivers/clk/qcom/gcc-sc8280xp.c +++ b/drivers/clk/qcom/gcc-sc8280xp.c @@ -6761,7 +6761,7 @@ static struct gdsc pcie_0_tunnel_gdsc = { .name = "pcie_0_tunnel_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = VOTABLE, + .flags = VOTABLE | RETAIN_FF_ENABLE, }; static struct gdsc pcie_1_tunnel_gdsc = { @@ -6772,7 +6772,7 @@ static struct gdsc pcie_1_tunnel_gdsc = { .name = "pcie_1_tunnel_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = VOTABLE, + .flags = VOTABLE | RETAIN_FF_ENABLE, }; /* @@ -6787,7 +6787,7 @@ static struct gdsc pcie_2a_gdsc = { .name = "pcie_2a_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = VOTABLE | ALWAYS_ON, + .flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON, }; static struct gdsc pcie_2b_gdsc = { @@ -6798,7 +6798,7 @@ static struct gdsc pcie_2b_gdsc = { .name = "pcie_2b_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = VOTABLE | ALWAYS_ON, + .flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON, }; static struct gdsc pcie_3a_gdsc = { @@ -6809,7 +6809,7 @@ static struct gdsc pcie_3a_gdsc = { .name = "pcie_3a_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = VOTABLE | ALWAYS_ON, + .flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON, }; static struct gdsc pcie_3b_gdsc = { @@ -6820,7 +6820,7 @@ static struct gdsc pcie_3b_gdsc = { .name = "pcie_3b_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = VOTABLE | ALWAYS_ON, + .flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON, }; static struct gdsc pcie_4_gdsc = { @@ -6831,7 +6831,7 @@ static struct gdsc pcie_4_gdsc = { .name = "pcie_4_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = VOTABLE | ALWAYS_ON, + .flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON, }; static struct gdsc ufs_card_gdsc = { @@ -6840,6 +6840,7 @@ static struct gdsc ufs_card_gdsc = { .name = "ufs_card_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .flags = RETAIN_FF_ENABLE, }; static struct gdsc ufs_phy_gdsc = { @@ -6848,6 +6849,7 @@ static struct gdsc ufs_phy_gdsc = { .name = "ufs_phy_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .flags = RETAIN_FF_ENABLE, }; static struct gdsc usb30_mp_gdsc = { @@ -6856,6 +6858,7 @@ static struct gdsc usb30_mp_gdsc = { .name = "usb30_mp_gdsc", }, .pwrsts = PWRSTS_RET_ON, + .flags = RETAIN_FF_ENABLE, }; static struct gdsc usb30_prim_gdsc = { @@ -6864,6 +6867,7 @@ static struct gdsc usb30_prim_gdsc = { .name = "usb30_prim_gdsc", }, .pwrsts = PWRSTS_RET_ON, + .flags = RETAIN_FF_ENABLE, }; static struct gdsc usb30_sec_gdsc = { @@ -6872,6 +6876,7 @@ static struct gdsc usb30_sec_gdsc = { .name = "usb30_sec_gdsc", }, .pwrsts = PWRSTS_RET_ON, + .flags = RETAIN_FF_ENABLE, }; static struct gdsc emac_0_gdsc = { @@ -6880,6 +6885,7 @@ static struct gdsc emac_0_gdsc = { .name = "emac_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .flags = RETAIN_FF_ENABLE, }; static struct gdsc emac_1_gdsc = { @@ -6888,6 +6894,7 @@ static struct gdsc emac_1_gdsc = { .name = "emac_1_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .flags = RETAIN_FF_ENABLE, }; static struct clk_regmap *gcc_sc8280xp_clocks[] = {