4 * TI AM335x boards information header
6 * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
8 * SPDX-License-Identifier: GPL-2.0+
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.
19 #define HDR_NO_OF_MAC_ADDR 3
20 #define HDR_ETH_ALEN 6
21 #define HDR_NAME_LEN 8
23 struct am335x_baseboard_id {
25 char name[HDR_NAME_LEN];
29 char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN];
32 static inline int board_is_bone(struct am335x_baseboard_id *header)
34 return !strncmp(header->name, "A335BONE", HDR_NAME_LEN);
37 static inline int board_is_bone_lt(struct am335x_baseboard_id *header)
39 return !strncmp(header->name, "A335BNLT", HDR_NAME_LEN);
42 static inline int board_is_evm_sk(struct am335x_baseboard_id *header)
44 return !strncmp("A335X_SK", header->name, HDR_NAME_LEN);
47 static inline int board_is_idk(struct am335x_baseboard_id *header)
49 return !strncmp(header->config, "SKU#02", 6);
52 static inline int board_is_gp_evm(struct am335x_baseboard_id *header)
54 return !strncmp("A33515BB", header->name, HDR_NAME_LEN);
57 static inline int board_is_evm_15_or_later(struct am335x_baseboard_id *header)
59 return (board_is_gp_evm(header) &&
60 strncmp("1.5", header->version, 3) <= 0);
64 * We have three pin mux functions that must exist. We must be able to enable
65 * uart0, for initial output and i2c0 to read the main EEPROM. We then have a
66 * main pinmux function that can be overridden to enable all other pinmux that
67 * is required on the board.
69 void enable_uart0_pin_mux(void);
70 void enable_uart1_pin_mux(void);
71 void enable_uart2_pin_mux(void);
72 void enable_uart3_pin_mux(void);
73 void enable_uart4_pin_mux(void);
74 void enable_uart5_pin_mux(void);
75 void enable_i2c0_pin_mux(void);
76 void enable_board_pin_mux(struct am335x_baseboard_id *header);