2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2013-07-30 06:06:27 +00:00
|
|
|
/*
|
|
|
|
* board.h
|
|
|
|
*
|
|
|
|
* TI AM437x boards information header
|
|
|
|
* Derived from AM335x board.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _BOARD_H_
|
|
|
|
#define _BOARD_H_
|
|
|
|
|
2013-12-10 09:32:15 +00:00
|
|
|
#include <asm/arch/omap.h>
|
|
|
|
|
2016-02-24 18:30:56 +00:00
|
|
|
#define DEV_ATTR_MAX_OFFSET 5
|
|
|
|
#define DEV_ATTR_MIN_OFFSET 0
|
2013-12-10 09:32:15 +00:00
|
|
|
|
|
|
|
static inline int board_is_eposevm(void)
|
|
|
|
{
|
2016-02-24 18:30:56 +00:00
|
|
|
return board_ti_is("AM43EPOS");
|
2013-12-10 09:32:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline int board_is_gpevm(void)
|
|
|
|
{
|
2016-02-24 18:30:56 +00:00
|
|
|
return board_ti_is("AM43__GP");
|
2013-12-10 09:32:15 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 20:01:20 +00:00
|
|
|
static inline int board_is_sk(void)
|
|
|
|
{
|
2016-02-24 18:30:56 +00:00
|
|
|
return board_ti_is("AM43__SK");
|
2014-06-10 20:01:20 +00:00
|
|
|
}
|
|
|
|
|
2014-12-22 22:26:17 +00:00
|
|
|
static inline int board_is_idk(void)
|
|
|
|
{
|
2016-02-24 18:30:56 +00:00
|
|
|
return board_ti_is("AM43_IDK");
|
2014-12-22 22:26:17 +00:00
|
|
|
}
|
|
|
|
|
2016-05-20 00:10:48 +00:00
|
|
|
static inline int board_is_hsevm(void)
|
|
|
|
{
|
|
|
|
return board_ti_is("AM43XXHS");
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int board_is_evm(void)
|
|
|
|
{
|
|
|
|
return board_is_gpevm() || board_is_hsevm();
|
|
|
|
}
|
|
|
|
|
2014-06-27 18:31:14 +00:00
|
|
|
static inline int board_is_evm_14_or_later(void)
|
|
|
|
{
|
2016-05-20 00:10:48 +00:00
|
|
|
return board_is_evm() && strncmp("1.4", board_ti_get_rev(), 3) <= 0;
|
2014-06-27 18:31:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline int board_is_evm_12_or_later(void)
|
|
|
|
{
|
2016-05-20 00:10:48 +00:00
|
|
|
return board_is_evm() && strncmp("1.2", board_ti_get_rev(), 3) <= 0;
|
2014-06-27 18:31:14 +00:00
|
|
|
}
|
|
|
|
|
2013-07-30 06:06:27 +00:00
|
|
|
void enable_uart0_pin_mux(void);
|
|
|
|
void enable_board_pin_mux(void);
|
2013-12-10 09:32:20 +00:00
|
|
|
void enable_i2c0_pin_mux(void);
|
2013-07-30 06:06:27 +00:00
|
|
|
#endif
|