i.MX51 EVK Linux Reference Manual
Freescale Semiconductor
25-1
Chapter 25
1-Wire Driver
Each i.MX processor has an integrated 1-Wire interface. This driver is implemented as a character driver
and provides a custom user space API that allows a user space application to interact with it.
25.1
Hardware Operation
The 1-Wire interface is used to connect to a battery monitor (Dallas DS2438Z). The 1-Wire interface reads
battery current, voltage and other information. The EVK board by default does not support 1-Wire. Refer
to the
MCIMX51 Multimedia Applications Processor Reference Manual
(MCIMX51RM) for more
information.
25.2
Software Operation
The 1-Wire module software implementation conforms to Linux W1 driver. It includes two sections:
•
1-Wire master driver implements the functions provided by i.MX 1-Wire module and provides the
interface to reset the bus, read bit, and write/read byte.
•
1-Wire slave driver (DS2438) is registered as a power supply class driver; therefore, the battery
information can be accessed through
/sys/class/power_supply/ interface
.
To avoid the conflict with the SPDIF module, a
w1
command option must be added in the launch command
line for the 1-Wire.
25.3
Driver Features
The 1-Wire implementation supports the following features:
•
i.MX 1-Wire module
•
Reads battery information from DS2640
25.4
Source Code Structure
The 1-Wire master module is implemented in
<ltib_dir>/rpm/BUILD/linux/drivers/w1/masters
.
The 1-Wire slave driver is located in
<ltib_dir>/rpm/BUILD/linux/drivers/w1/slaves/w1_ds2438.c.
The DS2438 battery driver is located in
<ltib_dir>/rpm/BUILD/linux/drivers/power/ds2438_battery.c
Table 25-1. 1-Wire Driver Files
File
Description
mxc_w1.c
1-Wire function implementation
Summary of Contents for i.MX51 EVK
Page 1: ...Part Number 924 76374 Rev 10 11 01 11 2010 i MX51 EVK Linux Reference Manual...
Page 14: ...i MX51 EVK Linux Reference Manual xiv Freescale Semiconductor...
Page 18: ...i MX51 EVK Linux Reference Manual xviii Freescale Semiconductor...
Page 24: ...i MX51 EVK Linux Reference Manual xxiv Freescale Semiconductor...
Page 38: ...Machine Specific Layer MSL i MX51 EVK Linux Reference Manual 2 8 Freescale Semiconductor...
Page 52: ...MC13892 Digitizer Driver i MX51 EVK Linux Reference Manual 5 4 Freescale Semiconductor...
Page 64: ...TV Encoder TVE Driver i MX51 EVK Linux Reference Manual 10 4 Freescale Semiconductor...
Page 82: ...Video for Linux Two V4L2 Driver i MX51 EVK Linux Reference Manual 12 8 Freescale Semiconductor...
Page 86: ...i MX5 Dual Display i MX51 EVK Linux Reference Manual 13 4 Freescale Semiconductor...
Page 100: ...X Windows Acceleration i MX51 EVK Linux Reference Manual 16 6 Freescale Semiconductor...
Page 118: ...Low Level Keypad Driver i MX51 EVK Linux Reference Manual 20 6 Freescale Semiconductor...
Page 134: ...Security Drivers i MX51 EVK Linux Reference Manual 22 10 Freescale Semiconductor...
Page 148: ...Inter IC I2C Driver i MX51 EVK Linux Reference Manual 24 4 Freescale Semiconductor...
Page 178: ...ARC USB Driver i MX51 EVK Linux Reference Manual 29 10 Freescale Semiconductor...
Page 194: ...OProfile i MX51 EVK Linux Reference Manual 33 6 Freescale Semiconductor...