Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2370932rdb; Mon, 20 Nov 2023 09:07:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBirym+Z+WEhjH3Mttd95yGTlQD/nGySzKbXkeQoLcRBo8tdb/0IeRDQmUAMf0IpPgyrGn X-Received: by 2002:a17:903:244e:b0:1cc:9781:4785 with SMTP id l14-20020a170903244e00b001cc97814785mr12064269pls.50.1700500027333; Mon, 20 Nov 2023 09:07:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700500027; cv=none; d=google.com; s=arc-20160816; b=FO8Tmnq0qsmCy8iikqLaQvWs06+11dfr462tRaZ+mVaB+EuiIdfOV0U/AwzOB8fZVE wearlLeOnlkr8b2HUvenqWJ9OYelUYI0HdYZqq7iwMcafMMtQpHBEZua8W2+MVWAgKLr NLhuT6thJ/MrtkZlE3JdSI2+r5m+PXBjodhXuuErljXFNDpzsWLUrRbj0JzTMSAlXheg x0SirreTm6h8TlY2PgG0pWxQ1BQ6CoxOjVLoeG2XQQC/SA4jrmO9pJqWJ32dW5fCoLHt 7e4anC+2KPiW5Q7Rzj84BBX9X4IUaPk+YKL0+6DwYkl/OufceQ6ZI/xHs7ae/oJEudhl Q1qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=nDo2L/kHH9S9njIE6FRuQXRwkc6RX5NfCLZkNNd2W9E=; fh=djCqQyCPITk/fGPikTLjejqXUdBjmgm6+WoI1E5KrDk=; b=uPqi/DlYJ0Y4PYP57GvweUHO6m2TyLr229d/uoLo0Xd08A8lFyJ7tiKw9xixd3V29i mq8KtlsidLClclN2pr0/mfEhM5o/0Ggj3KiFFU2NJEG6JKnAKsT5aR0m5cEMrk3h0BCO 4tkIFmQlkFKBzQAMRfVYozxYdl7rgqvIrfeZsEPUF4mVVGS9IzmWiem6OjDfSIj/DfQo fFxerN3oDsYFSlMDbBLqTcyDxXdwN4Z4zryUU/ijo6pzrHPCLDiHgTpvsoJeQTqNzSIw fDYuJCbdnIiN/zwGcM0BodPCdEMBaLwx0qChPpy/f4G1qCuIzq/CagWtEh1c7ZnyY+ow ECJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QBqPbnsx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id lk5-20020a17090308c500b001c71eb782b0si9381798plb.94.2023.11.20.09.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:07:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QBqPbnsx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 333348050638; Mon, 20 Nov 2023 09:06:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232103AbjKTRG0 (ORCPT + 99 others); Mon, 20 Nov 2023 12:06:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231563AbjKTRGR (ORCPT ); Mon, 20 Nov 2023 12:06:17 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66829E8; Mon, 20 Nov 2023 09:06:13 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 62A2FE0010; Mon, 20 Nov 2023 17:06:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700499972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nDo2L/kHH9S9njIE6FRuQXRwkc6RX5NfCLZkNNd2W9E=; b=QBqPbnsxX5rPc90WJBdLJNqmikqCqCW9lLULcko2NpiWhto/Vzx2pBz1B1AyHUAckANfOn NOWwyh1lTnaIn3E0HmBzw5lgnGbvDErrP5rlqISW7AtaDHhy95aNawkIA+uDfh4dnVRIRH YSLa5MXVUPQ41b7VwNYsC+fwgi30ZjmCC4Ue+pCLNQdzsVGwUDg1AToa0QzAE3uIsyu6TJ sQ5Okl4vkxi7vl06ZP13kvGpe4rfCBTUFYCjYLOcgZYyh7QyF8+lwewZXi/c49xIfLfIJp 95vGcaCza1+nxKTvoiTUeZwjmxI19pSBXHfqH9c2Dyikj/koqNOy1PYXAQuQCA== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Mon, 20 Nov 2023 18:06:06 +0100 Subject: [PATCH v2 6/7] usb: cdns3-ti: signal reset-on-resume to xHCI for J7200 platform MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231120-j7200-usb-suspend-v2-6-038c7e4a3df4@bootlin.com> References: <20231120-j7200-usb-suspend-v2-0-038c7e4a3df4@bootlin.com> In-Reply-To: <20231120-j7200-usb-suspend-v2-0-038c7e4a3df4@bootlin.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Roger Quadros , Peter Chen , Pawel Laszczak , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Thomas Petazzoni thomas.petazzoni"@bootlin.com, =?utf-8?q?Gr=C3=A9gory_Clement?= , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.12.3 X-GND-Sasl: theo.lebrun@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 09:06:58 -0800 (PST) Pass CDNS3_RESET_ON_RESUME as platform data to cdns3 host role. It will in turn pass it down to xHCI platform data as XHCI_RESET_ON_RESUME. Avoid this warning on resume: [ 16.017462] xhci-hcd xhci-hcd.1.auto: xHC error in resume, USBSTS 0x401, Reinit When used, remote wakeup is not expected to work. Only focus J7200 as other SoC are untested. Signed-off-by: Théo Lebrun --- drivers/usb/cdns3/cdns3-ti.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c index 84f93c2fcd5c..7d56a1acbc54 100644 --- a/drivers/usb/cdns3/cdns3-ti.c +++ b/drivers/usb/cdns3/cdns3-ti.c @@ -16,6 +16,7 @@ #include #include #include +#include "core.h" /* USB Wrapper register offsets */ #define USBSS_PID 0x0 @@ -128,6 +129,7 @@ static int cdns_ti_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = pdev->dev.of_node; + const struct of_dev_auxdata *auxdata; struct cdns_ti *data; unsigned long rate; int error, i; @@ -177,7 +179,8 @@ static int cdns_ti_probe(struct platform_device *pdev) cdns_ti_init_hw(data); - error = of_platform_populate(node, NULL, NULL, dev); + auxdata = of_device_get_match_data(dev); + error = of_platform_populate(node, NULL, auxdata, dev); if (error) { dev_err(dev, "failed to create children: %d\n", error); return error; @@ -222,8 +225,20 @@ static const struct dev_pm_ops cdns_ti_pm_ops = { #endif /* CONFIG_PM */ +static struct cdns3_platform_data cdns_ti_j7200_pdata = { + .quirks = CDNS3_RESET_ON_RESUME, +}; + +static const struct of_dev_auxdata cdns_ti_j7200_auxdata[] = { + { + .compatible = "cdns,usb3", + .platform_data = &cdns_ti_j7200_pdata, + }, + {}, +}; + static const struct of_device_id cdns_ti_of_match[] = { - { .compatible = "ti,j7200-usb", }, + { .compatible = "ti,j7200-usb", .data = cdns_ti_j7200_auxdata, }, { .compatible = "ti,j721e-usb", }, { .compatible = "ti,am64-usb", }, {}, -- 2.42.0