4 #include <linux/device.h>
5 #include <linux/platform_device.h>
7 #include <linux/types.h>
8 #include <linux/timer.h>
9 #include <linux/notifier.h>
10 #include <asm/setup.h>
11 #include <plat/board.h>
12 #include <mach/sram.h>
13 #include <linux/i2c-gpio.h>
15 #define GPIO_SWPORTA_DR 0x0000
16 #define GPIO_SWPORTA_DDR 0x0004
18 extern struct rk29_sdmmc_platform_data default_sdmmc0_data;
19 extern struct rk29_sdmmc_platform_data default_sdmmc1_data;
21 extern struct i2c_gpio_platform_data default_i2c_gpio_data;
23 void __init rk2928_map_common_io(void);
24 void __init rk2928_init_irq(void);
25 void __init rk2928_map_io(void);
27 void __init rk2928_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi);
28 void __init rk2928_clock_data_init(unsigned long gpll,unsigned long cpll,u32 flags);
29 void __init board_clock_init(void);
30 void __init rk2928_iomux_init(void);
31 void board_gpio_suspend(void);
32 void board_gpio_resume(void);
33 void __sramfunc board_pmu_suspend(void);
34 void __sramfunc board_pmu_resume(void);
36 extern struct sys_timer rk2928_timer;
38 //#if defined CONFIG_BATTERY_RK30_ADC_FAC
40 struct rk30_adc_battery_platform_data {
42 int (*io_deinit)(void);
43 int (*is_dc_charging)(void);
44 int (*charging_ok)(void);
46 int (*is_usb_charging)(void);
47 int spport_usb_charging ;
61 int dc_det_pin_pull; //pull up/down enable/disbale
62 int batt_low_pin_pull;
63 int charge_ok_pin_pull;
64 int charge_set_pin_pull;
66 int low_voltage_protection; // low voltage protection
68 int charging_sleep; // don't have lock,if chargeing_sleep = 0;else have lock
71 int save_capacity; //save capacity to /data/bat_last_capacity.dat, suggested use
73 int reference_voltage; // the rK2928 is 3300;RK3066 and rk29 are 2500;rk3066B is 1800;
74 int pull_up_res; //divider resistance , pull-up resistor
75 int pull_down_res; //divider resistance , pull-down resistor
77 int time_down_discharge; //the time of capactiy drop 1% --discharge
78 int time_up_charge; //the time of capacity up 1% ---charging
84 #ifndef _LINUX_WLAN_PLAT_H_
85 struct wifi_platform_data {
86 int (*set_power)(int val);
87 int (*set_reset)(int val);
88 int (*set_carddetect)(int val);
89 void *(*mem_prealloc)(int section, unsigned long size);
90 int (*get_mac_addr)(unsigned char *buf);
93 #if defined (CONFIG_EETI_EGALAX)
94 struct eeti_egalax_platform_data{
97 int (*get_pendown_state)(void);
98 int (*init_platform_hw)(void);
99 int (*eeti_egalax_platform_sleep)(void);
100 int (*eeti_egalax_platform_wakeup)(void);
101 void (*exit_platform_hw)(void);
109 #if defined (CONFIG_TOUCHSCREEN_SITRONIX_A720)
110 struct ft5x0x_platform_data{
112 int (*get_pendown_state)(void);
113 int (*init_platform_hw)(void);
114 int (*ft5x0x_platform_sleep)(void);
115 int (*ft5x0x_platform_wakeup)(void);
116 void (*exit_platform_hw)(void);
120 #if defined (CONFIG_TOUCHSCREEN_I30)
121 struct ft5306_platform_data {
124 int (*get_pendown_state)(void);
125 int (*init_platform_hw)(void);
126 int (*platform_sleep)(void);
127 int (*platform_wakeup)(void);
128 void (*exit_platform_hw)(void);
131 #if defined(CONFIG_TOUCHSCREEN_BYD693X)
132 struct byd_platform_data {
140 uint16_t screen_max_x;
141 uint16_t screen_max_y;
149 #if defined (CONFIG_GPIOEXP_AW9523B)
150 struct gpio_exp_platform_data {
151 int (*init_platform_hw)(void);
152 void (*exit_platform_hw)(void);
156 #ifdef CONFIG_INPUT_AP321XX
157 struct ap321xx_platform_data {
158 int (*init_platform_hw)(void);
159 void (*exit_platform_hw)(void);
164 periph_pll_1485mhz = 148500000,
165 periph_pll_297mhz = 297000000,
166 periph_pll_300mhz = 300000000,
167 periph_pll_1188mhz = 1188000000, /* for box*/
170 codec_pll_360mhz = 360000000, /* for HDMI */
171 codec_pll_408mhz = 408000000,
172 codec_pll_456mhz = 456000000,
173 codec_pll_504mhz = 504000000,
174 codec_pll_552mhz = 552000000, /* for HDMI */
175 codec_pll_600mhz = 600000000,
176 codec_pll_742_5khz = 742500000,
177 codec_pll_798mhz = 798000000,
178 codec_pll_1064mhz = 1064000000,
179 codec_pll_1188mhz = 1188000000,
183 #define CLK_FLG_MAX_I2S_12288KHZ (1<<1)
184 #define CLK_FLG_MAX_I2S_22579_2KHZ (1<<2)
185 #define CLK_FLG_MAX_I2S_24576KHZ (1<<3)
186 #define CLK_FLG_MAX_I2S_49152KHZ (1<<4)
188 #define RK30_CLOCKS_DEFAULT_FLAGS (CLK_FLG_MAX_I2S_12288KHZ/*|CLK_FLG_EXT_27MHZ*/)
189 #define periph_pll_default periph_pll_297mhz
190 #define codec_pll_default codec_pll_798mhz
191 //#define codec_pll_default codec_pll_1064mhz