Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys Pull up following revision(s) (requested by jmcneill ...
details: https://anonhg.NetBSD.org/src/rev/c4f36ae22f7b
branches: netbsd-9
changeset: 843666:c4f36ae22f7b
user: martin <martin%NetBSD.org@localhost>
date: Thu Dec 12 11:40:53 2019 +0000
description:
Pull up following revision(s) (requested by jmcneill in ticket #545):
sys/arch/arm/dts/rk3328.dtsi: revision 1.2
sys/dev/fdt/dwc3_fdt.c: revision 1.8
sys/arch/arm/dts/rk3328-rock64.dts: revision 1.5
Add support for snps,dis-tx-ipgap-linecheck-quirk quirk
Enable USB3 support on RK3328
diffstat:
sys/arch/arm/dts/rk3328-rock64.dts | 6 +-----
sys/arch/arm/dts/rk3328.dtsi | 10 +++++++++-
sys/dev/fdt/dwc3_fdt.c | 18 ++++++++++++++----
3 files changed, 24 insertions(+), 10 deletions(-)
diffs (102 lines):
diff -r 09ec1cbf00eb -r c4f36ae22f7b sys/arch/arm/dts/rk3328-rock64.dts
--- a/sys/arch/arm/dts/rk3328-rock64.dts Wed Dec 11 14:58:03 2019 +0000
+++ b/sys/arch/arm/dts/rk3328-rock64.dts Thu Dec 12 11:40:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk3328-rock64.dts,v 1.4 2019/05/23 20:50:29 jmcneill Exp $ */
+/* $NetBSD: rk3328-rock64.dts,v 1.4.2.1 2019/12/12 11:40:53 martin Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,8 +31,4 @@
&usbdrd3 {
status = "okay";
- snps,phyif-utmi-bits = <16>;
- snps,dis-enblslpm-quirk;
- snps,dis-u2-freeclk-exists-quirk;
- snps,dis_u2_susphy_quirk;
};
diff -r 09ec1cbf00eb -r c4f36ae22f7b sys/arch/arm/dts/rk3328.dtsi
--- a/sys/arch/arm/dts/rk3328.dtsi Wed Dec 11 14:58:03 2019 +0000
+++ b/sys/arch/arm/dts/rk3328.dtsi Thu Dec 12 11:40:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk3328.dtsi,v 1.1 2018/06/21 10:46:39 jmcneill Exp $ */
+/* $NetBSD: rk3328.dtsi,v 1.1.8.1 2019/12/12 11:40:53 martin Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -40,6 +40,14 @@
reg = <0x0 0xff600000 0x0 0x100000>;
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
dr_mode = "host";
+
+ phy_type = "utmi_wide";
+ snps,dis_enblslpm_quirk;
+ snps,dis-u2-freeclk-exists-quirk;
+ snps,dis_u2_susphy_quirk;
+ snps,dis_u3_susphy_quirk;
+ snps,dis-del-phy-power-chg-quirk;
+ snps,dis-tx-ipgap-linecheck-quirk;
};
};
};
diff -r 09ec1cbf00eb -r c4f36ae22f7b sys/dev/fdt/dwc3_fdt.c
--- a/sys/dev/fdt/dwc3_fdt.c Wed Dec 11 14:58:03 2019 +0000
+++ b/sys/dev/fdt/dwc3_fdt.c Thu Dec 12 11:40:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc3_fdt.c,v 1.7 2019/04/19 19:05:56 jmcneill Exp $ */
+/* $NetBSD: dwc3_fdt.c,v 1.7.4.1 2019/12/12 11:40:53 martin Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.7 2019/04/19 19:05:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.7.4.1 2019/12/12 11:40:53 martin Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -52,6 +52,9 @@
#define GCTL_PRTCAP_OTG 3
#define GCTL_CORESOFTRESET __BIT(11)
+#define DWC3_GUCTL1 0xc11c
+#define GUCTL1_TX_IPGAP_LINECHECK_DIS __BIT(28)
+
#define DWC3_SNPSID 0xc120
#define DWC3_SNPSID_REV __BITS(15,0)
@@ -120,7 +123,7 @@
}
static void
-dwc3_fdt_enable_phy(struct xhci_softc *sc, const int phandle)
+dwc3_fdt_enable_phy(struct xhci_softc *sc, const int phandle, u_int rev)
{
const char *max_speed, *phy_type;
u_int phyif_utmi_bits;
@@ -162,6 +165,13 @@
val &= ~GUSB3PIPECTL_DEPOCHANGE;
WR4(sc, DWC3_GUSB3PIPECTL(0), val);
+ if (rev >= 0x250a) {
+ val = RD4(sc, DWC3_GUCTL1);
+ if (of_hasprop(phandle, "snps,dis-tx-ipgap-linecheck-quirk"))
+ val |= GUCTL1_TX_IPGAP_LINECHECK_DIS;
+ WR4(sc, DWC3_GUCTL1, val);
+ }
+
max_speed = fdtbus_get_string(phandle, "maximum-speed");
if (max_speed == NULL)
max_speed = "super-speed";
@@ -279,7 +289,7 @@
}
dwc3_fdt_soft_reset(sc);
- dwc3_fdt_enable_phy(sc, dwc3_phandle);
+ dwc3_fdt_enable_phy(sc, dwc3_phandle, rev);
dwc3_fdt_set_mode(sc, GCTL_PRTCAP_HOST);
if (!fdtbus_intr_str(dwc3_phandle, 0, intrstr, sizeof(intrstr))) {
Home |
Main Index |
Thread Index |
Old Index