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.

Linux/BQ25895: TI BQ25890 charger driver - power_supply bq25890-charger: driver failed to report `constant_charge_current' property: -110

Part Number: BQ25895
Other Parts Discussed in Thread: BQ25890,

Tool/software: Linux

Hi,

Mainline Linux version 4.15.0-rc6 armv7l sun8i H3.

I have setup the BQ25890 charger driver to support the BQ25895 chip ID with the following device tree however power supply sysfs is failing preventing my device from booting.

	/* Binding for TI bq25890 Li-Ion Charger */
	bq25890: bq25890@6a {
		/* compatible: Should contain one of the following: "ti,bq25890" */
		compatible = "ti,bq25890";

		/* reg: integer, i2c address of the device */
		reg = <0x6a>;

		/* bank: 0, pin 20, function 6 */
		gpios = <&pio 0 20 6>;

		interrupt-parent = <&pio>;
		interrupt-names = "bq25890-edge-falling";
		interrupts = <GIC_SPI 11 IRQ_TYPE_EDGE_FALLING>; /* PA20 */

		/* ti,battery-regulation-voltage: integer, maximum charging voltage (in uV) */
        ti,battery-regulation-voltage = <4200000>;

		/* ti,charge-current: integer, maximum charging current (in uA) */
        ti,charge-current = <1000000>;

		/* ti,termination-current: integer, charge will be terminated when current in
    		constant-voltage phase drops below this value (in uA)
		*/
        ti,termination-current = <50000>;

		/* ti,precharge-current: integer, maximum charge current during precharge
    		phase (in uA) */
        ti,precharge-current = <128000>;

		/* ti,minimum-sys-voltage: integer, when battery is charging and it is below
			minimum system voltage, the system will be regulated above
			minimum-sys-voltage setting (in uV) */
        ti,minimum-sys-voltage = <3600000>;

		/* ti,boost-voltage: integer, VBUS voltage level in boost mode (in uV) */
		ti,boost-voltage = <5000000>;

		/* ti,boost-max-current: integer, maximum allowed current draw in boost mode
    		(in uA) */
        ti,boost-max-current = <1000000>;

		/* Optional properties:
		ti,boost-low-freq: boolean, if present boost mode frequency will be 500kHz,
			otherwise 1.5MHz;
		ti,use-ilim-pin: boolean, if present the ILIM resistor will be used and the
			input current will be the lower between the resistor setting and the IINLIM
			register setting;
		ti,thermal-regulation-threshold: integer, temperature above which the charge
			current is lowered, to avoid overheating (in degrees Celsius). If omitted,
			the default setting will be used (120 degrees)
		*/
		ti,boost-low-freq;
        ti,use-ilim-pin;
        ti,thermal-regulation-threshold = <120>;
	};

# dmesg |grep bq25890
[ 4.673343] bq25890-charger 0-006a: S:CHG/PG/VSYS=2/1/0, F:CHG/BOOST/BAT=0/0/0
[ 4.681960] bq25890_irq_handler_thread ret=0 client->irq=62
[ 4.682144] power_supply bq25890-charger: uevent
[ 4.687896] power_supply bq25890-charger: POWER_SUPPLY_NAME=bq25890-charger
[ 4.690513] power_supply bq25890-charger: uevent
[ 4.690525] power_supply bq25890-charger: POWER_SUPPLY_NAME=bq25890-charger
[ 4.690545] power_supply bq25890-charger: prop MANUFACTURER=Texas Instruments
[ 4.690556] power_supply bq25890-charger: prop STATUS=Charging
[ 4.690568] power_supply bq25890-charger: prop ONLINE=1
[ 4.690575] power_supply bq25890-charger: prop HEALTH=Good
[ 4.702628] power_supply bq25890-charger: power_supply_changed
[ 4.702649] power_supply bq25890-charger: power_supply_changed_work
[ 4.702665] power_supply bq25890-charger: power_supply_update_gen_leds 1
[ 4.702688] power_supply bq25890-charger: uevent
[ 4.702694] power_supply bq25890-charger: POWER_SUPPLY_NAME=bq25890-charger
[ 4.702712] power_supply bq25890-charger: prop MANUFACTURER=Texas Instruments
[ 4.702722] power_supply bq25890-charger: prop STATUS=Charging
[ 4.702730] power_supply bq25890-charger: prop ONLINE=1
[ 4.702738] power_supply bq25890-charger: prop HEALTH=Good
[ 6.809126] power_supply bq25890-charger: driver failed to report `constant_charge_current' property: -110