Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2364789rwb; Thu, 29 Sep 2022 09:15:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4G2a1w13aoCrm4Mi2rQznYIG3M7l2kpRFmAWfb0ipyUUMh3vhvceg6J3w/aNXYiY2kF86m X-Received: by 2002:a17:903:18d:b0:178:28d1:4a13 with SMTP id z13-20020a170903018d00b0017828d14a13mr4144711plg.160.1664468158024; Thu, 29 Sep 2022 09:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664468158; cv=none; d=google.com; s=arc-20160816; b=z6X8bkIkrGXskGvKoM7crK6v7h2R7oQULUvu4F5nBC8SKJE15snGzuNaDqUKAf1LmQ 7qDD0zm+44I9aR+gqia50GQQKAcuDRqTG+U6wH/6as6lSKSldKtL4ElOnGOwQNFOa5f7 3Mm6sdbvR60r5ovBv4iCfFgYomW/tv93n8KSGsfcWVqB10h16/JAaN/Wht4qaylFDO9N tc8gqIVMyQAe/t4ReGiD1Dn6Ib8IjXWxtGorWgMkUOjES/hXmzfQQGefY7YcMH3gWWPX 3Njkokkj7k21zVEiejDxxAi2jdffrQABW/w88KiBeDhDx8647u0BaQzW9v3oZ300Jfzs Y7ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XKUE834Ykgkxu+YlqNodUDw5U/47pdtfLHuz60OhBSE=; b=XCIGzp8nDDSdxg141VMbbK6HNBd6dEFk3Kke7uey0jA56EJo7f2W/GCGGcdtBchJIr r+oRm/lpn9Hh2vwDtNaDu2nTq8NnJ23ihUBn0Mkoiqdj0LInBL+nz13QbCOshCusuzaC ht5dyR2qYUzbW4HWlu9yxe8d5UMGhciA+VxTmeyB4d/l2qG9+0l/JLVzzb+lWupmrzF2 tRhYQXm72Cp58IBlO9djtx6RS1I3yVhoIfawt+B3Bg5Q0Kfg7OD79hx4ZmgPHJoYdmDl E1D5BbU7INK69BEcVGSSVayfOfj51NR45z65Dq/hE1v58taIwtefuNdldvn87tbcfQ5m rV8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JavQV1Eg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q5-20020a17090a4f8500b002001381e784si5921656pjh.111.2022.09.29.09.15.45; Thu, 29 Sep 2022 09:15:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JavQV1Eg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236061AbiI2QMP (ORCPT + 99 others); Thu, 29 Sep 2022 12:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234934AbiI2QMD (ORCPT ); Thu, 29 Sep 2022 12:12:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A80DC1D66DB; Thu, 29 Sep 2022 09:12:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 58625B824FA; Thu, 29 Sep 2022 16:12:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C2FFC433C1; Thu, 29 Sep 2022 16:12:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664467920; bh=Qb6H1MTM1LXEg8sMPvRyCuIO5X98/kvPIu0bqQ8zjw4=; h=From:To:Cc:Subject:Date:From; b=JavQV1Egnc8IhrvvsS8nMYbDTT6HGrmnOMmZ6td2f7mM36YZa9LCLFxwZc7UkJ/fF NHXhlK+91sd2qpHiu4Ra7w9bH3ySS7wnP4XWFvseTyFyaB2M9i09H49539Nw7AuJgL AvbfNZ8dIDewQY8otd3c4HHqHQGGqE4aH1Lx/C5tFpcRmhedBZLSdVAjQWtscWRd4E 5rhq8/D/iQTlcM2MKTrS+x9HTNlRyl6CPaptsYuZh1B77WzRw0R5B8T10HRQKluuax egwBy3WT4d5PbEKuyAdsaH89ivb8NCFWLUu293nkaAjnpYKbLjJwLz+sf+J81XRxYF MC/RKOOeaQ+uw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odw8s-0004j3-2g; Thu, 29 Sep 2022 18:12:06 +0200 From: Johan Hovold To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rajendra Nayak , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH] clk: gcc-sc8280xp: use retention for USB power domains Date: Thu, 29 Sep 2022 18:11:24 +0200 Message-Id: <20220929161124.18138-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit d399723950c4 ("clk: qcom: gdsc: Fix the handling of PWRSTS_RET support) retention mode can be used on sc8280xp to maintain state during suspend instead of leaving the domain always on. This is needed to eventually allow the parent CX domain to be powered down during suspend. Signed-off-by: Johan Hovold --- drivers/clk/qcom/gcc-sc8280xp.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) While we're not yet able to fully test this (since we're not hitting CX power down) this can still go in as we'll need it in some form eventually. Note that the PCIe domains should remain always-on until we have driver support for suspend in place. Johan diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c index 7768e6901dcc..a18ed88f3b82 100644 --- a/drivers/clk/qcom/gcc-sc8280xp.c +++ b/drivers/clk/qcom/gcc-sc8280xp.c @@ -6843,17 +6843,12 @@ static struct gdsc ufs_phy_gdsc = { .pwrsts = PWRSTS_OFF_ON, }; -/* - * The Qualcomm DWC3 driver suspend implementation appears to be incomplete - * for sc8280xp so keep the USB power domains always-on for now. - */ static struct gdsc usb30_mp_gdsc = { .gdscr = 0xab004, .pd = { .name = "usb30_mp_gdsc", }, - .pwrsts = PWRSTS_OFF_ON, - .flags = ALWAYS_ON, + .pwrsts = PWRSTS_RET_ON, }; static struct gdsc usb30_prim_gdsc = { @@ -6861,8 +6856,7 @@ static struct gdsc usb30_prim_gdsc = { .pd = { .name = "usb30_prim_gdsc", }, - .pwrsts = PWRSTS_OFF_ON, - .flags = ALWAYS_ON, + .pwrsts = PWRSTS_RET_ON, }; static struct gdsc usb30_sec_gdsc = { @@ -6870,8 +6864,7 @@ static struct gdsc usb30_sec_gdsc = { .pd = { .name = "usb30_sec_gdsc", }, - .pwrsts = PWRSTS_OFF_ON, - .flags = ALWAYS_ON, + .pwrsts = PWRSTS_RET_ON, }; static struct clk_regmap *gcc_sc8280xp_clocks[] = { -- 2.35.1