From patchwork Fri Mar 3 02:29:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 63726 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp185441wrd; Thu, 2 Mar 2023 18:33:19 -0800 (PST) X-Google-Smtp-Source: AK7set+pW5xZ+Ef7cV/RJatQ70JQ3tp+6ixUuRIzVwFsJNqxSSJ2p/FnuvjPQuN7RSQv6A1aH9iN X-Received: by 2002:a17:90a:19d:b0:233:ab9b:f86a with SMTP id 29-20020a17090a019d00b00233ab9bf86amr14199pjc.8.1677810798747; Thu, 02 Mar 2023 18:33:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677810798; cv=none; d=google.com; s=arc-20160816; b=xGeJJunGaMqplYpzyVOpTd6gUIdqQGhEfDRGzp9716ZaGTG05yWigVOBPqZ64IYqNb dgGW7kdxIJndH+oEwucFSnyIlctJDmj/yo0oMrVy9Yt+MB039c5wlyLnvphCJXbbYF55 5Qk6Qtruo8Y/dmJrYtHDXXnXCuX9DH17ot9u3gGa2WdG2dsbktdNFU1y4lLUq4bC6qDU x0Mj1fQf/7D4kd7M0HH9hylB0nEamAYac2YTZl1CZubRn5oZnNkfF0j8D4lXfEAg6pJn hYSjYPO+kF0RC7xvL9jYp6fnJiYfXgNOyKKsZETgHtTHM6sn0qdfJ0E+vo6+qeRmdSYK Zq8g== 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=UvP5dlba1SnOnrJzjTH6Yl38TduqMTlOKCpl48T8jEQ=; b=grVckLmHF2lAGfWTevG3yykYWEoYur5D1GMsFqCJi3wYRSiZumxDW3zTEKplQXLs6f nQx8cFzc7GikYWUz04zcl98lAVwbqkM7CtBR99EH76sawOunjNHUNWHB6KagW5AWylAt S+d8CKjBwKJy/Y55ZCdBsry5JWxcK67g4kPizVuPvR9Ak1+wfxEgYKI4qSlST+eBlag3 c4sdt+HCwHu/zddigvFkVZrMjTisMXHgfPun+pVCwW5JwH3E8aPXxi4zOVCHNtGYe/9O Tfsu6WTXvl/cTpTTH3ZZaKvB3K8Qg/O/LwFx+XryS9nFOPplFmBwLIG1jno/rlQM5sST b5Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OkKBIYGs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h188-20020a636cc5000000b004fc2e8947aasi918124pgc.42.2023.03.02.18.33.05; Thu, 02 Mar 2023 18:33:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OkKBIYGs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229668AbjCCC3X (ORCPT + 99 others); Thu, 2 Mar 2023 21:29:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbjCCC3V (ORCPT ); Thu, 2 Mar 2023 21:29:21 -0500 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 EFEEE1D91D for ; Thu, 2 Mar 2023 18:29:17 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id n2so1772275lfb.12 for ; Thu, 02 Mar 2023 18:29:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677810556; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UvP5dlba1SnOnrJzjTH6Yl38TduqMTlOKCpl48T8jEQ=; b=OkKBIYGskI8jazmVLYRtLg4JtLcn8LoNaZlhg21xJqeazztJtRcpDjcwxXIVRBzDMJ qVCYtAoWfpl3MelFjQ2BelyxK6gP7TJ0bt7wIbSujs3aY6gx+rWfM53j3heQjBCqNmLK ZuiWG/8iRy9LYvrnYRJ8GABZm/FxSJecb7xVnaSWfykUSvFwofcsx3GUp543UcUjnlxz smVMKoxdN2NFs+xRFgqFHmI78MFDo8baw5uWKy1GzidOyi51IOQzwZBToKtiRi65+XuN R0Do2HpONuIgURYRGjdyqjFqPdnylHnDvHrsDzd68+GaoU1HZGRdXl8NUmHSQJ2FswsH umeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677810556; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UvP5dlba1SnOnrJzjTH6Yl38TduqMTlOKCpl48T8jEQ=; b=727TPz+bAZGzfxYB7BddPY5VD5khgJ4aBoDE0ax/ArSVIaQS25BvCzb8U1U8MeVx2y bvSjOAU2gHeUizcgs3mnOtgcQa/Hj6C4LHzeCUSGAwkG7EME1c8qI1MQyZ3p/Ghx3mGw Q/eDxp8C4IWg8Y4eriaJJz4FJjIOZIuAzkJD0rc/NEzJNzI6zy0gGnzJ/I7Hfmuo9qPz +lZxhneey2i1jkshufyQcpax3A3AxFcDhc0m4KsmiKvVgcG+0JbT/hd/s0b5WTHcaO78 5POzXXk/ai7j02Uk+9O8O1BeJPelQl2Uyl+PxXeLb7jtNNuUneizeq7L2pW0LA5C2lPF 4Ygg== X-Gm-Message-State: AO0yUKU373PwUJ3h/BNoPgDljRWNLOSHwng2Om08/e+cZyRkvQ3QaJIl O7Nw7/tFQcc/YexjSlqFc4zLRw== X-Received: by 2002:a05:6512:21d:b0:4c6:4ff7:ba04 with SMTP id a29-20020a056512021d00b004c64ff7ba04mr104917lfo.2.1677810556189; Thu, 02 Mar 2023 18:29:16 -0800 (PST) Received: from localhost.localdomain (abym99.neoplus.adsl.tpnet.pl. [83.9.32.99]) by smtp.gmail.com with ESMTPSA id p10-20020ac246ca000000b004cb1135953fsm175574lfo.240.2023.03.02.18.29.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 18:29:15 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] clk: qcom: gcc-sm6375: Update the .pwrsts for usb gdsc Date: Fri, 3 Mar 2023 03:29:11 +0100 Message-Id: <20230303022912.2171177-1-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759312136246626445?= X-GMAIL-MSGID: =?utf-8?q?1759312136246626445?= The USB controller on sm6375 doesn't retain its state when the system goes into low power state and the GDSCs are turned off. This can be observed by the USB connection not coming back alive after putting the device into suspend, essentially breaking USB. Fix this by updating the .pwrsts for the USB GDSCs so they only transition to retention state in low power. Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sm6375.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/gcc-sm6375.c b/drivers/clk/qcom/gcc-sm6375.c index ad3c4833990d..93164670fbe1 100644 --- a/drivers/clk/qcom/gcc-sm6375.c +++ b/drivers/clk/qcom/gcc-sm6375.c @@ -3534,7 +3534,7 @@ static struct gdsc usb30_prim_gdsc = { .pd = { .name = "usb30_prim_gdsc", }, - .pwrsts = PWRSTS_OFF_ON, + .pwrsts = PWRSTS_RET_ON, }; static struct gdsc ufs_phy_gdsc = { From patchwork Fri Mar 3 02:29:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 63729 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp185803wrd; Thu, 2 Mar 2023 18:34:38 -0800 (PST) X-Google-Smtp-Source: AK7set9DYdftw6i5wpZCzIk/2ObFJM9onpzxShavfxkIcgqL52a3jO17hn9U73GnRTI/F1rNBLJ7 X-Received: by 2002:a62:38ce:0:b0:5a8:a9bc:197 with SMTP id f197-20020a6238ce000000b005a8a9bc0197mr578727pfa.11.1677810877857; Thu, 02 Mar 2023 18:34:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677810877; cv=none; d=google.com; s=arc-20160816; b=i7EHNbNN0Bk7KDjvKF5i30qL1UFBPlY3Rj3OHzRHtqxG48xvKMlMBMJww786PaB99X PY20itmpK0Bb64gcXK8yW4Q9TWiFo6n0eYtRgmD+VjiN8qYtprHd3n9ZcSVOSHU0Y2D5 QW4eEjMiHBfUtIctqvSW1p0BuJG821bkS3AMy2ZTDaPvMYYoRFC5AmX7PEWbqnSDZw7N dRyx4wDYSxmu1wyuHNHlsVx0MR9gwYjx4wwMrHn60S3wwujeCB1vFQdfieePYNnCf7bR McnVIpAQfykY1KrzS/mi70uy+f7/A6Lp5bx1Ommvr1v3JqT3odTh6dgMYggbMVC6WbqP x5Ww== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GTPSVEvvP89bGB3D92Tz451FufVn0eXFUs87v5JjTuw=; b=Sz5bFy2wOdRm5iH9jXqh65tA7kgGCsPzVO7YVZUaYmp88LQtHN63ifX+nCgrjRP05x r3hKt/P54k0sTxxEefdzrkG5F2/1Xe7JmaEtA5+WggIMlNDjdapC2D0AwgXqkNC0YsVj wgGY+n3iKM8IVQu62gBhvmnPno2jCnK4DKbnWD7QO0IypXpaW6b0li2OTUD2JnkA180v enCeIIXVGvplr/BWz2zcgDopTu+SMFoNbVNwW+iI9pGX6CWc5ztpL5Zm5a48LA5htvjm hZAy3cKSp6cMLWZM2qQYq54yUvOMJQeUVdIOpn+XJeTJaTYbjVBAw1zr9wxLId5LzTy2 XZ0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N8NDFXvx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a20-20020a656414000000b004fac849f880si831800pgv.206.2023.03.02.18.34.24; Thu, 02 Mar 2023 18:34:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N8NDFXvx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229748AbjCCC3Z (ORCPT + 99 others); Thu, 2 Mar 2023 21:29:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjCCC3V (ORCPT ); Thu, 2 Mar 2023 21:29:21 -0500 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 1FBCD1EBDD for ; Thu, 2 Mar 2023 18:29:19 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id g17so1830683lfv.4 for ; Thu, 02 Mar 2023 18:29:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677810557; 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=GTPSVEvvP89bGB3D92Tz451FufVn0eXFUs87v5JjTuw=; b=N8NDFXvx5McWRHFGaW786k6TdOOVLszqOVhIRYQ0CWW22ECnC6B49A+lhm+NtqMj/h b9UeIUU7o7ux5JnXjy5hlil4LTzdWfaN0miEPmaIawqDU7hrDdjbYZIoRoNWcErdATtX VgUihqiq4e/RYnhPXr9TudRmlDTfsNc6sPEGlQ7dYUsDWkow02PMIe9DLzpfif/VRG+a L82ze9FTIszLPLKawV64yeqme+twH2D0pRh8YVMgUQwUj4wsAzEgeskymYir7weJog9t tmWx1KldhpWhFQGo1IFGXyUbceXGWGxMNR3DDiPMrURW+KKnN85KDurhXGX5FOZJXag7 J6uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677810557; 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=GTPSVEvvP89bGB3D92Tz451FufVn0eXFUs87v5JjTuw=; b=d9HurhCURs4B0UiDpk089d0AFe5HK4NpKez9U6JLgVCKrU+T2BcVaFX1Iy1zahLfnt J761MqT6mTHpHQk7WksI4iPOx8/Dj3TqLyxdEDk9yruV4ZzgKZkDPlx5TZfDL3KabE4T cdzVIXn/z0FwRbFSKk3NrIl22Jl9wASZ5IV+5zX74A45Zu7bBDUv4hmzpRu+l4qtKwNQ KUQfGPDiUxRS63GLwXC7Xywhg1jsY9cu/JUIGPVt6RIVlyBDyvz1xEjEbeqn6Af948dT fLw3e60FAsb116ocENgp+IMqM1NY785bkZ42siVcVP3txZasexIhoG39Yo/GHkw6yADy 6yGg== X-Gm-Message-State: AO0yUKVpyp0v6v1RPCyypFrw6QKVKPJ6DcnRq2BNnyJx2jb5e1qdtzzU kjadAuHR8teUA0Rb4KixJ7rE2g== X-Received: by 2002:ac2:5a45:0:b0:4cc:8682:ec5c with SMTP id r5-20020ac25a45000000b004cc8682ec5cmr87320lfn.34.1677810557388; Thu, 02 Mar 2023 18:29:17 -0800 (PST) Received: from localhost.localdomain (abym99.neoplus.adsl.tpnet.pl. [83.9.32.99]) by smtp.gmail.com with ESMTPSA id p10-20020ac246ca000000b004cb1135953fsm175574lfo.240.2023.03.02.18.29.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 18:29:17 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] clk: qcom: gcc-msm8996: Update the .pwrsts for usb gdsc Date: Fri, 3 Mar 2023 03:29:12 +0100 Message-Id: <20230303022912.2171177-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230303022912.2171177-1-konrad.dybcio@linaro.org> References: <20230303022912.2171177-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759312219085064743?= X-GMAIL-MSGID: =?utf-8?q?1759312219085064743?= The USB controller on MSM8996 doesn't retain its state when the system goes into low power state and the GDSCs are turned off. This can be observed by the USB connection not coming back alive after putting the device into suspend, essentially breaking USB. Fix this by updating the .pwrsts for the USB GDSCs so they only transition to retention state in low power. Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-msm8996.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/gcc-msm8996.c b/drivers/clk/qcom/gcc-msm8996.c index e16163706735..e068c9e51441 100644 --- a/drivers/clk/qcom/gcc-msm8996.c +++ b/drivers/clk/qcom/gcc-msm8996.c @@ -3455,7 +3455,7 @@ static struct gdsc usb30_gdsc = { .pd = { .name = "usb30", }, - .pwrsts = PWRSTS_OFF_ON, + .pwrsts = PWRSTS_RET_ON, }; static struct gdsc pcie0_gdsc = {