xref: /rk3399_rockchip-uboot/board/ti/am43xx/board.h (revision 9f1a8cd33fec83c5e04c8d1103fb3ee2857ff2f0)
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 static char *const am43xx_board_name = (char *)AM4372_BOARD_NAME_START;
18 
19 /*
20  * TI AM437x EVMs define a system EEPROM that defines certain sub-fields.
21  * We use these fields to in turn see what board we are on, and what
22  * that might require us to set or not set.
23  */
24 #define HDR_NO_OF_MAC_ADDR	3
25 #define HDR_ETH_ALEN		6
26 #define HDR_NAME_LEN		8
27 
28 struct am43xx_board_id {
29 	unsigned int  magic;
30 	char name[HDR_NAME_LEN];
31 	char version[4];
32 	char serial[12];
33 	char config[32];
34 	char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN];
35 };
36 
37 static inline int board_is_eposevm(void)
38 {
39 	return !strncmp(am43xx_board_name, "AM43EPOS", HDR_NAME_LEN);
40 }
41 
42 static inline int board_is_gpevm(void)
43 {
44 	return !strncmp(am43xx_board_name, "AM43__GP", HDR_NAME_LEN);
45 }
46 
47 void enable_uart0_pin_mux(void);
48 void enable_board_pin_mux(void);
49 #endif
50