diff options
Diffstat (limited to 'roms/u-boot/board/atmel/at91sam9260ek')
-rw-r--r-- | roms/u-boot/board/atmel/at91sam9260ek/Kconfig | 12 | ||||
-rw-r--r-- | roms/u-boot/board/atmel/at91sam9260ek/MAINTAINERS | 17 | ||||
-rw-r--r-- | roms/u-boot/board/atmel/at91sam9260ek/Makefile | 11 | ||||
-rw-r--r-- | roms/u-boot/board/atmel/at91sam9260ek/at91sam9260ek.c | 107 | ||||
-rw-r--r-- | roms/u-boot/board/atmel/at91sam9260ek/led.c | 22 |
5 files changed, 169 insertions, 0 deletions
diff --git a/roms/u-boot/board/atmel/at91sam9260ek/Kconfig b/roms/u-boot/board/atmel/at91sam9260ek/Kconfig new file mode 100644 index 000000000..3844f086b --- /dev/null +++ b/roms/u-boot/board/atmel/at91sam9260ek/Kconfig @@ -0,0 +1,12 @@ +if TARGET_AT91SAM9260EK + +config SYS_BOARD + default "at91sam9260ek" + +config SYS_VENDOR + default "atmel" + +config SYS_CONFIG_NAME + default "at91sam9260ek" + +endif diff --git a/roms/u-boot/board/atmel/at91sam9260ek/MAINTAINERS b/roms/u-boot/board/atmel/at91sam9260ek/MAINTAINERS new file mode 100644 index 000000000..aa7898ef7 --- /dev/null +++ b/roms/u-boot/board/atmel/at91sam9260ek/MAINTAINERS @@ -0,0 +1,17 @@ +AT91SAM9260EK BOARD +M: Stelian Pop <stelian@popies.net> +S: Maintained +F: board/atmel/at91sam9260ek/ +F: include/configs/at91sam9260ek.h +F: configs/at91sam9260ek_dataflash_cs0_defconfig +F: configs/at91sam9260ek_dataflash_cs1_defconfig +F: configs/at91sam9260ek_nandflash_defconfig +F: configs/at91sam9g20ek_2mmc_nandflash_defconfig +F: configs/at91sam9g20ek_dataflash_cs0_defconfig +F: configs/at91sam9g20ek_dataflash_cs1_defconfig +F: configs/at91sam9g20ek_mmc_defconfig +F: configs/at91sam9g20ek_2mmc_defconfig +F: configs/at91sam9g20ek_nandflash_defconfig +F: configs/at91sam9xeek_dataflash_cs0_defconfig +F: configs/at91sam9xeek_dataflash_cs1_defconfig +F: configs/at91sam9xeek_nandflash_defconfig diff --git a/roms/u-boot/board/atmel/at91sam9260ek/Makefile b/roms/u-boot/board/atmel/at91sam9260ek/Makefile new file mode 100644 index 000000000..56cac9750 --- /dev/null +++ b/roms/u-boot/board/atmel/at91sam9260ek/Makefile @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2003-2008 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +# +# (C) Copyright 2008 +# Stelian Pop <stelian@popies.net> +# Lead Tech Design <www.leadtechdesign.com> + +obj-y += at91sam9260ek.o +obj-$(CONFIG_AT91_LED) += led.o diff --git a/roms/u-boot/board/atmel/at91sam9260ek/at91sam9260ek.c b/roms/u-boot/board/atmel/at91sam9260ek/at91sam9260ek.c new file mode 100644 index 000000000..38f97bce2 --- /dev/null +++ b/roms/u-boot/board/atmel/at91sam9260ek/at91sam9260ek.c @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2007-2008 + * Stelian Pop <stelian@popies.net> + * Lead Tech Design <www.leadtechdesign.com> + */ + +#include <common.h> +#include <debug_uart.h> +#include <init.h> +#include <net.h> +#include <asm/global_data.h> +#include <asm/io.h> +#include <asm/arch/at91sam9260_matrix.h> +#include <asm/arch/at91sam9_smc.h> +#include <asm/arch/at91_common.h> +#include <asm/arch/clk.h> +#include <asm/arch/gpio.h> + +DECLARE_GLOBAL_DATA_PTR; + +/* ------------------------------------------------------------------------- */ +/* + * Miscelaneous platform dependent initialisations + */ + +#ifdef CONFIG_CMD_NAND +static void at91sam9260ek_nand_hw_init(void) +{ + struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC; + struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX; + unsigned long csa; + + /* Assign CS3 to NAND/SmartMedia Interface */ + csa = readl(&matrix->ebicsa); + csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA; + writel(csa, &matrix->ebicsa); + + /* Configure SMC CS3 for NAND/SmartMedia */ + writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) | + AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0), + &smc->cs[3].setup); + writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) | + AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3), + &smc->cs[3].pulse); + writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5), + &smc->cs[3].cycle); + writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE | + AT91_SMC_MODE_EXNW_DISABLE | +#ifdef CONFIG_SYS_NAND_DBW_16 + AT91_SMC_MODE_DBW_16 | +#else /* CONFIG_SYS_NAND_DBW_8 */ + AT91_SMC_MODE_DBW_8 | +#endif + AT91_SMC_MODE_TDF_CYCLE(2), + &smc->cs[3].mode); + + /* Configure RDY/BSY */ + at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1); + + /* Enable NandFlash */ + at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1); + +} +#endif + +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init(void) +{ + at91_seriald_hw_init(); +} +#endif + +#ifdef CONFIG_BOARD_EARLY_INIT_F +int board_early_init_f(void) +{ +#ifdef CONFIG_DEBUG_UART + debug_uart_init(); +#endif + return 0; +} +#endif + +int board_init(void) +{ + /* adress of boot parameters */ + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + +#ifdef CONFIG_CMD_NAND + at91sam9260ek_nand_hw_init(); +#endif + return 0; +} + +int dram_init(void) +{ + gd->ram_size = get_ram_size( + (void *)CONFIG_SYS_SDRAM_BASE, + CONFIG_SYS_SDRAM_SIZE); + return 0; +} + +#ifdef CONFIG_RESET_PHY_R +void reset_phy(void) +{ +} +#endif diff --git a/roms/u-boot/board/atmel/at91sam9260ek/led.c b/roms/u-boot/board/atmel/at91sam9260ek/led.c new file mode 100644 index 000000000..cc6d5d7a0 --- /dev/null +++ b/roms/u-boot/board/atmel/at91sam9260ek/led.c @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2007-2008 + * Stelian Pop <stelian@popies.net> + * Lead Tech Design <www.leadtechdesign.com> + */ + +#include <common.h> +#include <init.h> +#include <asm/io.h> +#include <asm/arch/gpio.h> +#include <status_led.h> + +void coloured_LED_init(void) +{ + /* Clock is enabled in board_early_init_f() */ + at91_set_gpio_output(CONFIG_RED_LED, 1); + at91_set_gpio_output(CONFIG_GREEN_LED, 1); + + at91_set_gpio_value(CONFIG_RED_LED, 0); + at91_set_gpio_value(CONFIG_GREEN_LED, 1); +} |