This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x standby problem

Other Parts Discussed in Thread: TPS65910

Hi all,


I have a custom board with am335x on it.
I'm running linux 3.12.10-ti2013.12.01 from SDK 07.00.00.00.

Standby mode fails:
echo standby > /sys/power/state
-sh: echo: write error: No such device

The reason seems to be an i2c-problem.
During boot this msg appears:
[    1.891638] Error fetching I2C sleep/wake sequence

In my bootlog also this warning appears:

[    1.717946] ------------[ cut here ]------------
[    1.722857] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_device.c:888 omap_device_get_by_hwmod_name+0x94/0xb4()
[    1.734002] omap_device_get_by_hwmod_name: no omap_device for i2c1
[    1.740490] Modules linked in:
[    1.743705] CPU: 0 PID: 1 Comm: swapper Not tainted 3.12.10-ti2013.12.01 #5
[    1.751020] Backtrace: 
[    1.753598] [<c0017880>] (dump_backtrace+0x0/0x10c) from [<c0017a1c>] (show_stack+0x18/0x1c)
[    1.762456]  r6:c002f564 r5:00000009 r4:ed083e28 r3:00000000
[    1.768421] [<c0017a04>] (show_stack+0x0/0x1c) from [<c05d0a08>] (dump_stack+0x20/0x28)
[    1.776840] [<c05d09e8>] (dump_stack+0x0/0x28) from [<c0046d08>] (warn_slowpath_common+0x70/0x90)
[    1.786164] [<c0046c98>] (warn_slowpath_common+0x0/0x90) from [<c0046dcc>] (warn_slowpath_fmt+0x38/0x40)
[    1.796134]  r8:c07db3fc r7:c07d8410 r6:c11c2744 r5:c097f508 r4:c0717d64
[    1.803198] [<c0046d94>] (warn_slowpath_fmt+0x0/0x40) from [<c002f564>] (omap_device_get_by_hwmod_name+0x94/0xb4)
[    1.813972]  r3:c05dbe84 r2:c071434c
[    1.817748] [<c002f4d0>] (omap_device_get_by_hwmod_name+0x0/0xb4) from [<c07e8280>] (am33xx_pm_init+0x204/0x45c)
[    1.828432]  r4:00000000
[    1.831105] [<c07e807c>] (am33xx_pm_init+0x0/0x45c) from [<c07e0c00>] (am33xx_init_late+0x18/0x20)
[    1.840507]  r8:c07db3fc r7:c07d8410 r6:c097e400 r5:00000007 r4:c08ee14c
[    1.847573] [<c07e0be8>] (am33xx_init_late+0x0/0x20) from [<c07db420>] (init_machine_late+0x24/0x30)
[    1.857173] [<c07db3fc>] (init_machine_late+0x0/0x30) from [<c00089ec>] (do_one_initcall+0xf4/0x154)
[    1.866766] [<c00088f8>] (do_one_initcall+0x0/0x154) from [<c07d8b94>] (kernel_init_freeable+0xf0/0x1bc)
[    1.876726] [<c07d8aa4>] (kernel_init_freeable+0x0/0x1bc) from [<c05cb654>] (kernel_init+0x10/0xec)
[    1.886237] [<c05cb644>] (kernel_init+0x0/0xec) from [<c00146f8>] (ret_from_fork+0x14/0x3c)
[    1.895005]  r4:00000000 r3:00000000
[    1.898795] ---[ end trace 746e089ac4a8ece1 ]---[ 

As pointed out here, this might be caused by the PMIC tps65910 running on i2c-1 instead of i2c-0.
But the PMIC is running well, our issue is the sleep mode.

I suppose we have some I2c misconfiguration in our DeviceTree.
According to Documentation/devicetree/bindings/i2c/i2c-omap.txt, this should be correct.
Could someone please have a look on it?

	     i2c1: i2c@4802a000{
	                  pinctrl-name = "default";
	                  pinctrl-0 =<&i2c1_pins>;
	                  status = "okay";
	                  clock-frequency =<400000>;
			  		//ti,hwmods = "i2c1"; 
	                  /* Set OPP50 (0.95V) for VDD core */
			  			sleep-sequence = /bits/ 8 <
			  				0x02 0x2d 0x25 0x1f /* Set VDD2 to 0.95V */
			  			>;
			  
			  			/* Set OPP100 (1.10V) for VDD core */
			  			wake-sequence = /bits/ 8 <
			  				0x02 0x2d 0x25 0x2b /* Set VDD2 to 1.1V */
			  			>;
			  
			           tps: tps@2d {
			  				           reg = <0x2d>;
			                     };
					

			
				   tlv320aic3x: tlv320aic3x@18 {
							compatible = "ti,tlv320aic32x4"; /* ti,tlv320aic3x*/
							reg = <0x18>;
							status = "okay";
							/* Regulators */
							AVDD-supply = <&vaux2_reg>;
							IOVDD-supply = <&vaux2_reg>;
							DRVDD-supply = <&vaux2_reg>;
							DVDD-supply = <&vbat>;
					};					
        	};

	     i2c2: i2c@4819c000{
						pinctrl-name = "default";
						pinctrl-0 =<&i2c2_pins>;
						status = "okay";
						clock-frequency =<400000>;
//			  			ti,hwmods = "i2c2"; 
	  			   tsc:tsc@55 {
								   reg = <0x55>;	
					    };
	  			   gdx:gdx@5d {
								   reg = <0x5d>;
					    };

		};

Best regards,
Roland

  • I will forward this to the software team.
  • Now I found the solution.

    We had i2c-2 and -3 in use, but i2c-1 was unused and not enabled.
    But hwmod obviously requires that also i2c-1 is enabled.
    So I had to apply this fix

    diff --git a/arch/arm/boot/dts/am335x-sps-revA.dts b/arch/arm/boot/dts/am335x-sps-revA.dts
    index 4e83aff..ec42346 100644
    --- a/arch/arm/boot/dts/am335x-sps-revA.dts
    +++ b/arch/arm/boot/dts/am335x-sps-revA.dts
    @@ -413,12 +413,15 @@
     			};
     		};
     
    +		i2c0: i2c@44e0b000 {
    +			status = "okay";
    +		};
    +

    and the effect was gone.

  • Our PMIC is wired to I2C1 and it runs perfectly there.

    We have no power governor explicitly enabled, the System runs on "performance":

    #cat /sys/devices/system/cpu/cpu0/cpufreq/scaling 
    conservative userspace powersave performance 
    
    # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_ 
    performance
    

    We do not know from which module our performance issues come from.
    So this forum is probably not the right one.
    Could you please forward this issue to the correct forum or to Mr. ?

  • My suggested workaround has a serious drawback as pointed out here:

    Our Bluetooth module gains thecomplete CPU resources after a while.
    The BT-Module is connected via uart2 to the processor.
    The rts/cts-signals uart2_ctsn uart2_rtsn use the same pins as I2C0_SDA and I2C0_SCL.
    But we correctly configured the multiplexed uart pins:

                uart2_pins: pinmux_uart2_pins
                    {
                                            pinctrl-single,pins = <
                                                    0x10C (PIN_INPUT_PULLUP | MUX_MODE6)    /* uart2_rxd */
                                                    0x110 (PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* uart2_txd */
                                                    0x188 (PIN_INPUT| MUX_MODE2)  /* uart2_ctsn */
                                                    0x18C (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* uart2_rtsn */
                                            >;
                    };
    
    

    Questions:

  • Hello Biser,

    this Item is not solved.
    Could you pls forward it to the proper forum?
    Regards,
    Roland
  • Hi Roland

    Roland-B said:
    Is the workaound (enabling i2c-0) ok ?

    I would suggest you to try with this approach: disable i2c0 (assuming you have nothing on that bus) and apply the i2c1/pmic things from the below e2e threads:

    See also the below wiki page which discuss enabling i2c1:

    Regards,
    Pavel