blob: 9fea1f15a629614a788472ccbabab5eecaac9df4 [file] [log] [blame]
Peter Korsgaarde3634262012-10-18 01:21:09 +00001/*
2 * board.h
3 *
4 * TI AM335x boards information header
5 *
6 * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
7 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02008 * SPDX-License-Identifier: GPL-2.0+
Peter Korsgaarde3634262012-10-18 01:21:09 +00009 */
10
11#ifndef _BOARD_H_
12#define _BOARD_H_
13
14/*
15 * TI AM335x parts define a system EEPROM that defines certain sub-fields.
16 * We use these fields to in turn see what board we are on, and what
17 * that might require us to set or not set.
18 */
19#define HDR_NO_OF_MAC_ADDR 3
20#define HDR_ETH_ALEN 6
21#define HDR_NAME_LEN 8
22
23struct am335x_baseboard_id {
24 unsigned int magic;
25 char name[HDR_NAME_LEN];
26 char version[4];
27 char serial[12];
28 char config[32];
29 char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN];
30};
31
32/*
33 * We have three pin mux functions that must exist. We must be able to enable
34 * uart0, for initial output and i2c0 to read the main EEPROM. We then have a
35 * main pinmux function that can be overridden to enable all other pinmux that
36 * is required on the board.
37 */
38void enable_uart0_pin_mux(void);
Andrew Bradford6422b702012-10-25 08:21:30 -040039void enable_uart1_pin_mux(void);
40void enable_uart2_pin_mux(void);
41void enable_uart3_pin_mux(void);
42void enable_uart4_pin_mux(void);
43void enable_uart5_pin_mux(void);
Peter Korsgaarde3634262012-10-18 01:21:09 +000044void enable_i2c0_pin_mux(void);
45void enable_board_pin_mux(struct am335x_baseboard_id *header);
46#endif