board.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * linux/include/asm-arm/arch-omap/board.h
  3. *
  4. * Information structures for board-specific data
  5. *
  6. * Copyright (C) 2004 Nokia Corporation
  7. * Written by Juha Yrjölä <juha.yrjola@nokia.com>
  8. */
  9. #ifndef _OMAP_BOARD_H
  10. #define _OMAP_BOARD_H
  11. #include <linux/config.h>
  12. #include <linux/types.h>
  13. /* Different peripheral ids */
  14. #define OMAP_TAG_CLOCK 0x4f01
  15. #define OMAP_TAG_MMC 0x4f02
  16. #define OMAP_TAG_UART 0x4f03
  17. #define OMAP_TAG_USB 0x4f04
  18. #define OMAP_TAG_LCD 0x4f05
  19. #define OMAP_TAG_GPIO_SWITCH 0x4f06
  20. #define OMAP_TAG_BOOT_REASON 0x4f80
  21. #define OMAP_TAG_FLASH_PART 0x4f81
  22. struct omap_clock_config {
  23. /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */
  24. u8 system_clock_type;
  25. };
  26. struct omap_mmc_config {
  27. u8 mmc_blocks;
  28. s16 mmc1_power_pin, mmc2_power_pin;
  29. s16 mmc1_switch_pin, mmc2_switch_pin;
  30. };
  31. struct omap_uart_config {
  32. u8 console_uart;
  33. u32 console_speed;
  34. };
  35. struct omap_usb_config {
  36. /* Configure drivers according to the connectors on your board:
  37. * - "A" connector (rectagular)
  38. * ... for host/OHCI use, set "register_host".
  39. * - "B" connector (squarish) or "Mini-B"
  40. * ... for device/gadget use, set "register_dev".
  41. * - "Mini-AB" connector (very similar to Mini-B)
  42. * ... for OTG use as device OR host, initialize "otg"
  43. */
  44. unsigned register_host:1;
  45. unsigned register_dev:1;
  46. u8 otg; /* port number, 1-based: usb1 == 2 */
  47. u8 hmc_mode;
  48. /* implicitly true if otg: host supports remote wakeup? */
  49. u8 rwc;
  50. /* signaling pins used to talk to transceiver on usbN:
  51. * 0 == usbN unused
  52. * 2 == usb0-only, using internal transceiver
  53. * 3 == 3 wire bidirectional
  54. * 4 == 4 wire bidirectional
  55. * 6 == 6 wire unidirectional (or TLL)
  56. */
  57. u8 pins[3];
  58. };
  59. struct omap_lcd_config {
  60. char panel_name[16];
  61. char ctrl_name[16];
  62. };
  63. /* Cover:
  64. * high -> closed
  65. * low -> open
  66. * Connection:
  67. * high -> connected
  68. * low -> disconnected
  69. */
  70. #define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
  71. #define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
  72. #define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
  73. struct omap_gpio_switch_config {
  74. char name[12];
  75. u16 gpio;
  76. int flags:4;
  77. int type:4;
  78. int key_code:24; /* Linux key code */
  79. };
  80. struct omap_flash_part_config {
  81. char part_table[0];
  82. };
  83. struct omap_boot_reason_config {
  84. char reason_str[12];
  85. };
  86. struct omap_board_config_entry {
  87. u16 tag;
  88. u16 len;
  89. u8 data[0];
  90. };
  91. struct omap_board_config_kernel {
  92. u16 tag;
  93. const void *data;
  94. };
  95. extern const void *__omap_get_config(u16 tag, size_t len, int nr);
  96. #define omap_get_config(tag, type) \
  97. ((const type *) __omap_get_config((tag), sizeof(type), 0))
  98. #define omap_get_nr_config(tag, type, nr) \
  99. ((const type *) __omap_get_config((tag), sizeof(type), (nr)))
  100. extern const void *omap_get_var_config(u16 tag, size_t *len);
  101. extern struct omap_board_config_kernel *omap_board_config;
  102. extern int omap_board_config_size;
  103. #endif