[[120chr/line, tabstop:4]] BQ24150 CHARGER CHIP SYSFS INTERFACE RFC (C) GPL2, Joerg Reisenweber 2011 sysnode mode reg[bit:bit] values semantics watchdog r/w 0[7] "reset" (w) write 1 to TMR_RST to reset watchdog, stops auto "auto" (w) set kernel driver to auto-tickle (10 seconds) writing to any other*) sysnode of the driver stops auto ( *)except: ...TBD ) error conditions from charger stop auto mode bogus (w) stops auto write "reset" to this node does 0[7]=1 write "auto" starts 10s automatic reset (r) driver keeps values for read of this node, "auto" driver is in auto watchdog mode "off " driver is in manual watchdog mode, is either "manual" when watchdog auto stopped by writing "reset", "" (empty) when wd auto is default off after loading/resetting module when watchdog auto was stopped by writing to any other of the sysnodes OTG_sense r 0[7] 0 1 status OTG pin. basically chrg det of 1707 D+/- short STAT_indLED r/w 0[6] 0 1 enable STAT pin. Makes steady yellow ind-LED on chrg status r 0[5:4] "ready" (00) "in_progress" (01) "done" (10) "fault" (11) boost_stat r 0[3] 0 1 status of boost mode (5V to USB hostmode) fault_stat r 0[2:0] Charge mode: "normal" (000) "vbus_ovp" (001) VBUS OVP "sleep_mode"(010) Sleep mode "poor_input"(011) poor input source or VBUS < UVLO, "bat_ovp" (100) Battery OVP "thermal_shutdown"(101) Thermal shutdown "timer_expired"(110) Timer fault "no_battery"(111) Boost mode: "normal_boost"(000) "vbus_ovp_boost"(001) "overload" (010) Output short, current too high "batlow" (011) Battery voltage is too low "bat_ovp_boost"(100) "thermal_shutdown_boost"(101) "timer_expired_boost"(101) Timer fault "111_NA_WTF"(111) Not Available, should never happen r00 r/w 0[7:0] "0x00".."0xFF" raw register value hex, r/w USB-curlim r/w 1[7:6] "100" (00) 100mA USB input current limit "500" (01) 500mA "800" (10) 800mA "1200" (11) unlimited writing other positive numeric-base10 values enables the next lower defined value bogus writing bogus values defaults to "100" batlow r/w 1[5:4] "3400" (00) 3400mV "3500" (01) "3600" (10) "3700" (11) Battery low threshold, 3V4+200mV+100mV writing valid positive base10 <3400 ->3400 >3700 ->3700 nn00..nn99 ->nn00 bogus does not change value. Nevertheless disables auto watchdog chterm_ena r/w 1[3] 0 1 enable charge termination detect based on current threshold from chterm_thld chterm_thld r/w 4[2:0] "0".. Termination current I(term) in mA. Depends on R(SNS) "400" Default for R(SNS)=0.068, other can be set values by module parameter. I(term)= (offset_3.4 + bit0_3.4 + bit1_6.8 + bit2_13.6) / R(SNS) [mA] So for [2:0]=001 and default R(SNS) it is 100mA (power on default) Valid settings and steps are calculated from actual R(SNS) value Writing positive base10 values... < minimum results in (000), I(therm) = offset_3.4 / R(SNS) which do not match a step result in next higher step chosen > maximum results in (111) maximum set bogus does not change value. Nevertheless disables auto watchdog CC r/w 4[6:4] "0".. Charging Constant Current I(chg) in mA. Depends on R(SNS) "1250" Default for R(SNS)=0.068, other can be set values by module parameter. I(chg)= (offset_37.4 + bit4_6.8 + bit5_13.6 + bit6_27.2) / R(SNS) [mA] So for [6:4]=000 and default R(SNS) it is 550mA (power on default) Writing positive base10 values... < minimum results in (000), I(chg) = offset_37.4 / R(SNS) which do not match a step result in next lower step chosen > maximum results in (111) maximum set bogus does not change value. Nevertheless disables auto watchdog CV r/w 2[7:2] "3500".. Charging Constant Voltage V(chg) in mV. Battery will not charge "4240" to higher voltage than set here. BL-5J and bme setting is 4200. ("4440") Using higher voltage is dangerous as it might dramatically reduce lifetime endurance of the cell. That is why the driver does refuse settings to >4240mV without special sequence. See sourcecode. Voltage calculated V(chg)=Voffset_3.5 + bit2_20mV + bit3_40mV ..... + bit7_640mV Power on default: 3540mV INTERIM,to be completed if somebody is interested. This API breaks closed Nokia bme, as the direct I2C interface bme is using gets exclusively occupied by this module