diff --git a/sys/boot/fdt/dts/mips/beripad-de4.dts b/sys/boot/fdt/dts/mips/beripad-de4.dts index 4a13622b00a..e98f5e65945 100644 --- a/sys/boot/fdt/dts/mips/beripad-de4.dts +++ b/sys/boot/fdt/dts/mips/beripad-de4.dts @@ -222,7 +222,7 @@ }; usb@0x7f100000 { - compatible = "philips,isp1761"; + compatible = "nxp,usb-isp1761"; reg = <0x7f100000 0x40000 0x7f140000 0x4>; // IRQ 4 is DC, IRQ 5 is HC. @@ -253,14 +253,5 @@ sri-cambridge,fileio = "rw"; sri-cambridge,devname = "de4tempfan"; }; - - avgen@0x7f100000 { - compatible = "sri-cambridge,avgen"; - reg = <0x7f100000 0x40000>; - sri-cambridge,width = <4>; - sri-cambridge,fileio = "r"; - sri-cambridge,devname = "usbmem"; - }; - }; }; diff --git a/sys/conf/files b/sys/conf/files index 1c447e18522..3dd585a1735 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2314,6 +2314,8 @@ dev/usb/controller/uhci.c optional uhci dev/usb/controller/uhci_pci.c optional uhci pci dev/usb/controller/xhci.c optional xhci dev/usb/controller/xhci_pci.c optional xhci pci +dev/usb/controller/saf1761_otg.c optional saf1761otg +dev/usb/controller/saf1761_otg_fdt.c optional saf1761otg fdt dev/usb/controller/uss820dci.c optional uss820dci dev/usb/controller/uss820dci_atmelarm.c optional uss820dci at91rm9200 dev/usb/controller/usb_controller.c optional usb diff --git a/sys/dev/usb/controller/saf1761_otg_fdt.c b/sys/dev/usb/controller/saf1761_otg_fdt.c index 3e5b5da629a..1b18aea33c4 100644 --- a/sys/dev/usb/controller/saf1761_otg_fdt.c +++ b/sys/dev/usb/controller/saf1761_otg_fdt.c @@ -93,15 +93,15 @@ static device_method_t saf1761_otg_methods[] = { }; static driver_t saf1761_otg_driver = { - .name = "saf1761", + .name = "saf1761otg", .methods = saf1761_otg_methods, .size = sizeof(struct saf1761_otg_softc), }; static devclass_t saf1761_otg_devclass; -DRIVER_MODULE(saf1761, simplebus, saf1761_otg_driver, saf1761_otg_devclass, 0, 0); -MODULE_DEPEND(saf1761, usb, 1, 1, 1); +DRIVER_MODULE(saf1761otg, simplebus, saf1761_otg_driver, saf1761_otg_devclass, 0, 0); +MODULE_DEPEND(saf1761otg, usb, 1, 1, 1); static int saf1761_otg_fdt_probe(device_t dev) diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c index d62acd2e066..9f0e1162cb9 100644 --- a/sys/dev/usb/controller/usb_controller.c +++ b/sys/dev/usb/controller/usb_controller.c @@ -138,7 +138,7 @@ DRIVER_MODULE(usbus, octusb, usb_driver, usb_devclass, 0, 0); /* Dual Mode Drivers */ DRIVER_MODULE(usbus, dwcotg, usb_driver, usb_devclass, 0, 0); -DRIVER_MODULE(usbus, saf1761, usb_driver, usb_devclass, 0, 0); +DRIVER_MODULE(usbus, saf1761otg, usb_driver, usb_devclass, 0, 0); /*------------------------------------------------------------------------* * usb_probe diff --git a/sys/mips/conf/BERI_DE4_BASE b/sys/mips/conf/BERI_DE4_BASE index 801c8d30ada..d24a41f702e 100644 --- a/sys/mips/conf/BERI_DE4_BASE +++ b/sys/mips/conf/BERI_DE4_BASE @@ -40,3 +40,12 @@ device uart device miibus options DEVICE_POLLING +# +# USB support +# +#options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE +device usb +device saf1761otg + diff --git a/sys/modules/usb/Makefile b/sys/modules/usb/Makefile index 6b3c9d4540e..8dccf387499 100644 --- a/sys/modules/usb/Makefile +++ b/sys/modules/usb/Makefile @@ -44,7 +44,7 @@ MAKE+=" DEBUG_FLAGS+=-DUSB_REQ_DEBUG" SUBDIR = usb SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} ${_at91dci} \ - ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} + ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} ${_saf1761otg} SUBDIR += ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw} SUBDIR += ${_urtwn} ${_urtwnfw} SUBDIR += atp uhid ukbd ums udbp ufm uep wsp @@ -96,4 +96,8 @@ _urtw= urtw _avr32dci= avr32dci .endif +.if ${MACHINE_CPUARCH} == "mips" +_saf1761otg= saf1761otg +.endif + .include diff --git a/sys/modules/usb/saf1761/Makefile b/sys/modules/usb/saf1761otg/Makefile similarity index 99% rename from sys/modules/usb/saf1761/Makefile rename to sys/modules/usb/saf1761otg/Makefile index 5610a387373..f9d0e6f9e13 100644 --- a/sys/modules/usb/saf1761/Makefile +++ b/sys/modules/usb/saf1761otg/Makefile @@ -33,7 +33,7 @@ S= ${.CURDIR}/../../.. .PATH: $S/dev/usb/controller -KMOD= saf1761 +KMOD= saf1761otg SRCS= bus_if.h device_if.h usb_if.h \ opt_bus.h opt_usb.h ofw_bus_if.h \ saf1761_otg.c saf1761_otg_fdt.c \