blob: a7a4c669ab50f8eccff9e56e5ac6ee1c37f69b24 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _OMAP_BOARD_H
13#define _OMAP_BOARD_H
Ben Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#include <linux/types.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080016
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017#include <asm/arch/gpio-switch.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080018
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080019#define OMAP_TAG_CLOCK 0x4f01
20#define OMAP_TAG_MMC 0x4f02
21#define OMAP_TAG_SERIAL_CONSOLE 0x4f03
22#define OMAP_TAG_USB 0x4f04
23#define OMAP_TAG_LCD 0x4f05
24#define OMAP_TAG_GPIO_SWITCH 0x4f06
25#define OMAP_TAG_UART 0x4f07
26#define OMAP_TAG_FBMEM 0x4f08
27#define OMAP_TAG_STI_CONSOLE 0x4f09
28#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
29#define OMAP_TAG_BT 0x4f0b
Ben Cheng4b29af02012-03-07 16:14:53 -080030
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080031#define OMAP_TAG_BOOT_REASON 0x4f80
32#define OMAP_TAG_FLASH_PART 0x4f81
33#define OMAP_TAG_VERSION_STR 0x4f82
Ben Cheng4b29af02012-03-07 16:14:53 -080034
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080035struct omap_clock_config {
Ben Cheng4b29af02012-03-07 16:14:53 -080036
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080037 u8 system_clock_type;
38};
Ben Cheng4b29af02012-03-07 16:14:53 -080039
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080040struct omap_mmc_conf {
41 unsigned enabled:1;
Ben Cheng4b29af02012-03-07 16:14:53 -080042
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080043 unsigned nomux:1;
Ben Cheng4b29af02012-03-07 16:14:53 -080044
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080045 unsigned cover:1;
Ben Cheng4b29af02012-03-07 16:14:53 -080046
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080047 unsigned wire4:1;
48 s16 power_pin;
49 s16 switch_pin;
50 s16 wp_pin;
51};
Ben Cheng4b29af02012-03-07 16:14:53 -080052
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080053struct omap_mmc_config {
54 struct omap_mmc_conf mmc[2];
55};
Ben Cheng4b29af02012-03-07 16:14:53 -080056
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080057struct omap_serial_console_config {
58 u8 console_uart;
59 u32 console_speed;
60};
Ben Cheng4b29af02012-03-07 16:14:53 -080061
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080062struct omap_sti_console_config {
63 unsigned enable:1;
64 u8 channel;
65};
Ben Cheng4b29af02012-03-07 16:14:53 -080066
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080067struct omap_camera_sensor_config {
68 u16 reset_gpio;
69 int (*power_on)(void * data);
70 int (*power_off)(void * data);
71};
Ben Cheng4b29af02012-03-07 16:14:53 -080072
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080073struct omap_usb_config {
Ben Cheng4b29af02012-03-07 16:14:53 -080074
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080075 unsigned register_host:1;
76 unsigned register_dev:1;
77 u8 otg;
Ben Cheng4b29af02012-03-07 16:14:53 -080078
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080079 u8 hmc_mode;
Ben Cheng4b29af02012-03-07 16:14:53 -080080
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080081 u8 rwc;
Ben Cheng4b29af02012-03-07 16:14:53 -080082
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080083 u8 pins[3];
84};
Ben Cheng4b29af02012-03-07 16:14:53 -080085
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080086struct omap_lcd_config {
87 char panel_name[16];
88 char ctrl_name[16];
89 s16 nreset_gpio;
90 u8 data_lines;
91};
Ben Cheng4b29af02012-03-07 16:14:53 -080092
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080093struct device;
94struct fb_info;
95struct omap_backlight_config {
96 int default_intensity;
97 int (*set_power)(struct device *dev, int state);
98 int (*check_fb)(struct fb_info *fb);
99};
Ben Cheng4b29af02012-03-07 16:14:53 -0800100
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800101struct omap_fbmem_config {
102 u32 start;
103 u32 size;
104};
Ben Cheng4b29af02012-03-07 16:14:53 -0800105
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800106struct omap_pwm_led_platform_data {
107 const char *name;
108 int intensity_timer;
109 int blink_timer;
110 void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
111};
Ben Cheng4b29af02012-03-07 16:14:53 -0800112
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800113struct omap_gpio_switch_config {
114 char name[12];
115 u16 gpio;
116 int flags:4;
117 int type:4;
118 int key_code:24;
119};
Ben Cheng4b29af02012-03-07 16:14:53 -0800120
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800121struct omap_uart_config {
Ben Cheng4b29af02012-03-07 16:14:53 -0800122
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800123 unsigned int enabled_uarts;
124};
Ben Cheng4b29af02012-03-07 16:14:53 -0800125
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800126struct omap_flash_part_config {
127 char part_table[0];
128};
Ben Cheng4b29af02012-03-07 16:14:53 -0800129
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800130struct omap_boot_reason_config {
131 char reason_str[12];
132};
Ben Cheng4b29af02012-03-07 16:14:53 -0800133
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800134struct omap_version_config {
135 char component[12];
136 char version[12];
137};
Ben Cheng4b29af02012-03-07 16:14:53 -0800138
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800139struct omap_board_config_entry {
140 u16 tag;
141 u16 len;
142 u8 data[0];
143};
Ben Cheng4b29af02012-03-07 16:14:53 -0800144
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800145struct omap_board_config_kernel {
146 u16 tag;
147 const void *data;
148};
Ben Cheng4b29af02012-03-07 16:14:53 -0800149
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800150struct omap_bluetooth_config {
151 u8 chip_type;
152 u8 bt_uart;
153 u8 bd_addr[6];
154 u8 bt_sysclk;
155 int bt_wakeup_gpio;
156 int host_wakeup_gpio;
157 int reset_gpio;
158};
Ben Cheng4b29af02012-03-07 16:14:53 -0800159
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800160#define omap_get_config(tag, type) ((const type *) __omap_get_config((tag), sizeof(type), 0))
161#define omap_get_nr_config(tag, type, nr) ((const type *) __omap_get_config((tag), sizeof(type), (nr)))
Ben Cheng4b29af02012-03-07 16:14:53 -0800162
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800163#endif