blob: 706a8a2a876e55ade905f8422538d6ae54323144 [file] [log] [blame]
Lars Poeschel67b4a792013-01-11 00:53:31 +00001/*
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. Kornilovf23537e2014-07-26 18:48:45 +040022#include <configs/ti_am335x_common.h>
Lars Poeschel67b4a792013-01-11 00:53:31 +000023
Lars Poeschel67b4a792013-01-11 00:53:31 +000024#define CONFIG_MACH_TYPE MACH_TYPE_PCM051
25
Lars Poeschel67b4a792013-01-11 00:53:31 +000026/* set to negative value for no autoboot */
Matwey V. Kornilovbcf858e2018-06-02 20:22:25 +030027#define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
28 "bootcmd_" #devtypel #instance "=" \
29 "setenv mmcdev " #instance"; "\
30 "setenv bootpart " #instance":2 ; "\
31 "run mmcboot\0"
32
33#define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
34 #devtypel #instance " "
35
36#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
37 "bootcmd_" #devtypel "=" \
38 "run nandboot\0"
39
40#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
41 #devtypel #instance " "
42
43#define BOOT_TARGET_DEVICES(func) \
44 func(MMC, mmc, 0) \
45 func(LEGACY_MMC, legacy_mmc, 0) \
46 func(MMC, mmc, 1) \
47 func(LEGACY_MMC, legacy_mmc, 1) \
48 func(NAND, nand, 0)
49
50#define CONFIG_BOOTCOMMAND \
51 "run distro_bootcmd"
52
53#include <config_distro_bootcmd.h>
54
Matwey V. Kornilovce641752018-06-02 20:22:26 +030055#include <environment/ti/dfu.h>
56#include <environment/ti/mmc.h>
57
Lars Poeschel67b4a792013-01-11 00:53:31 +000058#define CONFIG_EXTRA_ENV_SETTINGS \
Matwey V. Kornilov9f2422e2018-06-02 20:22:27 +030059 DEFAULT_LINUX_BOOT_ENV \
Matwey V. Kornilovce641752018-06-02 20:22:26 +030060 DEFAULT_MMC_TI_ARGS \
Lars Poeschel67b4a792013-01-11 00:53:31 +000061 "bootfile=uImage\0" \
Matwey V. Kornilov2b2c66e2018-06-02 20:22:28 +030062 "fdtfile=am335x-wega-rdk.dtb\0" \
Lars Poeschel67b4a792013-01-11 00:53:31 +000063 "console=ttyO0,115200n8\0" \
64 "optargs=\0" \
Lars Poeschel67b4a792013-01-11 00:53:31 +000065 "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
66 "ramrootfstype=ext2\0" \
Lars Poeschel67b4a792013-01-11 00:53:31 +000067 "bootenv=uEnv.txt\0" \
matwey.kornilov@gmail.comf45df482014-12-27 22:10:44 +030068 "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
69 "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
70 "source ${loadaddr}\0" \
Lars Poeschel67b4a792013-01-11 00:53:31 +000071 "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
72 "importbootenv=echo Importing environment from mmc ...; " \
73 "env import -t $loadaddr $filesize\0" \
74 "ramargs=setenv bootargs console=${console} " \
75 "${optargs} " \
76 "root=${ramroot} " \
77 "rootfstype=${ramrootfstype}\0" \
78 "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
79 "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
80 "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \
81 "mmcboot=echo Booting from mmc ...; " \
Matwey V. Kornilovce641752018-06-02 20:22:26 +030082 "run args_mmc; " \
Lars Poeschel67b4a792013-01-11 00:53:31 +000083 "bootm ${loadaddr}\0" \
84 "ramboot=echo Booting from ramdisk ...; " \
85 "run ramargs; " \
86 "bootm ${loadaddr}\0" \
Matwey V. Kornilovbcf858e2018-06-02 20:22:25 +030087 BOOTENV
Lars Poeschel67b4a792013-01-11 00:53:31 +000088
89/* Clock Defines */
90#define V_OSCK 25000000 /* Clock output from T2 */
91#define V_SCLK (V_OSCK)
92
Lars Poeschel67b4a792013-01-11 00:53:31 +000093/*
94 * memtest works on 8 MB in DRAM after skipping 32MB from
95 * start addr of ram disk
96 */
Lars Poeschel67b4a792013-01-11 00:53:31 +000097
Lars Poeschel67b4a792013-01-11 00:53:31 +000098/* NS16550 Configuration */
Lars Poeschel67b4a792013-01-11 00:53:31 +000099#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
100#define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
101#define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
102#define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
103#define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
104#define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
105
106/* I2C Configuration */
Lars Poeschel67b4a792013-01-11 00:53:31 +0000107#define CONFIG_ENV_EEPROM_IS_ON_I2C
108#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
109#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
Lars Poeschel67b4a792013-01-11 00:53:31 +0000110
Lars Poeschel67b4a792013-01-11 00:53:31 +0000111#define CONFIG_SYS_BAUDRATE_TABLE { 110, 300, 600, 1200, 2400, \
1124800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }
113
SRICHARAN R669b3372013-04-24 00:41:25 +0000114/* CPU */
Lars Poeschel67b4a792013-01-11 00:53:31 +0000115
Matwey V. Kornilovf23537e2014-07-26 18:48:45 +0400116#ifdef CONFIG_SPI_BOOT
Lars Poeschel67b4a792013-01-11 00:53:31 +0000117#define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000
Lars Poeschel67b4a792013-01-11 00:53:31 +0000118#endif
119
120/*
121 * USB configuration
122 */
Lars Poeschel67b4a792013-01-11 00:53:31 +0000123#define CONFIG_AM335X_USB0
124#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
125#define CONFIG_AM335X_USB1
126#define CONFIG_AM335X_USB1_MODE MUSB_HOST
127
Lars Poeschel67b4a792013-01-11 00:53:31 +0000128#endif /* ! __CONFIG_PCM051_H */