2008-01-02 14:00:02     sl811 USB on BF561

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-01-02 14:00:02     sl811 USB on BF561

Bill Fassler (UNITED STATES)

Message: 49186    Has anyone got this working with the BF561? I tried to port the driver over from BF537-STAMP where I had it working and I guess I don't have it setup properly for our custom boards using BF561 DSP.

 

I hope it is simply something to do with my address and/or GPIO interrupt not being correct, but my drivers are registering, but I see no signs that the hardware is being found.

 

Bill

QuoteReplyEditDelete

 

 

2008-01-02 16:17:08     Re: sl811 USB on BF561

Bill Fassler (UNITED STATES)

Message: 49194    I can now find and register the device, but it doesn't work.  It appears to be my interrupt that is the problem.

 

PF8 is connected to the chip. When I try to use any of the even interrupts, I get:

 

request interrupt 54/56/58 failed

probe of sl811-hcd.0 failed with error -22

 

when I try the odd number interrupts everything goes better and the device is registered, but then I get

No IRQF_TRIGGER set_type function for IRQ 55

 

I obviously forgot something as I pulled this stuff from the BF537-STAMP to our custom BF561 board. I am trying to understand it but if anyone can tell me how to enable/create this IRQF_TRIGGER set_type function for IRQ 55,57, or 59 I'd appreciate it.

 

 

 

sl811: driver sl811-hcd, 19 May 2005

sl811-hcd sl811-hcd.0: SL811HS v1.5

sl811-hcd sl811-hcd.0: new USB bus registered, assigned bus number 1

No IRQF_TRIGGER set_type function for IRQ 55 (<NULL>)

sl811-hcd sl811-hcd.0: irq 55, io mem 0x28000000

usb usb1: Product: SL811HS v1.5

usb usb1: Manufacturer: Linux 2.6.22.14-ADI-2007R2-pre-svn3937 sl811-hcd

usb usb1: SerialNumber: sl811-hcd.0

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

mice: PS/2 mouse device common for all mice

i2c /dev entries driver

VS6524: starting probe for adapter Blackfin GPIO based I2C driver (0x10022)

usbcore: registered new interface driver hiddev

usbcore: registered new interface driver usbhid

drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

 

sl811-hcd sl811-hcd.0: request interrupt 58 failed

sl811-hcd sl811-hcd.0: USB bus 1 deregistered

sl811-hcd: probe of sl811-hcd.0 failed with error -22

QuoteReplyEditDelete

 

 

2008-01-07 13:53:23     Re: sl811 USB on BF561

Bill Fassler (UNITED STATES)

Message: 49331    It looks to me that the interrupt for the USB should be a programmable flag and not PF8 which according to irq.h is reserved for syscalls.

 

If I can't get hardware to shuffle this around how much trouble am I going to be in to try to get PF8 to work as I want?

 

Bill

QuoteReplyEditDelete

 

 

2008-01-07 19:41:04     Re: sl811 USB on BF561

Mike Frysinger (UNITED STATES)

Message: 49341    you're confusing things ... PF8 is a programmable flag and a possible GPIO interrupt source which gets arbitrarily mapped to a hardware IVG according to your priority settings in the kernel configuration ... the range of which is IVG7 to IVG13

 

syscalls are triggered by exception 0 ... the exception code will then lower itself to IVG15 for processing the syscall

QuoteReplyEditDelete

 

 

2008-01-08 04:14:24     Re: sl811 USB on BF561

Michael Hennerich (GERMANY)

Message: 49348    Bill,

 

you need to use IRQ numbers for BF561 - IRQ numbers differ between Blackfin derivatives.

 

Either use the define "IRQ_PF8" - or get the correct numbers from here:

 

http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:interrupts#gpio_interrupt_processing

 

-Michael

QuoteReplyEditDelete

 

 

2008-01-08 14:30:53     Re: sl811 USB on BF561

Bill Fassler (UNITED STATES)

Message: 49363    We probed pin 19 (interrupt) of the USB SL811 chip while plugging in and out a USB hub to the host port and slave port(we have both master and slave ports) and the interrupt signal seems to be there for both ports.  It is hooked up to PF8 and I am using IRQ 81 as per the bf561 irq.h.

 

I am using IRQ 84 (PF11) for the Ethernet and although I have some problems with my Ethernet driver it is working at the 10Mb speed (although currently seems to be interfering with our LCD somehow)

 

Granted, I am a little confused. I thought that what I saw in the irq.h file here overlapped what I see for IRQ 73,74 and 75.

 

        Programmable Flags0 A (8)            IVG11        54

        Programmable Flags0 B (8)           IVG11        55

        Programmable Flags1 A (8)           IVG11        56

        Programmable Flags1 B (8)           IVG11        57

        Programmable Flags2 A (8)           IVG11        58

        Programmable Flags2 B (8)           IVG11        59

 

