Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3302996pxk; Mon, 7 Sep 2020 09:01:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydPx1XncMIt9K/+6KW966dDBTLi53wlX04dSIJIC0QBuUyjCWeJF+HfPMa4M86Ed5WVbhH X-Received: by 2002:a17:906:4dc7:: with SMTP id f7mr22249281ejw.261.1599494492180; Mon, 07 Sep 2020 09:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599494492; cv=none; d=google.com; s=arc-20160816; b=L1emruajJJJFTJuHsgt2nRSFHq6Rc0ni8Um7a3AUhExY9JXnzDsB1PA3nVmA3N2aib bDILa7Ajb5anuZ6flpI8cIxanDjPTLRcw4IB3V0pESbN9C8CJXld9Ei3IoieLhO/+6Ic faKHkmUzlolx/50+RZ03i/u974O+4A4GUKAMZ9fQhsEriLLuezffMbn17tIY1qAqJFUS K0H6X0ZFcU9A5vnwfOvszR+Jv1VDQeOd+AK/+hQFXrkBb+sDPXU57EB61Xc50G37RuAA dRWIX4wf87s+Pe+QkpNKh5NLOD3XpjK1W8WpV4QysKfUjQeYuofAkaIwLAuALBDTQPzC /8kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=O3DuUxqTYgz2E6zvdXW7wTA8rCIhAGNYhBI5Dseo6B4=; b=VE9JNBRm25lbLd3gfZ3OE6FPtWuNqWZmXpLw+O69Wk53UPDOH7A+9umJAsbYhQ8DeA OTIgOuMExW8bdSGCAenooVUzQP4UQyKjU1WxCvRMbmUEIac5VvclYD8+tk2NVb3SPF75 KmgcVgqKG5DiKVFIxMwbZimkWSeOpJH07yf4IiZSNQded9FIWDjikh08WNh8xASe4LPP EzSQ4UhOaM6SCOyL4UCmNwPwvAz64Fm2p7UM2iMMGLiZcBjc61rDkEAAI6BTUx/3ZM1r vcuWrqyRcUJb+lYsLiqhyoW7fXlAdGl99jJk9dOt8ZMK6W6Qd0eR2epPGaZ2XA7Bxqk2 5YbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jJTNEKN6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w12si10343218edi.441.2020.09.07.09.01.08; Mon, 07 Sep 2020 09:01:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jJTNEKN6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730280AbgIGP6V (ORCPT + 99 others); Mon, 7 Sep 2020 11:58:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:58154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730008AbgIGOuJ (ORCPT ); Mon, 7 Sep 2020 10:50:09 -0400 Received: from coco.lan (ip5f5ad5cf.dynamic.kabel-deutschland.de [95.90.213.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 650DE21532; Mon, 7 Sep 2020 14:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599490208; bh=ucJr+saLVcP0I55uqGtU5DQWyYXMW2U5WBZWrLtx+zk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jJTNEKN6B2ykUQfSlOxxOquiv+y2ri4qBpvBA0yy2WBHyYQ7U60vuSx9SEBF9QlBn Ar+/7pK9BivK2eSYEDscpEZzduRbW2j7hxwiRljDzqT3vtxs/9Pq1T4PlIi/i4lUpu MPpNKwTKS8Igkyfh9QzkF30mEKEu4P5RLAI0SoJo= Date: Mon, 7 Sep 2020 16:50:00 +0200 From: Mauro Carvalho Chehab To: Felipe Balbi , Yu Chen Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, suzhuangluan@hisilicon.com, kongfei@hisilicon.com, liuyu712@hisilicon.com, wanghu17@hisilicon.com, butao@hisilicon.com, chenyao11@huawei.com, fangshengzhou@hisilicon.com, lipengcheng8@huawei.com, songxiaowei@hisilicon.com, xuyiping@hisilicon.com, xuyoujun4@huawei.com, yudongbin@hisilicon.com, zangleigang@hisilicon.com, Andy Shevchenko , Binghui Wang Subject: Re: [PATCH v6 04/13] usb: dwc3: Add splitdisable quirk for Hisilicon Kirin Soc Message-ID: <20200907165000.7c42a6da@coco.lan> In-Reply-To: <874ko9of80.fsf@kernel.org> References: <20190420064019.57522-1-chenyu56@huawei.com> <20190420064019.57522-5-chenyu56@huawei.com> <20200907150631.70e1bce0@coco.lan> <874ko9of80.fsf@kernel.org> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, 07 Sep 2020 17:04:31 +0300 Felipe Balbi escreveu: > Hi Mauro, > > Mauro Carvalho Chehab writes: > > > Hi Felipe/Greg, > > > > What's the status of this patch? > > to be frank, I don't think I have this in my inbox anymore. > > > I tested here, together with the Hikey 970 phy RFC patches I sent > > last week. > > > > Without this patch, the USB HID driver receives -EPROTO from > > submitted URBs, causing it to enter into an endless reset cycle > > on every 500 ms, at the hid_io_error() logic. > > > Tested-by: Mauro Carvalho Chehab > > > > If you prefer, I can re-submit this one with my SOB. > > Please do, but since you're changing device tree, I need Rob's acked-by. Ok, I'll do that. > > Thanks, > > Mauro > > > > Em Sat, 20 Apr 2019 14:40:10 +0800 > > Yu Chen escreveu: > > > >> SPLIT_BOUNDARY_DISABLE should be set for DesignWare USB3 DRD Core > >> of Hisilicon Kirin Soc when dwc3 core act as host. > > is this Kirin-specific or is this something that we should do a revision > check? I've no idea. I don't have any datasheets from this device. > Why does it affect only Hikey kirin? As John Stultz didn't re-submit this one (and looking at the DT between Kirin 960 and 970 from the original Kernel 4.9 official drivers), I suspect that only Kirin 970 requires this quirk. It could well be due to some Dwc3 revision, but it could also be due to some differences at the USB part of the SoC, as there are a few other things different between hikey 960 and 970: it has a different PHY driver, and there are also some differences at the USB HUB which is connected into it. On both devices, the USB physical ports are actually connected into a HUB. In the case of Hikey 970, the hub seems to be a TI TUSB8041 4-Port Hub: $ lsusb Bus 002 Device 002: ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive Bus 001 Device 003: ID 413c:301a Dell Computer Corp. Dell MS116 Optical Mouse Bus 001 Device 002: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub > What's the dwc3 revision on > that SoC (grep SNPSID /sys/kernel/debugfs/*dwc3/regdump)? GSNPSID = 0x33313130 > > >> @@ -1825,10 +1834,27 @@ static int dwc3_resume(struct device *dev) > >> > >> return 0; > >> } > >> + > >> +static void dwc3_complete(struct device *dev) > >> +{ > >> + struct dwc3 *dwc = dev_get_drvdata(dev); > >> + u32 reg; > >> + > >> + if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST && > >> + dwc->dis_split_quirk) { > >> + dev_dbg(dwc->dev, "set DWC3_GUCTL3_SPLITDISABLE\n"); > > no more dev_dbg() should be added. This driver relies exclusively on > tracepoints for debugging. Ok. > > >> + reg = dwc3_readl(dwc->regs, DWC3_GUCTL3); > >> + reg |= DWC3_GUCTL3_SPLITDISABLE; > >> + dwc3_writel(dwc->regs, DWC3_GUCTL3, reg); > >> + } > >> +} > >> +#else > >> +#define dwc3_complete NULL > >> #endif /* CONFIG_PM_SLEEP */ > >> > >> static const struct dev_pm_ops dwc3_dev_pm_ops = { > >> SET_SYSTEM_SLEEP_PM_OPS(dwc3_suspend, dwc3_resume) > >> + .complete = dwc3_complete, > > why is this done on complete? Why can't it be done at the end of > dwc3_resume()? Again, no idea. I didn't actually tried to suspend/resume. Maybe the original author can shed a light on it. Thanks, Mauro