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.

BQ27220: Driver support from linux

Part Number: BQ27220
Other Parts Discussed in Thread: AM62A3-Q1, BQ27541

Hi,

I am using BQ27220 for my custom board with SOC AM62A3-Q1.

What is the compatible driver and device-tree changes I has to make?

I am surfing in the kernel source directory, and I got this file,
https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/power/supply/bq27xxx_battery.c?h=ti-linux-6.1.y

But the driver doesn't have any reference to BQ27220.

  • Hello Sathiya, 

    I recommend referring to this E2E thread. I believe this thread is similar to the E2E thread I have linked. Please let me know if you still have questions. 

    Regards, 

    Jonny. 

  • Hello Jonny Trevino,

    I had gone through the thread. But it is not giving proper device tree and driver configuration.

    Anyway, I have given compatible string for bq27541. But the issue is that I can't set the full-capacity values through device tree. Here is my device tree.

    fuel_gauge: battery {
    	compatible = "simple-battery";
    	voltage-min-design-microvolt = <3200000>;
    	energy-full-design-microwatt-hours = <18000000>;
    	charge-full-design-microamp-hours = <5000000>;
    };
    
    &main_i2c1 {
    	fuel-gauge@55 {
            compatible = "ti,bq27541";
            reg = <0x55>;
            monitored-battery = <&fuel_gauge>;
    	};
    }
    

    And here is the error I got in the kernel logs

    [    0.936451] bq27xxx-battery 0-0055: data memory update not supported for chip

  • Hello Sathiya, 

    Please allow a day while we look over this. 

    Regards, 

    Jonny. 

  • Hello Sathiya, 

    I recommend referring to this E2E post. TI does not maintain the Linux drivers, so there is limited support for this. 

    Regards, 

    Jonny.