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 | |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 23 | #ifndef CONFIG_SPL_BUILD |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 24 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 25 | DEFAULT_LINUX_BOOT_ENV \ |
Enric Balletbò i Serra | 2e6bc67 | 2013-07-25 09:27:37 +0200 | [diff] [blame] | 26 | "bootdir=/boot\0" \ |
| 27 | "bootfile=zImage\0" \ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 28 | "console=ttyO0,115200n8\0" \ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 29 | "mmcdev=0\0" \ |
| 30 | "mmcroot=/dev/mmcblk0p2 rw\0" \ |
| 31 | "mmcrootfstype=ext4 rootwait\0" \ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 32 | "mmcargs=setenv bootargs console=${console} " \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 33 | "${optargs} " \ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 34 | "root=${mmcroot} " \ |
| 35 | "rootfstype=${mmcrootfstype}\0" \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 36 | "bootenv=uEnv.txt\0" \ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 37 | "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ |
| 38 | "importbootenv=echo Importing environment from mmc ...; " \ |
Enric Balletbò i Serra | 2e6bc67 | 2013-07-25 09:27:37 +0200 | [diff] [blame] | 39 | "env import -t ${loadaddr} ${filesize}\0" \ |
| 40 | "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \ |
Pau Pajuelo | 09533e5 | 2017-04-01 17:18:40 +0200 | [diff] [blame] | 41 | "load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${fdtfile}\0" \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 42 | "mmcboot=mmc dev ${mmcdev}; " \ |
| 43 | "if mmc rescan; then " \ |
| 44 | "echo SD/MMC found on device ${mmcdev};" \ |
| 45 | "if run loadbootenv; then " \ |
| 46 | "echo Loaded environment from ${bootenv};" \ |
| 47 | "run importbootenv;" \ |
| 48 | "fi;" \ |
| 49 | "if test -n $uenvcmd; then " \ |
| 50 | "echo Running uenvcmd ...;" \ |
| 51 | "run uenvcmd;" \ |
| 52 | "fi;" \ |
| 53 | "if run mmcload; then " \ |
| 54 | "run mmcargs; " \ |
| 55 | "bootz ${loadaddr} - ${fdtaddr};" \ |
| 56 | "fi;" \ |
| 57 | "fi;\0" \ |
Tom Rini | 43ede0b | 2017-10-22 17:55:07 -0400 | [diff] [blame] | 58 | "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ |
| 59 | "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ |
Ladislav Michl | 3607e0f | 2017-04-01 17:17:57 +0200 | [diff] [blame] | 60 | "nandroot=ubi0:rootfs rw ubi.mtd=1\0" \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 61 | "nandrootfstype=ubifs rootwait\0" \ |
Ladislav Michl | 3607e0f | 2017-04-01 17:17:57 +0200 | [diff] [blame] | 62 | "nandload=ubi part UBI; " \ |
| 63 | "ubi read ${loadaddr} kernel; " \ |
| 64 | "ubi read ${fdtaddr} dtb \0" \ |
Enric Balletbo i Serra | bf88720 | 2014-09-03 17:59:57 +0200 | [diff] [blame] | 65 | "nandargs=setenv bootargs console=${console} " \ |
| 66 | "${optargs} " \ |
| 67 | "root=${nandroot} " \ |
| 68 | "rootfstype=${nandrootfstype} \0" \ |
| 69 | "nandboot=echo Booting from nand ...; " \ |
| 70 | "run nandargs; " \ |
| 71 | "run nandload; " \ |
Pau Pajuelo | 09533e5 | 2017-04-01 17:18:40 +0200 | [diff] [blame] | 72 | "bootz ${loadaddr} - ${fdtaddr} \0" \ |
Pau Pajuelo | 2e0c6f3 | 2017-04-01 17:19:43 +0200 | [diff] [blame] | 73 | "netload=tftpboot ${loadaddr} ${bootfile}; " \ |
| 74 | "tftpboot ${fdtaddr} ${fdtfile} \0" \ |
| 75 | "netargs=setenv bootargs console=${console} " \ |
| 76 | "${optargs} " \ |
| 77 | "root=/dev/nfs " \ |
| 78 | "ip=${ipaddr} nfsroot=${serverip}:${rootnfs},v3,tcp \0" \ |
| 79 | "netboot=echo Booting from net ...; " \ |
| 80 | "run netargs; " \ |
| 81 | "run netload; " \ |
| 82 | "bootz ${loadaddr} - ${fdtaddr} \0" \ |
Pau Pajuelo | 09533e5 | 2017-04-01 17:18:40 +0200 | [diff] [blame] | 83 | "findfdt="\ |
| 84 | "if test ${board_name} = igep0033; then " \ |
| 85 | "setenv fdtfile am335x-igep-base0033.dtb; fi; " \ |
| 86 | "if test ${board_name} = igep0034; then " \ |
| 87 | "setenv fdtfile am335x-igep-base0040.dtb; fi; " \ |
| 88 | "if test ${board_name} = igep0034-lite; then " \ |
| 89 | "setenv fdtfile am335x-igep-base0040-lite.dtb; fi; " \ |
| 90 | "if test ${fdtfile} = ''; then " \ |
| 91 | "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] | 92 | #endif |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 93 | |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 94 | /* NS16550 Configuration */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 95 | #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* UART0 */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 96 | |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 97 | /* Ethernet support */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 98 | |
| 99 | /* NAND support */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 100 | |
Ladislav Michl | 3607e0f | 2017-04-01 17:17:57 +0200 | [diff] [blame] | 101 | /* NAND config */ |
Enric Balletbo i Serra | 5f5c1d1 | 2013-04-04 22:27:58 +0000 | [diff] [blame] | 102 | #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ |
| 103 | 10, 11, 12, 13, 14, 15, 16, 17, \ |
| 104 | 18, 19, 20, 21, 22, 23, 24, 25, \ |
| 105 | 26, 27, 28, 29, 30, 31, 32, 33, \ |
| 106 | 34, 35, 36, 37, 38, 39, 40, 41, \ |
| 107 | 42, 43, 44, 45, 46, 47, 48, 49, \ |
| 108 | 50, 51, 52, 53, 54, 55, 56, 57, } |
| 109 | |
| 110 | #define CONFIG_SYS_NAND_ECCSIZE 512 |
| 111 | #define CONFIG_SYS_NAND_ECCBYTES 14 |
| 112 | |
Ladislav Michl | a96c08f | 2017-04-01 17:17:16 +0200 | [diff] [blame] | 113 | #endif /* ! __CONFIG_IGEP003X_H */ |