Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp693701rdb; Thu, 19 Oct 2023 17:06:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENiwncoN+qOaT9a9MKsZ4VC3ot94vtybvbE9VDgS7nyr5TNypL50bKqr/445YZLqhLsBoG X-Received: by 2002:a9d:6ac3:0:b0:6c9:7aca:f436 with SMTP id m3-20020a9d6ac3000000b006c97acaf436mr293181otq.29.1697760374148; Thu, 19 Oct 2023 17:06:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697760374; cv=none; d=google.com; s=arc-20160816; b=oprDZGoPPLK8RpevvSRyrbctWZP+5l4tlsE6KpRbyVZolJ2zE3AM3ioRyuYebfnrgc TIxavXiDMSGrncYPbYo60IOskCJcqCTCwI5hinknKoLGAtsd0NyDLUQxt7pM8j38SCUB 4+6NHtLNTTHZq3wbTTmxrLuguojrn8/F9oNM8BBePbAxwp95nCX9zhJp7jlnlS6EgARX szmSfiiZSCClkFSR+YzXKQRQZ4Xv25nJO45C8hj6nvycS2TCbci8hYMKGyJi7LkoKBn/ l4LY2x7HdawMxUgnNIk+7NkI8zp7Lwv+jyhXTzEheYrPXgjbj8wvt4QHKnaTNuPbe8yy 8Tzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:date:to:cc:from:subject:references :in-reply-to:content-transfer-encoding:mime-version:message-id :dkim-signature; bh=O9MAEXEEnD8PbgYOZLMCqbHxoOdKvoMUqekx/eQ6PMI=; fh=D8ZeQYo+GbYbQcnQs7cc77tyUf+EWJmoNAaDAEuZpZo=; b=j0q/Q0L+asoG2xXYplJgW3PmmjRV1V8iHsvCscTOlMcJ6R25luHJp3RjmGVoxAMXuJ kzGgu8TJtt1RXhK+huHzq7yTyaiIp2hIOgYKAzBsDNQYtqQmRFQLdse2Azd6TgSqZX67 NlU0MU6SlsmwrAGDi2G/mgdCLJxuFzBZlH+F5RruVPhU/dYZerV3kwsF+ozYRUG+ANga 51bTWFftBcaLg5Rif7QaZVJuMW6weWGAVoASo6dLYAdvrZu97Ec5GtvJ1FrwgKwdYJBE Ye6LsqnQlcDtaNJG2Zgpw17jD2bvf5ybLZVyWVmZ3iUIM2k+41AjVEccM7u8o9vnbF0V SKFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pJwZeiQP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id u11-20020a056a00124b00b006b4d80642bbsi748093pfi.182.2023.10.19.17.06.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 17:06:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pJwZeiQP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 18D47836D60E; Thu, 19 Oct 2023 17:06:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346743AbjJTAGF (ORCPT + 99 others); Thu, 19 Oct 2023 20:06:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346711AbjJTAGD (ORCPT ); Thu, 19 Oct 2023 20:06:03 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F94B114; Thu, 19 Oct 2023 17:06:01 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9A55C433C7; Fri, 20 Oct 2023 00:05:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697760360; bh=O9MAEXEEnD8PbgYOZLMCqbHxoOdKvoMUqekx/eQ6PMI=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=pJwZeiQP69B+aICkseQkPHLtJPGyN5w/39KHR0BR27H2ziCIQUqpjn79bzLmU1SYN bqW6A9FRXDxcq+DWB7nhe89zQWF+bypTT8DYgav8dMfI5FDzbqicJoNEjP1TsQqtHM 7hhXvIFVY6t5pnkBTbb9Rd0PdthTZO5ORJV0lrxMXk4HOuiF0zPLKsAELBQ/jF19ux 8pbZGaXlrXE/iQqqCJID4rm6qUKQWN0sa5T6rBntLuJzIsJMXE8LvvB8ECM67YOQex kreSlww85XPYiugjq4gXim/H/X5nVAHBYMpk6Bg7wQ6Btc8atl7QiVAMcxPh6DRxeN N2HFzrOmAw72g== Message-ID: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20231017131944.8356-1-quic_kriskura@quicinc.com> Subject: Re: [RFC 4/8] clk: qcom: gcc-sm8450: Keep usb30 prim gdsc on during runtime suspend From: Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, quic_ppratap@quicinc.com, quic_jackp@quicinc.com, Udipto Goswami To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Krishna Kurapati PSSNV , Michael Turquette Date: Thu, 19 Oct 2023 17:05:54 -0700 User-Agent: alot/0.10 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 19 Oct 2023 17:06:12 -0700 (PDT) Quoting Krishna Kurapati PSSNV (2023-10-19 01:37:20) >=20 >=20 > On 10/19/2023 6:28 AM, Stephen Boyd wrote: > > Quoting Krishna Kurapati (2023-10-17 06:19:44) > >> When runtime suspend happens in host mode, if cable is removed at this > >> instant, it triggers a resume where a xhci register access is done when > >> gdsc is not on leading to a crash. Keep usb30 prim gdsc as on during > >> runtime suspend to avoid this crash. > >> > >> Signed-off-by: Krishna Kurapati > >> --- > >> Note: I am not sure if this is the right way or setting GDSC flags to > >> PWRSTS_RET_ON is the right approach. So for now made this change to > >=20 > > Does using PWRSTS_RET_ON work? Does the GDSC support being turned off or > > is the lowest power state retention? >=20 > I didn't see any issue when I put it as PWRSTS_RET_ON. If the GDSC is=20 > off, when we remove cable in host mode, we see a crash because of xhci=20 > register access. But when I try putting PWRSTS_RET_ON /=20 > CLK_RPM_ALWAYS_ON it doesn't crash. >=20 You need to find out if the GDSC only supports retention mode. Otherwise it sounds like the xhci register access is happening when the genpd is off, and thus the driver needs to power on the device before accessing it.