From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14398C07E95 for ; Tue, 20 Jul 2021 00:24:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA9AD6115B for ; Tue, 20 Jul 2021 00:24:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237981AbhGSXnK (ORCPT ); Mon, 19 Jul 2021 19:43:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359398AbhGSWoN (ORCPT ); Mon, 19 Jul 2021 18:44:13 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 814F1C05BD19 for ; Mon, 19 Jul 2021 16:19:20 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id r135so30317828ybc.0 for ; Mon, 19 Jul 2021 16:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LlezL0fbSXWmQYTDFUaIce6BNOh5OLGq/7WOzksM/j8=; b=XcvE/gHEKQsTS7bCpq2c1QLE/yk8wEn4Bx/tSLHz+IDwlhg6Unql03hSL0pJFK7/UT jzQeRzRP6a28tdGhkEL2nnq0/RiqTGracaMOFsaOyVlbf/rdPsBji0ziqLDhu0nEU11D a2C7ETw0B/mvWYKCOPjcf773kofD4yhteFe5uam9gIY9nOAJrV/LqfNwkL3GC3A8p6xQ WUd5hNJx2A4SrqdpG5trgqbGO2iBaY1Hm2nD5djf4aQ3uwdYHnsWvIwV71C/QmSOU81c m7624Pd3dNHGl/hVMikl7/JAGzHDoG/PWN+OdvL6HzE1YgSGzmNfe2NpUF8Z9XyofeGu 3Rkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LlezL0fbSXWmQYTDFUaIce6BNOh5OLGq/7WOzksM/j8=; b=uBRtcE45vUYSOwdNE7kKqbFYdwRXt6Tg03heHrmcfOHJDrawlA5DlLlo3iv17HaPLB 2a/KWIqKL9xUf/W8m3v90uWmUUW8QIYO7UdJSrb3Lse9MHHSiTsIAQDUCGA8wepv8dT4 kVci4oTY2UnR+4lRsOuqsquNkxxgh78UTJ8q6RaIwIjMhTIWpuqKjFbQX2V7AufWsuE5 wgLM2hbq6o4B+/pGkPx5dp7PQ/+Yex9BiOLNSvcdkY2YKFuYD0rB2HnoKTDxfiOKnBoc SbKK2tvh/FnFA9d0p3pIk6t55GjIpCcGGJzvmWXF37N4eo7pl6BfO2RKG1Hyupn93F85 mfSA== X-Gm-Message-State: AOAM531oEtFmlKm1/CI8YwKtLl5Y+WYfalsTpjY/tEwJY4wPaizJarDL pLIF8anD9NseRvG1PZ3QJ8deAjjA3tCFeDg9+ZY= X-Google-Smtp-Source: ABdhPJzIjY+RFh844oBvrjTF/QSAXR0NDQUqb4NG59ZhYeuqg2iz8jfmQaWT0vuGZ3d3MTBbOsypXmZtxU8FYOnKsfI= X-Received: by 2002:a25:b706:: with SMTP id t6mr35652520ybj.174.1626736759591; Mon, 19 Jul 2021 16:19:19 -0700 (PDT) MIME-Version: 1.0 References: <20201116151735.178737-1-pgwipeout@gmail.com> <20201116151735.178737-2-pgwipeout@gmail.com> <6e7a5a02-cd3c-81d3-a473-f87385c41e5a@gmail.com> In-Reply-To: <6e7a5a02-cd3c-81d3-a473-f87385c41e5a@gmail.com> From: Peter Geis Date: Mon, 19 Jul 2021 19:19:07 -0400 Message-ID: Subject: Re: [PATCH 1/4] phy: rockchip: add rockchip usb3 innosilicon phy driver To: Alex Bee Cc: Felipe Balbi , Greg Kroah-Hartman , Heiko Stuebner , =?UTF-8?B?546L5piO5oiQ?= , zyw , linux-usb@vger.kernel.org, Kever Yang , "open list:ARM/Rockchip SoC..." , =?UTF-8?B?5ZC06Imv5bOw?= , wulf , arm-mail-list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Jul 19, 2021 at 10:29 AM Alex Bee wrote: > > Hi Peter, > > thanks for working on this (I hope to have picked the latest version of > your series). > > It's pretty obvious that the quirky innosilicon phy Rockchip decided for > in RK3328 needs a additional glue layer. Even if this version isn't > perfect yet (usb3 devices "sometimes" do net get detected if detached > and attached again) - it makes thing *a lot* better than it is now (IIRC > its about the same in vendor tree) Yes, it certainly is broken. > > So: are you going to rebase this on current upstream? Honestly I hadn't planned on it, mostly because my board started exhibiting stability issues. This series had been tagged as an RFC as I was hoping to resolve the issues with it. Unfortunately either the documentation provided was insufficient to fix the problem, or the hardware doesn't behave as the documentation suggests. Also the way we have to tie into the usb core makes me really uncomfortable. Perhaps once the rk3566 is in good shape I can poke at this again. There's a number of other issues with older boards that have come to light that need attention. > > Regards, > > Alex > > Am 16.11.20 um 16:17 schrieb Peter Geis: > > The innosilicon based usb3 phy used in rockchip devices such as the rk3328 is bugged, requiring special handling. > > The following erata have been observed: > > - usb3 device disconnect events are not detected by the controller > > - usb2 hubs with no devices attached do not trigger disconnect events when removed > > - interrupts are not reliable > > > > To work around these issue we implement polling of the usb2 and usb3 status. > > On usb3 disconnection we reset the usb3 phy which triggers the disconnect event. > > On usb2 disconnection we have to force reset the whole controller. > > This requires a handoff to a special dwc3 device driver. > > > > This has been tested on the rk3328-roc-cc board with the following devices: > > - usb2 only device > > - usb3 only device > > - usb2 only hub without devices > > - usb3 hub without devices > > - usb2 hub with devices > > - usb3 hub with devices > > > > Signed-off-by: Peter Geis From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABF4CC07E95 for ; Mon, 19 Jul 2021 23:19:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65F60610F7 for ; Mon, 19 Jul 2021 23:19:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65F60610F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DU1F//Z8G4LKscIePthJaLH1cctQDJi1yBTGPvCuQt8=; b=eJyNkE/Ty/VOHa F8tbw6c0KxFh7Z4KorR5Bt2dEvP4pjSw0mpkgTdO6sLJttkd7LFmnKh/I8CikjaXROCIosERY2uA6 nQqRoXWO1bgN3kgQunD5whiWTPjg2HI0d0NU7Gut8ofSi96FjFaLVRJuClsphlfCX0rkTCz2FyX8f nruEP9QqMYkKNm1Jewcy8LvkZjp5TmFo5WXleC34XZ8ZIh9eL3MssZ4watIjbtJxInOeqS833F1NT 6lu7nwNEwYaUAbG7UmkqPxvrIz+hOk1Owkkxevr8DKogvf9ovl2RIeKpQvULKjdGNfM8emcJQxohp 9J/AvB4d1ul23+1yKDkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5cXm-00BVBx-51; Mon, 19 Jul 2021 23:19:26 +0000 Received: from mail-yb1-xb2a.google.com ([2607:f8b0:4864:20::b2a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5cXi-00BVBL-UN; Mon, 19 Jul 2021 23:19:24 +0000 Received: by mail-yb1-xb2a.google.com with SMTP id g5so30238813ybu.10; Mon, 19 Jul 2021 16:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LlezL0fbSXWmQYTDFUaIce6BNOh5OLGq/7WOzksM/j8=; b=XcvE/gHEKQsTS7bCpq2c1QLE/yk8wEn4Bx/tSLHz+IDwlhg6Unql03hSL0pJFK7/UT jzQeRzRP6a28tdGhkEL2nnq0/RiqTGracaMOFsaOyVlbf/rdPsBji0ziqLDhu0nEU11D a2C7ETw0B/mvWYKCOPjcf773kofD4yhteFe5uam9gIY9nOAJrV/LqfNwkL3GC3A8p6xQ WUd5hNJx2A4SrqdpG5trgqbGO2iBaY1Hm2nD5djf4aQ3uwdYHnsWvIwV71C/QmSOU81c m7624Pd3dNHGl/hVMikl7/JAGzHDoG/PWN+OdvL6HzE1YgSGzmNfe2NpUF8Z9XyofeGu 3Rkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LlezL0fbSXWmQYTDFUaIce6BNOh5OLGq/7WOzksM/j8=; b=sK3W1psjpzvf7eBm6+D0TLmNfj6nts1FRLdzQVsn6zp5mVpFwTqi/Cvj23152caa7I DjSdiQb/AvwBQSOqLFARwdIvsjPSNt5E9SZVZcqozIYlia4GyGghmEhSrCyqrMZFh9WW mImC82AXf8TEFpEO7UbRNsGEUUYR9sX/OuLA67301mFkdz9aC9HdILnOj0T4hciYqcKG cjjvCivGNqEWf4vAKh6tauLPtVa+iYpW37SULhqbHiVvx1+f/Ad7sAxHFLsZY4xW9ER0 tjDIzv5PYUqll+bkM+1vUl2MMASzciWzylshkReENMZ1pdgjGw1MAqZLqqqttJhKb4/M jizA== X-Gm-Message-State: AOAM531gZFM5skGkkKY1XxOSgAUDy+HJlNAqz6PolLn3SZBelpG5P81g sqYn5jCH32mDtugXDM++kA9fXHzgLqNf0AJLf8o= X-Google-Smtp-Source: ABdhPJzIjY+RFh844oBvrjTF/QSAXR0NDQUqb4NG59ZhYeuqg2iz8jfmQaWT0vuGZ3d3MTBbOsypXmZtxU8FYOnKsfI= X-Received: by 2002:a25:b706:: with SMTP id t6mr35652520ybj.174.1626736759591; Mon, 19 Jul 2021 16:19:19 -0700 (PDT) MIME-Version: 1.0 References: <20201116151735.178737-1-pgwipeout@gmail.com> <20201116151735.178737-2-pgwipeout@gmail.com> <6e7a5a02-cd3c-81d3-a473-f87385c41e5a@gmail.com> In-Reply-To: <6e7a5a02-cd3c-81d3-a473-f87385c41e5a@gmail.com> From: Peter Geis Date: Mon, 19 Jul 2021 19:19:07 -0400 Message-ID: Subject: Re: [PATCH 1/4] phy: rockchip: add rockchip usb3 innosilicon phy driver To: Alex Bee Cc: Felipe Balbi , Greg Kroah-Hartman , Heiko Stuebner , =?UTF-8?B?546L5piO5oiQ?= , zyw , linux-usb@vger.kernel.org, Kever Yang , "open list:ARM/Rockchip SoC..." , =?UTF-8?B?5ZC06Imv5bOw?= , wulf , arm-mail-list X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210719_161923_027169_7DF10C44 X-CRM114-Status: GOOD ( 26.58 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Mon, Jul 19, 2021 at 10:29 AM Alex Bee wrote: > > Hi Peter, > > thanks for working on this (I hope to have picked the latest version of > your series). > > It's pretty obvious that the quirky innosilicon phy Rockchip decided for > in RK3328 needs a additional glue layer. Even if this version isn't > perfect yet (usb3 devices "sometimes" do net get detected if detached > and attached again) - it makes thing *a lot* better than it is now (IIRC > its about the same in vendor tree) Yes, it certainly is broken. > > So: are you going to rebase this on current upstream? Honestly I hadn't planned on it, mostly because my board started exhibiting stability issues. This series had been tagged as an RFC as I was hoping to resolve the issues with it. Unfortunately either the documentation provided was insufficient to fix the problem, or the hardware doesn't behave as the documentation suggests. Also the way we have to tie into the usb core makes me really uncomfortable. Perhaps once the rk3566 is in good shape I can poke at this again. There's a number of other issues with older boards that have come to light that need attention. > > Regards, > > Alex > > Am 16.11.20 um 16:17 schrieb Peter Geis: > > The innosilicon based usb3 phy used in rockchip devices such as the rk3328 is bugged, requiring special handling. > > The following erata have been observed: > > - usb3 device disconnect events are not detected by the controller > > - usb2 hubs with no devices attached do not trigger disconnect events when removed > > - interrupts are not reliable > > > > To work around these issue we implement polling of the usb2 and usb3 status. > > On usb3 disconnection we reset the usb3 phy which triggers the disconnect event. > > On usb2 disconnection we have to force reset the whole controller. > > This requires a handoff to a special dwc3 device driver. > > > > This has been tested on the rk3328-roc-cc board with the following devices: > > - usb2 only device > > - usb3 only device > > - usb2 only hub without devices > > - usb3 hub without devices > > - usb2 hub with devices > > - usb3 hub with devices > > > > Signed-off-by: Peter Geis _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DD8CC07E95 for ; Mon, 19 Jul 2021 23:21:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1CCE1610F7 for ; Mon, 19 Jul 2021 23:21:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CCE1610F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dskfQeoQzY5q7vAlhlUMBA+vYs+avmn9vPCqdXd2ajU=; b=HHvfhlzrXrgy7D /KWwjBQ13DALjCa2MKdgXtUdGev+voObw4UYTxEB8WOfvjvX1eZvpRLwQrHEx6J5bm77wRtWCJP4j Gm4aWXUa1H6O0dzkgjAPfyhUeoil6ZvfIpUehoexqp6ZTjhKdOTB2+9WfghfXk7G8D6pyE9BMSI7o b0gOICZyLkXgGGoBtgStdaXIXYFBYpD+7PutmAOShExybczFi6cPueog3eR1FJ1YDZbsaJenVq5yj UbyPWA7KXmis/LJb2hQUl4X5MaTvf4vpA2jIBrzTcQHgsLyGeNTfBmZzeSnBr5k7Ho4/ZeJ5tQQac L7GN6ZjhlJzhf14JJHGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5cXn-00BVC1-OD; Mon, 19 Jul 2021 23:19:27 +0000 Received: from mail-yb1-xb2a.google.com ([2607:f8b0:4864:20::b2a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5cXi-00BVBL-UN; Mon, 19 Jul 2021 23:19:24 +0000 Received: by mail-yb1-xb2a.google.com with SMTP id g5so30238813ybu.10; Mon, 19 Jul 2021 16:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LlezL0fbSXWmQYTDFUaIce6BNOh5OLGq/7WOzksM/j8=; b=XcvE/gHEKQsTS7bCpq2c1QLE/yk8wEn4Bx/tSLHz+IDwlhg6Unql03hSL0pJFK7/UT jzQeRzRP6a28tdGhkEL2nnq0/RiqTGracaMOFsaOyVlbf/rdPsBji0ziqLDhu0nEU11D a2C7ETw0B/mvWYKCOPjcf773kofD4yhteFe5uam9gIY9nOAJrV/LqfNwkL3GC3A8p6xQ WUd5hNJx2A4SrqdpG5trgqbGO2iBaY1Hm2nD5djf4aQ3uwdYHnsWvIwV71C/QmSOU81c m7624Pd3dNHGl/hVMikl7/JAGzHDoG/PWN+OdvL6HzE1YgSGzmNfe2NpUF8Z9XyofeGu 3Rkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LlezL0fbSXWmQYTDFUaIce6BNOh5OLGq/7WOzksM/j8=; b=sK3W1psjpzvf7eBm6+D0TLmNfj6nts1FRLdzQVsn6zp5mVpFwTqi/Cvj23152caa7I DjSdiQb/AvwBQSOqLFARwdIvsjPSNt5E9SZVZcqozIYlia4GyGghmEhSrCyqrMZFh9WW mImC82AXf8TEFpEO7UbRNsGEUUYR9sX/OuLA67301mFkdz9aC9HdILnOj0T4hciYqcKG cjjvCivGNqEWf4vAKh6tauLPtVa+iYpW37SULhqbHiVvx1+f/Ad7sAxHFLsZY4xW9ER0 tjDIzv5PYUqll+bkM+1vUl2MMASzciWzylshkReENMZ1pdgjGw1MAqZLqqqttJhKb4/M jizA== X-Gm-Message-State: AOAM531gZFM5skGkkKY1XxOSgAUDy+HJlNAqz6PolLn3SZBelpG5P81g sqYn5jCH32mDtugXDM++kA9fXHzgLqNf0AJLf8o= X-Google-Smtp-Source: ABdhPJzIjY+RFh844oBvrjTF/QSAXR0NDQUqb4NG59ZhYeuqg2iz8jfmQaWT0vuGZ3d3MTBbOsypXmZtxU8FYOnKsfI= X-Received: by 2002:a25:b706:: with SMTP id t6mr35652520ybj.174.1626736759591; Mon, 19 Jul 2021 16:19:19 -0700 (PDT) MIME-Version: 1.0 References: <20201116151735.178737-1-pgwipeout@gmail.com> <20201116151735.178737-2-pgwipeout@gmail.com> <6e7a5a02-cd3c-81d3-a473-f87385c41e5a@gmail.com> In-Reply-To: <6e7a5a02-cd3c-81d3-a473-f87385c41e5a@gmail.com> From: Peter Geis Date: Mon, 19 Jul 2021 19:19:07 -0400 Message-ID: Subject: Re: [PATCH 1/4] phy: rockchip: add rockchip usb3 innosilicon phy driver To: Alex Bee Cc: Felipe Balbi , Greg Kroah-Hartman , Heiko Stuebner , =?UTF-8?B?546L5piO5oiQ?= , zyw , linux-usb@vger.kernel.org, Kever Yang , "open list:ARM/Rockchip SoC..." , =?UTF-8?B?5ZC06Imv5bOw?= , wulf , arm-mail-list X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210719_161923_027169_7DF10C44 X-CRM114-Status: GOOD ( 26.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 19, 2021 at 10:29 AM Alex Bee wrote: > > Hi Peter, > > thanks for working on this (I hope to have picked the latest version of > your series). > > It's pretty obvious that the quirky innosilicon phy Rockchip decided for > in RK3328 needs a additional glue layer. Even if this version isn't > perfect yet (usb3 devices "sometimes" do net get detected if detached > and attached again) - it makes thing *a lot* better than it is now (IIRC > its about the same in vendor tree) Yes, it certainly is broken. > > So: are you going to rebase this on current upstream? Honestly I hadn't planned on it, mostly because my board started exhibiting stability issues. This series had been tagged as an RFC as I was hoping to resolve the issues with it. Unfortunately either the documentation provided was insufficient to fix the problem, or the hardware doesn't behave as the documentation suggests. Also the way we have to tie into the usb core makes me really uncomfortable. Perhaps once the rk3566 is in good shape I can poke at this again. There's a number of other issues with older boards that have come to light that need attention. > > Regards, > > Alex > > Am 16.11.20 um 16:17 schrieb Peter Geis: > > The innosilicon based usb3 phy used in rockchip devices such as the rk3328 is bugged, requiring special handling. > > The following erata have been observed: > > - usb3 device disconnect events are not detected by the controller > > - usb2 hubs with no devices attached do not trigger disconnect events when removed > > - interrupts are not reliable > > > > To work around these issue we implement polling of the usb2 and usb3 status. > > On usb3 disconnection we reset the usb3 phy which triggers the disconnect event. > > On usb2 disconnection we have to force reset the whole controller. > > This requires a handoff to a special dwc3 device driver. > > > > This has been tested on the rk3328-roc-cc board with the following devices: > > - usb2 only device > > - usb3 only device > > - usb2 only hub without devices > > - usb3 hub without devices > > - usb2 hub with devices > > - usb3 hub with devices > > > > Signed-off-by: Peter Geis _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel