imx8mm - sbs-battery problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, if this is not the correct mailing list.

We have a NXP i.mx8mm SoM connected to a battery (bq40z50-r1) and a battery-charger (max17435).
The battery is broadcasting charging information to the battery charger.
The battery information is collected on the SoM by upower.

We have the problem that we get the following messages:

[  757.014871] i2c i2c-2: SCL is stuck low, exit recovery
[  787.015004] i2c i2c-2: SCL is stuck low, exit recovery
[  797.017727] i2c i2c-2: SCL is stuck low, exit recovery
[ 2257.017638] i2c i2c-2: SCL is stuck low, exit recovery
[ 2257.023154] i2c i2c-2: SCL is stuck low, exit recovery
[ 2287.010567] i2c i2c-2: SCL is stuck low, exit recovery
[ 2307.015255] i2c i2c-2: SCL is stuck low, exit recovery
[ 2357.018429] i2c i2c-2: SCL is stuck low, exit recovery
[ 2367.007989] i2c i2c-2: SCL is stuck low, exit recovery
[ 2377.014786] i2c i2c-2: SCL is stuck low, exit recovery
[ 2377.020321] i2c i2c-2: SCL is stuck low, exit recovery
[ 2397.015635] i2c i2c-2: SCL is stuck low, exit recovery
[ 2407.016731] i2c i2c-2: SCL is stuck low, exit recovery
[ 2827.015186] i2c i2c-2: SCL is stuck low, exit recovery
[ 2827.020808] i2c i2c-2: SCL is stuck low, exit recovery
[ 2877.017770] i2c i2c-2: SCL is stuck low, exit recovery
[ 3847.014759] i2c i2c-2: SCL is stuck low, exit recovery
[ 3847.020281] i2c i2c-2: SCL is stuck low, exit recovery
[ 3867.017461] i2c i2c-2: SCL is stuck low, exit recovery
[ 3877.014779] i2c i2c-2: SCL is stuck low, exit recovery
[ 3877.020308] i2c i2c-2: SCL is stuck low, exit recovery
[ 3887.014755] i2c i2c-2: SCL is stuck low, exit recovery
[ 3887.020289] i2c i2c-2: SCL is stuck low, exit recovery
[ 3887.025852] i2c i2c-2: SCL is stuck low, exit recovery
[ 3897.014890] i2c i2c-2: SCL is stuck low, exit recovery
[ 3907.014850] i2c i2c-2: SCL is stuck low, exit recovery
[ 3927.016968] i2c i2c-2: SCL is stuck low, exit recovery
[ 3937.014902] i2c i2c-2: SCL is stuck low, exit recovery
[ 3947.014960] i2c i2c-2: SCL is stuck low, exit recovery
[ 3947.020480] i2c i2c-2: SCL is stuck low, exit recovery
[ 3957.015375] i2c i2c-2: SCL is stuck low, exit recovery
[ 3967.014761] i2c i2c-2: SCL is stuck low, exit recovery
[ 3977.015700] i2c i2c-2: SCL is stuck low, exit recovery
[ 3997.014773] i2c i2c-2: SCL is stuck low, exit recovery
[ 3997.020292] i2c i2c-2: SCL is stuck low, exit recovery
[ 4337.014896] i2c i2c-2: SCL is stuck low, exit recovery
[ 4337.020428] i2c i2c-2: SCL is stuck low, exit recovery
[ 4337.026014] i2c i2c-2: SCL is stuck low, exit recovery
[ 4340.383912] systemd-shutdown[1]: Unable to finalize remaining DM devices, ignoring.
[ 4340.518821] imx2-wdt 30280000.watchdog: Device shutdown.
[ 4340.524265] reboot: Power down


The battery seems to send their messages to the charger during transmission of the imx8.


My device tree:

&i2c3 {
  clock-frequency = <100000>;
  smbus;
  smbus-alert;
  multi-master;
  pinctrl-names = "default", "gpio";
  pinctrl-0 = <&pinctrl_i2c3>;
  pinctrl-1 = <&pinctrl_i2c3_gpio>;
  sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
  scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
  status = "okay";

  #address-cells = <0x1>;
  #size-cells = <0x0>;

  battery: smartbattery@b {
    compatible = "sbs,sbs-battery";
    reg = <0xb>;
    sbs,i2c-retry-count = <2>;
    sbs,poll-retry-count = <10>;
    host-notify;
  };
};

There is an alias for i2c

aliases {
   i2c2 = &i2c3;
  };

I configured the i2c as smbus, multi-master because the battery is also acting as master, smbus-alert because battery can send alerts.

But it seems, that the imx8 is ignoring the second master and trying to reset the bus.

I would be thankful for any clue.

Thanks,
Thomas






[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux