uClinux on LPC4337 with Wifi/BT device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

uClinux on LPC4337 with Wifi/BT device

1,764 Views
lpcware
NXP Employee
NXP Employee

Content originally posted in LPCWare by bomellberg on Fri Nov 28 02:15:34 MST 2014
Hi,

 

I'm working on a custom board with LPC4337 and uClinux. I am hoping on using this thread as a diary on how to get uClinux up and running with a Wifi device.

 

I have already gotten a lot of help from Wolfgang at Denx (to get U-boot up) and Vlad at Emcraft (to get uCLinux up). I bought the BSD package for the LPC4550 as a starting point.

 

If I can assist in any way, feel free to ask questions in this thread. I have attached the board.c-file and the ea-lpc4357.h (for U-boot) that are tuned to my custom board.

 


Now, my current issue is getting the USB drivers for uClinux to work, but first, does anyone know why I get dual console messages at boot of uClinux?:

 

 

U-Boot 2010.03 (nov 25 2014 - 08:13:54)

CPU  : LPC43xx series (Cortex-M4/M0)
Freqs: SYSTICK=204MHz,CCLK=204MHz
Board: Physio-Control 200130-00 1
DRAM:  32 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
SPIFI lib found at address 0x1A01C000
Hit any key to stop autoboot:  0
EA-LPC4357-EVAL> setenv bootargs lpc18xx_platform=ea-lpc4357 console=ttyS1,115200 panic=10
EA-LPC4357-EVAL> bootm 0x80001000
## Booting kernel from Legacy Image at 80001000 ...
   Image Name:   Linux-2.6.33-arm1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3706368 Bytes =  3.5 MB
   Load Address: 30008000
   Entry Point:  30008001
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

<5>Linux version 2.6.33-arm1 (bosse@bolinux) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-189) ) #39 Thu Nov 27 15:52:29 CET 2014
CPU: ARMv7-M Processor [410fc241] revision 1 (ARMv7M)
CPU: NO data cache, NO instruction cache
Machine: NXP LPC18xx
<7>On node 0 totalpages: 8192
<7>free_area_init_node: node 0, pgdat 30390764, node_mem_map 303a1000
<7>  Normal zone: 64 pages used for memmap
<7>  Normal zone: 0 pages reserved
<7>  Normal zone: 8128 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 8128
<5>Kernel command line: lpc18xx_platform=ea-lpc4357 console=ttyS1,115200 panic=10
<6>PID hash table entries: 128 (order: -3, 512 bytes)
<6>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
<6>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
<6>Memory: 32MB = 32MB total
<5>Memory: 28804k/28804k available, 3964k reserved, 0K highmem
<5>Virtual kernel memory layout:
    vector  : 0x00000000 - 0x00001000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0x00000000 - 0xffffffff   (4095 MB)
    lowmem  : 0x30000000 - 0x32000000   (  32 MB)
    modules : 0x30000000 - 0x50000000   ( 512 MB)
      .init : 0x30008000 - 0x30237000   (2236 kB)
      .text : 0x30237000 - 0x3037a000   (1292 kB)
      .data : 0x3037a000 - 0x30390e00   (  92 kB)
<6>Hierarchical RCU implementation.
<6>NR_IRQS:53
<4>lpc18xx_clock_init: unsupported platform 2
<6>Calibrating delay loop... <c>53.04 BogoMIPS (lpj=265216)
Mount-cache hash table entries: 512
<6>NET: Registered protocol family 16
bio: create slab <bio-0> at 0
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<6>Switching to clocksource cm3-systick
<6>NET: Registered protocol family 2
<6>IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>TCP established hash table entries: 1024 (order: 1, 8192 bytes)
<6>TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
<6>TCP: Hash tables configured (established 1024 bind 1024)
<6>TCP reno registered
<6>RPC: Registered udp transport module.
<6>RPC: Registered tcp transport module.
<6>RPC: Registered tcp NFSv4.1 backchannel transport module.
<6>JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
<6>alg: No test for stdrng (krng)
<6>Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
<6>io scheduler noop registered
<6>io scheduler deadline registered
<6>io scheduler cfq registered (default)
<6>Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
<6>serial8250.2: ttyS0 at MMIO 0x400c1000 (irq = 26) is a 16550A
ÿ<6>serial8250.3: ttyS1 at MMIO 0x400c2000 (irq = 27) is a 16550A
Linux version 2.6.33-arm1 (bosse@bolinux) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-189) ) #39 Thu Nov 27 15:52:29 CET 2014
CPU: ARMv7-M Processor [410fc241] revision 1 (ARMv7M)
CPU: NO data cache, NO instruction cache
Machine: NXP LPC18xx
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 8128
Kernel command line: lpc18xx_platform=ea-lpc4357 console=ttyS1,115200 panic=10
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 28804k/28804k available, 3964k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0x00000000 - 0x00001000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0x00000000 - 0xffffffff   (4095 MB)
    lowmem  : 0x30000000 - 0x32000000   (  32 MB)
    modules : 0x30000000 - 0x50000000   ( 512 MB)
      .init : 0x30008000 - 0x30237000   (2236 kB)
      .text : 0x30237000 - 0x3037a000   (1292 kB)
      .data : 0x3037a000 - 0x30390e00   (  92 kB)
