how to enable I2C2 on the expansion connector?

Hi, BeagleBoard community,

Can anyone tell me how to enable the I2C2 on the expansion connector
in the validation image of BB (http://code.google.com/p/beagleboard/
wiki/BeagleBoardDiagnostics)?

From browsing the discussion board, my understanding is that currently
I2C2 is disabled due to timeout issue with no pullups on SCL/SDA. I
plan to use I2C2 and can add pullups.

Also I read there is a config option CONFIG_I2C2_OMAP_BEAGLE related
to this. Where is the option and how to enable it?

Thanks a lot

chuqdd

Hi Chuqdd.

The config option you mention is used when recompiling the kernel. So,
you'd need to download the source code first, "make
CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig" it before
making the uImage, select the option (in the I2C submenus) and then
put it on your Beagle.

From the Beagle wiki:

<quote>
Linux kernel

Git repository of OMAP Linux kernel contains Beagle support. Get it by:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git

Build:

make CROSS_COMPILE=arm-none-linux-gnueabi- V=1 ARCH=arm distclean
make CROSS_COMPILE=arm-none-linux-gnueabi- V=1 ARCH=arm omap3_beagle_defconfig
"make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig"
make CROSS_COMPILE=arm-none-linux-gnueabi- V=1 ARCH=arm uImage

The result will be a uImage in arch/arm/boot/ directory.
</quote>

The "make CROSS_COMPILE=arm-none-linux-gnueabi- V=1 ARCH=arm" is
"mine" (in fact, got it from a PDF by Nishant I think). The wiki
doesn't say to do it like that, but that's how I do it in my PC.

Hope this helps to start you with that. I'm still working on getting
something to work through that bus. =) (know anything about I2C
drivers perhaps?)

Best regards,

Alex B.

Thank you, Alex

This is what I got from "make CROSS_COMPILE=arm-none-linux-gnueabi-
ARCH=arm menuconfig"

from top

Device Drivers --->
    <M> I2C support --->

I got:
--- I2C support
  │ │ <M> I2C device interface
  │ │ I2C Algorithms --->
  │ │ I2C Hardware Bus support --->
  │ │ Miscellaneous I2C Chip support --->
  │ │ [ ] I2C Core debugging messages
  │ │ [ ] I2C Algorithm debugging messages
  │ │ [ ] I2C Bus debugging messages
  │ │ [ ] I2C Chip debugging messages

under
I2C Algorithms --->
I got:
--- I2C bit-banging interfaces
  │ │ <M> I2C PCF 8584 interfaces
  │ │ <M> I2C PCA 9564 interfaces

under
I2C Hardware Bus support --->
I got:
  │ │ <M> ALI 1535
  │ │ <M> ALI 1563
  │ │ <M> ALI 15x3
  │ │ <M> AMD 756/766/768/8111 and nVidia nForce
  │ │ <M> SMBus multiplexing on the Tyan S4882
  │ │ <M> AMD 8111
  │ │ <M> Intel 82801 (ICH)
  │ │ <M> Intel 810/815
  │ │ <M> Intel PIIX4 and compatible (ATI/Serverworks/Broadcom/
SMSC)
  │ │ <M> Nvidia nForce2, nForce3 and nForce4
  │ │ <M> OpenCores I2C Controller
  │ │ <M> Parallel port adapter
  │ │ <M> Parallel port adapter (light)
  │ │ <M> S3/VIA (Pro)Savage
  │ │ <M> S3 Savage 4
  │ │ < > Simtec Generic I2C interface (NEW)
  │ │ <M> SiS 5595
  │ │ <M> SiS 630/730
  │ │ <M> SiS 96x
  │ │ <M> I2C/SMBus Test Stub
  │ │ < > I2C-Tiny-USB (NEW)
  │ │ < > ARM Versatile/Realview I2C bus support (NEW)
  │ │ <M> VIA 82C586B
  │ │ <M> VIA VT82C596/82C686/82xx and CX700
  │ │ <M> Voodoo 3

under
Miscellaneous I2C Chip support --->
I got
  │ │ <M> Dallas Semiconductor DS1337 and DS1339 Real Time Clock
  │ │ <M> Maxim/Dallas Semiconductor DS1374 Real Time Clock
  │ │ <M> EEPROM reader
  │ │ <M> Philips PCF8574 and PCF8574A
  │ │ <M> Philips PCA9539 16-bit I/O port
  │ │ <M> Philips PCF8591
  │ │ <M> Philips ISP1301 with OMAP USBHOST (NEW)
  │ │ <M> Maxim MAX6875 Power supply supervisor

so I still can not find the option CONFIG_I2C2_OMAP_BEAGLE. Am I
looking at the right place?

Note I am using the board validation image (2.6.22.18-omap3,
http://code.google.com/p/beagleboard/wiki/BeagleBoardDiagnostics),
does this build have the option CONFIG_I2C2_OMAP_BEAGLE? or I have to
get the later version

Thanks

chuqdd

Hi again.

I cannot answer what is turned on or not in the diagnostics image. My
assumption was that I2C2 was not on in it.

Now, what you showed as the result of make
CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig, it doesn't
look at all to what I've seen.

It looks more like a PC kernel configuration.

Did you fetch the code from the linux-omap-2.6.git and did the first 2
steps to set the Beagle configuration?

Best regards,

Alex B.

Try using linux omap v2.6.26-omap2 in this tag you can test your i2c with i2c tools(i2c-tools-3.0.2.tar.bz2) i2cdetect

Flag CONFIG_I2C2_OMAP_BEAGLE is present there and is turned of by default, which you need to turn on with menuconfig

2009/2/26 Alejandro Blanca G. <alex.blanca@gmail.com>

Ernesto,

Thank you for the tip.

I need to aks further question because I am so new to stuff like git.
Can you show me the command to get tag v2.6.26-omap2<http://
git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a...> ?

Thanks a lot.

chuqdd

After doing the clone,

Enter the directory where it was cloned, it should be linux-omap-2.6
type:
git tag

This will show all the tags available

To get the tag you need type:

git checkout v2.6.26-omap2

This will update your copy to the v2.6.26-omap2 tag, change values to any other tag you need

Repeat the steps Alejandro mentioned, the distclean, omap3_defconfig, menuconfig and uImage to get an image with the tag you checkout

2009/3/2 chuqdd <chuqdd@yahoo.com>

Thanks a lot

I've been busy to learn git. Now I am ready to try your suggestion.