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