Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2073814pxb; Mon, 18 Jan 2021 07:35:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIR1G8LLWN6ZvnzMi7H/Y6zaLRiTT48qQSdEKasK+0opl6PbjPSfDjM1v7DEaCPxYwqFZ5 X-Received: by 2002:a17:907:1119:: with SMTP id qu25mr187085ejb.268.1610984122643; Mon, 18 Jan 2021 07:35:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610984122; cv=none; d=google.com; s=arc-20160816; b=DaNekflBh9HIFJ8pXqwVXjyaYit/F2MreZ178kahAYmh6UJ7vWGA3gZjG1YI5WTnd9 HcGTELZwbHG/SxuZJvePzup3EnA0yi2ZE68e2S6qh2Cw0WzSfhkMeUUZ7aKVkE8IVzZW BUsdiOly8SPl/DxwxCoGFqzaGs12WXeHsXk3VTcMzPdbbG0LZx6dCG/S//8MgIcGPW7r hn0FlAMjP425cEh6BzutTesZ0KkZPqigVQayErOw6mke6HCi/9gPubVVqmhiH1iQSbsN KXAGRlc+/0V4xhGylqyP97PCK5pMpiYheYF1RG41QV+go1RWGHei3ySN4XwIiEaFYOpc 8EHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=S1pK5W1PygRQ9RDfgKnmwWDizcYcBrLUj9FMb3blTAQ=; b=LmBnlMct8Ms950GAeJ8a7WeuU0cuReMV1D523gcxfAr0DxPv6TUIqo9lLym9TPOoDs ZbS3I92+68IvaeWARF/KVlfZvP+gSCGm+kiOoQSpgRvwOoGW4kF0gJZn7EYxiPobN08t KZQYSpNaMQuZvQMgsnOOH2svE9R/UpE5TjzrK8OvoTHnz2iEzcixIybepgKTSrIYxcti D6ZCBtR+qvR0liV9bCJzRyJUlk0QCUam5KqVajtSuAbHadnACF16HqDHOWl0CPFJsFiV AoKPXieChiAVcm0h3AFThgJVuzuA3Y0rcCFv59HHryNpgLhaJSLTQ+/ameCrSqMPSG31 c19Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YUN6F/h0"; 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 o9si6684028ejr.672.2021.01.18.07.34.56; Mon, 18 Jan 2021 07:35:22 -0800 (PST) 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=k20201202 header.b="YUN6F/h0"; 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 S2405759AbhARP0z (ORCPT + 99 others); Mon, 18 Jan 2021 10:26:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:56096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405648AbhARPZY (ORCPT ); Mon, 18 Jan 2021 10:25:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 31EA8206B2; Mon, 18 Jan 2021 15:24:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610983483; bh=xe8zwdAs5oOqIiJX/sypIYB/hScfzOBO8s8ms7b/orw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YUN6F/h0JVIQc690a0hOxEg0P0nkAdEGtCqiDVl75aaLa/DMDTT+1Bp68uS9c55Uq zSx7tOiQT3wMxTko6W8AUUP1O2JcnUiFlHJO3ynYz7kP959PXdSHAzObI92S3KK1ZK DUad8lfjw/6pr47fst9Xphk7+dOVXahroGzNOuIWU9lmB2SGKtPHsNd7WOYwoQOSiK jg6yHJezEb5pQKWu9PP5Ek5o9JJCA9QFLShpW59q8RmfhzkCWgo7a0LePUcN6yd6GW UnRrYOqQ+SgjjOwI+BOD7t5W9VNup4/XOrxuF6pf0OiuqOUK7dD3Qv/9IWQfbMBliQ v9ein479sfIJw== From: Felipe Balbi To: Michael Grzeschik , Manish Narani Cc: gregkh@linuxfoundation.org, robh+dt@kernel.org, michal.simek@xilinx.com, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, git@xilinx.com, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: Re: [RESEND PATCH v3 2/2] usb: dwc3: Add driver for Xilinx platforms In-Reply-To: <20210118134223.GE12316@pengutronix.de> References: <1608015291-52007-1-git-send-email-manish.narani@xilinx.com> <1608015291-52007-3-git-send-email-manish.narani@xilinx.com> <20210118134223.GE12316@pengutronix.de> Date: Mon, 18 Jan 2021 17:24:38 +0200 Message-ID: <87r1miuv2h.fsf@kernel.org> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Michael Grzeschik writes: > On Tue, Dec 15, 2020 at 12:24:51PM +0530, Manish Narani wrote: >>Add a new driver for supporting Xilinx platforms. This driver is used >>for some sequence of operations required for Xilinx USB controllers. >>This driver is also used to choose between PIPE clock coming from SerDes >>and the Suspend Clock. Before the controller is out of reset, the clock >>selection should be changed to PIPE clock in order to make the USB >>controller work. There is a register added in Xilinx USB controller >>register space for the same. > > I tried out this driver with the vanilla kernel on an zynqmp. Without > this patch the USB-Gadget is already acting buggy. In the gadget mode, > some iterations of plug/unplug results to an stalled gadget which will > never come back without a reboot. > > With the corresponding code of this driver (reset assert, clk modify, > reset deassert) in the downstream kernels phy driver we found out it is > totaly stable. But using this exact glue driver which should do the same > as the downstream code, the gadget still was buggy the way described > above. > > I suspect the difference lays in the different order of operations. > While the downstream code is runing the resets inside the phy driver > which is powered and initialized in the dwc3-core itself. With this glue > layser approach of this patch the whole phy init is done before even > touching dwc3-core in any way. It seems not to have the same effect, > though. > > If really the order of operations is limiting us, we probably need > another solution than this glue layer. Any Ideas? might be a good idea to collect dwc3 trace events. Can you do that? -- balbi