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