Letux 400 Hardware

Power

You are looking at an old revision of the page Power. This revision was created by Paul Boddie.

Table of Content

Power supply control

Power

The power supply is controlled using an LPC915 accessed via I2C/SMBUS. See: https://style.nxp.com/docs/en/user-guide/UM10107.pdf

Controller Registers

Registers related to I2C defined in the NXP documentation are given as follows:

Register Purpose
0xd8 control
0xd9 status (bits 7..3 provide status code)
0xda data
0xdb address

These are special function registers in the microcontroller itself, not I2C-accessible addresses or registers.

However, the mipsbook-mcu.c driver seems to reference the following I2C-accessible addresses, registers or "commands" (as Linux calls them):

Register Purpose
0xd8 control (bit 0 written for power off)
0xd9 status (bit 0 provides status)
0xdb battery voltage level

It is possible that these values are coincidentally similar to the internal microcontroller registers.

The schematic shows the P89LPC915 microcontroller.

In the legacy (letux-400) kernel, the I2C address of the microcontroller is given as (0x50 >> 1) or 0x28, with registers as follows:

Register Purpose
0xd8 shutdown - bit 0 written for power off
0xd9 battery charge
0xdb battery status

The status register appears to provide the battery level.

See: https://web.archive.org/web/20090226101357/http://projects.kwaak.net/twiki/bin/view/Epc700/LPC915F

Battery Status

LIPO battery with usable range 7.0V - 8.4V.

Battery level scaled by resistor divider to 3V from 8.4V with LPC915 powered by 3.3V (presumably used as reference), measuring the level in 255 increments (255 corresponds to 3.3V).

level in V = (3.3V / 255) * (8.4V / 3.0V) * value
level in µV = (3300000µv / 255) * (8400000µV / 3000000µV) * value
level in µV = 36235 * value

Resources

The following files in the vendor kernel are informative:

  • drivers/char/jzchar/minipc-misc.c

In modern kernels, the following files are pertinent:

  • drivers/power/supply/mipsbook-mcu.c

Created: 4 years 5 months ago
by Paul Boddie

Old Revisions