Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp60436lqo; Wed, 15 May 2024 21:35:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXe/jbeKqgWsUziDccAsjdaPqNCn2UEmLEn7mbSuWaALq9UroEDfdx9LlSRB3Slg1LshNKLafPN+eRklV9dWhiW+NfDrn1IA2tODTcXRg== X-Google-Smtp-Source: AGHT+IGQlV6V/1U2Iexddly/cBdlEoVoJXIhntq2YcJ0jSfFf+Gi0gLRofwGKegnd+5mqmejqZ6d X-Received: by 2002:a05:620a:1671:b0:792:c025:a36e with SMTP id af79cd13be357-792c75affb5mr1801331585a.32.1715834123015; Wed, 15 May 2024 21:35:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715834123; cv=pass; d=google.com; s=arc-20160816; b=cBrGAMsAmqu5JDQ8L5rDvaJ1H12yQtXJYT7tO4soLsvxbtijzb92npL8m65v6Oza9o hSYIJwbUaETuVbwjLcXslGwVa+XcurJbXi0ovbfNxeVBkiiNrJjJbY4MX+cAUs7UmB/g J6xDBdSBJHSx7qsQ8XdWPwVkQ/O+JtIzs/h8CGOga9bsmSPt5vb7BQNEomXS9AR/W9xo UBuogbD5fZfTVM4196RfJN0LOe3ZKG/23PO3MeXyyVtZepYgRosPbcJGxuvcC1dRfPkE UofCpHAUxXJRAySw6bfYIqjvnC0IbR4CGF2QYThDpaetaNRC79YMbddVqqMRR7QAkHo9 POug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=qhrqxFtYpRU+Vl8uqo5rJIfOPHbM+LsyiYwbd5rWZWk=; fh=PSL1vrjdr50KEGaZmX45jSrsX5fTWAcfpjOtLQQ6TGA=; b=ehPJSEBNKcCdztETgUzK0vtCTkC0SWM3xOAZNEArDQ2uXcdT2tc8FGb3LUn2kGHhsU WY8RdaLzACb4HUcPsO1Gkzu7bmPsZLuatemm4GBpl+2DHxffK71I9k0RwQbcdbcNwLuh oBadbPLU7KaT0qjkEbk8uLh+QUqUUQwKcR/jLJx3OtBnCvBo7MuQbgTcpNZM4B3lPt9U QLIFTN4Nf5jx4ghsUIK9eyDv7na9Yh4trdEOGEdae4ocSO/g6GfxdpJNdSKjO6ISNxqp ZPi8nKGMKfjzePJKS8ZYBfTv3VkdCHJv2/DNsQsf0RvgethG/yi1Qd6YkzXJyCaME4al Uh2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=uI5t7c1L; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-180627-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180627-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf38d880si1489462085a.732.2024.05.15.21.35.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 21:35:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180627-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=uI5t7c1L; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-180627-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180627-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9ED741C22ABA for ; Thu, 16 May 2024 04:35:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC904125D6; Thu, 16 May 2024 04:35:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="uI5t7c1L" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FC7119479; Thu, 16 May 2024 04:35:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715834112; cv=none; b=WXgopBPKixhRuexqs5Q2sogTLRWZHaTeTl7R4hx+H3chii0BxfcfZ6d3NsGB+jxNrUVsOfzMrzxZlm0itfuhkc/I3lbnKy9Fq8priQA/0wEm4iWYr7sqqbW8f4dq1bgcgvaGqfHZRlV3p6vkB+FL6kf7Cllkp9pgfgYE0Zw4AvE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715834112; c=relaxed/simple; bh=R6g6Kbz23JJuHxxGxKU5UfnHFtwBCQKTbu8wuwF8h5I=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=R6KXXKu6Yc0PV4bvkC4wOSLzM9nyfaGO7qKyS07Rc8ZAu8Wdwba9y1DpWk0yxbubNbch28ifMp+lEhgR9FqCF28VojFHTSDvIxX8cR4s/Yi1Qq4CcpG7YklZ+PSMmR8k3TrDN8qeaoyjP2eCtejUAJttr9IR+wCGDZeP8+p7TB0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=uI5t7c1L; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44G4Z5po060121; Wed, 15 May 2024 23:35:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1715834105; bh=qhrqxFtYpRU+Vl8uqo5rJIfOPHbM+LsyiYwbd5rWZWk=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=uI5t7c1LCpyJVLQe80TqhMKXhpmYZmEXhxdlUsnx6FawlrJIIxl02+UDS77h/BtqK jTPIX4euwj7vG1WR8xckJRjmlEgpyhr1KgVW+MJ9GwRGaU10B2XSqR1TajnOPIhDaM JvzcvZgEKfq7cEYk8+hbRv4dxrl9533Ty8gkuRno= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44G4Z5CW019414 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 May 2024 23:35:05 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 15 May 2024 23:35:05 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 15 May 2024 23:35:05 -0500 Received: from [172.24.227.88] (uda0500640.dhcp.ti.com [172.24.227.88]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44G4Z2Mj100716; Wed, 15 May 2024 23:35:02 -0500 Message-ID: Date: Thu, 16 May 2024 10:05:01 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2 1/2] usb: cdns3: Add quirk flag to enable suspend residency Content-Language: en-US To: , , CC: , , , , Ravi Gunasekaran References: <20240516042845.31211-1-r-gunasekaran@ti.com> <20240516042845.31211-2-r-gunasekaran@ti.com> From: Ravi Gunasekaran In-Reply-To: <20240516042845.31211-2-r-gunasekaran@ti.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 5/16/24 9:58 AM, Ravi Gunasekaran wrote: > From: Roger Quadros > > Some platforms (e.g. ti,j721e-usb, ti,am64-usb) require > this bit to be set to workaround a lockup issue with PHY > short suspend intervals [1]. Add a platform quirk flag > to indicate if Suspend Residency should be enabled. > > [1] - https://www.ti.com/lit/er/sprz457h/sprz457h.pdf > i2409 - USB: USB2 PHY locks up due to short suspend > > Signed-off-by: Roger Quadros > Signed-off-by: Ravi Gunasekaran > --- > Change log: > ---------- > > Changes since v1: > ---------------- > * Grouped the susp_ctrl register update along with > existing CDNS3 snippet as suggested by Peter Chen > > v1: https://lore.kernel.org/all/20240514092421.20897-1-r-gunasekaran@ti.com/#t [...] > - u32 state; > + u32 state, reg; > int ret; > > regs = devm_ioremap_resource(cdns->dev, &cdns->otg_res); > @@ -433,12 +433,21 @@ int cdns_drd_init(struct cdns *cdns) > cdns->otg_irq_regs = (struct cdns_otg_irq_regs __iomem *) > &cdns->otg_v1_regs->ien; > writel(1, &cdns->otg_v1_regs->simulate); > + > + if (cdns->pdata && > + (cdns->pdata->quirks & CDNS3_DRD_SUSPEND_RESIDENCY_ENABLE)) { > + reg = readl(&cdns->otg_v1_regs->susp_ctrl); > + reg |= SUSP_CTRL_SUSPEND_RESIDENCY_ENABLE; > + writel(reg, &cdns->otg_v1_regs->susp_ctrl); > + } > + > cdns->version = CDNS3_CONTROLLER_V1; > } else { > dev_err(cdns->dev, "not supported DID=0x%08x\n", state); > return -EINVAL; > } > > + Please ignore this patch. I didn't notice this. I will send a v3 fixing it. > dev_dbg(cdns->dev, "DRD version v1 (ID: %08x, rev: %08x)\n", > readl(&cdns->otg_v1_regs->did), > readl(&cdns->otg_v1_regs->rid)); > diff --git a/drivers/usb/cdns3/drd.h b/drivers/usb/cdns3/drd.h > index d72370c321d3..1e2aee14d629 100644 > --- a/drivers/usb/cdns3/drd.h > +++ b/drivers/usb/cdns3/drd.h > @@ -193,6 +193,9 @@ struct cdns_otg_irq_regs { > /* OTGREFCLK - bitmasks */ > #define OTGREFCLK_STB_CLK_SWITCH_EN BIT(31) > > +/* SUPS_CTRL - bitmasks */ > +#define SUSP_CTRL_SUSPEND_RESIDENCY_ENABLE BIT(17) > + > /* OVERRIDE - bitmasks */ > #define OVERRIDE_IDPULLUP BIT(0) > /* Only for CDNS3_CONTROLLER_V0 version */ -- Regards, Ravi