Compass problem

Hello,

I connected MPU6050 and AKM8963 to dragonboard. I used drivers that comes with the kernel source. I changed dtsi files as i needed. Then i was able to enable sensors. The sensors work well, when i try them seperately.

But compass does not work. I use physics toolbox suite app for testing the sensors. I see below error from debug port when i use compass or linear accelerometer.

First “sensors MPU6050-gyro: Invalid value of delay, delay=5” error comes and then “akm8963 0-000c: AKECS_Set_CNTL: device is busy.” and “akm8963 0-000c: Failed to set mode.” errors come.

I did a lot of hard work but i couldn’t solve this problem. Are there any one to help me to solve the problem.

Hi,

Can you please share that part of your dtsi file where you have made the node of these two sensors.

Also, are you able to use accelerometer and gyroscope from the app?

Did you try with any other app?

Regards,
Divya

Dear Divya,

Yes, I am able to use accelerometer and gyroscope from the app. And I also tried other apps. The results are same.

This is my dtsi file details:

i2c@78b6000 { /* BLSP1 QUP2 */
	        status = "ok";
		mpu6050@68 { /* Gyroscope and accelerometer sensor combo */
			compatible = "invn,mpu6050";
			reg = <0x68>;
			pinctrl-names = "mpu_default","mpu_sleep";
			pinctrl-0 = <&mpu6050_default>;
			pinctrl-1 = <&mpu6050_sleep>;
			interrupt-parent = <&msm_gpio>;
			interrupts = <115 0x2>;
			vdd-supply = <&vph_pwr_vreg>;
			vlogic-supply = <&vph_pwr_vreg>;
			vi2c-supply = <&vph_pwr_vreg>;
			invn,gpio-int = <&msm_gpio 115 0x2>;
			invn,place = "Landscape Left Back Side";		
			
		};
	akm@c {
		compatible = "ak,ak8963";
		reg = <0x0c>;
		pinctrl-names = "ak8963_default", "ak8963_sleep";
		pinctrl-0 = <&ak8963_default>;
		pinctrl-1 = <&ak8963_sleep>;
		interrupt-parent = <&msm_gpio>;
		interrupts = <69 0x2>;
		vdd-supply = <&vph_pwr_vreg>;
		vio-supply = <&vph_pwr_vreg>;
		ak,layout = <0x9>;
		ak,auto-report;
		//ak,use-interrupt;
		//ak,gpio-int = <&msm_gpio 69 0x2>;
	};
	
	tsl2561@29 {
		/* Grove digital light sensor */
		compatible = "taos,tsl2561";
		reg = <0x29>;
	};

Regards,

Selim.