Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/fdt Add support for Meson8b
details: https://anonhg.NetBSD.org/src/rev/68eb7aca4f7b
branches: trunk
changeset: 448048:68eb7aca4f7b
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Jan 19 20:53:32 2019 +0000
description:
Add support for Meson8b
diffstat:
sys/dev/fdt/dwc2_fdt.c | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
diffs (67 lines):
diff -r 0a4750fc77aa -r 68eb7aca4f7b sys/dev/fdt/dwc2_fdt.c
--- a/sys/dev/fdt/dwc2_fdt.c Sat Jan 19 20:52:26 2019 +0000
+++ b/sys/dev/fdt/dwc2_fdt.c Sat Jan 19 20:53:32 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2_fdt.c,v 1.3 2018/08/15 07:46:15 skrll Exp $ */
+/* $NetBSD: dwc2_fdt.c,v 1.4 2019/01/19 20:53:32 jmcneill Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2_fdt.c,v 1.3 2018/08/15 07:46:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2_fdt.c,v 1.4 2019/01/19 20:53:32 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -64,6 +64,7 @@
static void dwc2_fdt_attach(device_t, device_t, void *);
static void dwc2_fdt_deferred(device_t);
+static void dwc2_fdt_amlogic_params(struct dwc2_fdt_softc *, struct dwc2_core_params *);
static void dwc2_fdt_rockchip_params(struct dwc2_fdt_softc *, struct dwc2_core_params *);
struct dwc2_fdt_config {
@@ -74,10 +75,15 @@
.params = dwc2_fdt_rockchip_params,
};
+static const struct dwc2_fdt_config dwc2_fdt_meson8b_config = {
+ .params = dwc2_fdt_amlogic_params,
+};
+
static const struct dwc2_fdt_config dwc2_fdt_generic_config = {
};
static const struct of_compat_data compat_data[] = {
+ { "amlogic,meson8b-usb", (uintptr_t)&dwc2_fdt_meson8b_config },
{ "rockchip,rk3066-usb", (uintptr_t)&dwc2_fdt_rk3066_config },
{ "snps,dwc2", (uintptr_t)&dwc2_fdt_generic_config },
{ NULL }
@@ -197,6 +203,24 @@
}
static void
+dwc2_fdt_amlogic_params(struct dwc2_fdt_softc *sc, struct dwc2_core_params *params)
+{
+ dwc2_set_all_params(params, -1);
+
+ params->otg_cap = DWC2_CAP_PARAM_NO_HNP_SRP_CAPABLE;
+ params->speed = DWC2_SPEED_PARAM_HIGH;
+ params->host_rx_fifo_size = 512;
+ params->host_nperio_tx_fifo_size = 500;
+ params->host_perio_tx_fifo_size = 500;
+ params->host_channels = 16;
+ params->phy_type = DWC2_PHY_TYPE_PARAM_UTMI;
+ params->ahbcfg = GAHBCFG_HBSTLEN_INCR8 << GAHBCFG_HBSTLEN_SHIFT;
+#ifdef DWC2_POWER_DOWN_PARAM_NONE
+ params->power_down = DWC2_POWER_DOWN_PARAM_NONE;
+#endif
+}
+
+static void
dwc2_fdt_rockchip_params(struct dwc2_fdt_softc *sc, struct dwc2_core_params *params)
{
dwc2_set_all_params(params, -1);
Home |
Main Index |
Thread Index |
Old Index