From patchwork Fri Aug 26 01:21:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 600372 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 02469ECAAA2 for ; Fri, 26 Aug 2022 01:22:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244222AbiHZBWH (ORCPT ); Thu, 25 Aug 2022 21:22:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242730AbiHZBWF (ORCPT ); Thu, 25 Aug 2022 21:22:05 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A939DC6E81 for ; Thu, 25 Aug 2022 18:22:03 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id 142so164832pfu.10 for ; Thu, 25 Aug 2022 18:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=xYTu/skGP38f1q1Dy1/xZQnsGWW6M+Lwk/V98c8nDu8=; b=JpF/+LgYMZNVlZzZkRsCU4B8eY4IAOMRYjG+0+dOUsTnzvH+xpvG8RkdRizvPNEVR/ 0rS2ucyTxq9BKlqt16xAymDVrA63ezwAzCtsvzi7jvyYXnpEkrQSOigH+W+drEVQ7dAW yF3n8St7jBCp0pZ5Ne2HeBzF8y65aAsGd4atY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=xYTu/skGP38f1q1Dy1/xZQnsGWW6M+Lwk/V98c8nDu8=; b=sHVgRZRKAecV6/qr95qH6P/Ot6KuTc6uA/o1uud7WnyslfE+9eoLlwzO9fbzT1ThSy vJsS3ErLLoB3ZCdslFjeAVGCp42ddALXWQCZ5otrpGSYEirVlK7Wn8jtiSw5WD8yDdTh kOBIiWlHqhwegM5B/NlADJedvVeL5d/90AjrWIXfVAufdMEgpE9X+VKrpJZkfVjYnyHl t6vHfgp5h29a3Ceb+27t36ReS+okZy+1Q76c++s/BUc8in+mCZld2fW83hZLsAXqWSId UhdNVrfksuRGeegA7RaM8HdJsDpev2nf5fa/exrezq4r5I2RquCkLA/nLF06myQzXy/0 9OpA== X-Gm-Message-State: ACgBeo3SFtonpbVGkqmfFwhfgvXzObxSsTqq1re7bKHEIAUcK95SB9Bd WNdeJ+teuQspwdzleoQkP9o8Dg== X-Google-Smtp-Source: AA6agR4Z/EoRmqFd1BdKNTESfOYrPjKNqvkrv1ei2EB6fomnI4F/yHLbtdbye+ABKOdFbrSXghBapA== X-Received: by 2002:a63:4c3:0:b0:42b:5150:fcfa with SMTP id 186-20020a6304c3000000b0042b5150fcfamr1407615pge.210.1661476923185; Thu, 25 Aug 2022 18:22:03 -0700 (PDT) Received: from localhost ([2620:15c:11a:202:d529:f79d:2a1a:4e61]) by smtp.gmail.com with UTF8SMTPSA id t9-20020a17090a1c8900b001f8aee0d826sm354685pjt.53.2022.08.25.18.22.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 18:22:02 -0700 (PDT) From: Matthias Kaehlcke To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd Cc: Johan Hovold , linux-clk@vger.kernel.org, Krishna Kurapati , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson , Matthias Kaehlcke , Bjorn Andersson Subject: [PATCH v2 1/2] clk: qcom: gcc-sc7180: Keep the USB GDSC always on Date: Thu, 25 Aug 2022 18:21:58 -0700 Message-Id: <20220825182152.v2.1.I45235b7c40997bc2abf813e4722b4dcdd6aecf6b@changeid> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org When the GDSC is disabled during system suspend USB is broken on sc7180 when the system resumes. Mark the GDSC as always on to make sure USB still works after system suspend. Signed-off-by: Matthias Kaehlcke --- I'm not entirely sure that this is the correct solution. What makes me doubt is that only msm8953 sets ALWAYS_ON for the USB GDSC. Is USB broken after suspend on all the other QC platforms? Changes in v2: - set the flags of the GDSC not of the GDSC power domain - updated commit message drivers/clk/qcom/gcc-sc7180.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/qcom/gcc-sc7180.c b/drivers/clk/qcom/gcc-sc7180.c index c2ea09945c47..c0d7509a782e 100644 --- a/drivers/clk/qcom/gcc-sc7180.c +++ b/drivers/clk/qcom/gcc-sc7180.c @@ -2225,6 +2225,7 @@ static struct gdsc usb30_prim_gdsc = { .name = "usb30_prim_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .flags = ALWAYS_ON, }; static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc = { From patchwork Fri Aug 26 01:21:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 600762 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 1000CECAAD1 for ; Fri, 26 Aug 2022 01:22:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244238AbiHZBWJ (ORCPT ); Thu, 25 Aug 2022 21:22:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244233AbiHZBWH (ORCPT ); Thu, 25 Aug 2022 21:22:07 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D445BC8772 for ; Thu, 25 Aug 2022 18:22:05 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id f4so59631pgc.12 for ; Thu, 25 Aug 2022 18:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=gY3tlF3vENa5itYuSBx/pa6KL0Udf7AS/e/RUrrnffM=; b=H3igN1/yHvXXMjmVn4kWJ8Doatb6ptuxzFkFWpXbIRJUBy2um69V57WqimgHiLgkqm +Iysp9DuFgCDu1pfdZnUJYGJg0/XCZV+ubCs7nBX4fG8hRcbdzVaqRSl17ULmpE366aC UIjGOygGlVeIc0gNPqyQ2zAYPRXg4/npFzmAg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=gY3tlF3vENa5itYuSBx/pa6KL0Udf7AS/e/RUrrnffM=; b=b9jQSVd0ZgFOgKLj6jkRI5ljeRFKKbV1yb1zMPfN8Mp+6EMIawM/8XutIUGsRCGfum q0y6TtFLtWabqhM7qbBrFJpddobKLRQtpDQLz4ylAbmlutjAYsH6FewmfM7APKEKQeWo NMscSLJbaJdKgBpZhMRUn6hROLoyop0Kx3SWOSloOAjgPcloK7QTH1B3eKfRZTcipgFo F4yvnK/iR27Y56J8d0KZvbCpyDkBwEfwL4KI/8jH7M98IUlCcIdYBE3EHtC7UEyDmrCI Dx3XHqabhGp9v7eSqi1eQVDNL1nslRR3thTy2p/wUmS0OAYCrqu3jbVGe87g79BfjZ4T TbpA== X-Gm-Message-State: ACgBeo2jnW+BNVoB2HbHZql9XjU2v9Ot2WK43uQdmS2YgD7dGYdwJT5L MVklr9lCvc5SrFchU4MzUQfWGQ== X-Google-Smtp-Source: AA6agR5Tq03n2LBQdmBzk9YoR2dPliY0RNs3VGu0MMT6FJlzVsdMYfhy5YqbQISsMs4sqNR7md9nEg== X-Received: by 2002:a65:6d13:0:b0:41d:7380:e9cc with SMTP id bf19-20020a656d13000000b0041d7380e9ccmr1375243pgb.153.1661476925137; Thu, 25 Aug 2022 18:22:05 -0700 (PDT) Received: from localhost ([2620:15c:11a:202:d529:f79d:2a1a:4e61]) by smtp.gmail.com with UTF8SMTPSA id q17-20020a170902dad100b0017315b11bb8sm192415plx.213.2022.08.25.18.22.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 18:22:04 -0700 (PDT) From: Matthias Kaehlcke To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd Cc: Johan Hovold , linux-clk@vger.kernel.org, Krishna Kurapati , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson , Matthias Kaehlcke , Bjorn Andersson Subject: [PATCH v2 2/2] clk: qcom: gcc-sc7280: Keep the USB GDSCs always on Date: Thu, 25 Aug 2022 18:21:59 -0700 Message-Id: <20220825182152.v2.2.If09027f73daa6e1ed95f5eab02326b543c67132e@changeid> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220825182152.v2.1.I45235b7c40997bc2abf813e4722b4dcdd6aecf6b@changeid> References: <20220825182152.v2.1.I45235b7c40997bc2abf813e4722b4dcdd6aecf6b@changeid> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org When the GDSC is disabled during system suspend USB is broken on sc7280 when the system resumes. Mark the GDSC as always on to make sure USB still works after system suspend. Signed-off-by: Matthias Kaehlcke --- Changes in v2: - set the flags of the GDSC not of the GDSC power domain - updated commit message drivers/clk/qcom/gcc-sc7280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/gcc-sc7280.c b/drivers/clk/qcom/gcc-sc7280.c index 7ff64d4d5920..adef68d2cb0b 100644 --- a/drivers/clk/qcom/gcc-sc7280.c +++ b/drivers/clk/qcom/gcc-sc7280.c @@ -3127,7 +3127,7 @@ static struct gdsc gcc_usb30_prim_gdsc = { .name = "gcc_usb30_prim_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = VOTABLE, + .flags = VOTABLE | ALWAYS_ON, }; static struct gdsc gcc_usb30_sec_gdsc = {