Blame view

include/configs/at91-sama5_common.h 1.98 KB
b2d387bce   Wu, Josh   ARM: at91: sama5:...
1
2
3
4
5
6
7
8
9
10
11
  /*
   * Common part of configuration settings for the AT91 SAMA5 board.
   *
   * Copyright (C) 2015 Atmel Corporation
   *		      Josh Wu <josh.wu@atmel.com>
   *
   * SPDX-License-Identifier:	GPL-2.0+
   */
  
  #ifndef __AT91_SAMA5_COMMON_H
  #define __AT91_SAMA5_COMMON_H
b2d387bce   Wu, Josh   ARM: at91: sama5:...
12
13
14
15
16
17
18
19
20
  /* ARM asynchronous clock */
  #define CONFIG_SYS_AT91_SLOW_CLOCK      32768
  #define CONFIG_SYS_AT91_MAIN_CLOCK      12000000 /* from 12 MHz crystal */
  
  #define CONFIG_ARCH_CPU_INIT
  
  #ifndef CONFIG_SPL_BUILD
  #define CONFIG_SKIP_LOWLEVEL_INIT
  #endif
b2d387bce   Wu, Josh   ARM: at91: sama5:...
21
  /* general purpose I/O */
fc977b94a   Wenyou Yang   configs: at91-sam...
22
  #ifndef CONFIG_DM_GPIO
b2d387bce   Wu, Josh   ARM: at91: sama5:...
23
  #define CONFIG_AT91_GPIO
fc977b94a   Wenyou Yang   configs: at91-sam...
24
  #endif
b2d387bce   Wu, Josh   ARM: at91: sama5:...
25

b2d387bce   Wu, Josh   ARM: at91: sama5:...
26
27
28
29
30
  
  /*
   * BOOTP options
   */
  #define CONFIG_BOOTP_BOOTFILESIZE
b2d387bce   Wu, Josh   ARM: at91: sama5:...
31
32
33
34
  
  /*
   * Command line configuration.
   */
b2d387bce   Wu, Josh   ARM: at91: sama5:...
35

5541543f6   Wenyou Yang   configs: at91: Re...
36
  #ifdef CONFIG_SD_BOOT
ac1eefebf   Josh Wu   ARM: at91: sama5:...
37
38
39
40
41
42
43
  
  #ifdef CONFIG_ENV_IS_IN_MMC
  /* Use raw reserved sectors to save environment */
  #define CONFIG_ENV_OFFSET		0x2000
  #define CONFIG_ENV_SIZE			0x1000
  #define CONFIG_SYS_MMC_ENV_DEV		0
  #else
372ca03fc   Wu, Josh   ARM: at91: sama5:...
44
  /* u-boot env in sd/mmc card */
372ca03fc   Wu, Josh   ARM: at91: sama5:...
45
  #define CONFIG_ENV_SIZE		0x4000
ac1eefebf   Josh Wu   ARM: at91: sama5:...
46
  #endif
372ca03fc   Wu, Josh   ARM: at91: sama5:...
47

89a3658ac   Wu, Josh   ARM: at91: sama5d...
48
49
50
51
  #define CONFIG_BOOTCOMMAND	"if test ! -n ${dtb_name}; then "	\
  				    "setenv dtb_name at91-${board_name}.dtb; " \
  				"fi; "					\
  				"fatload mmc 0:1 0x21000000 ${dtb_name}; " \
372ca03fc   Wu, Josh   ARM: at91: sama5:...
52
53
  				"fatload mmc 0:1 0x22000000 zImage; "	\
  				"bootz 0x22000000 - 0x21000000"
5abc1a452   Sam Protsenko   common: Move CONF...
54

b2d387bce   Wu, Josh   ARM: at91: sama5:...
55
  #else
dc018fef2   Wu, Josh   ARM: at91: sama5:...
56

5541543f6   Wenyou Yang   configs: at91: Re...
57
  #ifdef CONFIG_NAND_BOOT
dc018fef2   Wu, Josh   ARM: at91: sama5:...
58
  /* u-boot env in nand flash */
dc018fef2   Wu, Josh   ARM: at91: sama5:...
59
60
61
62
63
64
  #define CONFIG_ENV_OFFSET		0xc0000
  #define CONFIG_ENV_OFFSET_REDUND	0x100000
  #define CONFIG_ENV_SIZE			0x20000
  #define CONFIG_BOOTCOMMAND		"nand read 0x21000000 0x180000 0x80000;"	\
  					"nand read 0x22000000 0x200000 0x600000;"	\
  					"bootz 0x22000000 - 0x21000000"
5541543f6   Wenyou Yang   configs: at91: Re...
65
  #elif CONFIG_SPI_BOOT
7a53b9544   Wu, Josh   ARM: at91: sama5:...
66
  /* u-boot env in serial flash, by default is bus 0 and cs 0 */
a61047370   Josh Wu   ARM: at91: sama5:...
67
68
  #define CONFIG_ENV_OFFSET		0x6000
  #define CONFIG_ENV_SIZE			0x2000
7a53b9544   Wu, Josh   ARM: at91: sama5:...
69
70
71
72
73
  #define CONFIG_ENV_SECT_SIZE		0x1000
  #define CONFIG_BOOTCOMMAND		"sf probe 0; "				\
  					"sf read 0x21000000 0x60000 0xc000; "	\
  					"sf read 0x22000000 0x6c000 0x394000; "	\
  					"bootz 0x22000000 - 0x21000000"
dc018fef2   Wu, Josh   ARM: at91: sama5:...
74
  #endif
b2d387bce   Wu, Josh   ARM: at91: sama5:...
75
  #endif
b2d387bce   Wu, Josh   ARM: at91: sama5:...
76
77
78
79
  /* Size of malloc() pool */
  #define CONFIG_SYS_MALLOC_LEN		(4 * 1024 * 1024)
  
  #endif