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 #define PMIC_TYPE_TPS65910 2
19 #define PMIC_TYPE_ACT8931 3
21 extern struct rk29_sdmmc_platform_data default_sdmmc0_data;
22 extern struct rk29_sdmmc_platform_data default_sdmmc1_data;
24 extern struct i2c_gpio_platform_data default_i2c_gpio_data;
26 void __init rk2928_map_common_io(void);
27 void __init rk2928_init_irq(void);
28 void __init rk2928_map_io(void);
30 void __init rk2928_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi);
31 void __init rk2928_clock_data_init(unsigned long gpll,unsigned long cpll,u32 flags);
32 void __init board_clock_init(void);
33 void __init rk2928_iomux_init(void);
34 void board_gpio_suspend(void);
35 void board_gpio_resume(void);
36 void __sramfunc board_pmu_suspend(void);
37 void __sramfunc board_pmu_resume(void);
39 extern struct sys_timer rk2928_timer;
41 //#if defined CONFIG_BATTERY_RK30_ADC_FAC
43 struct rk30_adc_battery_platform_data {
45 int (*io_deinit)(void);
46 int (*is_dc_charging)(void);
47 int (*charging_ok)(void);
49 int (*is_usb_charging)(void);
50 int spport_usb_charging ;
64 int dc_det_pin_pull; //pull up/down enable/disbale
65 int batt_low_pin_pull;
66 int charge_ok_pin_pull;
67 int charge_set_pin_pull;
69 int low_voltage_protection; // low voltage protection
71 int charging_sleep; // don't have lock,if chargeing_sleep = 0;else have lock
74 int save_capacity; //save capacity to /data/bat_last_capacity.dat, suggested use
76 int reference_voltage; // the rK2928 is 3300;RK3066 and rk29 are 2500;rk3066B is 1800;
77 int pull_up_res; //divider resistance , pull-up resistor
78 int pull_down_res; //divider resistance , pull-down resistor
80 int time_down_discharge; //the time of capactiy drop 1% --discharge
81 int time_up_charge; //the time of capacity up 1% ---charging
87 #ifndef _LINUX_WLAN_PLAT_H_
88 struct wifi_platform_data {
89 int (*set_power)(int val);
90 int (*set_reset)(int val);
91 int (*set_carddetect)(int val);
92 void *(*mem_prealloc)(int section, unsigned long size);
93 int (*get_mac_addr)(unsigned char *buf);
96 #if defined (CONFIG_EETI_EGALAX)
97 struct eeti_egalax_platform_data{
100 int (*get_pendown_state)(void);
101 int (*init_platform_hw)(void);
102 int (*eeti_egalax_platform_sleep)(void);
103 int (*eeti_egalax_platform_wakeup)(void);
104 void (*exit_platform_hw)(void);
112 #if defined (CONFIG_TOUCHSCREEN_SITRONIX_A720)
113 struct ft5x0x_platform_data{
115 int (*get_pendown_state)(void);
116 int (*init_platform_hw)(void);
117 int (*ft5x0x_platform_sleep)(void);
118 int (*ft5x0x_platform_wakeup)(void);
119 void (*exit_platform_hw)(void);
123 #if defined (CONFIG_TOUCHSCREEN_I30)
124 struct ft5306_platform_data {
127 int (*get_pendown_state)(void);
128 int (*init_platform_hw)(void);
129 int (*platform_sleep)(void);
130 int (*platform_wakeup)(void);
131 void (*exit_platform_hw)(void);
134 #if defined(CONFIG_TOUCHSCREEN_BYD693X)
135 struct byd_platform_data {
143 uint16_t screen_max_x;
144 uint16_t screen_max_y;
152 #if defined (CONFIG_GPIOEXP_AW9523B)
153 struct gpio_exp_platform_data {
154 int (*init_platform_hw)(void);
155 void (*exit_platform_hw)(void);
159 #ifdef CONFIG_INPUT_AP321XX
160 struct ap321xx_platform_data {
161 int (*init_platform_hw)(void);
162 void (*exit_platform_hw)(void);
167 periph_pll_1485mhz = 148500000,
168 periph_pll_297mhz = 297000000,
169 periph_pll_300mhz = 300000000,
170 periph_pll_1188mhz = 1188000000, /* for box*/
173 codec_pll_360mhz = 360000000, /* for HDMI */
174 codec_pll_408mhz = 408000000,
175 codec_pll_456mhz = 456000000,
176 codec_pll_504mhz = 504000000,
177 codec_pll_552mhz = 552000000, /* for HDMI */
178 codec_pll_600mhz = 600000000,
179 codec_pll_742_5khz = 742500000,
180 codec_pll_798mhz = 798000000,
181 codec_pll_1064mhz = 1064000000,
182 codec_pll_1188mhz = 1188000000,
186 #define CLK_FLG_MAX_I2S_12288KHZ (1<<1)
187 #define CLK_FLG_MAX_I2S_22579_2KHZ (1<<2)
188 #define CLK_FLG_MAX_I2S_24576KHZ (1<<3)
189 #define CLK_FLG_MAX_I2S_49152KHZ (1<<4)
191 #define RK30_CLOCKS_DEFAULT_FLAGS (CLK_FLG_MAX_I2S_12288KHZ/*|CLK_FLG_EXT_27MHZ*/)
192 #define periph_pll_default periph_pll_297mhz
193 #define codec_pll_default codec_pll_798mhz
194 //#define codec_pll_default codec_pll_1064mhz