All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] arm: at91: support for the Calao USB-A9263 board (based on AT91SAM9263)
Date: Tue, 12 Nov 2013 09:53:12 +0100	[thread overview]
Message-ID: <5281EC78.3040506@denx.de> (raw)
In-Reply-To: <5280B99C.1070702@gmail.com>

Hello Andreas,

Am 11.11.2013 12:03, schrieb Andreas Bie?mann:
> Dear Mateusz Kulikowski,
>
> On 11/02/2013 12:19 AM, Mateusz Kulikowski wrote:
>> Add support for USB-A9263 board manufactured by Calao Systems
>> (http://www.calao-systems.com/).
>> Code is based on old U-Boot sources (2010.09) released by Calao and
>> existing AT92SAM9263-EK code.
>>
>> Signed-off-by: Mateusz Kulikowski<mateusz.kulikowski@gmail.com>
>> ---
>>   board/calao/usb_a9263/Makefile    |  34 ++++++++
>>   board/calao/usb_a9263/usb_a9263.c | 167 +++++++++++++++++++++++++++++++++++++
>>   boards.cfg                        |   1 +
>>   include/configs/usb_a9263.h       | 168 ++++++++++++++++++++++++++++++++++++++
>>   4 files changed, 370 insertions(+)
>>   create mode 100644 board/calao/usb_a9263/Makefile
>>   create mode 100644 board/calao/usb_a9263/usb_a9263.c
>>   create mode 100644 include/configs/usb_a9263.h
>>
[...]
>> diff --git a/board/calao/usb_a9263/usb_a9263.c b/board/calao/usb_a9263/usb_a9263.c
>> new file mode 100644
>> index 0000000..bbc1e25
>> --- /dev/null
>> +++ b/board/calao/usb_a9263/usb_a9263.c
>> @@ -0,0 +1,167 @@
[...]
>> +#ifdef CONFIG_MACB
>> +static void usb_a9263_macb_hw_init(void)
>> +{
>> +	unsigned long erstl;
>> +	at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC;
>> +	at91_rstc_t *rstc = (at91_rstc_t *)ATMEL_BASE_RSTC;
>> +
>> +	/* Enable clock */
>> +	writel(1<<  ATMEL_ID_EMAC,&pmc->pcer);
>> +
>> +	/*
>> +	 * Disable pull-up on:
>> +	 *  RXDV (PC25) =>  PHY normal mode (not Test mode)
>> +	 *  ERX0 (PE25) =>  PHY ADDR0
>> +	 *  ERX1 (PE26) =>  PHY ADDR1 =>  PHYADDR = 0x0
>> +	 *
>> +	 * PHY has internal pull-down
>> +	 */
>> +	at91_set_pio_pullup(AT91_PIO_PORTC, 25, 0);
>> +	at91_set_pio_pullup(AT91_PIO_PORTE, 25, 0);
>> +	at91_set_pio_pullup(AT91_PIO_PORTE, 26, 0);
>> +
>> +	erstl = readl(&rstc->mr)&  AT91_RSTC_MR_ERSTL_MASK;
>> +
>> +	/* Need to reset PHY ->  500ms reset */
>> +	writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(0x0D) |
>> +	       AT91_RSTC_MR_URSTEN,&rstc->mr);
>> +
>> +	writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST,&rstc->cr);
>> +
>> +	/* Wait for end hardware reset */
>> +	while (!(readl(&rstc->sr)&  AT91_RSTC_SR_NRSTL))
>> +		;
>> +
>> +	/* Restore NRST value */
>> +	writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN,&rstc->mr);
>> +
>> +	/* Re-enable pull-up */
>> +	at91_set_pio_pullup(AT91_PIO_PORTC, 25, 1);
>> +	at91_set_pio_pullup(AT91_PIO_PORTE, 25, 1);
>> +	at91_set_pio_pullup(AT91_PIO_PORTE, 26, 1);
>> +
>> +	at91_macb_hw_init();
>
> Heiko proposed a solution for unifying macb reset sequence.
>
> @Heiko will you send another patch?

I thought I wait for your GPIO update patches, and rebase my patch-
serie for the siemens boards on them ...

Ok, based on the spl patches from bo shen, see

http://lists.denx.de/pipermail/u-boot/2013-November/166272.html

I can sent soon the "phy_reset" patch, if the patch passes a
"MAKEALL" ;-)

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2013-11-12  8:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-27 19:34 [U-Boot] [PATCH] arm: at91: support for the Calao USB-A9263 board (based on AT91SAM9263) Mateusz Kulikowski
2013-10-28  4:57 ` Bo Shen
2013-10-28 21:30   ` Mateusz Kulikowski
2013-10-29  5:20     ` Heiko Schocher
2013-10-30 18:03       ` Mateusz Kulikowski
2013-10-29  5:24     ` Bo Shen
2013-10-29  5:54       ` Heiko Schocher
2013-10-30 18:17       ` Mateusz Kulikowski
2013-10-29  6:26     ` Andreas Bießmann
2013-10-29  6:35       ` Heiko Schocher
2013-10-29  9:12   ` Andreas Bießmann
2013-11-01 19:26     ` Mateusz Kulikowski
2013-11-04  9:36       ` Andreas Bießmann
2013-11-01 23:19     ` [U-Boot] [PATCH v2] " Mateusz Kulikowski
2013-11-11 11:03       ` Andreas Bießmann
2013-11-12  8:53         ` Heiko Schocher [this message]
2013-11-28 21:29         ` Mateusz Kulikowski
2013-11-29 11:31           ` Andreas Bießmann
2013-12-02 22:30             ` [U-Boot] [PATCH v3] " Mateusz Kulikowski
2013-12-09 12:39               ` [U-Boot] [U-Boot, " Andreas Bießmann

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=5281EC78.3040506@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /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.