Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1394086ybb; Sun, 29 Mar 2020 03:37:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtwcby5IGvlLDDk64OagBRxSEd3jDqXviF4MX5wgvaglBELJdsFv8eKcP8CBHVIJ+cFECV0 X-Received: by 2002:a9d:748a:: with SMTP id t10mr667662otk.244.1585478246449; Sun, 29 Mar 2020 03:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585478246; cv=none; d=google.com; s=arc-20160816; b=AdUlAP4IW5J9O56teElZaCMRhjMcXH8fj6rpm9SJwx9uzm1N22qrZnQ2PVhWMpalHZ nJhnqKFfuwHhB13x769+MH9gy7UxxZ9IpaTrdElUtxKok1oPMEEjkK9BOxWV9/3uJNx2 EsUL/Ro7YAGKYSQdYex1wC7yDjbw1zZEB523tNkVu2g1vTXki1o+6n/Yr1Z/2Gdc5dXw wdacjYxSgbhfpzBrCoHs79yX0uP7LQRt3kkaj+DbVXA/J7MKXBDavLD5MkrilX+3y8nJ 1bvNu2DERgiuZsHdlfkVfZ+56gSXLcLe2FArBqVZjtnyfXdko5mQNB9FiRLisSx+Jxeh /VXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=cEsIe8nn/S1lT0wrpqG10UN56pPApRKTKN29r4c4Uu8=; b=wSpAX+mXXjTmqzqXl0z7k0u+r2M+fe7PZ0qiobP/h0Vf4V5seo/nJO3sqIDNgapvGw IL6XmcVfeK+VhyQ9y2znNKsOppxQ+5s5c9CbS3AL+lyQnMII7lWekrztcZ43opvsWaey 9QRDUe4IyH1iHyI5lXE/4dDL8MLCgliseGYJAAAMbzD+lNjlf0PEQfOnxvzxRaqsnw+B C7q5nlLhCda6WUEgVOT1oMdRdlIxIs2BMo9Fet1B9VjjJjOlJPTLwlm+dJNom09ANzEs kOgxUmVVSiHxJxx/IXB4VCyZZDw+FLnHJhBKtyaipQirETcOOfR8NakEa4jnyAAWtHXE v3mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ZKWeswJz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4si5537238otn.210.2020.03.29.03.37.13; Sun, 29 Mar 2020 03:37:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ZKWeswJz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727985AbgC2Kgh (ORCPT + 99 others); Sun, 29 Mar 2020 06:36:37 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:44421 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727869AbgC2Kgh (ORCPT ); Sun, 29 Mar 2020 06:36:37 -0400 Received: by mail-lj1-f193.google.com with SMTP id p14so14699488lji.11; Sun, 29 Mar 2020 03:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=cEsIe8nn/S1lT0wrpqG10UN56pPApRKTKN29r4c4Uu8=; b=ZKWeswJz2TjBGfAJe3HbiPdCAr3SAOh2sPYa0TzzpncnDPFVrILal0hxoCJog0t8uW Ksu4ct+oISI8eYATUgwqFuctJVD+KM7iKyZxVXe6YYDS4CZdzrQz1vO69vhpLgDNTOnC hDj0hOnVAqkxHlO8Xmejq8lhPxTij/tFHZdUk9SoBRTyC6c4LRMIGBl5EBpvcy8zXG/u fRTlspMAYfdgBtudbe90nhcleTSmtaNEOLtkQwXErND9RjiUQAyk3IZv0FB6ev9pfkWG uRLIRt55E0sMNw78VnDLg9bTubhpd4oEruWQPDd1RTBqejrRw8hMrd52fbX/Y9hPVl3I intA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :date:message-id:mime-version; bh=cEsIe8nn/S1lT0wrpqG10UN56pPApRKTKN29r4c4Uu8=; b=D++lF5XdlOBUV86ZeIj38uxVCy55oImZP/pRiiH7EbQcy+OXJMq1nh0LE8Hn6WZoF/ piNObpNn7vIUv4Vge2Iq3qtawhtD95fbMTAvnVK7J281mSxRzoFrhEKM+oL0+cEIZYYv Bkd3PfRU5MSRF+bWteAQ5BYH+ZCOEHKZTtMDMjFBJI8MZcaBOWh3PYV5MjWmr7ITEOEX XaMx6VJ1uvebxx/4BpqjbqJsGHpmrZczrbtnVyVWPY4a32lIpSwxax9kS2YcFZ+6qM2p d3/ZwF5E0wFwdoAQuijxpz69TreiJh1xQHFdoPrWK/qjSuLSXeFvthWiVjaJNhU7lNB+ qvJQ== X-Gm-Message-State: AGi0PuaQuxYGEbLZv2vDIgsr9hUxFWCV5FYUwxOZYoT+mTxt/NZBGie4 yuz8RJCenTaQb6EhlfsTPO27a3nLpnN8QQ== X-Received: by 2002:a2e:8954:: with SMTP id b20mr4134503ljk.176.1585478194949; Sun, 29 Mar 2020 03:36:34 -0700 (PDT) Received: from saruman (91-155-214-58.elisa-laajakaista.fi. [91.155.214.58]) by smtp.gmail.com with ESMTPSA id k3sm5332976lji.43.2020.03.29.03.36.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Mar 2020 03:36:34 -0700 (PDT) From: Felipe Balbi To: Neil Armstrong , kishon@ti.com, khilman@baylibre.com, martin.blumenstingl@googlemail.com Cc: Neil Armstrong , linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 00/14] usb: dwc3: meson: add OTG support for GXL/GXM In-Reply-To: <20200326134507.4808-1-narmstrong@baylibre.com> References: <20200326134507.4808-1-narmstrong@baylibre.com> Date: Sun, 29 Mar 2020 13:36:28 +0300 Message-ID: <87v9mne9cj.fsf@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Neil Armstrong writes: > The USB support was initialy done with a set of PHYs and dwc3-of-simple > because the architecture of the USB complex was not understood correctly > at the time (and proper documentation was missing...). > > But with the G12A family, the USB complex was correctly understood and > implemented correctly. > But seems the G12A architecture was derived for the GXL USB architecture, > with minor differences and looks we can share most of the USB DWC3 glue > driver. > > This patchset refactors and adds callbacks to handle the architecture > difference while keeping the main code shared. > > The main difference is that on GXL/GXM the USB2 PHY control registers > are mixed with the PHY registers (we already handle correctly), and > the GLUE registers are allmost (99%) the same as G12A. > > But, the GXL/GXM HW is buggy, here are the quirks : > - for the DWC2 controller to reset correctly, the GLUE mux must be switch= ed > to peripheral when the DWC2 controller probes. For now it's handled by = simply > switching to device when probing the subnodes, but it may be not enough > - when manually switching from Host to Device when the USB port is not > populated (should not happen with proper Micro-USB/USB-C OTG switch), it > makes the DWC3 to crash. The only way to avoid that is to use the Host > Disconnect bit to disconnect the DWC3 controller from the port, but we = can't > recover the Host functionnality unless resetting the DWC3 controller. > This bit is set when only manual switch is done, and a warning is print= ed > on manual switching. > > The patches 1-9 should be applied first, then either waiting the next rel= ease > or if the usb maintainer can provide us a stable tag, we can use it to me= rge > the DT and bindings. > > Changes since v1 at [1]: > - Fixed DT bindings to take in account usb2-phy2 on GXM > - Added comment in patch2 > - Fixed patch 5 and moved fix out > - Collected tags > - Lower DT patch changes, switch p20x-q20x port B as OTG by default patches 1-6 are applied to my testing/next =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl6Aei4ACgkQzL64meEa mQaamxAAwuHxU4drRBYL0UhnH4ujHmfw9zVuZeEVjxAf0eTeCXjxw0u76bgZlbm1 z407kK9bU2znxIUFAEtYZ8SNuPQcnGkEkJBRIAKr9sBlcoqnVl0I6UCCgpAhZh0P /Mkpea+QjUrtIgojPkyM9xnxi42+JwBT6S+rGqgq9KulVVC5TzNWTY5b3IvlJinW 7OruoTHahtfiVqSi5DOzzNRsWvX6R6JolMq8wsa1KOQiVnlB0GTLJFqf8TKrZgWn /PQpbbhk5MUnDgUTIaOWYbfcJrUZd4yt0kkgH8tO3jIH8getvK3JKgZcrsQQ2em6 gmXrQ+o64TaJ+5RFNMJknhcMfnB5jKCAWj8FVHB2P/wOFt1eHu6XOIxBozraEkYW OEa+3RNEFilashPRbm7plsHlqQX98HpliM2+p7mtcgTjWKJeDRMiBc2RXqd8SKcp U7kwWYGv6BZ/EVncImIHgVJ2uTvriB+yeUuMVrZU8u/Rr3eRaOHikb/KJANh00k/ UlpxS89UD2zAd+HT3BqVYuzvtoKJOYO8z0d6DlvV/bzaxSOpWoIFNEL8tGjGDRtu R9HlOcqhoi3amtqVFMR+huIB6ZQIcilLcNA+1mzxwq0qXyVNA+oyY2dskRhgoV+t kFZs/a6g4e5bN8HxaWdDeEdWgts/Cmz+A4PfCTsD26XKggaw8f4= =uyGs -----END PGP SIGNATURE----- --=-=-=--