xref: /openbmc/u-boot/board/birdland/bav335x/board.h (revision 2290fe06)
1 /*
2  * board.c
3  *
4  * Board functions for Birdland Audio BAV335x Network Processor
5  *
6  * Copyright (c) 2012-2014, Birdland Audio - http://birdland.com/oem
7  *
8  *
9  * SPDX-License-Identifier:	GPL-2.0+
10  */
11 
12 #ifndef _BOARD_H_
13 #define _BOARD_H_
14 
15 /* Serial MagicE: AA 55 BA BE */
16 #define BOARD_MAGIC  0xBEBA55AA
17 enum board_type {UNKNOWN, BAV335A, BAV335B};
18 
19 
20 /*
21  * The BAV335x may use a built-in read-only serial EEProm.
22  * The Evaluation board, disables the write-protect so the Serial-EE
23  * Can be programmed during manufacturing to store fields such as
24  * a board serial number, ethernet mac address and other user fields.
25  * Additionally, the Serial-EE can store the specific version of the
26  * board it runs on, and overwrite the defaults in _defconfig
27  */
28 #define HDR_NO_OF_MAC_ADDR	3
29 #define HDR_ETH_ALEN		6
30 #define HDR_NAME_LEN		8
31 
32 struct board_eeconfig {
33 	unsigned int  magic;
34 	char name[HDR_NAME_LEN];	/* BAV3354 */
35 	char version[4];		/* 0B20 - Rev.B2 */
36 	char serial[16];
37 	char config[32];
38 	char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN];
39 };
40 
41 enum board_type get_board_type(bool verbose_debug_output);
42 
43 
44 /*
45  * We have three pin mux functions that must exist.  We must be able to enable
46  * uart0, for initial output and i2c0 to read the main EEPROM.  We then have a
47  * main pinmux function that can be overridden to enable all other pinmux that
48  * is required on the board.
49  */
50 void enable_uart0_pin_mux(void);
51 void enable_uart1_pin_mux(void);
52 void enable_uart2_pin_mux(void);
53 void enable_uart3_pin_mux(void);
54 void enable_uart4_pin_mux(void);
55 void enable_uart5_pin_mux(void);
56 void enable_i2c0_pin_mux(void);
57 void enable_board_pin_mux(enum board_type board);
58 
59 #endif
60