OpenWrt Forum Archive

Topic: DIR-615 E4 trunk build usb question

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, I would like to build from trunk plus add the usb.  But on the wiki tells to add lines
   
Add line #include "dev-usb.h" after line #include "dev-leds-gpio.h"
Add line ar71xx_add_device_usb(); after line ar71xx_add_device_eth(1);

But on trunk instead of ar71xx, it shows ath79. 

How I can add the usb now?? 

Thanks, in advance for any help anyone can provide.

now it's ath79_register_usb(); close to line ath79_register_eth(1);

Thanks!!!!!

What other lines should be modified.  The usb port still not working??

Hi to all! Also have a problem with usb support on DIR-615 E4.

I have tried to build the firmware several times making below modifications:
-  I have modified "610-MIPS-ath79-openwrt-machines.patch" by adding "+ select TH79_DEV_USB" in appropriate section
- I have added "#include "dev-usb.h"" and "ath79_register_usb();" in "mach-dir-600-a1.c" file.

I used latest trunk for firmware building.

But still USB is not functioning at all! What are my further actions?

Please find below kernel log:

[    0.000000] Linux version 3.3.8 (alex@alex-laptop) (gcc version 4.6.4 20121001 (prerelease) (Linaro GCC 4.6-2012.10) ) #1 Tue Oct 30 00:17:47 MSK 2012
[    0.000000] MyLoader: sysp=11111110, boardp=11101011, parts=dd9ddd9c
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR7240 rev 2
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 802cc0d0, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=DIR-615-E4 console=ttyS0,115200 mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,960k(kernel),2752k(rootfs),64k(mac)ro,64k(art)ro,3712k@0x40000(firmware) rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 29156k/32768k available (2084k kernel code, 3612k reserved, 397k data, 208k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.090000] gpiochip_add: registered GPIOs 0 to 17 on device: ath79
[    0.100000] MIPS: machine is D-Link DIR-615 rev. E4
[    1.520000] registering PCI controller with io_map_base unset
[    1.530000] bio: create slab <bio-0> at 0
[    1.540000] PCI host bridge to bus 0000:00
[    1.540000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.550000] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.550000] pci 0000:00:00.0: [168c:002e] type 0 class 0x000280
[    1.550000] pci 0000:00:00.0: fixup device configuration
[    1.560000] pci 0000:00:00.0: reg 10: [mem 0x00000000-0x0000ffff 64bit]
[    1.560000] pci 0000:00:00.0: supports D1
[    1.560000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    1.560000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[    1.560000] pci 0000:00:00.0: using irq 40 for pin 1
[    1.570000] Switching to clocksource MIPS
[    1.570000] NET: Registered protocol family 2
[    1.580000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    1.580000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    1.590000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.590000] TCP: Hash tables configured (established 1024 bind 1024)
[    1.600000] TCP reno registered
[    1.600000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.610000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.620000] NET: Registered protocol family 1
[    1.620000] PCI: CLS 0 bytes, default 32
[    1.640000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.640000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.650000] msgmni has been set to 56
[    1.660000] io scheduler noop registered
[    1.660000] io scheduler deadline registered (default)
[    1.670000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    1.700000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    1.700000] console [ttyS0] enabled, bootconsole disabled
[    1.720000] m25p80 spi0.0: found mx25l3205d, expected m25p80
[    1.720000] m25p80 spi0.0: mx25l3205d (4096 Kbytes)
[    1.730000] 7 cmdlinepart partitions found on MTD device spi0.0
[    1.730000] Creating 7 MTD partitions on "spi0.0":
[    1.740000] 0x000000000000-0x000000030000 : "u-boot"
[    1.750000] 0x000000030000-0x000000040000 : "nvram"
[    1.750000] 0x000000040000-0x000000130000 : "kernel"
[    1.760000] 0x000000130000-0x0000003e0000 : "rootfs"
[    1.770000] mtd: partition "rootfs" set to be root filesystem
[    1.770000] mtd: partition "rootfs_data" created automatically, ofs=320000, len=C0000 
[    1.780000] 0x000000320000-0x0000003e0000 : "rootfs_data"
[    1.790000] 0x0000003e0000-0x0000003f0000 : "mac"
[    1.790000] 0x0000003f0000-0x000000400000 : "art"
[    1.800000] 0x000000040000-0x0000003e0000 : "firmware"
[    1.910000] ag71xx_mdio: probed
[    1.920000] eth0: Atheros AG71xx at 0xba000000, irq 5
[    2.470000] eth0: Found an AR7240/AR9330 built-in switch
[    3.510000] eth1: Atheros AG71xx at 0xb9000000, irq 4
[    4.080000] ag71xx ag71xx.0: eth1: connected to PHY at ag71xx-mdio.0:04 [uid=004dd041, driver=Generic PHY]
[    4.090000] TCP cubic registered
[    4.090000] NET: Registered protocol family 17
[    4.090000] 8021q: 802.1Q VLAN Support v1.8
[    4.100000] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    4.110000] Freeing unused kernel memory: 208k freed
[    7.440000] Registered led device: d-link:green:power
[    7.440000] Registered led device: d-link:amber:power
[    7.440000] Registered led device: d-link:amber:wan
[    7.440000] Registered led device: d-link:green:wan
[    7.440000] Registered led device: d-link:green:lan1
[    7.440000] Registered led device: d-link:green:lan2
[    7.440000] Registered led device: d-link:green:lan3
[    7.440000] Registered led device: d-link:green:lan4
[    7.440000] Registered led device: d-link:blue:wps
[    7.900000] eth0: link up (1000Mbps/Full duplex)
[   10.730000] JFFS2 notice: (433) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 13 of xref (0 dead, 2 orphan) found.
[   10.850000] eth0: link down
[   12.820000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[   12.820000] Backport based on wireless-testing.git master-2012-09-07
[   12.830000] compat.git: wireless-testing.git
[   12.860000] cfg80211: Calling CRDA to update world regulatory domain
[   12.870000] cfg80211: World regulatory domain updated:
[   12.870000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   12.880000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.890000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   12.900000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   12.900000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.910000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   13.320000] usbcore: registered new interface driver usbfs
[   13.320000] usbcore: registered new interface driver hub
[   13.330000] usbcore: registered new device driver usb
[   13.910000] usbcore: registered new interface driver rtl8187
[   13.940000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[   13.950000] ath: EEPROM regdomain: 0x0
[   13.950000] ath: EEPROM indicates default country code should be used
[   13.950000] ath: doing EEPROM country->regdmn map search
[   13.950000] ath: country maps to regdmn code: 0x3a
[   13.950000] ath: Country alpha2 being used: US
[   13.950000] ath: Regpair used: 0x3a
[   13.950000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   13.960000] Registered led device: ath9k-phy0
[   13.960000] ieee80211 phy0: Atheros AR9287 Rev:2 mem=0xb0000000, irq=40
[   13.970000] cfg80211: Calling CRDA for country: US
[   13.970000] cfg80211: Regulatory domain changed to country: US
[   13.980000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   13.980000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   13.990000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   14.000000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   14.010000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   14.020000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   14.020000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   14.040000] usbcore: registered new interface driver rt2800usb
[   14.190000] PPP generic driver version 2.4.2
[   14.340000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.560000] NET: Registered protocol family 24
[   14.590000] nf_conntrack version 0.5.0 (458 buckets, 1832 max)
[   14.960000] usbcore: registered new interface driver ath9k_htc
[   19.750000] device eth0.1 entered promiscuous mode
[   19.750000] device eth0 entered promiscuous mode
[   20.350000] eth0: link up (1000Mbps/Full duplex)
[   20.350000] br-lan: port 1(eth0.1) entered forwarding state
[   20.360000] br-lan: port 1(eth0.1) entered forwarding state
[   22.360000] br-lan: port 1(eth0.1) entered forwarding state
khudko_denys wrote:

-  I have modified "610-MIPS-ath79-openwrt-machines.patch" by adding "+ select TH79_DEV_USB" in appropriate section

is this just a typo in here, or did you really modified that file like that? it has to be ATH79_DEV_USB.

MBS wrote:
khudko_denys wrote:

-  I have modified "610-MIPS-ath79-openwrt-machines.patch" by adding "+ select TH79_DEV_USB" in appropriate section

is this just a typo in here, or did you really modified that file like that? it has to be ATH79_DEV_USB.

It is mistyping in my post. Modification was made: " + select ATH79_DEV_USB". So there should be another reason of USB disfunction.
Maybe some-one knows what should be done to make USB work?

Hi to all! USB problem was solved after kernel update to ver. 3.6.4 in trunk!
But new bug was found - the router DOES NOT save settings. All default settings are done after reboot!
Please advice what can I do with it?

The discussion might have continued from here.