Hierarchical RCU implementation.
NR_IRQS:53
lpc18xx_clock_init: unsupported platform 2
Calibrating delay loop... 53.04 BogoMIPS (lpj=265216)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource cm3-systick
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
alg: No test for stdrng (krng)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
serial8250.2: ttyS0 at MMIO 0x400c1000 (irq = 26) is a 16550A
serial8250.3: ttyS1 at MMIO 0x400c2000 (irq = 27) is a 16550A
<6>console [ttyS1] enabled
console [ttyS1] enabled
<6>usbcore: registered new interface driver ub
usbcore: registered new interface driver ub
<6>TCP cubic registered
TCP cubic registered
<6>NET: Registered protocol family 17
NET: Registered protocol family 17
<6>lib80211: common routines for IEEE802.11 drivers
lib80211: common routines for IEEE802.11 drivers
<7>lib80211_crypt: registered algorithm 'NULL'
<6>ARMv7-M VFP Extension supported
ARMv7-M VFP Extension supported
<6>Freeing init memory: 2236K
Freeing init memory: 2236K
init started: BusyBox v1.17.0 (2014-11-27 15:52:02 CET)
~ #

 

 

As you can see, "Linux version ..." comes twice, and a lot of the console messages are doubled??

 

Thanks,

 

/Bo

Original Attachment has been moved to: board_0.c.zip

Original Attachment has been moved to: ea-lpc4357_0.h.zip

Labels (1)
0 Kudos
18 Replies

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Wed Dec 17 00:23:23 MST 2014
Compiling the kernel with

CONFIG_ARM_V7M_NO_UNALIGN_TRP=y


solved the unaligned issue.

I can now bring up the wlan0 interface, associate with an open network, get an IP using udhcpc and ping www.google.com

Next thing is to add wpa_supplicant for encrypted networks, and getting hostapd to work.
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Fri Dec 12 05:29:29 MST 2014
Duh!

In the datasheet it says clearly that USB1 does not include the PHY interface.

I soldered the wifi-device onto a cable and inserted it in the USB0-port and it came to life:

usb 1-1: new high speed USB device using lpc43xx-ehci and address 2
~ # lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 002: ID 0bda:0724
~ #


Tadaa! One Linux 2.0 root hub and one Realtek RTL8723AU device.

OK, let's insmod the driver and bring up the wlan0 interface:

/root # insmod 8723au.ko
RTL871X: rtl8723as-vau driver version=v4.1.6_7336.20130426
RTL871X: build time: Dec  9 2014 09:56:52
RTL871X:
usb_endpoint_descriptor(0):
RTL871X: bLength=7
RTL871X: bDescriptorType=5
RTL871X: bEndpointAddress=84
RTL871X: wMaxPacketSize=512
RTL871X: bInterval=0
RTL871X: RT_usb_endpoint_is_bulk_in = 4
RTL871X:
usb_endpoint_descriptor(1):
RTL871X: bLength=7
RTL871X: bDescriptorType=5
RTL871X: bEndpointAddress=5
RTL871X: wMaxPacketSize=512
RTL871X: bInterval=0
RTL871X: RT_usb_endpoint_is_bulk_out = 5
RTL871X:
usb_endpoint_descriptor(2):
RTL871X: bLength=7
RTL871X: bDescriptorType=5
RTL871X: bEndpointAddress=6
RTL871X: wMaxPacketSize=512
RTL871X: bInterval=0
RTL871X: RT_usb_endpoint_is_bulk_out = 6
RTL871X:
usb_endpoint_descriptor(3):
RTL871X: bLength=7
RTL871X: bDescriptorType=5
RTL871X: bEndpointAddress=87
RTL871X: wMaxPacketSize=64
RTL871X: bInterval=3
RTL871X: RT_usb_endpoint_is_int_in = 7, Interval = 3
RTL871X: nr_endpoint=4, in_num=2, out_num=2

