All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tiemo Krueger - mycable GmbH <tk@mycable.de>
To: bruno randolf <br1@4g-systems.biz>
Cc: linux-mips@linux-mips.org
Subject: Re: Mycable XXS board
Date: Tue, 11 Mar 2003 16:59:17 +0100	[thread overview]
Message-ID: <3E6E07D5.60306@mycable.de> (raw)
In-Reply-To: <3E689267.3070509@prosyst.bg>

Hi Bruno, Hi group!

There is a separate power switch on the mycable XXS1500 Board:

1. GPIO1  switch on UART3
2.  Enable UART3
3.  Set DTR from UART3 to low-level

The voltage switch for USB is controlled by the unused DTR line of the 
Au1500.

below the code we use with QNX for this procedure:

/*-------------------------------------------------------------------------*/
/*                                                                         
*/
/*  
main                                                                   */
/*                                                                         
*/
/*  action: enable and start AU1500 onchip USB 
controller                  */
/*                                                                         
*/
/*  passing param.  : 
-none-                                               */
/*  global  param.  : 
-none-                                               */
/*  return  param.  : 
-none-                                               */
/*                                                                         
*/
/*  programmer      : 
JR                                                   */
/*                                                                         
*/
/*  04.03.03  JR    : build this 
function                                  */
/*                                                                         
*/
/*-------------------------------------------------------------------------*/

int main(int argc, char *argv[]) {
   
    volatile uint32_t *sysctrlptr;
    volatile uint32_t *uart3_mdmptr;
    volatile uint32_t *usb_baseptr;
   
   
    printf("Prepare AU1500 onchip USB host controller\n");
    printf("  map memory\n");
    sysctrlptr = mmap_device_memory(NULL, 1000, 
PROT_READ|PROT_WRITE|PROT_NOCACHE, 0, 0x011900000);
    if ( sysctrlptr == MAP_FAILED ) {
        perror( "couldn't map sysctrl mem.\n" );
        exit( EXIT_FAILURE );
    }
    uart3_mdmptr = mmap_device_memory(NULL, 1000, 
PROT_READ|PROT_WRITE|PROT_NOCACHE, 0, 0x011400000);
    if ( uart3_mdmptr == MAP_FAILED ) {
        perror( "couldn't map uart3 mem.\n" );
        exit( EXIT_FAILURE );
    }
    usb_baseptr = mmap_device_memory(NULL, 0x80000, 
PROT_READ|PROT_WRITE|PROT_NOCACHE, 0, 0x010100000);
    if ( usb_baseptr == MAP_FAILED ) {
        perror( "couldn't map usb mem.\n" );
        exit( EXIT_FAILURE );
    }

    // configure some multiple use pins for UART3
    sysctrlptr[0x2c/4] |= (1 << 7);  // sys_pinctrl
   
    printf("  power on\n");
    uart3_mdmptr[0x100/4] |= 0x01;    // CE
    delay(10);
    uart3_mdmptr[0x100/4] |= 0x03;    // CE | EN
    delay(10);
    uart3_mdmptr[0x18/4]  |= 0x01;    // power on
   
    // enable usb OCHI controller
    usb_baseptr[0x7fffc/4] = 0x08;    // CE
    delay(10);
    usb_baseptr[0x7fffc/4] = 0x0c ;    // CE | EN
    delay(10);
    // clear HCFS bits in HcControl
    usb_baseptr[0x0004/4] = 0x00; 
   
    while ((usb_baseptr[0x7fffc/4] & 0x10) == 0); // wait for reset done
   
    printf("  USB OHCI ver. 0x%x\n", usb_baseptr[0]);
   
    return EXIT_SUCCESS;
}

Tiemo

-- 
-------------------------------------------------------
Tiemo Krueger       Tel:  +49 48 73 90 19 86
mycable GmbH        Fax: +49 48 73 90 19 76
Boeker Stieg 43
D-24613 Aukrug      eMail: tk@mycable.de

Public Kryptographic Key is available on request
-------------------------------------------------------


Pete Popov wrote:

>On Tue, 2003-03-11 at 02:30, Bruno Randolf wrote:
>  
>
>>On Friday 07 March 2003 22:54, Dan Malek wrote:
>>
>>    
>>
>>>That's what I wanted to clarify.  Are we discussing one of the on-chip
>>>peripheral USB controllers of the Au1xxx, or is it a PCI USB controller
>>>that was plugged into the Au1500.  In the case of the on-chip controller,
>>>there aren't any interrupt routing problems, it's identical (and the same
>>>code) on all Au1xxx boards.
>>>      
>>>
>>we are discussing the on-chip USB controller for the mycable board. and its 
>>little endian...
>>
>>any ideas where the assignment errors could come from in this case?
>>    
>>
>
>There wouldn't be any. So the problem is not irq assignment related.
>
>I'm not what to suggest here but it feels like it might be a hardware
>issue.  Try adding some printks (the abatron bdi jtag debugger works
>great if you have one) and narrow down what's going on. Do you have any
>jumpers on the board that are not setup correctly?
>
>
>Pete
>
>
>
>  
>


-- 
-------------------------------------------------------
Tiemo Krueger       Tel:  +49 48 73 90 19 86
mycable GmbH        Fax: +49 48 73 90 19 76
Boeker Stieg 43
D-24613 Aukrug      eMail: tk@mycable.de

Public Kryptographic Key is available on request
-------------------------------------------------------

  parent reply	other threads:[~2003-03-11 15:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-07 12:36 Mycable XXS board Alexander Popov
2003-03-07 12:40 ` Pete Popov
2003-03-07 15:47   ` Bruno Randolf
2003-03-07 18:13     ` Jun Sun
2003-03-07 20:12       ` Dan Malek
2003-03-07 21:39         ` Jun Sun
2003-03-07 21:54           ` Dan Malek
2003-03-11 10:30             ` Bruno Randolf
2003-03-11 15:17               ` Pete Popov
2003-03-11 21:43                 ` Eric DeVolder
2003-03-11 21:57                   ` Dan Malek
2003-03-13 13:08                     ` Bruno Randolf
2003-03-13 16:03                       ` Dan Malek
2003-03-13 17:23                         ` Bruno Randolf
2003-03-13 17:50                           ` Dan Malek
2003-03-13 18:07                             ` Pete Popov
2003-03-11 15:59 ` Tiemo Krueger - mycable GmbH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-03-10  8:27 Tiemo Krueger - mycable GmbH
2003-03-10  8:33 Tiemo Krueger - mycable GmbH
2003-03-10  9:41 ` Alexander Popov
2003-03-10  9:41   ` Alexander Popov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E6E07D5.60306@mycable.de \
    --to=tk@mycable.de \
    --cc=br1@4g-systems.biz \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.