And where I see PF8 = IRQ 81 is below this line

 

#define    IRQ_SW_INT2        72    /* Software Interrupt 2     */

                        /* reserved for SYSCALL */

#define IRQ_PF0            73

#define IRQ_PF1            74

#define IRQ_PF2            75

#define IRQ_PF3            76

#define IRQ_PF4            77

#define IRQ_PF5            78

#define IRQ_PF6            79

#define IRQ_PF7            80

#define IRQ_PF8            81

 

The driver and the device are both detected and registered when I assign IRQ 81 but I see absolutely nothing from the kernel when inserting devices (at the same time I see an interrupt pulse from the chip).  I haven't got something right.  I initially thought that perhaps I needed a pull-up resistor since one time (out of 20 attempts) while probing the kernel recognized the hub (but not the keyboard and/or mouse that was attached to it), but I've never had anything from the kernel if I wasn't probing at the same time.

 

Bill

QuoteReplyEditDelete

 

 

2008-01-08 15:42:58     Re: sl811 USB on BF561

Bill Fassler (UNITED STATES)

Message: 49370    I found one problem with the hardware configuration.  Now that the chip select is properly set to Master I am having much better luck.  I still have issues as you can see, if these look familiar let me know.  At least I have something to go on now....

 

VOCAL> bootm 0x2000000

## Booting image at 02000000 ...

   Image Name:   Linux-2.6.22.14-ADI-2007R2-pre-s

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3525930 Bytes =  3.4 MB

   Load Address: 00100000

   Entry Point:  00292000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... Linux version 2.6.22.14-ADI-2007R2-pre-svn3937

(vocal@Grumpy) (gcc version 4.1.2 (ADI svn)) #209 Wed Jan 2 18:49:11 EST 2008

early printk enabled on early_BFuart0

Hardware Trace Active and Enabled

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF561 Rev 0.5

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 589 MHz core clock and 117 MHz System Clock

Board Memory: 128MB

Kernel Managed Memory: 128MB

Memory map:

  text      = 0x00100000-0x0021e800

  rodata    = 0x0021f000-0x0027c810

  data      = 0x0027d000-0x00292000

    stack   = 0x0027e000-0x00280000

  init      = 0x00292000-0x007eb000

  bss       = 0x007eb000-0x007fb630

  available = 0x007fb630-0x07dff000

  DMA Zone  = 0x07e00000-0x08000000

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists.  Total pages: 32004

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 512 (order: 9, 2048 bytes)

console handover: boot [early_BFuart0] -> real [ttyBF0]

Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

Physical pages: 7dff

Memory available: 119552k/128524k RAM, (5476k init code, 1146k kernel code, 65k

data, 2048k dma)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (15 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 16 KB (8 KB free)

Security Framework v1.0.0 initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

vphone_init(): registering device resources

Generic PHY: Registered new driver

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 4096 (order: 3, 32768 bytes)

TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

TCP: Hash tables configured (established 4096 bind 4096)

TCP reno registered

BF561 Core B driver v0.1 initialized.

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 35) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

SMSC LAN83C185: Registered new driver

Linux video capture interface: v2.00

Initializing camera

VS6524: i2c driver ready

sl811: driver sl811-hcd, 19 May 2005

sl811-hcd sl811-hcd.0: SL811HS v1.5

sl811-hcd sl811-hcd.0: new USB bus registered, assigned bus number 1

sl811-hcd sl811-hcd.0: irq 81, io mem 0x28000000

usb usb1: Product: SL811HS v1.5

usb usb1: Manufacturer: Linux 2.6.22.14-ADI-2007R2-pre-svn3937 sl811-hcd

usb usb1: SerialNumber: sl811-hcd.0

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

mice: PS/2 mouse device common for all mice

i2c /dev entries driver

VS6524: starting probe for adapter Blackfin GPIO based I2C driver (0x10022)

usbcore: registered new interface driver hiddev

usbcore: registered new interface driver usbhid

drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50

2006 UTC).

ASoC version 0.13.1

bfin-wm8750: bf5xx_wm8750_init

bfin-wm8750: bf5xx_probe

WM8750: WM8750 Audio Codec 0.12

dma_alloc_init: dma_page @ 0x07a35000 - 512 pages at 0x07e00000

asoc: WM8750 <-> bf5xx-i2s-0 mapping ok

bfin-wm8750: bf5xx_wm8750_init_dev

Configured Timer2 for codec clock

