xref: /openbmc/u-boot/board/ti/am43xx/board.h (revision e8f80a5a)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * board.h
4  *
5  * TI AM437x boards information header
6  * Derived from AM335x board.
7  *
8  * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/
9  */
10 
11 #ifndef _BOARD_H_
12 #define _BOARD_H_
13 
14 #include <asm/arch/omap.h>
15 
16 #define DEV_ATTR_MAX_OFFSET    5
17 #define DEV_ATTR_MIN_OFFSET    0
18 
board_is_eposevm(void)19 static inline int board_is_eposevm(void)
20 {
21 	return board_ti_is("AM43EPOS");
22 }
23 
board_is_gpevm(void)24 static inline int board_is_gpevm(void)
25 {
26 	return board_ti_is("AM43__GP");
27 }
28 
board_is_sk(void)29 static inline int board_is_sk(void)
30 {
31 	return board_ti_is("AM43__SK");
32 }
33 
board_is_idk(void)34 static inline int board_is_idk(void)
35 {
36 	return board_ti_is("AM43_IDK");
37 }
38 
board_is_hsevm(void)39 static inline int board_is_hsevm(void)
40 {
41 	return board_ti_is("AM43XXHS");
42 }
43 
board_is_evm(void)44 static inline int board_is_evm(void)
45 {
46 	return board_is_gpevm() || board_is_hsevm();
47 }
48 
board_is_evm_14_or_later(void)49 static inline int board_is_evm_14_or_later(void)
50 {
51 	return board_is_evm() && strncmp("1.4", board_ti_get_rev(), 3) <= 0;
52 }
53 
board_is_evm_12_or_later(void)54 static inline int board_is_evm_12_or_later(void)
55 {
56 	return board_is_evm() && strncmp("1.2", board_ti_get_rev(), 3) <= 0;
57 }
58 
59 void enable_uart0_pin_mux(void);
60 void enable_board_pin_mux(void);
61 void enable_i2c0_pin_mux(void);
62 #endif
63