Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013 Gumstix, Inc. - http://www.gumstix.com/ |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __CONFIG_PEPPER_H |
| 7 | #define __CONFIG_PEPPER_H |
| 8 | |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 9 | #include <configs/ti_am335x_common.h> |
| 10 | |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 11 | /* Clock defines */ |
| 12 | #define V_OSCK 24000000 /* Clock output from T2 */ |
| 13 | #define V_SCLK (V_OSCK) |
| 14 | |
Adam YH Lee | 3dc3c98 | 2015-06-01 14:29:09 -0700 | [diff] [blame] | 15 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 16 | |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 17 | /* Mach type */ |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 18 | #define CONFIG_MACH_TYPE MACH_TYPE_PEPPER |
| 19 | |
| 20 | #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 21 | |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 22 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 23 | DEFAULT_LINUX_BOOT_ENV \ |
| 24 | "bootdir=/boot\0" \ |
| 25 | "bootfile=zImage\0" \ |
| 26 | "fdtfile=am335x-pepper.dtb\0" \ |
| 27 | "console=ttyO0,115200n8\0" \ |
| 28 | "optargs=\0" \ |
| 29 | "mmcdev=0\0" \ |
| 30 | "mmcroot=/dev/mmcblk0p2 rw\0" \ |
Adam YH Lee | bc08c76 | 2015-07-20 11:50:40 -0700 | [diff] [blame] | 31 | "mmcrootfstype=ext4 rootwait\0" \ |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 32 | "mmcargs=setenv bootargs console=${console} " \ |
| 33 | "${optargs} " \ |
| 34 | "root=${mmcroot} " \ |
| 35 | "rootfstype=${mmcrootfstype}\0" \ |
| 36 | "bootenv=uEnv.txt\0" \ |
| 37 | "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ |
| 38 | "importbootenv=echo Importing environment from mmc ...; " \ |
| 39 | "env import -t ${loadaddr} ${filesize}\0" \ |
| 40 | "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \ |
| 41 | "load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${fdtfile}\0" \ |
| 42 | "loaduimage=fatload mmc ${mmcdev}:1 ${loadaddr} uImage\0" \ |
| 43 | "uimageboot=echo Booting from mmc${mmcdev} ...; " \ |
| 44 | "run mmcargs; " \ |
| 45 | "bootm ${loadaddr}\0" \ |
| 46 | "mmcboot=echo Booting from mmc ...; " \ |
| 47 | "run mmcargs; " \ |
| 48 | "bootz ${loadaddr} - ${fdtaddr}\0" \ |
| 49 | "ubiboot=echo Booting from nand (ubifs) ...; " \ |
| 50 | "run ubiargs; run ubiload; " \ |
| 51 | "bootz ${loadaddr} - ${fdtaddr}\0" \ |
| 52 | |
| 53 | #define CONFIG_BOOTCOMMAND \ |
| 54 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
| 55 | "echo SD/MMC found on device ${mmcdev};" \ |
| 56 | "if run loadbootenv; then " \ |
| 57 | "echo Loaded environment from ${bootenv};" \ |
| 58 | "run importbootenv;" \ |
| 59 | "fi;" \ |
| 60 | "if test -n $uenvcmd; then " \ |
| 61 | "echo Running uenvcmd ...;" \ |
| 62 | "run uenvcmd;" \ |
| 63 | "fi;" \ |
| 64 | "if run mmcload; then " \ |
| 65 | "run mmcboot;" \ |
| 66 | "fi;" \ |
| 67 | "if run loaduimage; then " \ |
| 68 | "run uimageboot;" \ |
| 69 | "fi;" \ |
| 70 | "fi;" \ |
| 71 | |
| 72 | /* Serial console configuration */ |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 73 | #define CONFIG_SERIAL1 1 |
| 74 | #define CONFIG_SYS_NS16550_COM1 0x44e09000 |
| 75 | |
| 76 | /* Ethernet support */ |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 77 | #define CONFIG_PHY_RESET_DELAY 1000 |
| 78 | |
| 79 | /* SPL */ |
Ash Charles | 9cb110e | 2014-05-07 08:24:11 -0700 | [diff] [blame] | 80 | |
| 81 | #endif /* __CONFIG_PEPPER_H */ |