board.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #ifndef _BOARD_H_
  11. #define _BOARD_H_
  12. /* Serial MagicE: AA 55 BA BE */
  13. #define BOARD_MAGIC 0xBEBA55AA
  14. enum board_type {UNKNOWN, BAV335A, BAV335B};
  15. /*
  16. * The BAV335x may use a built-in read-only serial EEProm.
  17. * The Evaluation board, disables the write-protect so the Serial-EE
  18. * Can be programmed during manufacturing to store fields such as
  19. * a board serial number, ethernet mac address and other user fields.
  20. * Additionally, the Serial-EE can store the specific version of the
  21. * board it runs on, and overwrite the defaults in _defconfig
  22. */
  23. #define HDR_NO_OF_MAC_ADDR 3
  24. #define HDR_ETH_ALEN 6
  25. #define HDR_NAME_LEN 8
  26. struct board_eeconfig {
  27. unsigned int magic;
  28. char name[HDR_NAME_LEN]; /* BAV3354 */
  29. char version[4]; /* 0B20 - Rev.B2 */
  30. char serial[16];
  31. char config[32];
  32. char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN];
  33. };
  34. enum board_type get_board_type(bool verbose_debug_output);
  35. /*
  36. * We have three pin mux functions that must exist. We must be able to enable
  37. * uart0, for initial output and i2c0 to read the main EEPROM. We then have a
  38. * main pinmux function that can be overridden to enable all other pinmux that
  39. * is required on the board.
  40. */
  41. void enable_uart0_pin_mux(void);
  42. void enable_uart1_pin_mux(void);
  43. void enable_uart2_pin_mux(void);
  44. void enable_uart3_pin_mux(void);
  45. void enable_uart4_pin_mux(void);
  46. void enable_uart5_pin_mux(void);
  47. void enable_i2c0_pin_mux(void);
  48. void enable_board_pin_mux(enum board_type board);
  49. #endif