From: wuhao Date: Fri, 15 Mar 2013 01:38:56 +0000 (+0800) Subject: rk3188 ds1006h: add hardware V1.2 support X-Git-Tag: firefly_0821_release~7406 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0b5ce5d965d761505365d2f43f6a50553c3004ea;p=firefly-linux-kernel-4.4.55.git rk3188 ds1006h: add hardware V1.2 support --- diff --git a/arch/arm/mach-rk3188/board-rk3188-ds1006h-sdmmc-config.c b/arch/arm/mach-rk3188/board-rk3188-ds1006h-sdmmc-config.c index 7507acdefd69..827fa7f95cd8 100644 --- a/arch/arm/mach-rk3188/board-rk3188-ds1006h-sdmmc-config.c +++ b/arch/arm/mach-rk3188/board-rk3188-ds1006h-sdmmc-config.c @@ -12,6 +12,8 @@ * ******************************************************************************************/ +#define DS1006H_V1_2_SUPPORT 0 + /* ** If you select the macro of CONFIG_SDMMC0_RK29_WRITE_PROTECT, You must define the following values. ** Otherwise, there is no need to define the following values¡£ @@ -88,12 +90,17 @@ int rk31sdk_get_sdmmc0_pin_io_voltage(void) //#define RK30SDK_WIFI_GPIO_RESET_N RK30_PIN3_PD1 //#define RK30SDK_WIFI_GPIO_RESET_ENABLE_VALUE GPIO_HIGH + #else + #if DS1006H_V1_2_SUPPORT + #define RK30SDK_WIFI_GPIO_POWER_N RK30_PIN3_PD0 + #define RK30SDK_WIFI_GPIO_POWER_ENABLE_VALUE GPIO_HIGH #else #define RK30SDK_WIFI_GPIO_POWER_N RK30_PIN0_PA5 #define RK30SDK_WIFI_GPIO_POWER_ENABLE_VALUE GPIO_HIGH #define RK30SDK_WIFI_GPIO_RESET_N RK30_PIN3_PD1 #define RK30SDK_WIFI_GPIO_RESET_ENABLE_VALUE GPIO_HIGH + #endif #endif #elif defined(CONFIG_MT6620) diff --git a/arch/arm/mach-rk3188/board-rk3188-ds1006h.c b/arch/arm/mach-rk3188/board-rk3188-ds1006h.c index 3cc1b5be9b08..7b32ebf7074c 100755 --- a/arch/arm/mach-rk3188/board-rk3188-ds1006h.c +++ b/arch/arm/mach-rk3188/board-rk3188-ds1006h.c @@ -418,10 +418,18 @@ static struct sensor_platform_data cm3217_info = { #ifdef CONFIG_FB_ROCKCHIP +#if DS1006H_V1_2_SUPPORT +#define LCD_CS_PIN RK30_PIN0_PB0 +#else #define LCD_CS_PIN INVALID_GPIO +#endif #define LCD_CS_VALUE GPIO_HIGH +#if DS1006H_V1_2_SUPPORT +#define LCD_EN_PIN RK30_PIN0_PB1 +#else #define LCD_EN_PIN RK30_PIN0_PB0 +#endif #define LCD_EN_VALUE GPIO_LOW static int rk_fb_io_init(struct rk29_fb_setting_info *fb_setting) @@ -1197,7 +1205,11 @@ struct platform_device rk_device_gps = { #if defined(CONFIG_MT5931_MT6622) static struct mt6622_platform_data mt6622_platdata = { .power_gpio = { // BT_REG_ON + #if DS1006H_V1_2_SUPPORT + .io = RK30_PIN3_PC7, // set io to INVALID_GPIO for disable it + #else .io = RK30_PIN3_PD5, // set io to INVALID_GPIO for disable it + #endif .enable = GPIO_HIGH, .iomux = { .name = NULL, @@ -1205,7 +1217,11 @@ static struct mt6622_platform_data mt6622_platdata = { }, .reset_gpio = { // BT_RST + #if DS1006H_V1_2_SUPPORT + .io = RK30_PIN3_PD1, + #else .io = RK30_PIN0_PD7, + #endif .enable = GPIO_HIGH, .iomux = { .name = NULL, @@ -1213,7 +1229,11 @@ static struct mt6622_platform_data mt6622_platdata = { }, .irq_gpio = { + #if DS1006H_V1_2_SUPPORT + .io = RK30_PIN0_PA5, + #else .io = RK30_PIN3_PD2, + #endif .enable = GPIO_HIGH, .iomux = { .name = NULL, @@ -1304,13 +1324,6 @@ static struct i2c_board_info __initdata i2c0_info[] = { .platform_data = &mma8452_info, }, #endif -#if defined (CONFIG_LS_US5151) - { - .type = "us5151", - .addr = 0x10, - .flags = 0, - }, -#endif #if defined (CONFIG_GS_LIS3DH) { @@ -1373,13 +1386,6 @@ static struct i2c_board_info __initdata i2c0_info[] = { .flags = 0, }, #endif -#if defined (CONFIG_SND_SOC_RT5631) - { - .type = "rt5631", - .addr = 0x1a, - .flags = 0, - }, -#endif }; #endif @@ -1801,6 +1807,14 @@ static struct i2c_board_info __initdata i2c2_info[] = { .platform_data = &cm3217_info, }, #endif +#if defined (CONFIG_LS_US5151) + { + .type = "us5151", + .addr = 0x10, + .flags = 0, + }, +#endif + #if defined(CONFIG_HDMI_CAT66121) { .type = "cat66121_hdmi", @@ -1852,6 +1866,14 @@ static struct i2c_board_info __initdata i2c4_info[] = { #endif #endif +#if defined (CONFIG_SND_SOC_RT5631) + { + .type = "rt5631", + .addr = 0x1a, + .flags = 0, + }, +#endif + }; #endif