i.MX Platforms uses Freescale Atlas chipset as power management IC (PMIC).
PMIC is connected with i.MX processor through SPI port.
Reading and Changing PMIC Registers
pmic_reg is a simple program that allows to read and change PMIC registers through SPI.
Click here to download the binary
Click here to download the source package
Click here to download the spec file
To use pmic_reg, you can simply download the binary file and move it to your system.
To build the source code, download and mv the source package (in this case "pmic_reg-1.0.tar.gz") to /opt/freescale/pkgs:
sudo mv pmic_reg-1.0.tar.gz /opt/freescale/pkgs
Download the spec file to spec directory:
mkdir <ltib directory>/dist/lfs-5.1/pmic_reg
cp pmic_reg.spec <ltib directory>/dist/lfs-5.1/pmic_reg
On <ltib directory>, extract, build and deploy pmic_reg:
./ltib -p pmic_reg.spec -m prep
./ltib -p pmic_reg.spec -m scbuild
./ltib -p pmic_reg.spec -m scdeploy
Source files will be located at <ltib directory>/rpm/BUILD/pmic_reg-1.0 and binary will be located at /usr/bin on your i.MX system rootfs.
To get pmic_reg help, just type pmic_reg:
PMIC_REG v1.0 (2009.12.15)
To read all PMIC registers:
To write to a specific register:
pmic_reg w <register address> <register value>