Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 1 | /* |
| 2 | * pcm051.h |
| 3 | * |
| 4 | * Phytec phyCORE-AM335x (pcm051) boards information header |
| 5 | * |
| 6 | * Copyright (C) 2013 Lemonage Software GmbH |
| 7 | * Author Lars Poeschel <poeschel@lemonage.de> |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or |
| 10 | * modify it under the terms of the GNU General Public License as |
| 11 | * published by the Free Software Foundation version 2. |
| 12 | * |
| 13 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any |
| 14 | * kind, whether express or implied; without even the implied warranty |
| 15 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | */ |
| 18 | |
| 19 | #ifndef __CONFIG_PCM051_H |
| 20 | #define __CONFIG_PCM051_H |
| 21 | |
Matwey V. Kornilov | f23537e | 2014-07-26 18:48:45 +0400 | [diff] [blame] | 22 | #include <configs/ti_am335x_common.h> |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 23 | |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 24 | #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 25 | #define CONFIG_MACH_TYPE MACH_TYPE_PCM051 |
| 26 | |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 27 | /* set to negative value for no autoboot */ |
Matwey V. Kornilov | bcf858e | 2018-06-02 20:22:25 +0300 | [diff] [blame] | 28 | #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \ |
| 29 | "bootcmd_" #devtypel #instance "=" \ |
| 30 | "setenv mmcdev " #instance"; "\ |
| 31 | "setenv bootpart " #instance":2 ; "\ |
| 32 | "run mmcboot\0" |
| 33 | |
| 34 | #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \ |
| 35 | #devtypel #instance " " |
| 36 | |
| 37 | #define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \ |
| 38 | "bootcmd_" #devtypel "=" \ |
| 39 | "run nandboot\0" |
| 40 | |
| 41 | #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \ |
| 42 | #devtypel #instance " " |
| 43 | |
| 44 | #define BOOT_TARGET_DEVICES(func) \ |
| 45 | func(MMC, mmc, 0) \ |
| 46 | func(LEGACY_MMC, legacy_mmc, 0) \ |
| 47 | func(MMC, mmc, 1) \ |
| 48 | func(LEGACY_MMC, legacy_mmc, 1) \ |
| 49 | func(NAND, nand, 0) |
| 50 | |
| 51 | #define CONFIG_BOOTCOMMAND \ |
| 52 | "run distro_bootcmd" |
| 53 | |
| 54 | #include <config_distro_bootcmd.h> |
| 55 | |
Matwey V. Kornilov | ce64175 | 2018-06-02 20:22:26 +0300 | [diff] [blame] | 56 | #include <environment/ti/dfu.h> |
| 57 | #include <environment/ti/mmc.h> |
| 58 | |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 59 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Matwey V. Kornilov | 9f2422e | 2018-06-02 20:22:27 +0300 | [diff] [blame^] | 60 | DEFAULT_LINUX_BOOT_ENV \ |
Matwey V. Kornilov | ce64175 | 2018-06-02 20:22:26 +0300 | [diff] [blame] | 61 | DEFAULT_MMC_TI_ARGS \ |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 62 | "bootfile=uImage\0" \ |
| 63 | "fdtfile=pcm051.dtb\0" \ |
| 64 | "console=ttyO0,115200n8\0" \ |
| 65 | "optargs=\0" \ |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 66 | "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \ |
| 67 | "ramrootfstype=ext2\0" \ |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 68 | "bootenv=uEnv.txt\0" \ |
matwey.kornilov@gmail.com | f45df48 | 2014-12-27 22:10:44 +0300 | [diff] [blame] | 69 | "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ |
| 70 | "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ |
| 71 | "source ${loadaddr}\0" \ |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 72 | "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ |
| 73 | "importbootenv=echo Importing environment from mmc ...; " \ |
| 74 | "env import -t $loadaddr $filesize\0" \ |
| 75 | "ramargs=setenv bootargs console=${console} " \ |
| 76 | "${optargs} " \ |
| 77 | "root=${ramroot} " \ |
| 78 | "rootfstype=${ramrootfstype}\0" \ |
| 79 | "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ |
| 80 | "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \ |
| 81 | "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \ |
| 82 | "mmcboot=echo Booting from mmc ...; " \ |
Matwey V. Kornilov | ce64175 | 2018-06-02 20:22:26 +0300 | [diff] [blame] | 83 | "run args_mmc; " \ |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 84 | "bootm ${loadaddr}\0" \ |
| 85 | "ramboot=echo Booting from ramdisk ...; " \ |
| 86 | "run ramargs; " \ |
| 87 | "bootm ${loadaddr}\0" \ |
Matwey V. Kornilov | bcf858e | 2018-06-02 20:22:25 +0300 | [diff] [blame] | 88 | BOOTENV |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 89 | |
| 90 | /* Clock Defines */ |
| 91 | #define V_OSCK 25000000 /* Clock output from T2 */ |
| 92 | #define V_SCLK (V_OSCK) |
| 93 | |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 94 | /* |
| 95 | * memtest works on 8 MB in DRAM after skipping 32MB from |
| 96 | * start addr of ram disk |
| 97 | */ |
Tom Rini | f3b6a1d | 2013-08-09 11:22:13 -0400 | [diff] [blame] | 98 | #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + (64 << 20)) |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 99 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \ |
| 100 | + (8 * 1024 * 1024)) |
| 101 | |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 102 | #define CONFIG_SF_DEFAULT_SPEED 24000000 |
| 103 | |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 104 | /* NS16550 Configuration */ |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 105 | #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ |
| 106 | #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */ |
| 107 | #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */ |
| 108 | #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */ |
| 109 | #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */ |
| 110 | #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */ |
| 111 | |
| 112 | /* I2C Configuration */ |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 113 | #define CONFIG_ENV_EEPROM_IS_ON_I2C |
| 114 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */ |
| 115 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 116 | |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 117 | #define CONFIG_SYS_BAUDRATE_TABLE { 110, 300, 600, 1200, 2400, \ |
| 118 | 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 } |
| 119 | |
SRICHARAN R | 669b337 | 2013-04-24 00:41:25 +0000 | [diff] [blame] | 120 | /* CPU */ |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 121 | |
Matwey V. Kornilov | f23537e | 2014-07-26 18:48:45 +0400 | [diff] [blame] | 122 | #ifdef CONFIG_SPI_BOOT |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 123 | #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 |
| 124 | #define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000 |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 125 | #endif |
| 126 | |
| 127 | /* |
| 128 | * USB configuration |
| 129 | */ |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 130 | #define CONFIG_AM335X_USB0 |
| 131 | #define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL |
| 132 | #define CONFIG_AM335X_USB1 |
| 133 | #define CONFIG_AM335X_USB1_MODE MUSB_HOST |
| 134 | |
Lars Poeschel | 67b4a79 | 2013-01-11 00:53:31 +0000 | [diff] [blame] | 135 | #define CONFIG_PHY_SMSC |
| 136 | |
| 137 | #endif /* ! __CONFIG_PCM051_H */ |