soft_switch.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * U-Boot - main board file
  3. *
  4. * Copyright (c) 2008-2011 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2 or later.
  7. */
  8. #ifndef __BOARD_SOFT_SWITCH_H__
  9. #define __BOARD_SOFT_SWITCH_H__
  10. #include <asm/soft_switch.h>
  11. /* switch 0 port A */
  12. #define CAN_EN 0x1
  13. #define CAN_STB 0x2
  14. #define CAN0_ERR_EN 0x4
  15. #define CAN0RX_EN 0x8
  16. #define CNT0UD_EN 0x10
  17. #define CNT0DG_EN 0x20
  18. #define CNT0ZM_EN 0x40
  19. #define RMII_CLK_EN 0x80
  20. /* switch 0 port B */
  21. #define UART0RTS_EN 0x1
  22. #define UART0RX_EN 0x2
  23. #define UART0CTS_EN 0x4
  24. #define UART0CTS_RTS_LPBK 0x8
  25. #define UART0CTS_RST_EN 0x10
  26. #define UART0CTS_146_EN 0x20
  27. #define TEMP_IRQ_EN 0x40
  28. #define TEMP_THERM_EN 0x80
  29. /* switch 1 port A */
  30. #define OVERRIDE_SMC0_LP0_BOOT 0x1
  31. #define SMC0_EPPI2_LP1_SWITCH 0x2
  32. #define SMC0_LP0_EN 0x8
  33. #define LED1_GPIO_EN 0x10
  34. #define LED2_GPIO_EN 0x20
  35. #define LED3_GPIO_EN 0x40
  36. #define LED4_GPIO_EN 0x80
  37. /* switch 1 port B */
  38. #define PUSHBUTTON1_EN 0x1
  39. #define PUSHBUTTON2_EN 0x2
  40. #define SD_CD_EN 0x4
  41. #define SD_WP_EN 0x8
  42. #define SPIFLASH_CS_EN 0x10
  43. #define SPI0D2_EN 0x20
  44. #define SPI0D3_EN 0x40
  45. /* switch 2 port A */
  46. #define PHYINT_EN 0x1
  47. #define PHY_PWR_DWN_INT 0x2
  48. #define PHYAD0 0x4
  49. #define ETHERNET_EN 0x8
  50. #define WAKE_PUSHBUTTON_EN 0x10
  51. #define PD0_SPI0D2_EN 0x20
  52. #define PD1_SPI0D3_EN 0x40
  53. #define PD2_SPI0MISO_EN 0x80
  54. /* switch 2 port B */
  55. #define PD3_SPI0MOSI_EN 0x1
  56. #define PD4_SPI0CK_EN 0x2
  57. #ifdef CONFIG_BFIN_BOARD_VERSION_1_0
  58. #define SWITCH_ADDR 0x21
  59. #else
  60. #define SWITCH_ADDR 0x20
  61. #endif
  62. #define NUM_SWITCH 3
  63. #define IODIRA 0x0
  64. #define IODIRB 0x1
  65. #define OLATA 0x14
  66. #define OLATB 0x15
  67. int setup_board_switches(void);
  68. #endif /* __BOARD_SOFT_SWITCH_H__ */