From 77040e121bd7d7810922fb809bd721eea67da03d Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=83=AD=E6=AF=85?= Date: Thu, 10 Jul 2014 10:46:11 +0800 Subject: [PATCH] tb_8846 : default support mpu6050 for sdk_v2.0 --- arch/arm/boot/dts/rk3288-tb_8846.dts | 73 ++++++++++----------------- arch/arm/configs/rockchip_defconfig | 5 ++ drivers/misc/inv_mpu/compass/ak8963.c | 2 +- 3 files changed, 32 insertions(+), 48 deletions(-) diff --git a/arch/arm/boot/dts/rk3288-tb_8846.dts b/arch/arm/boot/dts/rk3288-tb_8846.dts index ac7b072b50da..7319b4720366 100644 --- a/arch/arm/boot/dts/rk3288-tb_8846.dts +++ b/arch/arm/boot/dts/rk3288-tb_8846.dts @@ -463,54 +463,33 @@ &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 = ; - 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 = ; - 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"; + }; }; @@ -727,9 +706,9 @@ &clk_ddr_dvfs_table { operating-points = < /* KHz uV */ - 200000 1000000 - 300000 1000000 - 400000 1050000 + 200000 1050000 + 300000 1050000 + 400000 1100000 533000 1150000 >; diff --git a/arch/arm/configs/rockchip_defconfig b/arch/arm/configs/rockchip_defconfig index 7297cc94c9ca..00c4bb505c8b 100644 --- a/arch/arm/configs/rockchip_defconfig +++ b/arch/arm/configs/rockchip_defconfig @@ -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 diff --git a/drivers/misc/inv_mpu/compass/ak8963.c b/drivers/misc/inv_mpu/compass/ak8963.c index bba661110ecd..fd9684cd1172 100755 --- a/drivers/misc/inv_mpu/compass/ak8963.c +++ b/drivers/misc/inv_mpu/compass/ak8963.c @@ -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 */ } }; -- 2.34.1