Peter Korsgaard | e363426 | 2012-10-18 01:21:09 +0000 | [diff] [blame] | 1 | /* |
| 2 | * board.h |
| 3 | * |
| 4 | * TI AM335x boards information header |
| 5 | * |
| 6 | * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/ |
| 7 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 8 | * SPDX-License-Identifier: GPL-2.0+ |
Peter Korsgaard | e363426 | 2012-10-18 01:21:09 +0000 | [diff] [blame] | 9 | */ |
| 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 | |
| 23 | struct 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 | */ |
| 38 | void enable_uart0_pin_mux(void); |
Andrew Bradford | 6422b70 | 2012-10-25 08:21:30 -0400 | [diff] [blame] | 39 | void enable_uart1_pin_mux(void); |
| 40 | void enable_uart2_pin_mux(void); |
| 41 | void enable_uart3_pin_mux(void); |
| 42 | void enable_uart4_pin_mux(void); |
| 43 | void enable_uart5_pin_mux(void); |
Peter Korsgaard | e363426 | 2012-10-18 01:21:09 +0000 | [diff] [blame] | 44 | void enable_i2c0_pin_mux(void); |
| 45 | void enable_board_pin_mux(struct am335x_baseboard_id *header); |
| 46 | #endif |