RTL871X: USB_SPEED_HIGH
RTL871X: CHIP TYPE: RTL8723A
RTL871X: rtw_handle_dualmac(): pbuddy_padapter == NULL, Set pbuddy_padapter
RTL871X: register rtw_netdev_ops to netdev_ops
RTL871X: Chip Version Info: CHIP_8723A_Normal_Chip_UMC_B_CUT_1T1R_RomVer(0)
RTL871X: RF_Type is 3!!
RTL871X: EEPROM type is E-FUSE
RTL871X: ====> _ReadAdapterInfo8723AU
RTL871X: Boot from EFUSE, Autoload OK !
RTL871X: hal_EfuseSwitchToBank: Efuse switch bank to 0
RTL871X: hal_ReadEFuse_WiFi: data end at address=0x9a


KERNEL: fault at 0x30b2de8c [pc=0x30b2de8c, sp=0x3001dcf8] Illegal unaligned access


Pid: 164, comm:               insmod
CPU: 0    Not tainted  (2.6.33-arm1 #56)
pc : [<30b2de8c>]    lr : [<30b2e13f>]    psr: 6100000b
sp : 3001dcf8  ip : 00000000  fp : 30033ec0 Code dump at pc [30b2de8c]:
30b7f8b1 f8b18763 87a110b9 8f614803
r10: 30419709  r9 : 3000fc00  r8 : 30307da0
r7 : 30033ec0  r6 : 3003b0a8  r5 : 3001dd10  r4 : 3003c000
r3 : 00000000  r2 : 00000000  r1 : 3001dd10  r0 : 3003bda8
Flags: nZCv  IRQs on  FIQs on  Mode UK11_26  ISA unknown  Segment kernel Kernel panic - not syncing:
Rebooting in 10 seconds...


Wow. Unaligned access. I tried to recompile the driver with -mno-unaligned-access, but that compiler flag does not seem to be available in the arm-2010q1 toolchain.
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Wed Dec 10 07:38:05 MST 2014
Reading the datasheet, I found this:


Quote:
In the SFSUSB register, the USB_ESEA bit must be set to 1 for the USB1 to operate
(see Table 192).





Where would I set this bit? In U-boot, or in the linux platform file ehci.c?

I have no idea of how to manipulate a registry bit from either U-boot or the kernel files. Could anyone shed some light on this?

EDIT: I just discovered the file lpc18xx_scu.h:

#ifndef _MACH_SCU_H_
#define _MACH_SCU_H_

/*
 * SCU (System Control Unit) register map
 */
struct lpc18xx_scu_regs {
u32 sfs[802];/* Pin configuration registers */
u32 enaio0;/* ADC0 function select register */
u32 enaio1;/* ADC1 function select register */
u32 enaio2;/* Analog function select register */
u32 rsv0[27];
u32 emcdelayclk;/* EMC clock delay register */
u32 rsv1[63];
u32 pintsel0;/* Pin interrupt select for interrupts 0 to 3 */
u32 pintsel1;/* Pin interrupt select for interrupts 4 to 7 */
};

/*
 * SCU registers base
 */
#define LPC18XX_SCU_BASE0x40086000
#define LPC18XX_SCU((volatile struct lpc18xx_scu_regs *) \
LPC18XX_SCU_BASE)

#endif /* _MACH_SCU_H_ */


I will try to call lpc18xx_scu_regs from board_init.
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Wed Dec 10 00:11:39 MST 2014
The hub is not a real USB-hub. It is the ehci_hcd virtual hub, initialized by the Linux kernel.

~ # lsusb
Bus 001 Device 001: ID 1d6b:0002
~ #