ALSA device list:

  #0: bf5xx-wm8750 (WM8750)

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

Freeing unused kernel memory: 5476k freed

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.4.1 (2007-12-21 13:04:30 EST) Built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:~> usb 1-1: new full speed USB device using sl811-hcd and address 2

usb 1-1: configuration #1 chosen from 1 choice

hub 1-1:1.0: USB hub found

hub 1-1:1.0: 4 ports detected

usb 1-1.2: new low speed USB device using sl811-hcd and address 3

hub 1-1:1.0: cannot reset port 2 (err = -62)

usb 1-1.2: Manufacturer: Microsoft

usb 1-1.2: configuration #1 chosen from 1 choice

  INPUT[INPUT]

    Field(0)

      Physical(GenericDesktop.Pointer)

      Usage(3)

        Button.0001

        Button.0002

        Button.0003

      Logical Minimum(0)

      Logical Maximum(1)

      Report Size(1)

      Report Count(3)

      Report Offset(0)

      Flags( Variable Absolute )

    Field(1)

      Physical(GenericDesktop.Pointer)

      Usage(3)

        GenericDesktop.X

        GenericDesktop.Y

        GenericDesktop.Wheel

      Logical Minimum(-127)

      Logical Maximum(127)

      Report Size(8)

      Report Count(3)

      Report Offset(8)

      Flags( Variable Relative )

input: Microsoft as /class/input/input0

input: USB HID v1.10 Mouse [Microsoft] on usb-sl811-hcd.0-1.2

hub 1-1:1.0: cannot reset port 3 (err = -62)

usb 1-1.3: new low speed USB device using sl811-hcd and address 4

usb 1-1.3: device descriptor read/all, error -62

usb 1-1.3: new low speed USB device using sl811-hcd and address 5

usb 1-1.3: Product: Comfort Curve Keyboard 2000

usb 1-1.3: Manufacturer: Microsoft

usb 1-1.3: configuration #1 chosen from 1 choice

Data access CPLB miss

- Used by the MMU to signal a CPLB miss on a data access.

Kernel OOPS in progress

Deferred excecption or HW Error context

CURRENT PROCESS:

COMM=   PID=607125504

 

Double Fault

Kernel OOPS in progress

Deferred excecption or HW Error context

CURRENT PROCESS:

COMM=   PID=607125504

TEXT = 0x00000001-0x0000001f  DATA = 0x0000001a-0x0000001f

BSS = 0x0000001f-0x0000001a   USER-STACK = 0x0000001a

 

return address: [0x00102d00]; contents of:

0x00102ce0:

 

SEQUENCER STATUS:

SEQSTAT: 00060024  IPEND: 1acf2a  SYSCFG: 0006

  HWERRCAUSE: 0x18

  EXCAUSE   : 0x24

RETE: <0x00000000> /* Maybe null pointer? */

 

 

U-Boot 1.1.6-svn1079 (ADI-2007R2-pre) (Jan  8 2008 - 09:36:06)

 

CPU:   ADSP bf561-0.5 (Detected Rev: 0.5)

Board: VOCAL BF561 Vphone board

       Support: http://www.vocal.com

Clock: VCO: 589 MHz, Core: 589 MHz, System: 117 MHz

RAM:   128 MB

Flash: 64 MB

In:    serial

Out:   serial

Err:   serial

Net:   LAN9x18 (0x01170002) detected at 0x2c000000

MAC:   00:50:C2:30:77:02

Hit any key to stop autoboot:  0

VOCAL>

QuoteReplyEditDelete

 

 

2008-01-15 14:13:19     Re: sl811 USB on BF561

Bill Fassler (UNITED STATES)

Message: 49606    We made the hardware changes that Mike H. had recommended and now we do have much better luck recognizing when a device is plugged into the USB, but still no visible activity when unplugging the device.  Also as shown previously we had problems, but it looked like it at least saw the mouse and keyboard and now I don't get that.

 

Here is what I saw last week:

 

root:~> usb 1-1: new full speed USB device using sl811-hcd and address 2

usb 1-1: configuration #1 chosen from 1 choice

hub 1-1:1.0: USB hub found

hub 1-1:1.0: 4 ports detected

usb 1-1.2: new low speed USB device using sl811-hcd and address 3

hub 1-1:1.0: cannot reset port 2 (err = -62)

usb 1-1.2: Manufacturer: Microsoft

