From nobody Wed Nov 10 09:49:35 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BADFC1847E8B; Wed, 10 Nov 2021 09:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hq0SH50GDz4mWX; Wed, 10 Nov 2021 09:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BD5A16564; Wed, 10 Nov 2021 09:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AA9nZjZ052865; Wed, 10 Nov 2021 09:49:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AA9nZ7f052864; Wed, 10 Nov 2021 09:49:35 GMT (envelope-from git) Date: Wed, 10 Nov 2021 09:49:35 GMT Message-Id: <202111100949.1AA9nZ7f052864@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 3987e506112a - main - USB dwc3 controller: add quirk snps,dis_rxdet_inp3_quirk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3987e506112a7e8af6f09966792fb8656d630496 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3987e506112a7e8af6f09966792fb8656d630496 commit 3987e506112a7e8af6f09966792fb8656d630496 Author: Bjoern A. Zeeb AuthorDate: 2021-11-10 00:22:20 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-10 09:44:44 +0000 USB dwc3 controller: add quirk snps,dis_rxdet_inp3_quirk Add support for the "snps,dis_rxdet_inp3_quirk" quirk needed at least on SolidRun's HoneyComb. Reviewed by: manu, mw MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32921 --- sys/dev/usb/controller/dwc3.c | 10 ++++++---- sys/dev/usb/controller/dwc3.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/controller/dwc3.c b/sys/dev/usb/controller/dwc3.c index 54c42503f2d4..d4422caf0fcd 100644 --- a/sys/dev/usb/controller/dwc3.c +++ b/sys/dev/usb/controller/dwc3.c @@ -264,11 +264,13 @@ snps_dwc3_do_quirks(struct snps_dwc3_softc *sc) reg |= DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS; DWC3_WRITE(sc, DWC3_GUCTL1, reg); - if (OF_hasprop(sc->node, "snps,dis-del-phy-power-chg-quirk")) { - reg = DWC3_READ(sc, DWC3_GUSB3PIPECTL0); + reg = DWC3_READ(sc, DWC3_GUSB3PIPECTL0); + if (OF_hasprop(sc->node, "snps,dis-del-phy-power-chg-quirk")) reg |= DWC3_GUSB3PIPECTL0_DELAYP1TRANS; - DWC3_WRITE(sc, DWC3_GUSB3PIPECTL0, reg); - } + if (OF_hasprop(sc->node, "snps,dis_rxdet_inp3_quirk")) + reg |= DWC3_GUSB3PIPECTL0_DISRXDETINP3; + DWC3_WRITE(sc, DWC3_GUSB3PIPECTL0, reg); + } static int diff --git a/sys/dev/usb/controller/dwc3.h b/sys/dev/usb/controller/dwc3.h index 7153f9abf0df..a8b127cda9a8 100644 --- a/sys/dev/usb/controller/dwc3.h +++ b/sys/dev/usb/controller/dwc3.h @@ -90,6 +90,7 @@ #define DWC3_GUSB3PIPECTL0 0xc2c0 #define DWC3_GUSB3PIPECTL0_PHYSOFTRST (1 << 31) +#define DWC3_GUSB3PIPECTL0_DISRXDETINP3 (1 << 28) #define DWC3_GUSB3PIPECTL0_DELAYP1TRANS (1 << 18) #define DWC3_GTXFIFOSIZ(x) (0xc300 + 0x4 * (x))