ARM: atmel: add sama5d3xek board support
Subsystems (6)
v2 cover ARM: atmel: add sama5d3xek board support
This patch series add sama5d3xek board support.
Included features
- boot from NAND flash, PMECC support, 4bit ECC @ 512 bytes sector
- boot from SPI flash support
- boot from SD card support
- LCD support
- EMAC support
- USB support
Will do
- Add GMAC support
- Add of control support
Bo Shen (4):
USB: ohci-at91: support sama5d3x devices
NET: macb: support sama5d3x devices
SPI: atmel_spi: support sama5d3x devices
ARM: atmel: add sama5d3xek support
MAINTAINERS | 1 + arch/arm/cpu/armv7/at91/Makefile | 52 +++++ arch/arm/cpu/armv7/at91/clock.c | 127 ++++++++++++ arch/arm/cpu/armv7/at91/cpu.c | 90 +++++++++ arch/arm/cpu/armv7/at91/reset.c | 47 +++++ arch/arm/cpu/armv7/at91/sama5d3_devices.c | 196 ++++++++++++++++++ arch/arm/cpu/armv7/at91/timer.c | 139 +++++++++++++ arch/arm/include/asm/arch-at91/at91_common.h | 1 + arch/arm/include/asm/arch-at91/at91_dbu.h | 4 + arch/arm/include/asm/arch-at91/at91_pmc.h | 23 +++ arch/arm/include/asm/arch-at91/clk.h | 1 + arch/arm/include/asm/arch-at91/hardware.h | 2 + arch/arm/include/asm/arch-at91/sama5d3.h | 212 ++++++++++++++++++++ arch/arm/include/asm/arch-at91/sama5d3_smc.h | 79 ++++++++ board/atmel/sama5d3xek/Makefile | 51 +++++ board/atmel/sama5d3xek/sama5d3xek.c | 277 ++++++++++++++++++++++++++ boards.cfg | 3 + drivers/net/macb.c | 6 +- drivers/spi/atmel_spi.c | 3 +- drivers/usb/host/ohci-at91.c | 14 +- include/configs/sama5d3xek.h | 255 ++++++++++++++++++++++++ 21 files changed, 1578 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv7/at91/Makefile create mode 100644 arch/arm/cpu/armv7/at91/clock.c create mode 100644 arch/arm/cpu/armv7/at91/cpu.c create mode 100644 arch/arm/cpu/armv7/at91/reset.c create mode 100644 arch/arm/cpu/armv7/at91/sama5d3_devices.c create mode 100644 arch/arm/cpu/armv7/at91/timer.c create mode 100644 arch/arm/include/asm/arch-at91/sama5d3.h create mode 100644 arch/arm/include/asm/arch-at91/sama5d3_smc.h create mode 100644 board/atmel/sama5d3xek/Makefile create mode 100644 board/atmel/sama5d3xek/sama5d3xek.c create mode 100644 include/configs/sama5d3xek.h
Signature · 1 line
1.7.9.5
PATCH v2 1/4 USB: ohci-at91: support sama5d3x devices
Add OHCI support for sama5d3x devices
---
change in v2:
- change #if defined to #ifdef for sama5d3
--- drivers/usb/host/ohci-at91.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/usb/host/ohci-at91.c +12 -2
@@ -42,7 +42,7 @@ int usb_cpu_init(void)while ((readl (&pmc->sr) &AT91_PMC_LOCKB ) !=AT91_PMC_LOCKB ) ;#elif defined(CONFIG_AT91SAM9G45 ) || defined(CONFIG_AT91SAM9M10G45 ) || \ - defined(CONFIG_AT91SAM9X5 ) + defined(CONFIG_AT91SAM9X5 ) || defined(CONFIG_SAMA5D3 )/* Enable UPLL */ writel (readl (&pmc->uckr) |AT91_PMC_UPLLEN |AT91_PMC_BIASEN , &pmc->uckr);
@@ -54,7 +54,12 @@ int usb_cpu_init(void)#endif /* Enable USB host clock. */ +#ifdef CONFIG_SAMA5D3 +writel (1 << (ATMEL_ID_UHP -32 ), &pmc->pcer1); +#else writel (1 <<ATMEL_ID_UHP , &pmc->pcer); +#endif +#ifdef CONFIG_AT91SAM9261 writel (ATMEL_PMC_UHP |AT91_PMC_HCK0 , &pmc->scer);#else
@@ -69,7 +74,12 @@ int usb_cpu_stop(void)at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC ;/* Disable USB host clock. */ +#ifdef CONFIG_SAMA5D3 +writel (1 << (ATMEL_ID_UHP -32 ), &pmc->pcdr1); +#else writel (1 <<ATMEL_ID_UHP , &pmc->pcdr); +#endif +#ifdef CONFIG_AT91SAM9261 writel (ATMEL_PMC_UHP |AT91_PMC_HCK0 , &pmc->scdr);#else
@@ -83,7 +93,7 @@ int usb_cpu_stop(void)while ((readl (&pmc->sr) &AT91_PMC_LOCKB ) !=0 ) ;#elif defined(CONFIG_AT91SAM9G45 ) || defined(CONFIG_AT91SAM9M10G45 ) || \ - defined(CONFIG_AT91SAM9X5 ) + defined(CONFIG_AT91SAM9X5 ) || defined(CONFIG_SAMA5D3 )/* Disable UPLL */ writel (readl (&pmc->uckr) & (~AT91_PMC_UPLLEN ), &pmc->uckr);while ((readl (&pmc->sr) &AT91_PMC_LOCKU ) ==AT91_PMC_LOCKU )
Signature · 1 line
1.7.9.5
PATCH v2 1/4 USB: ohci-at91: support sama5d3x devices
Dear Bo Shen,
Quoted 1 line · Bo Shen
Add OHCI support for sama5d3x devices
can you please rebase this patch and send again?
Quoted 23 lines
Signed-off-by Bo Shen <[email protected]>---
change in v2:
- change #if defined to #ifdef for sama5d3--- drivers/usb/host/ohci-at91.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)drivers/usb/host/ohci-at91.c +1
-1@@ -42,7 +42,7 @@ int usb_cpu_init(void)while ((readl (&pmc->sr) &AT91_PMC_LOCKB ) !=AT91_PMC_LOCKB ) ;#elif defined(CONFIG_AT91SAM9G45 ) || defined(CONFIG_AT91SAM9M10G45 ) || \ - defined(CONFIG_AT91SAM9X5 ) + defined(CONFIG_AT91SAM9X5 ) || defined(CONFIG_SAMA5D3 )/* Enable UPLL */ writel (readl (&pmc->uckr) |AT91_PMC_UPLLEN |AT91_PMC_BIASEN , &pmc->uckr);
drivers/usb/host/ohci-at91.c int usb_cpu_init(void) · line 58
Quoted 5 lines
drivers/usb/host/ohci-at91.c +2
-0@@ -54,7 +54,12 @@ int usb_cpu_init(void)#endif /* Enable USB host clock. */ +#ifdef CONFIG_SAMA5D3 +writel (1 << (ATMEL_ID_UHP -32 ), &pmc->pcer1);
Please reorder the patches so that pmc->pcer1 is declared before used.
Best regards
Andreas Bie?mann
PATCH v2 1/4 USB: ohci-at91: support sama5d3x devices
Hi Andreas,
Quoted 6 lines · Andreas Bie?mann
Dear Bo Shen,
Quoted 1 line · Bo Shen
Add OHCI support for sama5d3x devices
can you please rebase this patch and send again?
OK, I will do it at next version.
Quoted 26 lines
Quoted 26 lines
Signed-off-by Bo Shen <[email protected]>---
change in v2:
- change #if defined to #ifdef for sama5d3--- drivers/usb/host/ohci-at91.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)drivers/usb/host/ohci-at91.c +1
-1@@ -42,7 +42,7 @@ int usb_cpu_init(void)while ((readl (&pmc->sr) &AT91_PMC_LOCKB ) !=AT91_PMC_LOCKB ) ; #elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \ - defined(CONFIG_AT91SAM9X5 ) + defined(CONFIG_AT91SAM9X5 ) || defined(CONFIG_SAMA5D3 )/* Enable UPLL */ writel(readl(&pmc->uckr) | AT91_PMC_UPLLEN | AT91_PMC_BIASEN,&pmc->uckr);drivers/usb/host/ohci-at91.c +0
-0@@ -54,7 +54,12 @@ int usb_cpu_init(void)#endif
Quoted 5 lines
drivers/usb/host/ohci-at91.c int usb_cpu_init(void) · line 58
Quoted 3 lines
drivers/usb/host/ohci-at91.c +2
-0/* Enable USB host clock. */ +#ifdef CONFIG_SAMA5D3 +writel (1 << (ATMEL_ID_UHP -32 ), &pmc->pcer1);Please reorder the patches so that
pmc->pcer1is declared before used.
Ok, thanks for figure out this. I will do it at next version.
Quoted 3 lines
Best regards
Andreas Bie?mann
Best Regards,
Bo Shen
PATCH v2 2/4 NET: macb: support sama5d3x devices
In reply to Bo ShenAdd macb support for sama5d3x devices
---
change in v2:
No change
--- drivers/net/macb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/macb.c +4 -2
@@ -469,7 +469,8 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)#if defined(CONFIG_AT91CAP9 ) || defined(CONFIG_AT91SAM9260 ) || \ defined(CONFIG_AT91SAM9263 ) || defined(CONFIG_AT91SAM9G20 ) || \ defined(CONFIG_AT91SAM9G45 ) || defined(CONFIG_AT91SAM9M10G45 ) || \ - defined(CONFIG_AT91SAM9XE ) || defined(CONFIG_AT91SAM9X5 ) + defined(CONFIG_AT91SAM9XE ) || defined(CONFIG_AT91SAM9X5 ) || \ + defined(CONFIG_SAMA5D3 )macb_writel (macb,USRIO ,MACB_BIT (RMII ) |MACB_BIT (CLKEN ));#else macb_writel (macb,USRIO ,0 );
@@ -478,7 +479,8 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)#if defined(CONFIG_AT91CAP9 ) || defined(CONFIG_AT91SAM9260 ) || \ defined(CONFIG_AT91SAM9263 ) || defined(CONFIG_AT91SAM9G20 ) || \ defined(CONFIG_AT91SAM9G45 ) || defined(CONFIG_AT91SAM9M10G45 ) || \ - defined(CONFIG_AT91SAM9XE ) || defined(CONFIG_AT91SAM9X5 ) + defined(CONFIG_AT91SAM9XE ) || defined(CONFIG_AT91SAM9X5 ) || \ + defined(CONFIG_SAMA5D3 )macb_writel (macb,USRIO ,MACB_BIT (CLKEN ));#else macb_writel (macb,USRIO ,MACB_BIT (MII ));
Signature · 1 line
1.7.9.5
PATCH v2 2/4 NET: macb: support sama5d3x devices
Dear Bo Shen,
Quoted 15 lines · Bo Shen
Add macb support for sama5d3x devices
Signed-off-by Bo Shen <[email protected]>---
change in v2:
No change--- drivers/net/macb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/net/macb.c +0
-0
drivers/net/macb.c static int macb_init(struct eth_device *netdev, bd_t *bd) · line 473
Quoted 6 lines
drivers/net/macb.c +2
-1@@ -469,7 +469,8 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)#if defined(CONFIG_AT91CAP9 ) || defined(CONFIG_AT91SAM9260 ) || \ defined(CONFIG_AT91SAM9263 ) || defined(CONFIG_AT91SAM9G20 ) || \ defined(CONFIG_AT91SAM9G45 ) || defined(CONFIG_AT91SAM9M10G45 ) || \ - defined(CONFIG_AT91SAM9XE ) || defined(CONFIG_AT91SAM9X5 ) + defined(CONFIG_AT91SAM9XE ) || defined(CONFIG_AT91SAM9X5 ) || \ + defined(CONFIG_SAMA5D3 )
I would like to apply http://patchwork.ozlabs.org/patch/239064/ instead of this one.
Joe, do you have any objections?
Best regards
Andreas Bie?mann
PATCH v2 2/4 NET: macb: support sama5d3x devices
Quoted 24 lines · Andreas Bie?mann
Dear Bo Shen,
Quoted 20 lines · Bo Shen
Add macb support for sama5d3x devices
Signed-off-by Bo Shen <[email protected]>---
change in v2:
No change--- drivers/net/macb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/net/macb.c +0
-0@@ -469,7 +469,8 @@ static int macb_init(struct eth_device *netdev, bd_t *bd) #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \ defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \ defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
Quoted 8 lines
drivers/net/macb.c static int macb_init(struct eth_device *netdev, bd_t *bd) · line 473
Quoted 3 lines
drivers/net/macb.c +2
-1-defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) +defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) || \ +defined (CONFIG_SAMA5D3 )I would like to apply http://patchwork.ozlabs.org/patch/239064/ instead of this one.
Joe, do you have any objections?
Agreed.
-Joe
PATCH v2 2/4 NET: macb: support sama5d3x devices
Hi Andreas,
Quoted 35 lines · Joe Hershberger
Quoted 24 lines · Andreas Bie?mann
Dear Bo Shen,
Quoted 20 lines · Bo Shen
Add macb support for sama5d3x devices
Signed-off-by Bo Shen <[email protected]>---
change in v2:
No change--- drivers/net/macb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/net/macb.c +0
-0@@ -469,7 +469,8 @@ static int macb_init(struct eth_device *netdev, bd_t *bd) #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \ defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \ defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \Quoted 8 lines
drivers/net/macb.c static int macb_init(struct eth_device *netdev, bd_t *bd) · line 473
Quoted 3 lines
drivers/net/macb.c +2
-1-defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) +defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) || \ +defined (CONFIG_SAMA5D3 )I would like to apply http://patchwork.ozlabs.org/patch/239064/ instead of this one.
Joe, do you have any objections?
Quoted 1 line
Agreed.
Just remind to take this patch: net: macb: using AT91FAMILY replace #ifdeferry (http://patchwork.ozlabs.org/patch/239064/). or else the macb won't work with sama5d3xek board.
Quoted 6 lines
-Joe
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Best Regards,
Bo Shen
PATCH v2 2/4 NET: macb: support sama5d3x devices
Hi Bo,
Quoted 42 lines · Bo Shen
Hi Andreas,
Quoted 39 lines · Joe Hershberger
Quoted 36 lines · Andreas Bie?mann
Dear Bo Shen,
Quoted 23 lines · Bo Shen
Add macb support for sama5d3x devices
Signed-off-by Bo Shen <[email protected]>---
change in v2:
No change--- drivers/net/macb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/net/macb.c +0
-0@@ -469,7 +469,8 @@ static int macb_init(struct eth_device *netdev,
bd_t
*bd)#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \ defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \ defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \drivers/net/macb.c static int macb_init(struct eth_device *netdev, bd_t *bd) · line 473
Quoted 3 lines
drivers/net/macb.c +2
-1-defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) +defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) || \ +defined (CONFIG_SAMA5D3 )I would like to apply http://patchwork.ozlabs.org/patch/239064/
instead of
this one.
Joe, do you have any objections?
Quoted 5 lines
Quoted 1 line
Agreed.
Just remind to take this patch: net: macb: using AT91FAMILY replace #ifdeferry (http://patchwork.ozlabs.org/patch/239064/). or else the macb won't work with sama5d3xek board.
I thought this would go through Joe's tree. There are some patches delegated to him regarding sama5 network too (gmac). I could pick up this single patch however, lets wait some days for Joe to work on the whole series.
Best regards
Andreas Bie?mann
PATCH v2 2/4 NET: macb: support sama5d3x devices
Hi,
Quoted 47 lines · Andreas Bie?mann
Hi Bo,
Quoted 44 lines · Bo Shen
Hi Andreas,
Quoted 40 lines · Joe Hershberger
Quoted 28 lines · Andreas Bie?mann
Dear Bo Shen,
Quoted 24 lines · Bo Shen
Add macb support for sama5d3x devices
Signed-off-by Bo Shen <[email protected]>---
change in v2:
No change--- drivers/net/macb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/net/macb.c +0
-0@@ -469,7 +469,8 @@ static int macb_init(struct eth_device *netdev,
bd_t
*bd)#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \ defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \ defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \ - defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)Quoted 8 lines
drivers/net/macb.c
Quoted 2 lines
drivers/net/macb.c +2
-0+defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) || \ +defined (CONFIG_SAMA5D3 )I would like to apply http://patchwork.ozlabs.org/patch/239064/
instead of
this one.
Joe, do you have any objections?Agreed.
Quoted 8 lines
Quoted 3 lines
Just remind to take this patch: net: macb: using AT91FAMILY replace #ifdeferry (http://patchwork.ozlabs.org/patch/239064/). or else the macb won't work with sama5d3xek board.
I thought this would go through Joe's tree. There are some patches delegated to him regarding sama5 network too (gmac). I could pick up this single patch however, lets wait some days for Joe to work on the whole series.
Yes, I hope to be getting to patches assigned to me in patchwork in the next week or so.
-Joe
PATCH v2 2/4 NET: macb: support sama5d3x devices
Hi Joe,
Quoted 55 lines · Joe Hershberger
Hi,
Quoted 51 lines · Andreas Bie?mann
Hi Bo,
Quoted 47 lines · Bo Shen
Hi Andreas,
Quoted 39 lines · Joe Hershberger
Quoted 28 lines · Andreas Bie?mann
Dear Bo Shen,
Quoted 24 lines · Bo Shen
Add macb support for sama5d3x devices
Signed-off-by Bo Shen <[email protected]>---
change in v2:
No change--- drivers/net/macb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/net/macb.c +0
-0@@ -469,7 +469,8 @@ static int macb_init(struct eth_device *netdev,
bd_t
*bd)#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \ defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \ defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \ - defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)Quoted 8 lines
drivers/net/macb.c
Quoted 2 lines
drivers/net/macb.c +2
-0+defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) || \ +defined (CONFIG_SAMA5D3 )I would like to apply http://patchwork.ozlabs.org/patch/239064/
instead of
this one.
Joe, do you have any objections?Quoted 1 line
Agreed.
Just remind to take this patch: net: macb: using AT91FAMILY replace #ifdeferry (http://patchwork.ozlabs.org/patch/239064/). or else the macb won't work with sama5d3xek board.
Quoted 8 lines
Quoted 4 lines
I thought this would go through Joe's tree. There are some patches delegated to him regarding sama5 network too (gmac). I could pick up this single patch however, lets wait some days for Joe to work on the whole series.
Yes, I hope to be getting to patches assigned to me in patchwork in the next week or so.
When will these patches will be dealt.
Quoted 2 lines
-Joe
Best Regards,
Bo Shen
PATCH v2 2/4 NET: macb: support sama5d3x devices
Hi Bo,
Quoted 77 lines · Bo Shen
Hi Joe,
Quoted 73 lines · Joe Hershberger
Hi,
Quoted 65 lines · Andreas Bie?mann
Hi Bo,
Quoted 49 lines · Bo Shen
Hi Andreas,
Quoted 45 lines · Joe Hershberger
Quoted 40 lines · Andreas Bie?mann
Dear Bo Shen,
Quoted 25 lines · Bo Shen
Add macb support for sama5d3x devices
Signed-off-by Bo Shen <[email protected]>---
change in v2:
No change--- drivers/net/macb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/net/macb.c +0
-0@@ -469,7 +469,8 @@ static int macb_init(struct eth_device *netdev,
bd_t
*bd)#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \ defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \ defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \drivers/net/macb.c
Quoted 3 lines
drivers/net/macb.c +2
-1-defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) +defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) || \ +defined (CONFIG_SAMA5D3 )I would like to apply http://patchwork.ozlabs.org/patch/239064/
instead of
this one.
Joe, do you have any objections?Quoted 6 lines
Quoted 1 line
Agreed.
Just remind to take this patch: net: macb: using AT91FAMILY replace #ifdeferry (http://patchwork.ozlabs.org/patch/239064/). or else the macb won't work with sama5d3xek board.
I thought this would go through Joe's tree. There are some patches delegated to him regarding sama5 network too (gmac). I could pick up this single patch however, lets wait some days for Joe to work on the whole series.
Quoted 5 lines
Quoted 2 lines
Yes, I hope to be getting to patches assigned to me in patchwork in the next week or so.
When will these patches will be dealt.
I've got all the patches in my local repo and I'm build testing them. I'll likely send a PR by the end of today or tomorrow.
Thanks,
-Joe
PATCH v2 2/4 NET: macb: support sama5d3x devices
In reply to Andreas BießmannHi Andreas,
Quoted 47 lines · Andreas Bie?mann
Hi Bo,
Quoted 44 lines · Bo Shen
Hi Andreas,
Quoted 40 lines · Joe Hershberger
Quoted 28 lines · Andreas Bie?mann
Dear Bo Shen,
Quoted 24 lines · Bo Shen
Add macb support for sama5d3x devices
Signed-off-by Bo Shen <[email protected]>---
change in v2:
No change--- drivers/net/macb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/net/macb.c +0
-0@@ -469,7 +469,8 @@ static int macb_init(struct eth_device *netdev,
bd_t
*bd)#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \ defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \ defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \ - defined(CONFIG_AT91SAM9XE) || defined(CONFIG_AT91SAM9X5)Quoted 8 lines
drivers/net/macb.c
Quoted 2 lines
drivers/net/macb.c +2
-0+defined (CONFIG_AT91SAM9XE ) ||defined (CONFIG_AT91SAM9X5 ) || \ +defined (CONFIG_SAMA5D3 )I would like to apply http://patchwork.ozlabs.org/patch/239064/
instead of
this one.
Joe, do you have any objections?Agreed.
Quoted 8 lines
Quoted 3 lines
Just remind to take this patch: net: macb: using AT91FAMILY replace #ifdeferry (http://patchwork.ozlabs.org/patch/239064/). or else the macb won't work with sama5d3xek board.
I thought this would go through Joe's tree. There are some patches delegated to him regarding sama5 network too (gmac). I could pick up this single patch however, lets wait some days for Joe to work on the whole series.
OK, I will wait Joe to take these patches.
Thanks.
Quoted 3 lines
Best regards
Andreas Bie?mann
Best Regards,
Bo Shen
PATCH v2 3/4 SPI: atmel_spi: support sama5d3x devices
In reply to Bo ShenAdd WDRBT bit support for sama5d3x devices
---
Change in v2:
no change
--- drivers/spi/atmel_spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/atmel_spi.c +2 -1
@@ -92,7 +92,8 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, as->slave.cs = cs; as->regs = regs; as->mr = ATMEL_SPI_MR_MSTR | ATMEL_SPI_MR_MODFDIS -#if defined(CONFIG_AT91SAM9X5) || defined(CONFIG_AT91SAM9M10G45) +#if defined(CONFIG_AT91SAM9X5 ) || defined(CONFIG_AT91SAM9M10G45 ) || \ + defined(CONFIG_SAMA5D3) |ATMEL_SPI_MR_WDRBT #endif | ATMEL_SPI_MR_PCS(~(1 << cs) & 0xf);
Signature · 1 line
1.7.9.5
PATCH v2 3/4 SPI: atmel_spi: support sama5d3x devices
Dear Bo Shen,
Quoted 15 lines · Bo Shen
Add WDRBT bit support for sama5d3x devices
Signed-off-by Bo Shen <[email protected]>---
Change in v2:
no change--- drivers/spi/atmel_spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/spi/atmel_spi.c +0
-0
drivers/spi/atmel_spi.c struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, · line 97
Quoted 7 lines
drivers/spi/atmel_spi.c +2
-1@@ -92,7 +92,8 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, as->slave.cs = cs; as->regs = regs; as->mr = ATMEL_SPI_MR_MSTR | ATMEL_SPI_MR_MODFDIS -#if defined(CONFIG_AT91SAM9X5 ) || defined(CONFIG_AT91SAM9M10G45 ) +#if defined(CONFIG_AT91SAM9X5 ) || defined(CONFIG_AT91SAM9M10G45 ) || \ + defined(CONFIG_SAMA5D3 ) | ATMEL_SPI_MR_WDRBT
I will apply http://patchwork.ozlabs.org/patch/237182/ today, please remove this patch from series.
Best regards
Andreas Bie?mann
PATCH v2 4/4 ARM: atmel: add sama5d3xek support
In reply to Bo ShenAdd sama5d3xek support with following feature
- boot from NAND flash, PMECC support, 4bit ECC @ 512 bytes sector
- boot from SPI flash support
- boot from SD card support
- LCD support
- EMAC support
- USB support (OHCI)
---
Change in v2:
- Remove unneeded #undef
- Using string directly
- Add missed copyright
- Using pull up for usart Tx line
- Using pull up for spi cs
- make code more readable in clock.c file
- move LCD higher 8 bit to board file (This is board related)
--- MAINTAINERS | 1 + arch/arm/cpu/armv7/at91/Makefile | 52 +++++ arch/arm/cpu/armv7/at91/clock.c | 127 ++++++++++++ arch/arm/cpu/armv7/at91/cpu.c | 90 +++++++++ arch/arm/cpu/armv7/at91/reset.c | 47 +++++ arch/arm/cpu/armv7/at91/sama5d3_devices.c | 196 ++++++++++++++++++ arch/arm/cpu/armv7/at91/timer.c | 139 +++++++++++++ arch/arm/include/asm/arch-at91/at91_common.h | 1 + arch/arm/include/asm/arch-at91/at91_dbu.h | 4 + arch/arm/include/asm/arch-at91/at91_pmc.h | 23 +++ arch/arm/include/asm/arch-at91/clk.h | 1 + arch/arm/include/asm/arch-at91/hardware.h | 2 + arch/arm/include/asm/arch-at91/sama5d3.h | 212 ++++++++++++++++++++ arch/arm/include/asm/arch-at91/sama5d3_smc.h | 79 ++++++++ board/atmel/sama5d3xek/Makefile | 51 +++++ board/atmel/sama5d3xek/sama5d3xek.c | 277 ++++++++++++++++++++++++++ boards.cfg | 3 + include/configs/sama5d3xek.h | 255 ++++++++++++++++++++++++ 18 files changed, 1560 insertions(+) create mode 100644 arch/arm/cpu/armv7/at91/Makefile create mode 100644 arch/arm/cpu/armv7/at91/clock.c create mode 100644 arch/arm/cpu/armv7/at91/cpu.c create mode 100644 arch/arm/cpu/armv7/at91/reset.c create mode 100644 arch/arm/cpu/armv7/at91/sama5d3_devices.c create mode 100644 arch/arm/cpu/armv7/at91/timer.c create mode 100644 arch/arm/include/asm/arch-at91/sama5d3.h create mode 100644 arch/arm/include/asm/arch-at91/sama5d3_smc.h create mode 100644 board/atmel/sama5d3xek/Makefile create mode 100644 board/atmel/sama5d3xek/sama5d3xek.c create mode 100644 include/configs/sama5d3xek.h
MAINTAINERS +1 -0
@@ -910,6 +910,7 @@ Matt Sealey <[email protected]> Bo Shen <[email protected]> at91sam9x5ek ARM926EJS (AT91SAM9G15,G25,G35,X25,X35 SoC) + sama5d3xek ARMV7 (SAMA5D31, D33, D34, D35 SoC) Michal Simek <[email protected]>
arch/arm/cpu/armv7/at91/Makefile new file +52 -0
52 lines not on this page · raw message
arch/arm/cpu/armv7/at91/clock.c new file +127 -0
127 lines not on this page · raw message
arch/arm/cpu/armv7/at91/cpu.c new file +90 -0
90 lines not on this page · raw message
arch/arm/cpu/armv7/at91/reset.c new file +47 -0
47 lines not on this page · raw message
arch/arm/cpu/armv7/at91/sama5d3_devices.c new file +196 -0
196 lines not on this page · raw message
arch/arm/cpu/armv7/at91/timer.c new file +139 -0
139 lines not on this page · raw message
arch/arm/include/asm/arch-at91/at91_common.h +1 -0
@@ -26,6 +26,7 @@#define AT91_COMMON_H void at91_can_hw_init (void ); +void at91_lcd_hw_init (void );void at91_macb_hw_init (void );void at91_mci_hw_init (void );void at91_serial0_hw_init (void );
arch/arm/include/asm/arch-at91/at91_dbu.h +4 -0
@@ -38,4 +38,8 @@ typedef struct at91_dbu {#define AT91_DBU_CID_ARCH_9xx 0x01900000#define AT91_DBU_CID_ARCH_9XExx 0x02900000 +#define AT91_DBU_CIDR_MASK 0x1f +#define AT91_DBU_CIDR 0x40 +#define AT91_DBU_EXID 0x44 +#endif
arch/arm/include/asm/arch-at91/at91_pmc.h +23 -0
@@ -55,7 +55,16 @@ typedef struct at91_pmc {u32 reserved5[21 ];u32 wpmr;/* 0xE4 Write Protect Mode Register (CAP0) */ u32 wpsr;/* 0xE8 Write Protect Status Register (CAP0) */ +#ifdef CONFIG_SAMA5D3 +u32 reserved6[8 ]; +u32 pcer1;/* 0x100 Periperial Clock Enable Register 1 */ +u32 pcdr1;/* 0x104 Periperial Clock Disable Register 1 */ +u32 pcsr1;/* 0x108 Periperial Clock Status Register 1 */ +u32 pcr;/* 0x10c Periperial Control Register 1 */ +u32 ocr;/* 0x110 Oscillator Calibration Register 1 */ +#else u32 reserved8[5 ]; +#endif } at91_pmc_t;#endif /* end not assembly */
@@ -82,6 +91,16 @@ typedef struct at91_pmc {#define AT91_PMC_MCKR_CSS_PLLB 0x00000003#define AT91_PMC_MCKR_CSS_MASK 0x00000003 +#ifdef CONFIG_SAMA5D3 +#define AT91_PMC_MCKR_PRES_1 0x00000000 +#define AT91_PMC_MCKR_PRES_2 0x00000010 +#define AT91_PMC_MCKR_PRES_4 0x00000020 +#define AT91_PMC_MCKR_PRES_8 0x00000030 +#define AT91_PMC_MCKR_PRES_16 0x00000040 +#define AT91_PMC_MCKR_PRES_32 0x00000050 +#define AT91_PMC_MCKR_PRES_64 0x00000060 +#define AT91_PMC_MCKR_PRES_MASK 0x00000070 +#else #define AT91_PMC_MCKR_PRES_1 0x00000000#define AT91_PMC_MCKR_PRES_2 0x00000004#define AT91_PMC_MCKR_PRES_4 0x00000008
@@ -90,6 +109,7 @@ typedef struct at91_pmc {#define AT91_PMC_MCKR_PRES_32 0x00000014#define AT91_PMC_MCKR_PRES_64 0x00000018#define AT91_PMC_MCKR_PRES_MASK 0x0000001C +#endif #ifdef CONFIG_AT91RM9200 #define AT91_PMC_MCKR_MDIV_1 0x00000000
@@ -100,6 +120,9 @@ typedef struct at91_pmc {#else #define AT91_PMC_MCKR_MDIV_1 0x00000000#define AT91_PMC_MCKR_MDIV_2 0x00000100 +#ifdef CONFIG_SAMA5D3 +#define AT91_PMC_MCKR_MDIV_3 0x00000300 +#endif #define AT91_PMC_MCKR_MDIV_4 0x00000200#define AT91_PMC_MCKR_MDIV_MASK 0x00000300#endif
arch/arm/include/asm/arch-at91/clk.h +1 -0
@@ -95,4 +95,5 @@ static inline unsigned long get_mci_clk_rate(void) }int at91_clock_init (unsigned long main_clock); +void at91_periph_clk_enable (int id);#endif /* __ASM_ARM_ARCH_CLK_H__ */
arch/arm/include/asm/arch-at91/hardware.h +2 -0
@@ -43,6 +43,8 @@# include <asm/arch/at91cap9.h> #elif defined(CONFIG_AT91X40 )# include <asm/arch/at91x40.h> +#elif defined(CONFIG_SAMA5D3 ) +# include <asm/arch/sama5d3.h> #else # error "Unsupported AT91 processor"#endif
arch/arm/include/asm/arch-at91/sama5d3.h new file +212 -0
212 lines not on this page · raw message
arch/arm/include/asm/arch-at91/sama5d3_smc.h new file +79 -0
79 lines not on this page · raw message
board/atmel/sama5d3xek/Makefile new file +51 -0
51 lines not on this page · raw message
board/atmel/sama5d3xek/sama5d3xek.c new file +277 -0
277 lines not on this page · raw message
boards.cfg +3 -0
@@ -241,6 +241,9 @@ am335x_evm_uart3 arm armv7 am335x ti am335x_evm_uart4 arm armv7 am335x ti am33xx am335x_evm:SERIAL5,CONS_INDEX=5 am335x_evm_uart5 arm armv7 am335x ti am33xx am335x_evm:SERIAL6,CONS_INDEX=6 pcm051 arm armv7 pcm051 phytec am33xx pcm051 +sama5d3xek_nandflash arm armv7 sama5d3xek atmel at91 sama5d3xek:SAMA5D3,SYS_USE_NANDFLASH +sama5d3xek_sdcard arm armv7 sama5d3xek atmel at91 sama5d3xek:SAMA5D3,SYS_USE_MMC +sama5d3xek_spiflash arm armv7 sama5d3xek atmel at91 sama5d3xek:SAMA5D3,SYS_USE_SERIALFLASH highbank arm armv7 highbank - highbank mx51_efikamx arm armv7 mx51_efikamx genesi mx5 mx51_efikamx:MACH_TYPE=MACH_TYPE_MX51_EFIKAMX,IMX_CONFIG=board/genesi/mx51_efikamx/imximage_mx.cfg mx51_efikasb arm armv7 mx51_efikamx genesi mx5 mx51_efikamx:MACH_TYPE=MACH_TYPE_MX51_EFIKASB,IMX_CONFIG=board/genesi/mx51_efikamx/imximage_sb.cfg
include/configs/sama5d3xek.h new file +255 -0
255 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 4/4 ARM: atmel: add sama5d3xek support
Dear Bo Shen,
Quoted 7 lines · Bo Shen
Add sama5d3xek support with following feature
- boot from NAND flash, PMECC support, 4bit ECC @ 512 bytes sector
- boot from SPI flash support
- boot from SD card support
- LCD support
- EMAC support
- USB support (OHCI)
no obvious objections here, please just change order order or split the register definition changes out of this one.
Best regards
Andreas Bie?mann
PATCH v2 4/4 ARM: atmel: add sama5d3xek support
Hi Andreas,
Quoted 11 lines · Andreas Bie?mann
Dear Bo Shen,
Quoted 7 lines · Bo Shen
Add sama5d3xek support with following feature
- boot from NAND flash, PMECC support, 4bit ECC @ 512 bytes sector
- boot from SPI flash support
- boot from SD card support
- LCD support
- EMAC support
- USB support (OHCI)
Quoted 2 lines
no obvious objections here, please just change order order or split the register definition changes out of this one.
OK, I will split the register definition changes out for this one.
Quoted 3 lines
Best regards
Andreas Bie?mann
Best Regards,
Bo Shen