[U-Boot] USB Host driver for ISP1362?

I am working on a embedded board that uses a BF537 (Blackfin) and ISP1362 USB controller. I want to access a USB flash drive from U-Boot. But I haven't been able to find the drivers for the ISP1362. I have found two other U-Boot target platforms that at least reference the ISP1362:
In include/configs/NSCU.h, I found this:
#define CONFIG_ISP1362_USB /* ISP1362 USB OTG controller */
#ifdef CONFIG_ISP1362_USB #define CONFIG_SYS_ISP1362_BASE 0xD0000000 #define CONFIG_SYS_ISP1362_OR_AM 0xFFFF8000 #define CONFIG_SYS_OR5_ISP1362 \ (CONFIG_SYS_ISP1362_OR_AM | OR_CSNT_SAM | \ OR_ACS_DIV2 | OR_BI | OR_SCY_5_CLK) #define CONFIG_SYS_BR5_ISP1362 \ ((CONFIG_SYS_ISP1362_BASE & BR_BA_MSK) | \ BR_PS_16 | BR_MS_GPCM | BR_V ) #endif
And in board/tqc/tqm8xx/tqm8xx.c:
#ifdef CONFIG_ISP1362_USB memctl->memc_or5 = CONFIG_SYS_OR5_ISP1362; memctl->memc_br5 = CONFIG_SYS_BR5_ISP1362; #endif
The first of those certainly appears to be setting up a driver for the ISP1362, but I haven't been able to find that driver. Any pointers would be greatly appreciated.
Steve

Dear Steve Strobel,
In message CAGrmWbzCR=2sFMJ56B45Fnju78dKeFq+9-LPnH09bxGkwVVMyg@mail.gmail.com you wrote:
I am working on a embedded board that uses a BF537 (Blackfin) and ISP1362 USB controller. I want to access a USB flash drive from U-Boot. But I haven't been able to find the drivers for the ISP1362. I have found two other U-Boot target platforms that at least reference the ISP1362:
In include/configs/NSCU.h, I found this:
#define CONFIG_ISP1362_USB /* ISP1362 USB OTG controller */
...
The first of those certainly appears to be setting up a driver for the ISP1362, but I haven't been able to find that driver. Any pointers would be greatly appreciated.
IIRC these boards use only the host mode of the ISP1362, and this is using just the normal EHCI driver.
Best regards,
Wolfgang Denk

Steve Strobel wrote:
...I want to access a USB flash drive from U-Boot. But I haven't been able to find the drivers for the ISP1362...
On Mon, Oct 15, 2012 at 1:04 PM, Wolfgang Denk wd@denx.de wrote:
IIRC these boards use only the host mode of the ISP1362, and this is using just the normal EHCI driver.
Thanks for the reply. Host mode is all I need, so that is OK. But I think I must still be missing something. I grepped the entire U-Boot tree searching for CONFIG_ISP1362_USB, CONFIG_SYS_ISP and CONFIG_SYS_.R5_ISP and found only the definitions I quoted earlier; they don't seem to be used anywhere. And there is no way it could work without using them as the ISP1362 sits on the data bus as a memory-mapped part and the driver would need to know where to find it.
I thought that maybe the distribution I got from blackfin.uclinux.org [1] is missing some files used by those targets, so I downloaded the latest from ftp.denx.de [2], but found exactly the same things there. Is there somewhere else I should look for the code that implements CONFIG_ISP1362_USB and utilizes the defined addresses? Thanks.
Steve
[1] - I used the latest release listed here http://blackfin.uclinux.org/gf/project/u-boot/frs/ which was and is still u-boot-2011.09-2012R1-RC4.tar.bz2
[2] - ftp://ftp.denx.de/pub/u-boot/. I downloaded and searched u-boot-2012.10.tar.bz2

Dear Steve Strobel,
In message CAGrmWbyvjXRfCP2V-KNYNndt+UTSaQVrGELqXRNVEz+ySYT70w@mail.gmail.com you wrote:
Thanks for the reply. Host mode is all I need, so that is OK. But I think I must still be missing something. I grepped the entire U-Boot tree searching for CONFIG_ISP1362_USB, CONFIG_SYS_ISP and CONFIG_SYS_.R5_ISP and found only the definitions I quoted earlier;
CONFIG_ISP1362_USB is an option used only in the respective board config files, used there to set up a mapping for the respective device memory; if enabled, we define CONFIG_SYS_BR5_ISP1362 and CONFIG_SYS_OR5_ISP1362 which are then used in the code to program the memory controller of the SoC used on these boards as needed; see "board/tqc/tqm8xx/tqm8xx.c"
they don't seem to be used anywhere. And there is no way it could work without using them as the ISP1362 sits on the data bus as a memory-mapped part and the driver would need to know where to find it.
Well, the memory controller does get programmed for a valid mapping, see "board/tqc/tqm8xx/tqm8xx.c".
Is there somewhere else I should look for the code that implements CONFIG_ISP1362_USB and utilizes the defined addresses? Thanks.
There is no "code that implements CONFIG_ISP1362_USB" - this really only makes sure the device is mapped at the right address. But you are right - I don't even see USB enabled in the NSCU board config file. eventually all that gets done is setting up the memory controller (for later use in Linux?).
Sorry, I don't have access to NSCU boards any longer; I cannot verify that this actually works on this hardware.
Best regards,
Wolfgang Denk

On Wed, Oct 17, 2012 at 2:48 AM, Wolfgang Denk wd@denx.de wrote:
CONFIG_ISP1362_USB is an option used only in the respective board config files, used there to set up a mapping for the respective device memory; if enabled, we define CONFIG_SYS_BR5_ISP1362 and CONFIG_SYS_OR5_ISP1362 which are then used in the code to program the memory controller of the SoC used on these boards as needed; see "board/tqc/tqm8xx/tqm8xx.c"
That part is clear to me. I don't think I need to do that on the Blackfin, as the external chip selects have pre-defined addresses (and it doesn't have a MMU).
...And there is no way it could work without using them as the ISP1362 sits on the data bus as a memory-mapped part and the driver would need to know where to find it.
Well, the memory controller does get programmed for a valid mapping, see "board/tqc/tqm8xx/tqm8xx.c"...this really only makes sure the device is mapped at the right address. But you are right - I don't even see USB enabled in the NSCU board config file. eventually all that gets done is setting up the memory controller (for later use in Linux?).
Now that you mention it, it makes sense that they are just setting things up for later use in Linux. I guess I followed a major bunny trail thinking it did more.
If I were to pursue adding ISP1362 support to U-Boot, would it be best to port the Linux driver or is there another way? Would that support need to be built on top of something else like EHCI, or would it sit in parallel with it? FWIW, I think that the ISP1362 Linux driver supports only host mode (not gadget or OTG).
Thank you very much for clearing up my confusion and ending my search for the driver that apparently doesn't exist.
Steve
participants (3)
-
Steve Strobel
-
Steve Strobel
-
Wolfgang Denk