board: atmel: add SAMA5D2 PTC Engineering board
cover board: atmel: add SAMA5D2 PTC Engineering board
This board supports booting from NAND Flash and spi Flash.
Wenyou Yang (2):
ARM: at91: sama5d2: add macro & field definitions
board: atmel: add SAMA5D2 PTC Engineering board
arch/arm/mach-at91/Kconfig | 6 + arch/arm/mach-at91/include/mach/sama5_sfr.h | 24 +++ arch/arm/mach-at91/include/mach/sama5d2.h | 5 + board/atmel/sama5d2_ptc/Kconfig | 15 ++ board/atmel/sama5d2_ptc/MAINTAINERS | 7 + board/atmel/sama5d2_ptc/Makefile | 8 + board/atmel/sama5d2_ptc/sama5d2_ptc.c | 285 +++++++++++++++++++++++++++ configs/sama5d2_ptc_nandflash_defconfig | 12 ++ configs/sama5d2_ptc_spiflash_defconfig | 12 ++ include/configs/sama5d2_ptc.h | 155 +++++++++++++++ 10 files changed, 529 insertions(+) create mode 100644 board/atmel/sama5d2_ptc/Kconfig create mode 100644 board/atmel/sama5d2_ptc/MAINTAINERS create mode 100644 board/atmel/sama5d2_ptc/Makefile create mode 100644 board/atmel/sama5d2_ptc/sama5d2_ptc.c create mode 100644 configs/sama5d2_ptc_nandflash_defconfig create mode 100644 configs/sama5d2_ptc_spiflash_defconfig create mode 100644 include/configs/sama5d2_ptc.h
Signature · 1 line
1.7.9.5
PATCH 1/2 ARM: at91: sama5d2: add macro & field definitions
They will be used on SAMA5D2 PTC board.
---
arch/arm/mach-at91/include/mach/sama5_sfr.h | 24 ++++++++++++++++++++++++ arch/arm/mach-at91/include/mach/sama5d2.h | 5 +++++ 2 files changed, 29 insertions(+)
arch/arm/mach-at91/include/mach/sama5_sfr.h +24 -0
@@ -32,6 +32,30 @@ struct atmel_sfr {#define ATMEL_SFR_DDRCFG_FDQIEN 0x00010000#define ATMEL_SFR_DDRCFG_FDQSIEN 0x00020000 +/* Bit field in EBICFG */ +#define AT91_SFR_EBICFG_DRIVE0 (0x3 << 0) +#define AT91_SFR_EBICFG_DRIVE0_LOW (0x0 << 0) +#define AT91_SFR_EBICFG_DRIVE0_MEDIUM (0x2 << 0) +#define AT91_SFR_EBICFG_DRIVE0_HIGH (0x3 << 0) +#define AT91_SFR_EBICFG_PULL0 (0x3 << 2) +#define AT91_SFR_EBICFG_PULL0_UP (0x0 << 2) +#define AT91_SFR_EBICFG_PULL0_NONE (0x1 << 2) +#define AT91_SFR_EBICFG_PULL0_DOWN (0x3 << 2) +#define AT91_SFR_EBICFG_SCH0 (0x1 << 4) +#define AT91_SFR_EBICFG_SCH0_OFF (0x0 << 4) +#define AT91_SFR_EBICFG_SCH0_ON (0x1 << 4) +#define AT91_SFR_EBICFG_DRIVE1 (0x3 << 8) +#define AT91_SFR_EBICFG_DRIVE1_LOW (0x0 << 8) +#define AT91_SFR_EBICFG_DRIVE1_MEDIUM (0x2 << 8) +#define AT91_SFR_EBICFG_DRIVE1_HIGH (0x3 << 8) +#define AT91_SFR_EBICFG_PULL1 (0x3 << 10) +#define AT91_SFR_EBICFG_PULL1_UP (0x0 << 10) +#define AT91_SFR_EBICFG_PULL1_NONE (0x1 << 10) +#define AT91_SFR_EBICFG_PULL1_DOWN (0x3 << 10) +#define AT91_SFR_EBICFG_SCH1 (0x1 << 12) +#define AT91_SFR_EBICFG_SCH1_OFF (0x0 << 12) +#define AT91_SFR_EBICFG_SCH1_ON (0x1 << 12) +/* Bit field in AICREDIR */ #define ATMEL_SFR_AICREDIR_NSAIC 0x00000001
arch/arm/mach-at91/include/mach/sama5d2.h +5 -0
@@ -135,7 +135,11 @@/* * Address Memory Space */ +#define ATMEL_BASE_CS0 0x10000000#define ATMEL_BASE_DDRCS 0x20000000 +#define ATMEL_BASE_CS1 0x60000000 +#define ATMEL_BASE_CS2 0x70000000 +#define ATMEL_BASE_CS3 0x80000000#define ATMEL_BASE_QSPI0_AES_MEM 0x90000000#define ATMEL_BASE_QSPI1_AES_MEM 0x98000000#define ATMEL_BASE_SDMMC0 0xa0000000
@@ -165,6 +169,7 @@*/ #define ATMEL_BASE_PMECC (ATMEL_BASE_HSMC + 0x70)#define ATMEL_BASE_PMERRLOC (ATMEL_BASE_HSMC + 0x500) +#define ATMEL_BASE_SMC (ATMEL_BASE_HSMC + 0x700)#define ATMEL_BASE_PIOB (ATMEL_BASE_PIOA + 0x40)#define ATMEL_BASE_PIOC (ATMEL_BASE_PIOB + 0x40)
Signature · 1 line
1.7.9.5
PATCH 1/2 ARM: at91: sama5d2: add macro & field definitions
Quoted 3 lines · Wenyou Yang
They will be used on SAMA5D2 PTC board.
Signed-off-by Wenyou Yang <[email protected]>
Quoted 5 lines
---
arch/arm/mach-at91/include/mach/sama5_sfr.h | 24 ++++++++++++++++++++++++ arch/arm/mach-at91/include/mach/sama5d2.h | 5 +++++ 2 files changed, 29 insertions(+)
PATCH 1/2 ARM: at91: sama5d2: add macro & field definitions
In reply to Wenyou YangDear Wenyou Yang,
Quoted 9 lines · Wenyou Yang
They will be used on SAMA5D2 PTC board.
Signed-off-by Wenyou Yang <[email protected]>Reviewed-by Andreas Bie?mann <[email protected]>---
arch/arm/mach-at91/include/mach/sama5_sfr.h| 24 ++++++++++++++++++++++++arch/arm/mach-at91/include/mach/sama5d2.h| 5 +++++2 files changed, 29 insertions(+)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
PATCH 2/2 board: atmel: add SAMA5D2 PTC Engineering board
Dear Wenyou Yang,
Quoted 18 lines · Wenyou Yang
The board supports following features:
- Boot media support: NAND Flash/SPI Flash
- Support ethernet
- Support USB mass storageSigned-off-by Wenyou Yang <[email protected]>Reviewed-by Andreas Bie?mann <[email protected]>---
arch/arm/mach-at91/Kconfig | 6 + board/atmel/sama5d2_ptc/Kconfig | 15 ++ board/atmel/sama5d2_ptc/MAINTAINERS | 7 + board/atmel/sama5d2_ptc/Makefile | 8 + board/atmel/sama5d2_ptc/sama5d2_ptc.c | 285 +++++++++++++++++++++++++++++++ configs/sama5d2_ptc_nandflash_defconfig | 12 ++ configs/sama5d2_ptc_spiflash_defconfig | 12 ++ include/configs/sama5d2_ptc.h | 155 +++++++++++++++++ 8 files changed, 500 insertions(+)
Quoted 7 lines
create mode 100644 board/atmel/sama5d2_ptc/Kconfig create mode 100644 board/atmel/sama5d2_ptc/MAINTAINERS create mode 100644 board/atmel/sama5d2_ptc/Makefile create mode 100644
board/atmel/sama5d2_ptc/sama5d2_ptc.ccreate mode 100644 configs/sama5d2_ptc_nandflash_defconfig create mode 100644 configs/sama5d2_ptc_spiflash_defconfig create mode 100644include/configs/sama5d2_ptc.h
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
[U-Boot] board: atmel: sama5d2_xplained: fix the missing pin config of SDMMC0
In reply to Andreas BießmannDear Wenyou Yang,
Quoted 8 lines · Wenyou Yang
Fix the missing pin config of the SDMMC0 interface.
Signed-off-by Wenyou Yang <[email protected]>Reviewed-by Andreas Bie?mann <[email protected]>---
board/atmel/sama5d2_xplained/sama5d2_xplained.c| 1 +1 file changed, 1 insertion(+)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
PATCH 1/3 ARM: at91: clock: fix the GCK's clock source
In reply to Andreas BießmannDear Wenyou Yang,
Quoted 9 lines · Wenyou Yang
Before enabling a generated clock whose source is from the UPLL clock, check and enable the UPLL clock.
Signed-off-by Wenyou Yang <[email protected]>Reviewed-by Andreas Bie?mann <[email protected]>---
arch/arm/mach-at91/armv7/clock.c| 5 +++++1 file changed, 5 insertions(+)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
PATCH 2/3 ARM: at91: clock: complete the GCK's clock sources
In reply to Andreas BießmannDear Wenyou Yang,
Quoted 10 lines · Wenyou Yang
Add the UPLL clock and master clock as a clock source for getting the generated clock frequency to complete its clock sources support.
Signed-off-by Wenyou Yang <[email protected]>Reviewed-by Andreas Bie?mann <[email protected]>---
arch/arm/mach-at91/armv7/clock.c| 6 ++++++arch/arm/mach-at91/include/mach/clk.h| 2 ++2 files changed, 8 insertions(+)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
PATCH 3/3 board: sama5d2_xplained: change SDHCI GCK's clock source to UPLL
In reply to Andreas BießmannDear Wenyou Yang,
Quoted 9 lines · Wenyou Yang
Change the clock source of the SDHCI's generated clock from PLLA to UPLL clock to align to Linux driver.
Signed-off-by Wenyou Yang <[email protected]>Reviewed-by Andreas Bie?mann <[email protected]>---
board/atmel/sama5d2_xplained/sama5d2_xplained.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
[U-Boot] ARM: atmel: Enable FIT image support for SAMA5Dx
In reply to Andreas BießmannDear Marek Vasut,
Quoted 11 lines · Marek Vasut
Enable the fitImage support for the entire SAMA5Dx lineup of CPUs. The fitImage is superior image format to uImage and it is useful to have it available.
Signed-off-by Marek Vasut <[email protected]>Cc Andreas Bie?mann <[email protected]>Cc Wenyou Yang <[email protected]>Reviewed-by Andreas Bie?mann <[email protected]>[rebase on current ToT]Signed-off-by Andreas Bie?mann <[email protected]>---
Quoted 14 lines
configs/sama5d2_xplained_mmc_defconfig | 1 + configs/sama5d2_xplained_spiflash_defconfig | 1 + configs/sama5d3_xplained_mmc_defconfig | 1 + configs/sama5d3_xplained_nandflash_defconfig | 1 + configs/sama5d3xek_mmc_defconfig | 1 + configs/sama5d3xek_nandflash_defconfig | 1 + configs/sama5d3xek_spiflash_defconfig | 1 + configs/sama5d4_xplained_mmc_defconfig | 1 + configs/sama5d4_xplained_nandflash_defconfig | 1 + configs/sama5d4_xplained_spiflash_defconfig | 1 + configs/sama5d4ek_mmc_defconfig | 1 + configs/sama5d4ek_nandflash_defconfig | 1 + configs/sama5d4ek_spiflash_defconfig | 1 + 13 files changed, 13 insertions(+)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
[U-Boot] ARM: sama5d2: Implement boot device autodetection
In reply to Andreas BießmannDear Marek Vasut,
Quoted 17 lines · Marek Vasut
Implement support for saving ARM register R4 early during boot using
save_boot_params. Implement support for decoding the stored register R4 value inspl_boot_device()to obtain boot device from which the SoC booted. This way, the SPL will always load U-Boot from the same device from which the SPL itself booted instead of using hard-coded boot device.This functionality is useful for example when booting sama5d2-xplained from SD card, where by default the SPL would try loading the U-Boot from eMMC and fail. This is because eMMC is on SDHCI0 (
BOOT_DEVICE_MMC1), while SD slot is on SDHCI1 (BOOT_DEVICE_MMC2) and the SPL was hard-wired to always boot fromBOOT_DEVICE_MMC1.Signed-off-by Marek Vasut <[email protected]>Cc Andreas Bie?mann <[email protected]>Cc Wenyou Yang <[email protected]>Reviewed-by Andreas Bie?mann <[email protected]>
Quoted 7 lines
---
arch/arm/mach-at91/Makefile | 2 +- arch/arm/mach-at91/bootparams_atmel.S | 18 ++++++++++++++++ arch/arm/mach-at91/include/mach/sama5d2.h | 12 +++++++++++ arch/arm/mach-at91/spl.c | 36 +++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 1 deletion(-)create mode 100644
arch/arm/mach-at91/bootparams_atmel.S
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
PATCH 2/2 board: atmel: add SAMA5D2 PTC Engineering board
In reply to Wenyou YangThe board supports following features:
- Boot media support: NAND Flash/SPI Flash
- Support ethernet
- Support USB mass storage
---
arch/arm/mach-at91/Kconfig | 6 + board/atmel/sama5d2_ptc/Kconfig | 15 ++ board/atmel/sama5d2_ptc/MAINTAINERS | 7 + board/atmel/sama5d2_ptc/Makefile | 8 + board/atmel/sama5d2_ptc/sama5d2_ptc.c | 285 +++++++++++++++++++++++++++++++ configs/sama5d2_ptc_nandflash_defconfig | 12 ++ configs/sama5d2_ptc_spiflash_defconfig | 12 ++ include/configs/sama5d2_ptc.h | 155 +++++++++++++++++ 8 files changed, 500 insertions(+) create mode 100644 board/atmel/sama5d2_ptc/Kconfig create mode 100644 board/atmel/sama5d2_ptc/MAINTAINERS create mode 100644 board/atmel/sama5d2_ptc/Makefile create mode 100644 board/atmel/sama5d2_ptc/sama5d2_ptc.c create mode 100644 configs/sama5d2_ptc_nandflash_defconfig create mode 100644 configs/sama5d2_ptc_spiflash_defconfig create mode 100644 include/configs/sama5d2_ptc.h
arch/arm/mach-at91/Kconfig +6 -0
@@ -71,6 +71,11 @@ config TARGET_AT91SAM9X5EK select CPU_ARM926EJS select SUPPORT_SPL +config TARGET_SAMA5D2_PTC + bool "SAMA5D2 PTC board" + select CPU_V7 + select SUPPORT_SPL + config TARGET_SAMA5D2_XPLAINED bool "SAMA5D2 Xplained board" select CPU_V7
@@ -138,6 +143,7 @@ source "board/atmel/at91sam9m10g45ek/Kconfig" source "board/atmel/at91sam9n12ek/Kconfig" source "board/atmel/at91sam9rlek/Kconfig" source "board/atmel/at91sam9x5ek/Kconfig" +source "board/atmel/sama5d2_ptc/Kconfig" source "board/atmel/sama5d2_xplained/Kconfig" source "board/atmel/sama5d3_xplained/Kconfig" source "board/atmel/sama5d3xek/Kconfig"
board/atmel/sama5d2_ptc/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_SAMA5D2_PTC + +config SYS_BOARD + default "sama5d2_ptc" + +config SYS_VENDOR + default "atmel" + +config SYS_SOC + default "at91" + +config SYS_CONFIG_NAME + default "sama5d2_ptc" + +endif
board/atmel/sama5d2_ptc/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +SAMA5D2 PTC Engineering BOARD +M: Wenyou Yang <[email protected]> +S: Maintained +F: board/atmel/sama5d2_ptc/ +F: include/configs/sama5d2_ptc.h +F: configs/sama5d2_ptc_spiflash_defconfig +F: configs/sama5d2_ptc_nandflash_defconfig
board/atmel/sama5d2_ptc/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# Copyright (C) 2016 Atmel +# Wenyou Yang <[email protected]> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += sama5d2_ptc.o
board/atmel/sama5d2_ptc/sama5d2_ptc.c new file +285 -0
285 lines not on this page · raw message
configs/sama5d2_ptc_nandflash_defconfig new file +12 -0
@@ -0,0 +1,12 @@ +CONFIG_ARM=y +CONFIG_ARCH_AT91=y +CONFIG_TARGET_SAMA5D2_PTC=y +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_NANDFLASH" +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_IMLS is not set +# CONFIG_CMD_LOADS is not set +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_SF=y +# CONFIG_CMD_FPGA is not set +CONFIG_SPI_FLASH=y
configs/sama5d2_ptc_spiflash_defconfig new file +12 -0
@@ -0,0 +1,12 @@ +CONFIG_ARM=y +CONFIG_ARCH_AT91=y +CONFIG_TARGET_SAMA5D2_PTC=y +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH" +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_IMLS is not set +# CONFIG_CMD_LOADS is not set +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_SF=y +# CONFIG_CMD_FPGA is not set +CONFIG_SPI_FLASH=y
include/configs/sama5d2_ptc.h new file +155 -0
155 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 2/2 board: atmel: add SAMA5D2 PTC Engineering board
Quoted 6 lines · Wenyou Yang
The board supports following features:
- Boot media support: NAND Flash/SPI Flash
- Support ethernet
- Support USB mass storageSigned-off-by Wenyou Yang <[email protected]>
Quoted 18 lines
---
arch/arm/mach-at91/Kconfig | 6 + board/atmel/sama5d2_ptc/Kconfig | 15 ++ board/atmel/sama5d2_ptc/MAINTAINERS | 7 + board/atmel/sama5d2_ptc/Makefile | 8 + board/atmel/sama5d2_ptc/sama5d2_ptc.c | 285 +++++++++++++++++++++++++++++++ configs/sama5d2_ptc_nandflash_defconfig | 12 ++ configs/sama5d2_ptc_spiflash_defconfig | 12 ++ include/configs/sama5d2_ptc.h | 155 +++++++++++++++++ 8 files changed, 500 insertions(+) create mode 100644 board/atmel/sama5d2_ptc/Kconfig create mode 100644 board/atmel/sama5d2_ptc/MAINTAINERS create mode 100644 board/atmel/sama5d2_ptc/Makefile create mode 100644 board/atmel/sama5d2_ptc/sama5d2_ptc.c create mode 100644 configs/sama5d2_ptc_nandflash_defconfig create mode 100644 configs/sama5d2_ptc_spiflash_defconfig create mode 100644 include/configs/sama5d2_ptc.h