Commit d8ccbe93 authored by Heiko Schocher's avatar Heiko Schocher Committed by Tom Rini

am335x, shc: add support for the am335x based bosch shc board

U-Boot SPL 2016.03-rc3-00019-g6dfb4c2-dirty (Mar 09 2016 - 07:40:06)
SHC C3-Sample
MPU reference clock runs at 6 MHz
Setting MPU clock to 594 MHz
Enabling Spread Spectrum of 18 permille for MPU
Trying to boot from MMC
reading u-boot.img
reading u-boot.img

U-Boot 2016.03-rc3-00019-g6dfb4c2-dirty (Mar 09 2016 - 07:05:35 +0100)

       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
reloc off 1f783000
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Net:   cpsw
U-Boot#
Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
parent 3e584b94
......@@ -396,6 +396,14 @@ config TARGET_AM335X_EVM
select DM_GPIO
select TI_I2C_BOARD_DETECT
config TARGET_AM335X_SHC
bool "Support am335x based shc board from bosch"
select CPU_V7
select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_AM335X_SL50
bool "Support am335x_sl50"
select CPU_V7
......@@ -875,6 +883,7 @@ source "arch/arm/cpu/armv8/Kconfig"
source "arch/arm/imx-common/Kconfig"
source "board/bosch/shc/Kconfig"
source "board/BuR/kwb/Kconfig"
source "board/BuR/tseries/Kconfig"
source "board/CarMediaLab/flea3/Kconfig"
......
if TARGET_AM335X_SHC
config SYS_BOARD
default "shc"
config SYS_VENDOR
default "bosch"
config SYS_SOC
default "am33xx"
config SYS_CONFIG_NAME
default "am335x_shc"
choice
prompt "enable different boot versions for the shc board"
default EMMC
help
Select the boot version of the shc board.
config SHC_EMMC
bool "enable eMMC"
help
enable here the eMMC functionality on the bosch shc board.
config SHC_ICT
bool "enable ICT"
help
enable here the ICT functionality on the bosch shc board
config SHC_NETBOOT
bool "enable NETBOOT"
help
enable here the NETBOOT functionality on the bosch shc board
config SHC_SDBOOT
bool "enable SDBOOT"
help
enable here the SDBOOT functionality on the bosch shc board
endchoice
choice
prompt "enable different board versions for the shc board"
default C3_SAMPLE
help
Select the board version of the shc board.
config B_SAMPLE
bool "B Sample board version"
help
activate, if you want to build for the B sample version
of the bosch shc board
config B2_SAMPLE
bool "B2 Sample board version"
help
activate, if you want to build for the B2 sample version
of the bosch shc board
config C_SAMPLE
bool "C Sample board version"
help
activate, if you want to build for the C sample version
of the bosch shc board
config C2_SAMPLE
bool "C2 Sample board version"
help
activate, if you want to build for the C2 sample version
of the bosch shc board
config C3_SAMPLE
bool "C3 Sample board version"
help
activate, if you want to build for the C3 sample version
of the bosch shc board
config SERIES
bool "Series board version"
help
activate, if you want to build for the Series version
of the bosch shc board
endchoice
endif
SHC BOARD
M: Heiko Schocher <hs@denx.de>
S: Maintained
F: board/bosch/shc
F: include/configs/am335x_shc.h
F: configs/am335x_shc_defconfig
F: configs/am335x_shc_ict_defconfig
F: configs/am335x_shc_netboot_defconfig
F: configs/am335x_shc_prompt_defconfig
F: configs/am335x_shc_sdboot_defconfig
F: configs/am335x_shc_sdboot_prompt_defconfig
#
# Makefile
#
# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-y := mux.o
obj-y += board.o
Summary
=======
This document covers various features of the 'am335x_shc' build.
Hardware
========
AM335X based board:
I2C: ready
DRAM: 512 MiB
Enabling the D-Cache
MMC: OMAP SD/MMC: 0 @ 26 MHz, OMAP SD/MMC: 1 @ 26 MHz
Net: cpsw
Following boot options are possible:
2 Jumpers:
Jumper 1 Jumper 2 Bootmode
off off eMMC boot
on off SD boot
off on Net boot
Compiling
=========
$ make am335x_shc_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
$ make -s all
-> now you have the MLO and the u-boot.img file, you can put
on your SD card or eMMC.
Configuring
===========
There are a lot of board versions and boot configurations, which
can be selected through "make menuconfig"
ARM architecture --->
enable different boot versions for the shc board (enable eMMC) --->
(X) enable eMMC
( ) enable ICT
( ) enable NETBOOT
( ) enable SDBOOT
enable different board versions for the shc board (C3 Sample board version) --->
( ) B Sample board version
( ) B2 Sample board version
( ) C Sample board version
( ) C2 Sample board version
(X) C3 Sample board version
( ) Series board version
Netboot
=======
- see also doc/SPL/README.am335x-network
- set the jumper into netboot mode
- compile the U-boot sources with:
make am335x_shc_netboot_defconfig
make all
- copy the images into your tftp boot directory
cp spl/u-boot-spl.bin /tftpboot/.../u-boot-spl-restore.bin
cp u-boot.img /tftpboot/.../u-boot-restore.img
- power on the board, and you should get something like this:
U-Boot SPL 2016.05-rc2-00016-gf23b960-dirty (Apr 26 2016 - 09:02:18)
#### NETBOOT ####
SHC
MPU reference clock runs at 6 MHz
Setting MPU clock to 594 MHz
Enabling Spread Spectrum of 18 permille for MPU
Trying to boot from net
Using default environment
<ethaddr> not set. Validating first E-fuse MAC
cpsw
cpsw Waiting for PHY auto negotiation to complete... done
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.20.91 (258 ms)
Using cpsw device
TFTP from server 192.168.1.1; our IP address is 192.168.20.91
Filename 'shc/u-boot-restore.img'.
Load address: 0x807fffc0
Loading: ##################
1.2 MiB/s
done
Bytes transferred = 262480 (40150 hex)
U-Boot 2016.05-rc2-00016-gf23b960-dirty (Apr 26 2016 - 09:02:18 +0200)
Watchdog enabled
I2C: ready
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - bad CRC, using default environment
Net: cpsw
switch to partitions #0, OK
This diff is collapsed.
/*
* board.h
*
* (C) Copyright 2016
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
*
* Based on:
* TI AM335x boards information header
*
* Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef _BOARD_H_
#define _BOARD_H_
/* Definition to control the GPIOs (for LEDs and Reset) */
#define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio))
static inline int board_is_b_sample(void)
{
#if defined CONFIG_B_SAMPLE
return 1;
#else
return 0;
#endif
}
static inline int board_is_c_sample(void)
{
#if defined CONFIG_C_SAMPLE
return 1;
#else
return 0;
#endif
}
static inline int board_is_c3_sample(void)
{
#if defined CONFIG_C3_SAMPLE
return 1;
#else
return 0;
#endif
}
static inline int board_is_series(void)
{
#if defined CONFIG_SERIES
return 1;
#else
return 0;
#endif
}
/*
* Definitions for pinmuxing header and Board ID strings
*/
#if defined CONFIG_B_SAMPLE
# define BOARD_ID_STR "SHC B-Sample\n"
#elif defined CONFIG_B2_SAMPLE
# define BOARD_ID_STR "SHC B2-Sample\n"
#elif defined CONFIG_C_SAMPLE
# if defined(CONFIG_SHC_NETBOOT)
# define BOARD_ID_STR "#### NETBOOT ####\nSHC C-Sample\n"
# elif defined(CONFIG_SHC_SDBOOT)
# define BOARD_ID_STR "#### SDBOOT ####\nSHC C-Sample\n"
# else
# define BOARD_ID_STR "SHC C-Sample\n"
# endif
#elif defined CONFIG_C2_SAMPLE
# if defined(CONFIG_SHC_ICT)
# define BOARD_ID_STR "#### ICT ####\nSHC C2-Sample\n"
# elif defined(CONFIG_SHC_NETBOOT)
# define BOARD_ID_STR "#### NETBOOT ####\nSHC C2-Sample\n"
# elif defined(CONFIG_SHC_SDBOOT)
# define BOARD_ID_STR "#### SDBOOT ####\nSHC C2-Sample\n"
# else
# define BOARD_ID_STR "SHC C2-Sample\n"
# endif
#elif defined CONFIG_C3_SAMPLE
# if defined(CONFIG_SHC_ICT)
# define BOARD_ID_STR "#### ICT ####\nSHC C3-Sample\n"
# elif defined(CONFIG_SHC_NETBOOT)
# define BOARD_ID_STR "#### NETBOOT ####\nSHC C3-Sample\n"
# elif defined(CONFIG_SHC_SDBOOT)
# define BOARD_ID_STR "#### SDBOOT ####\nSHC C3-Sample\n"
# else
# define BOARD_ID_STR "SHC C3-Sample\n"
# endif
#elif defined CONFIG_SERIES
# if defined(CONFIG_SHC_ICT)
# define BOARD_ID_STR "#### ICT ####\nSHC\n"
# elif defined(CONFIG_SHC_NETBOOT)
# define BOARD_ID_STR "#### NETBOOT ####\nSHC\n"
# elif defined(CONFIG_SHC_SDBOOT)
# define BOARD_ID_STR "#### SDBOOT ####\nSHC\n"
# else
# define BOARD_ID_STR "SHC\n"
# endif
#else
# define BOARD_ID_STR "Unknown device!\n"
#endif
/*
* Definitions for GPIO pin assignments
*/
#if defined CONFIG_B_SAMPLE
# define LED_PWR_BL_GPIO GPIO_TO_PIN(1, 17)
# define LED_PWR_RD_GPIO GPIO_TO_PIN(1, 18)
# define LED_PWR_GN_GPIO GPIO_TO_PIN(1, 19)
# define LED_CONN_BL_GPIO GPIO_TO_PIN(0, 26)
# define LED_CONN_RD_GPIO GPIO_TO_PIN(0, 22)
# define LED_CONN_GN_GPIO GPIO_TO_PIN(0, 23)
# define RESET_GPIO GPIO_TO_PIN(1, 29)
# define WIFI_REGEN_GPIO GPIO_TO_PIN(1, 16)
# define WIFI_RST_GPIO GPIO_TO_PIN(0, 27)
# define ZIGBEE_RST_GPIO GPIO_TO_PIN(3, 18)
# define BIDCOS_RST_GPIO GPIO_TO_PIN(0, 12)
# define ENOC_RST_GPIO GPIO_TO_PIN(1, 22)
#else
# define LED_PWR_BL_GPIO GPIO_TO_PIN(0, 22)
# define LED_PWR_RD_GPIO GPIO_TO_PIN(0, 23)
# define LED_LAN_BL_GPIO GPIO_TO_PIN(1, 17)
# define LED_LAN_RD_GPIO GPIO_TO_PIN(0, 26)
# define LED_CLOUD_BL_GPIO GPIO_TO_PIN(1, 18)
# define LED_CLOUD_RD_GPIO GPIO_TO_PIN(2, 2)
# define LED_PWM_GPIO GPIO_TO_PIN(1, 19)
# define RESET_GPIO GPIO_TO_PIN(1, 29)
# define WIFI_REGEN_GPIO GPIO_TO_PIN(1, 16)
# define WIFI_RST_GPIO GPIO_TO_PIN(0, 27)
# define ZIGBEE_RST_GPIO GPIO_TO_PIN(3, 18)
# define BIDCOS_RST_GPIO GPIO_TO_PIN(1, 24)
# define Z_WAVE_RST_GPIO GPIO_TO_PIN(1, 21)
# define ENOC_RST_GPIO GPIO_TO_PIN(1, 22)
#endif
#define BACK_BUTTON_GPIO GPIO_TO_PIN(1, 29)
#define FRONT_BUTTON_GPIO GPIO_TO_PIN(1, 25)
/* Reset is on GPIO pin 29 of GPIO bank 1 */
#define RESET_MASK (0x1 << 29)
#define HDR_MAGIC 0x43485342
#define HDR_ETH_ALEN 6
#define HDR_NAME_LEN 8
#define HDR_REV_LEN 8
#define HDR_SER_LEN 16
#define HDR_ROOT_LEN 12
#define HDR_FATC_LEN 12
/*
* SHC parameters held in On-Board I²C EEPROM device.
*
* Header Format
*
* Name Size Contents
*-------------------------------------------------------------
* Magic 4 0x42 0x53 0x48 0x43 [BSHC]
*
* Version 2 0x0100 for v1.0
*
* Lenght 2 The length of the complete structure, not only this header
*
* Eth-MAC 6 Ethernet MAC Address
* SHC Pool: 7C:AC:B2:00:10:01 - TBD
*
* --- Further values follow, not important for Bootloader ---
*/
struct shc_eeprom {
u32 magic;
u16 version;
u16 lenght;
uint8_t mac_addr[HDR_ETH_ALEN];
};
void enable_uart0_pin_mux(void);
void enable_shc_board_pin_mux(void);
void enable_shc_board_pwm_pin_mux(void);
#endif
This diff is collapsed.
CONFIG_ARM=y
CONFIG_TARGET_AM335X_SHC=y
CONFIG_SERIES=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=0
CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="U-Boot# "
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n"
CONFIG_AUTOBOOT_DELAY_STR="shc"
CONFIG_AUTOBOOT_STOP_STR="noautoboot"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
CONFIG_ARM=y
CONFIG_TARGET_AM335X_SHC=y
CONFIG_SHC_ICT=y
CONFIG_SERIES=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=0
CONFIG_SYS_PROMPT="U-Boot# "
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n"
CONFIG_AUTOBOOT_DELAY_STR="shc"
CONFIG_AUTOBOOT_STOP_STR="noautoboot"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
CONFIG_ARM=y
CONFIG_TARGET_AM335X_SHC=y
CONFIG_SHC_NETBOOT=y
CONFIG_SERIES=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=0
CONFIG_SYS_PROMPT="U-Boot# "
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n"
CONFIG_AUTOBOOT_DELAY_STR="shc"
CONFIG_AUTOBOOT_STOP_STR="noautoboot"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
CONFIG_ARM=y
CONFIG_TARGET_AM335X_SHC=y
CONFIG_SERIES=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=5
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n"
CONFIG_AUTOBOOT_DELAY_STR="shc"
CONFIG_AUTOBOOT_STOP_STR="noautoboot"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
CONFIG_ARM=y
CONFIG_TARGET_AM335X_SHC=y
CONFIG_SHC_SDBOOT=y
CONFIG_SERIES=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=0
CONFIG_SYS_PROMPT="U-Boot# "
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n"
CONFIG_AUTOBOOT_DELAY_STR="shc"
CONFIG_AUTOBOOT_STOP_STR="noautoboot"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
CONFIG_ARM=y
CONFIG_TARGET_AM335X_SHC=y
CONFIG_SHC_SDBOOT=y
CONFIG_SERIES=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=5
CONFIG_SYS_PROMPT="U-Boot# "
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n"
CONFIG_AUTOBOOT_DELAY_STR="shc"
CONFIG_AUTOBOOT_STOP_STR="noautoboot"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment