2012-10-18 01:21:09 +00:00
|
|
|
/*
|
|
|
|
* board.h
|
|
|
|
*
|
|
|
|
* TI AM335x boards information header
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2012-10-18 01:21:09 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _BOARD_H_
|
|
|
|
#define _BOARD_H_
|
|
|
|
|
2016-02-24 18:30:55 +00:00
|
|
|
static inline int board_is_bone(void)
|
|
|
|
{
|
|
|
|
return board_ti_is("A335BONE");
|
|
|
|
}
|
2012-10-18 01:21:09 +00:00
|
|
|
|
2016-02-24 18:30:55 +00:00
|
|
|
static inline int board_is_bone_lt(void)
|
2013-07-18 19:13:01 +00:00
|
|
|
{
|
2016-02-24 18:30:55 +00:00
|
|
|
return board_ti_is("A335BNLT");
|
2013-07-18 19:13:01 +00:00
|
|
|
}
|
|
|
|
|
2016-02-24 18:30:55 +00:00
|
|
|
static inline int board_is_bbg1(void)
|
2013-07-18 19:13:01 +00:00
|
|
|
{
|
2016-02-24 18:30:55 +00:00
|
|
|
return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4);
|
2013-07-18 19:13:01 +00:00
|
|
|
}
|
|
|
|
|
2016-02-24 18:30:55 +00:00
|
|
|
static inline int board_is_evm_sk(void)
|
2013-07-18 19:13:01 +00:00
|
|
|
{
|
2016-02-24 18:30:55 +00:00
|
|
|
return board_ti_is("A335X_SK");
|
2013-07-18 19:13:01 +00:00
|
|
|
}
|
|
|
|
|
2016-02-24 18:30:55 +00:00
|
|
|
static inline int board_is_idk(void)
|
2013-07-18 19:13:01 +00:00
|
|
|
{
|
2016-02-24 18:30:55 +00:00
|
|
|
return !strncmp(board_ti_get_config(), "SKU#02", 6);
|
2013-07-18 19:13:01 +00:00
|
|
|
}
|
|
|
|
|
2016-02-24 18:30:55 +00:00
|
|
|
static inline int board_is_gp_evm(void)
|
2013-07-18 19:13:01 +00:00
|
|
|
{
|
2016-02-24 18:30:55 +00:00
|
|
|
return board_ti_is("A33515BB");
|
2013-07-18 19:13:01 +00:00
|
|
|
}
|
|
|
|
|
2016-02-24 18:30:55 +00:00
|
|
|
static inline int board_is_evm_15_or_later(void)
|
2013-07-18 19:13:01 +00:00
|
|
|
{
|
2016-02-24 18:30:55 +00:00
|
|
|
return (board_is_gp_evm() &&
|
|
|
|
strncmp("1.5", board_ti_get_rev(), 3) <= 0);
|
2013-07-18 19:13:01 +00:00
|
|
|
}
|
|
|
|
|
2016-05-16 06:17:22 +00:00
|
|
|
static inline int board_is_icev2(void)
|
|
|
|
{
|
|
|
|
return board_ti_is("A335_ICE") && !strncmp("2", board_ti_get_rev(), 1);
|
|
|
|
}
|
|
|
|
|
2012-10-18 01:21:09 +00:00
|
|
|
/*
|
|
|
|
* We have three pin mux functions that must exist. We must be able to enable
|
|
|
|
* uart0, for initial output and i2c0 to read the main EEPROM. We then have a
|
|
|
|
* main pinmux function that can be overridden to enable all other pinmux that
|
|
|
|
* is required on the board.
|
|
|
|
*/
|
|
|
|
void enable_uart0_pin_mux(void);
|
2012-10-25 12:21:30 +00:00
|
|
|
void enable_uart1_pin_mux(void);
|
|
|
|
void enable_uart2_pin_mux(void);
|
|
|
|
void enable_uart3_pin_mux(void);
|
|
|
|
void enable_uart4_pin_mux(void);
|
|
|
|
void enable_uart5_pin_mux(void);
|
2012-10-18 01:21:09 +00:00
|
|
|
void enable_i2c0_pin_mux(void);
|
2016-02-24 18:30:55 +00:00
|
|
|
void enable_board_pin_mux(void);
|
2012-10-18 01:21:09 +00:00
|
|
|
#endif
|