Here is a list of USB manufacturers: http://www.linux-usb.org/usb.ids

1d6b  Linux Foundation
0001  1.1 root hub
0002  2.0 root hub
0003  3.0 root hub
0100  PTP Gadget
0101  Audio Gadget
0102  EEM Gadget
0103  NCM (Ethernet) Gadget
0104  Multifunction Composite Gadget
0105  FunctionFS Gadget
0200  Qemu Audio Device


So, 1d6b:0002 is a 2.0 root hub, capable of enumerating USB devices.

The problem is that the device is not enumerated. It is found on the USB bus, but the device descriptors can not be read, and thus, it can not be enumerated. That is also why my

~ # insmod /root/8723au.ko
RTL871X: rtl8723as-vau driver version=v4.1.6_7336.20130426
RTL871X: build time: Dec  9 2014 09:56:52
usbcore: registered new interface driver rtl8723au
~ #


is pointless. I load the driver, but the device does not exist.
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rocketdawg on Tue Dec 09 17:14:59 MST 2014
in the block diagram of 24.4.1 of UM10503 I see no internal HUB in the LPC43xx series.
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Tue Dec 09 02:48:51 MST 2014
The hub is the internal usb hub on the LPC4337 chip.

Since last, I have compiled the kernel with support for hot plugging, which made lsusb work:

~ # lsusb
Bus 001 Device 001: ID 1d6b:0002
~ #


But as you can see, it is just showing the hub. 1d6b:0002 is the Linux foundation 2.0 root hub.

There are a number of USB errors pointing to the fact that perhaps the device is not properly enumerated.
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rocketdawg on Sun Dec 07 14:42:17 MST 2014
I am confused.
That console message said that the ehci controller found a hub.
and it looks like a full speed hub.

lpc43xx-ehci lpc43xx-ehci: USB 0.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usb 1-1: new full speed USB device using lpc43xx-ehci and address 2~ #
usb 1-1: device descriptor read/64, error -71
usb 1-1: device descriptor read/64, error -71

Is there a downstream hub?  and why would you want a full speed hub rather than a high speed one?
if there is no hub, then why is it thinking the wifi adapter is a hub?
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Fri Dec 05 04:04:09 MST 2014
lsusb gives no result what so ever.

I wonder if I have gotten the USB ehci to work at all.

~ # lsusb
~ #
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Fri Dec 05 00:22:38 MST 2014
I have iwconfig and iwlist, but none of them are of any use until I get the wlan interface up.

I am trying to find out my devices usb id. lsusb is not normally part of the busybox install, compiling it in now.
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rocketdawg on Thu Dec 04 13:19:48 MST 2014
ifconfig is obsolete for linux, maybe not yet obsolete for uClinux.
Anyway, you just assumed the interface would be called "wlan0"
does not have to be named that, but it usually is.
But error is saying that the interface does not yet exist.
can you list the interfaces?

do you have iwconfig & iwlist?
http://wireless.kernel.org/
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Thu Dec 04 05:18:57 MST 2014
With some help from Emcraft, I now have ehci support.

Starting kernel ...

ÿLinux version 2.6.33-arm1 (bosse@bolinux) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-189) ) #25 Thu Dec 4 11:27:44 CET 2014
CPU: ARMv7-M Processor [410fc241] revision 1 (ARMv7M)
CPU: NO data cache, NO instruction cache
Machine: NXP LPC18xx
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line: lpc18xx_platform=ea-lpc4357 console=ttyS1,115200 panic=10 mem=16M
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 11764k/11764k available, 4620k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0x00000000 - 0x00001000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0x00000000 - 0xffffffff   (4095 MB)
    lowmem  : 0x30000000 - 0x31000000   (  16 MB)
    modules : 0x30000000 - 0x01000000   (3344 MB)
      .init : 0x30008000 - 0x302f8000   (3008 kB)
      .text : 0x302f8000 - 0x30440000   (1312 kB)
      .data : 0x30440000 - 0x30457c60   (  96 kB)
