Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013, ISEE 2007 SL - http://www.isee.biz/ |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation version 2. |
| 7 | * |
| 8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any |
| 9 | * kind, whether express or implied; without even the implied warranty |
| 10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
Ladislav Michl | a96c08f | 2017-04-01 17:17:16 +0200 | [diff] [blame] | 14 | #ifndef __CONFIG_IGEP003X_H |
| 15 | #define __CONFIG_IGEP003X_H |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 16 | |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 17 | #include <configs/ti_am335x_common.h> |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 18 | |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 19 | /* Clock defines */ |
| 20 | #define V_OSCK 24000000 /* Clock output from T2 */ |
| 21 | #define V_SCLK (V_OSCK) |
| 22 | |
Ladislav Michl | 3607e0f | 2017-04-01 17:17:57 +0200 | [diff] [blame] | 23 | #define CONFIG_ENV_SIZE (96 << 10) /* 96 KiB */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 24 | |
Enric Balletbo i Serra | cf8d005 | 2013-07-25 09:27:39 +0200 | [diff] [blame] | 25 | /* Make the verbose messages from UBI stop printing */ |
| 26 | #define CONFIG_UBI_SILENCE_MSG |
| 27 | #define CONFIG_UBIFS_SILENCE_MSG |
| 28 | |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 29 | #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 30 | |
| 31 | #ifndef CONFIG_SPL_BUILD |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 32 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 33 | DEFAULT_LINUX_BOOT_ENV \ |
Enric Balletbò i Serra | 2e6bc67 | 2013-07-25 09:27:37 +0200 | [diff] [blame] | 34 | "bootdir=/boot\0" \ |
| 35 | "bootfile=zImage\0" \ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 36 | "console=ttyO0,115200n8\0" \ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 37 | "mmcdev=0\0" \ |
| 38 | "mmcroot=/dev/mmcblk0p2 rw\0" \ |
| 39 | "mmcrootfstype=ext4 rootwait\0" \ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 40 | "mmcargs=setenv bootargs console=${console} " \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 41 | "${optargs} " \ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 42 | "root=${mmcroot} " \ |
| 43 | "rootfstype=${mmcrootfstype}\0" \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 44 | "bootenv=uEnv.txt\0" \ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 45 | "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ |
| 46 | "importbootenv=echo Importing environment from mmc ...; " \ |
Enric Balletbò i Serra | 2e6bc67 | 2013-07-25 09:27:37 +0200 | [diff] [blame] | 47 | "env import -t ${loadaddr} ${filesize}\0" \ |
| 48 | "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \ |
Pau Pajuelo | 09533e5 | 2017-04-01 17:18:40 +0200 | [diff] [blame] | 49 | "load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${fdtfile}\0" \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 50 | "mmcboot=mmc dev ${mmcdev}; " \ |
| 51 | "if mmc rescan; then " \ |
| 52 | "echo SD/MMC found on device ${mmcdev};" \ |
| 53 | "if run loadbootenv; then " \ |
| 54 | "echo Loaded environment from ${bootenv};" \ |
| 55 | "run importbootenv;" \ |
| 56 | "fi;" \ |
| 57 | "if test -n $uenvcmd; then " \ |
| 58 | "echo Running uenvcmd ...;" \ |
| 59 | "run uenvcmd;" \ |
| 60 | "fi;" \ |
| 61 | "if run mmcload; then " \ |
| 62 | "run mmcargs; " \ |
| 63 | "bootz ${loadaddr} - ${fdtaddr};" \ |
| 64 | "fi;" \ |
| 65 | "fi;\0" \ |
| 66 | "mtdids=" MTDIDS_DEFAULT "\0" \ |
| 67 | "mtdparts=" MTDPARTS_DEFAULT "\0" \ |
Ladislav Michl | 3607e0f | 2017-04-01 17:17:57 +0200 | [diff] [blame] | 68 | "nandroot=ubi0:rootfs rw ubi.mtd=1\0" \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 69 | "nandrootfstype=ubifs rootwait\0" \ |
Ladislav Michl | 3607e0f | 2017-04-01 17:17:57 +0200 | [diff] [blame] | 70 | "nandload=ubi part UBI; " \ |
| 71 | "ubi read ${loadaddr} kernel; " \ |
| 72 | "ubi read ${fdtaddr} dtb \0" \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 73 | "nandargs=setenv bootargs console=${console} " \ |
| 74 | "${optargs} " \ |
| 75 | "root=${nandroot} " \ |
| 76 | "rootfstype=${nandrootfstype} \0" \ |
| 77 | "nandboot=echo Booting from nand ...; " \ |
| 78 | "run nandargs; " \ |
| 79 | "run nandload; " \ |
Pau Pajuelo | 09533e5 | 2017-04-01 17:18:40 +0200 | [diff] [blame] | 80 | "bootz ${loadaddr} - ${fdtaddr} \0" \ |
Pau Pajuelo | 2e0c6f3 | 2017-04-01 17:19:43 +0200 | [diff] [blame] | 81 | "netload=tftpboot ${loadaddr} ${bootfile}; " \ |
| 82 | "tftpboot ${fdtaddr} ${fdtfile} \0" \ |
| 83 | "netargs=setenv bootargs console=${console} " \ |
| 84 | "${optargs} " \ |
| 85 | "root=/dev/nfs " \ |
| 86 | "ip=${ipaddr} nfsroot=${serverip}:${rootnfs},v3,tcp \0" \ |
| 87 | "netboot=echo Booting from net ...; " \ |
| 88 | "run netargs; " \ |
| 89 | "run netload; " \ |
| 90 | "bootz ${loadaddr} - ${fdtaddr} \0" \ |
Pau Pajuelo | 09533e5 | 2017-04-01 17:18:40 +0200 | [diff] [blame] | 91 | "findfdt="\ |
| 92 | "if test ${board_name} = igep0033; then " \ |
| 93 | "setenv fdtfile am335x-igep-base0033.dtb; fi; " \ |
| 94 | "if test ${board_name} = igep0034; then " \ |
| 95 | "setenv fdtfile am335x-igep-base0040.dtb; fi; " \ |
| 96 | "if test ${board_name} = igep0034-lite; then " \ |
| 97 | "setenv fdtfile am335x-igep-base0040-lite.dtb; fi; " \ |
| 98 | "if test ${fdtfile} = ''; then " \ |
| 99 | "echo WARNING: Could not determine device tree to use; fi; \0" |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 100 | #endif |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 101 | |
| 102 | #define CONFIG_BOOTCOMMAND \ |
Pau Pajuelo | 09533e5 | 2017-04-01 17:18:40 +0200 | [diff] [blame] | 103 | "run findfdt;" \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 104 | "run mmcboot;" \ |
Pau Pajuelo | 2e0c6f3 | 2017-04-01 17:19:43 +0200 | [diff] [blame] | 105 | "run nandboot;" \ |
| 106 | "run netboot;" |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 107 | |
| 108 | /* NS16550 Configuration */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 109 | #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* UART0 */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 110 | #define CONFIG_CONS_INDEX 1 |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 111 | |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 112 | /* Ethernet support */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 113 | #define CONFIG_PHY_SMSC |
| 114 | |
| 115 | /* NAND support */ |
pekon gupta | beba5f0 | 2013-11-18 19:02:59 +0530 | [diff] [blame] | 116 | #define CONFIG_NAND_OMAP_ELM |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 117 | #define CONFIG_SYS_NAND_ONFI_DETECTION 1 |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 118 | |
| 119 | #define CONFIG_MTD_PARTITIONS |
| 120 | #define CONFIG_MTD_DEVICE |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 121 | |
Enric Balletbo i Serra | cf8d005 | 2013-07-25 09:27:39 +0200 | [diff] [blame] | 122 | #define MTDIDS_DEFAULT "nand0=omap2-nand.0" |
Ladislav Michl | 3607e0f | 2017-04-01 17:17:57 +0200 | [diff] [blame] | 123 | #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(SPL),-(UBI)" |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 124 | |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 125 | /* SPL */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 126 | |
Ladislav Michl | 3607e0f | 2017-04-01 17:17:57 +0200 | [diff] [blame] | 127 | /* UBI configuration */ |
| 128 | #define CONFIG_SPL_UBI 1 |
| 129 | #define CONFIG_SPL_UBI_MAX_VOL_LEBS 256 |
| 130 | #define CONFIG_SPL_UBI_MAX_PEB_SIZE (256*1024) |
| 131 | #define CONFIG_SPL_UBI_MAX_PEBS 4096 |
| 132 | #define CONFIG_SPL_UBI_VOL_IDS 8 |
| 133 | #define CONFIG_SPL_UBI_LOAD_MONITOR_ID 0 |
| 134 | #define CONFIG_SPL_UBI_LOAD_KERNEL_ID 3 |
| 135 | #define CONFIG_SPL_UBI_LOAD_ARGS_ID 4 |
| 136 | #define CONFIG_SPL_UBI_PEB_OFFSET 4 |
| 137 | #define CONFIG_SPL_UBI_VID_OFFSET 512 |
| 138 | #define CONFIG_SPL_UBI_LEB_START 2048 |
| 139 | #define CONFIG_SPL_UBI_INFO_ADDR 0x88080000 |
| 140 | |
| 141 | /* environment organization */ |
Ladislav Michl | 3607e0f | 2017-04-01 17:17:57 +0200 | [diff] [blame] | 142 | #define CONFIG_ENV_UBI_PART "UBI" |
| 143 | #define CONFIG_ENV_UBI_VOLUME "config" |
| 144 | #define CONFIG_ENV_UBI_VOLUME_REDUND "config_r" |
| 145 | |
| 146 | /* NAND config */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 147 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
| 148 | #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ |
| 149 | CONFIG_SYS_NAND_PAGE_SIZE) |
| 150 | #define CONFIG_SYS_NAND_PAGE_SIZE 2048 |
| 151 | #define CONFIG_SYS_NAND_OOBSIZE 64 |
| 152 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) |
| 153 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS |
| 154 | #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ |
| 155 | 10, 11, 12, 13, 14, 15, 16, 17, \ |
| 156 | 18, 19, 20, 21, 22, 23, 24, 25, \ |
| 157 | 26, 27, 28, 29, 30, 31, 32, 33, \ |
| 158 | 34, 35, 36, 37, 38, 39, 40, 41, \ |
| 159 | 42, 43, 44, 45, 46, 47, 48, 49, \ |
| 160 | 50, 51, 52, 53, 54, 55, 56, 57, } |
| 161 | |
| 162 | #define CONFIG_SYS_NAND_ECCSIZE 512 |
| 163 | #define CONFIG_SYS_NAND_ECCBYTES 14 |
pekon gupta | 3f71906 | 2013-11-18 19:03:01 +0530 | [diff] [blame] | 164 | #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 165 | |
Ladislav Michl | a96c08f | 2017-04-01 17:17:16 +0200 | [diff] [blame] | 166 | #endif /* ! __CONFIG_IGEP003X_H */ |