usb 1-1.2: configuration #1 chosen from 1 choice

  INPUT[INPUT]

    Field(0)

      Physical(GenericDesktop.Pointer)

      Usage(3)

        Button.0001

        Button.0002

        Button.0003

      Logical Minimum(0)

      Logical Maximum(1)

      Report Size(1)

      Report Count(3)

      Report Offset(0)

      Flags( Variable Absolute )

    Field(1)

      Physical(GenericDesktop.Pointer)

      Usage(3)

        GenericDesktop.X

        GenericDesktop.Y

        GenericDesktop.Wheel

      Logical Minimum(-127)

      Logical Maximum(127)

      Report Size(8)

      Report Count(3)

      Report Offset(8)

      Flags( Variable Relative )

input: Microsoft as /class/input/input0

input: USB HID v1.10 Mouse [Microsoft] on usb-sl811-hcd.0-1.2

hub 1-1:1.0: cannot reset port 3 (err = -62)

usb 1-1.3: new low speed USB device using sl811-hcd and address 4

usb 1-1.3: device descriptor read/all, error -62

usb 1-1.3: new low speed USB device using sl811-hcd and address 5

usb 1-1.3: Product: Comfort Curve Keyboard 2000

usb 1-1.3: Manufacturer: Microsoft

usb 1-1.3: configuration #1 chosen from 1 choice

 

Here is what I am seeing now: (In some ways worse than before)

 

root:/mnt/project/uclinux> usb 1-1: new full speed USB device using sl811-hcd an

d address 2

usb 1-1: device descriptor read/64, error -62

usb 1-1: device descriptor read/64, error -62

usb 1-1: new full speed USB device using sl811-hcd and address 3

usb 1-1: device descriptor read/64, error -62

usb 1-1: device descriptor read/64, error -62

usb 1-1: new full speed USB device using sl811-hcd and address 4

usb 1-1: device not accepting address 4, error -62

usb 1-1: new full speed USB device using sl811-hcd and address 5

usb 1-1: device not accepting address 5, error -62

 

I thought I would toss that out in case someone recognizes the symptoms.  I am digging into the code and also seeing if the guy who did the mods left any stray solder or something.....

 

Bill

QuoteReplyEditDelete

 

 

2008-01-15 14:28:31     Re: sl811 USB on BF561

Michael Hennerich (GERMANY)

Message: 49610   

 

Bill,

 

This looks to me like a bus timing issue.

Have a look here:

 

http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:usb_ez-extender&s=sl811#linux_kernel_configuration_isp1362_sl811

 

Make sure you set the dummy access thingy - as well as the EBIU settings for the memory bank you connected the SL811.

 

-Michael

 

 

QuoteReplyEditDelete

 

 

2008-01-15 15:37:30     Re: sl811 USB on BF561

Bill Fassler (UNITED STATES)

Message: 49611    How about power?  My hub seems to be 5V and my standard mouse and keyboard also seem to be 5V, yet the chip is running at 3V and seem to generate power output of 3V.  Could this be a power conflict?

 

Bill

QuoteReplyEditDelete

 

 

2008-01-15 16:01:27     Re: sl811 USB on BF561

Michael Hennerich (GERMANY)

Message: 49615   

 

No -

USB phys. is always 5V - the USB HOST controllers usually have a separate 5V power pin or they may generate 5V internally.

The CPU IO interface is a separate voltage domain - usually 3.3V (1.8V/5V).

 

-Michael

 

 

QuoteReplyEditDelete

 

 

2008-01-15 16:15:35     Re: sl811 USB on BF561

Michael Hennerich (GERMANY)

Message: 49617   

 

In case of the SL811 - I think this part is simply 5V tolerant - 3V output levels should meet the HI/LO specs. of any USB certified part.

 

-Michael

QuoteReplyEditDelete

 

 

2008-01-15 16:53:15     Re: sl811 USB on BF561

Bill Fassler (UNITED STATES)

Message: 49619    We checked the voltage of the BF537-STAMP USB and saw it was 5V going to the devices when our custom board only puts out 3V.  I was hoping this might be the culprit because I still don't have it running right.

 

Bill

QuoteReplyEditDelete

 

 

2008-01-15 17:06:35     Re: sl811 USB on BF561

Michael Hennerich (GERMANY)

Message: 49620   

 

I just saw it - U29 (ADM869) needs to supply 5V to VBUS not 3.3V.

This 5V supply goes directly to the USB Jack and is not connected to the SL811HST.

Sorry I overlooked this flaw.

 

 

-Michael

 

 

QuoteReplyEditDelete

 

 

2008-01-15 17:44:53     Re: sl811 USB on BF561

Bill Fassler (UNITED STATES)

Message: 49621    Thanks Mike.  Hopefully that is the *ONE* flaw that was causing me so much grief.  Damaged a chip on the first attempt to fix this, so you'll have to wait a bit before I can tell you for sure if this fixes all my problems.

 

Regards,

Bill

Attachments

    Outcomes