Hierarchical RCU implementation.
NR_IRQS:53
lpc18xx_clock_init: unsupported platform 2
Calibrating delay loop... 53.45 BogoMIPS (lpj=267264)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource cm3-systick
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
alg: No test for stdrng (krng)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
serial8250.2: ttyS0 at MMIO 0x400c1000 (irq = 26) is a 16550A
serial8250.3: ttyS1 at MMIO 0x400c2000 (irq = 27) is a 16550A
console [ttyS1] enabled
usbcore: registered new interface driver ub
m25p80_spifi m25p80_spifi: found s25fl256s1, expected (null)
m25p80_spifi m25p80_spifi: s25fl256s1 (32768 Kbytes)
Creating 3 MTD partitions on "m25p80_spifi":
0x000000000000-0x000000010000 : "flash_uboot"
0x000000010000-0x000001000000 : "flash_linux_image"
0x000001000000-0x000002000000 : "flash_jffs2"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
lpc43xx-ehci lpc43xx-ehci: LPC43XX EHCI
lpc43xx-ehci lpc43xx-ehci: new USB bus registered, assigned bus number 1
lpc43xx-ehci lpc43xx-ehci: irq 9, io mem 0x40007000
lpc43xx-ehci lpc43xx-ehci: USB 0.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
ARMv7-M VFP Extension supported
Freeing init memory: 3008K
init started: BusyBox v1.17.0 (2014-12-04 10:08:23 CET)
usb 1-1: new full speed USB device using lpc43xx-ehci and address 2
~ # usb 1-1: device descriptor read/64, error -71
usb 1-1: device descriptor read/64, error -71
usb 1-1: new full speed USB device using lpc43xx-ehci and address 3
usb 1-1: device descriptor read/64, error -71
usb 1-1: device descriptor read/64, error -71
usb 1-1: new full speed USB device using lpc43xx-ehci and address 4
usb 1-1: device not accepting address 4, error -71
usb 1-1: new full speed USB device using lpc43xx-ehci and address 5
usb 1-1: device not accepting address 5, error -71
hub 1-0:1.0: unable to enumerate USB device on port 1


I can also insmod the module for my wifi-device:

~ # insmod /root/compat.ko
Compat-wireless backport release: compat-wireless-v3.4-rc3-1
Backport based on linux-stable.git v3.4-rc3
~ # insmod /root/cfg80211.ko
cfg80211: Calling CRDA to update world regulatory domain
~ # insmod /root/mac80211.ko
~ # insmod /root/8723au.ko
usbcore: registered new interface driver rtl8723au


But, when I try to bring the interface up, I get this:

~ # ifconfig wlan0 up
ifconfig: SIOCGIFFLAGS: No such device
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Mon Dec 01 06:38:11 MST 2014
Hmm. In my tree I don't have an ehci.c file at all. Also, on this page: http://www.emcraft.com/ea-lpc1788/usb-wifi-with-lpc1788 they are refering to OHCI, not EHCI.
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ezequielg on Mon Dec 01 06:16:56 MST 2014
This is the board file:

arch/arm/mach-lpc18xx/lpc18xx_platform.c

And the EHCI code is in:

arch/arm/mach-lpc18xx/ehci.c

But as far as I can see, it only registers the USB0. Seems like you will have to modify that for USB1.
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Mon Dec 01 06:10:12 MST 2014
I know that platform specific files reside in arch/arm/mach-lpc18xx

But which one is the board file?
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ezequielg on Mon Dec 01 05:58:47 MST 2014
No, you need to register this in the Linux board file. Do you know which one that is?

You've attached U-Boot's board file.
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Mon Dec 01 05:53:28 MST 2014
OK, so I need to configure the USB port in U-boot? The only thing I can find in my board.c is for USB boot, which is not what I need.

I have a Wifi/BT device connected to USB1_DP and USB1_DM.

Any help is appreciated, as always. I'll attach my board.c-file.

/Bo
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ezequielg on Mon Dec 01 05:35:24 MST 2014

usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb


This means USB is configured and enabled in your kernel config.

ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver


And this means you are registering through your board file or devicetree. Maybe you still need to do that?

Can you share your board file?
0 Kudos

1,169 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bomellberg on Mon Dec 01 02:59:59 MST 2014
The above problem was solved. I had left debug code in kernel/printk.c. Removing it also removed the dual console output.

So, the next issue is the USB driver. In my boot, I can see the following:

usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
.
.
.
usbcore: registered new interface driver ub


But I never see the
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver


even though I have enabled USB and OHCI in the kernel. Any hints?
0 Kudos