blob: 091162ee20ff8ff9b49f571e483d43775e300f2a [file] [log] [blame]
Lokesh Vutlafaa680f2013-07-30 11:36:27 +05301/*
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
Sekhar Nori2ab3c492013-12-10 15:02:15 +053015#include <asm/arch/omap.h>
16
17static 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
Lokesh Vutla42c213a2013-12-10 15:02:20 +053028#define DEV_ATTR_MAX_OFFSET 5
29#define DEV_ATTR_MIN_OFFSET 0
30
Sekhar Nori2ab3c492013-12-10 15:02:15 +053031struct am43xx_board_id {
32 unsigned int magic;
33 char name[HDR_NAME_LEN];
34 char version[4];
35 char serial[12];
36 char config[32];
37 char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN];
38};
39
40static inline int board_is_eposevm(void)
41{
42 return !strncmp(am43xx_board_name, "AM43EPOS", HDR_NAME_LEN);
43}
44
45static inline int board_is_gpevm(void)
46{
47 return !strncmp(am43xx_board_name, "AM43__GP", HDR_NAME_LEN);
48}
49
Lokesh Vutlafaa680f2013-07-30 11:36:27 +053050void enable_uart0_pin_mux(void);
51void enable_board_pin_mux(void);
Lokesh Vutla42c213a2013-12-10 15:02:20 +053052void enable_i2c0_pin_mux(void);
Lokesh Vutlafaa680f2013-07-30 11:36:27 +053053#endif