Enable USB on DSL 2750B B1

Hello,
I've a D-Link DSL 2750B B1 router using the following fw:
openwrt-19.07.7-brcm63xx-generic-DSL274XB-F1-squashfs-cfe-EU
The firmware I am using suits perfectly for my device but it lacks a USB port because the 274XB F1 has no physical port instead the 2750B has a 1x2.0 USB port.

I tried to install the following packages: kmod-usb-ledtrig-usbport kmod-usb-ohci kmod-usb2 but lsusb returns the following:

root@OpenWrt:~# lsusb
unable to initialize libusb: -99

I tried also to compile an image from scratch based on the firmware of the 247XB F1 adding the USB packages and flashing the image to the device with no luck, lsusb still says that it's unable to initialize libusb.

Other infos:

root@OpenWrt:~# dmesg | grep usb
[    4.424248] usbcore: registered new interface driver usbfs
[    4.430194] usbcore: registered new interface driver hub
[    4.435937] usbcore: registered new device driver usb
root@OpenWrt:~# dmesg | grep USB
[    4.459448] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.482934] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
root@OpenWrt:~# lspci | grep USB
root@OpenWrt:~# lspci | grep usb
root@OpenWrt:~# lsmod |grep usb
ledtrig_usbport         2720  0
nls_base                5152  1 usbcore
usb_common              2224  1 usbcore
usbcore               134480  6 ohci_pci,ledtrig_usbport,ohci_platform,ohci_hcd,ehci_platform,ehci_hcd

Any idea?

You're basically hacking up an image for another device now. It sounds like OpenWrt has an image for your device but that actually breaks (or was it for another revision?).

Either way, USB needs to be exposed in the DTS. Now the kernel doesn't know about any USB. So you start with enabling it in the DTS. Then you rebuild your image.

Ideally, though, you'd take the building blocks of the image you're using to create a dedicated image for your device.

The image for my specific device is not available on OpenWRT, the one which is ideal is the one of the DSL274X-F1, this device has the same hw of mine DSL2750B ver.B1 only without the USB port.

Can you explain me the steps? I don't have any idea about working on DTS..
What I did now was simply generating a custom .bin with the USB packets from opkg, nothing more.. I've used this service to build the image https://chef.libremesh.org/

@donluca87 D-Link DSL-2750B rev. B1 router is exactly like 274xB F1 but with a usb
port, This patch add USB support to it.

diff --git a/target/linux/brcm63xx/patches-4.4/524-board_dsl_274xb_rev_f.patch b/target/linux/brcm63xx/patches-4.4/524-board_dsl_274xb_rev_f.patch
index d4754af..410ce89 100644
--- a/target/linux/brcm63xx/patches-4.4/524-board_dsl_274xb_rev_f.patch
+++ b/target/linux/brcm63xx/patches-4.4/524-board_dsl_274xb_rev_f.patch
@@ -22,6 +22,10 @@  Subject: [PATCH 70/79] MIPS: BCM63XX: Add board definition for D-Link
 +	.has_uart0			= 1,
 +	.has_pci			= 1,
 +
++   .has_ohci0          = 1,
++   .has_ehci0          = 1,
++   .num_usbh_ports         = 1,
++
 +	.has_caldata			= 1,
 +	.caldata = {
 +		{