![Phytec phyBoard Wega AM335x Скачать руководство пользователя страница 114](http://html1.mh-extra.com/html/phytec/phyboard-wega-am335x/phyboard-wega-am335x_application-manual_1554191114.webp)
phyBOARD-Wega AM335x [PB-00802-xxx]
98
©
PHYTEC Messtechnik GmbH 2014 L-792e_1
Board
Prod. No.
Device
Address used
(7 MSB)
EEPROM 0x52
RTC
0x68
phyCORE-AM335x PCL-051
PMIC 0x2D,
0x12
phyBOARD-Wega PBA-CD-02 Audio
0x18
HDMI Core
0x70
AV-Adapter HDMI
PEB-AV-01
CEC Core
0x34
AV-Adapter Display
PEB-AV-02
GPIO Expander
0x41
Evaluation Board
PEB-EVAL-01
EEPROM
0x56
GPIO Expander
0x20
GPIO Expander
0x21
M2M Board
PEB-C-01
GPIO Expander
0x22
Table 16:
I
2
C Addresses in Use
4.6.2.1
Software Implementation
The driver for I
2
C can be accessed by its API within the kernel. If you connect a chip to I
2
C,
you should implement its driver into the kernel, as well. Please note that the BSP already
includes a couple of deactivated drivers for various chips. These drivers might be helpful
for you even though they are usually not tested. In the following you will find a description
of the basic device usage of a few integrated I
2
C devices. It is also possible to access the I
2
C
Bus from userland in a rudimentary way. You may use the tools
i2cdetect
,
i2cget
,
i2cset
and
i2cdump
for some quick experiments. To program the character devices
/dev/i2c-*
directly see the kernel documentation in
Documentation/i2c/dev-interface
.
4.6.2.1.1
EEPROM
It is possible to read/write directly to the device:
/sys/class/i2c
‐
adapter/i2c
‐
0/0
‐
0052/eeprom
e.g.: Fill with zeros
dd
if=/dev/zero
of=/sys/class/i2c
‐
adapter/i2c
‐
0/0
‐
0052/eeprom
bs=4096
count=1