rk3028a_86v: add support gsensor lis3dh and emmc_rk
authorhjc <hjc@rock-chips.com>
Wed, 7 Aug 2013 07:34:58 +0000 (15:34 +0800)
committerhjc <hjc@rock-chips.com>
Wed, 7 Aug 2013 07:36:55 +0000 (15:36 +0800)
arch/arm/configs/rk3028a_86v_defconfig
arch/arm/mach-rk3026/board-rk3028a-86v.c

index 3c4246e3174ec946556d611e8ca559d065fa6167..401b7a60d05d821599ce7be3234d6ba93871dea1 100644 (file)
@@ -247,6 +247,7 @@ CONFIG_INPUT_KEYCHORD=y
 CONFIG_INPUT_UINPUT=y
 CONFIG_GS_MMA7660=y
 CONFIG_GS_MMA8452=y
+CONFIG_GS_LIS3DH=y
 CONFIG_SENSOR_DEVICE=y
 CONFIG_GSENSOR_DEVICE=y
 CONFIG_GS_MXC6225=y
@@ -397,7 +398,8 @@ CONFIG_MMC=y
 CONFIG_MMC_UNSAFE_RESUME=y
 CONFIG_MMC_EMBEDDED_SDIO=y
 CONFIG_MMC_PARANOID_SD_INIT=y
-CONFIG_MMC_BLOCK_MINORS=12
+CONFIG_MMC_BLOCK_MINORS=32
+CONFIG_EMMC_RK=y
 CONFIG_SDMMC_RK29=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
index 39b8e7054d0c2cbaeb1df72526bdedb435dc026e..5185366fb9726bb556e94dd637044ea2674a3076 100755 (executable)
@@ -517,8 +517,129 @@ static struct sensor_platform_data mxc6225_info = {
         .orientation = { 0, -1, 0, 1, 0, 0, 0, 0, 0},
 };
 #endif
+#if defined (CONFIG_GS_LIS3DH)
+#define LIS3DH_INT_PIN   GS_INT_PIN
+       
+       static int lis3dh_init_platform_hw(void)
+       {
+       
+               return 0;
+       }
+       
+       static struct sensor_platform_data lis3dh_info = {
+               .type = SENSOR_TYPE_ACCEL,
+               .irq_enable = 1,
+               .poll_delay_ms = 30,
+               .init_platform_hw = lis3dh_init_platform_hw,
+               .orientation = {1, 0, 0, 0, 1, 0, 0, 0, 1},
+       };
+#endif
+
+#if defined (CONFIG_COMPASS_AK8975)
+static struct sensor_platform_data akm8975_info =
+{
+       .type = SENSOR_TYPE_COMPASS,
+       .irq_enable = 1,
+       .poll_delay_ms = 30,
+       .m_layout = 
+       {
+               {
+                       {1, 0, 0},
+                       {0, 1, 0},
+                       {0, 0, 1},
+               },
+
+               {
+                       {1, 0, 0},
+                       {0, 1, 0},
+                       {0, 0, 1},
+               },
+
+               {
+                       {1, 0, 0},
+                       {0, 1, 0},
+                       {0, 0, 1},
+               },
+
+               {
+                       {1, 0, 0},
+                       {0, 1, 0},
+                       {0, 0, 1},
+               },
+       }
+};
+
+#endif
+
+#if defined (CONFIG_COMPASS_AK8963)
+static struct sensor_platform_data akm8963_info =
+{
+       .type = SENSOR_TYPE_COMPASS,
+       .irq_enable = 1,
+       .poll_delay_ms = 30,
+       .m_layout = 
+       {
+               {
+                       {0, 1, 0},
+                       {1, 0, 0},
+                       {0, 0, -1},
+               },
+
+               {
+                       {1, 0, 0},
+                       {0, 1, 0},
+                       {0, 0, 1},
+               },
+
+               {
+                       {0, -1, 0},
+                       {-1, 0, 0},
+                       {0, 0, -1},
+               },
+
+               {
+                       {1, 0, 0},
+                       {0, 1, 0},
+                       {0, 0, 1},
+               },
+       }
+};
+
+#endif
 
 
+#if defined(CONFIG_GYRO_L3G4200D)
+
+#include <linux/l3g4200d.h>
+#define L3G4200D_INT_PIN  RK30_PIN0_PB4
+
+static int l3g4200d_init_platform_hw(void)
+{
+       return 0;
+}
+
+static struct sensor_platform_data l3g4200d_info = {
+       .type = SENSOR_TYPE_GYROSCOPE,
+       .irq_enable = 1,
+       .poll_delay_ms = 30,
+       .orientation = {0, 1, 0, -1, 0, 0, 0, 0, 1},
+       .init_platform_hw = l3g4200d_init_platform_hw,
+       .x_min = 40,//x_min,y_min,z_min = (0-100) according to hardware
+       .y_min = 40,
+       .z_min = 20,
+};
+
+#endif
+
+#ifdef CONFIG_LS_CM3217
+static struct sensor_platform_data cm3217_info = {
+       .type = SENSOR_TYPE_LIGHT,
+       .irq_enable = 0,
+       .poll_delay_ms = 500,
+};
+
+#endif
+
 /***********************************************************
 *      keyboard
 ************************************************************/
@@ -1277,6 +1398,45 @@ static struct i2c_board_info __initdata i2c1_info[] = {
                .platform_data = &mma8452_info,
        },
 #endif
+#if defined (CONFIG_GS_LIS3DH)
+       {
+               .type           = "gs_lis3dh",
+               .addr           = 0x19,   //0x19(SA0-->VCC), 0x18(SA0-->GND)
+               .flags          = 0,
+               .irq            = LIS3DH_INT_PIN,
+               .platform_data = &lis3dh_info,
+       },
+#endif
+#if defined (CONFIG_COMPASS_AK8975)
+       {
+               .type          = "ak8975",
+               .addr          = 0x0d,
+               .flags         = 0,
+               .irq           = RK30_PIN3_PD7, 
+               .platform_data = &akm8975_info,
+               .irq           = RK30_PIN3_PD7, 
+               .platform_data = &akm8975_info,
+       },
+#endif
+#if defined (CONFIG_COMPASS_AK8963)
+       {
+               .type          = "ak8963",
+               .addr          = 0x0d,
+               .flags         = 0,
+               .irq           = RK30_PIN3_PD7, 
+               .platform_data = &akm8963_info,
+       },
+#endif
+#if defined (CONFIG_GYRO_L3G4200D)
+       {
+               .type          = "l3g4200d_gryo",
+               .addr          = 0x69,
+               .flags         = 0,
+               .irq           = L3G4200D_INT_PIN,
+               .platform_data = &l3g4200d_info,
+       },
+#endif
+
 };
 #endif