tb_8846 : default support mpu6050 for sdk_v2.0
author郭毅 <gy@rock-chips.com>
Thu, 10 Jul 2014 02:46:11 +0000 (10:46 +0800)
committer郭毅 <gy@rock-chips.com>
Thu, 10 Jul 2014 02:47:51 +0000 (10:47 +0800)
arch/arm/boot/dts/rk3288-tb_8846.dts
arch/arm/configs/rockchip_defconfig
drivers/misc/inv_mpu/compass/ak8963.c

index ac7b072b50da66db8640a2bbd6f07c08614c5c4e..7319b4720366ec33b52f0329851ce9853df9f3c0 100644 (file)
 
 &i2c1 {
        status = "okay";
-       rtc@51 {
-               compatible = "nxp,pcf8563";
-               reg = <0x51>;
+               
+       mpu6050:mpu@68{
+               compatible = "mpu6050";
+               reg = <0x68>;
+               mpu-int_config = <0x10>;
+               mpu-level_shifter = <0>;
+               mpu-orientation = <0 1 0 1 0 0 0 0 1>;  
+               orientation-x= <0>;
+               orientation-y= <1>;
+               orientation-z= <1>;
+               irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_LEVEL_LOW>;                 
+               mpu-debug = <0>;
        };
        
-       sensor@1d {
-               compatible = "gs_mma8452";
-               reg = <0x1d>;
-               type = <SENSOR_TYPE_ACCEL>;
-               irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_EDGE_FALLING>;
-               irq_enable = <1>;
-               poll_delay_ms = <30>;
-               layout = <1>;
-       };
-               sensor@19 {
-               compatible = "gs_lis3dh";
-               reg = <0x19>;
-               type = <SENSOR_TYPE_ACCEL>;
-               irq-gpio = <&gpio0 GPIO_A0 IRQ_TYPE_LEVEL_LOW>;
-               irq_enable = <1>;
-               poll_delay_ms = <30>;
-               layout = <1>;
-       };
 
        ak8963:compass@0d{
-       compatible = "ak8963";
-       reg = <0x0d>;
-       compass-bus = <0>;
-       compass-adapt_num = <0>;
-       compass-orientation = <1 0 0 0 1 0 0 0 1>;
-       orientation-x= <0>;
-       orientation-y= <0>;
-       orientation-z= <1>;     
-       compass-debug = <1>;
-       status = "disabled";
-       };
-
-       ak8975:compass@0d{
-       compatible = "ak8975";
-       reg = <0x0d>;
-       compass-bus = <0>;
-       compass-adapt_num = <0>;
-       compass-orientation = <0 1 0 1 0 0 0 0 1>;
-       orientation-x= <0>;
-       orientation-y= <0>;
-       orientation-z= <0>;     
-       compass-debug = <0>;
-       };
+               compatible = "mpu_ak8963";
+               reg = <0x0d>;
+               compass-bus = <0>;
+               compass-adapt_num = <0>;
+               compass-orientation = <1 0 0 0 1 0 0 0 1>;
+               orientation-x= <0>;
+               orientation-y= <0>;
+               orientation-z= <1>;     
+               compass-debug = <1>;
+               status = "okay";
+       };      
 
 };
 
 &clk_ddr_dvfs_table {
        operating-points = <
                /* KHz    uV */
-               200000 1000000
-               300000 1000000
-               400000 1050000
+               200000 1050000
+               300000 1050000
+               400000 1100000
                533000 1150000
                >;
 
index 7297cc94c9cab33987b51c04cd569cd3268805af..00c4bb505c8b28b282f2188c8159466deba9dcfe 100644 (file)
@@ -212,6 +212,11 @@ CONFIG_DMA_CMA=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_UID_STAT=y
 CONFIG_SRAM=y
+CONFIG_MPU_SENSORS_TIMERIRQ=y
+CONFIG_INV_SENSORS=y
+CONFIG_MPU_SENSORS_MPU6050B1=y
+CONFIG_MPU_SENSORS_MPU6050_ACCEL=y
+CONFIG_MPU_SENSORS_AK8963=y
 CONFIG_SCSI=y
 CONFIG_SCSI_TGT=y
 CONFIG_BLK_DEV_SD=y
index bba661110ecdf6855f6476263cba4f123b228ac8..fd9684cd1172634682a62084c2579bad4a6ded6a 100755 (executable)
@@ -602,7 +602,7 @@ static const struct i2c_device_id ak8963_mod_id[] = {
 MODULE_DEVICE_TABLE(i2c, ak8963_mod_id);
 
 static const struct of_device_id of_mpu_ak8963_match[] = {
-       { .compatible = "ak8963" },
+       { .compatible = "mpu_ak8963" },
        { /* Sentinel */ }
 };