I2C mux configuration with 2.6.29?

I'm using a 2.6.29 kernel I've build using OE. If I supply the command
line parameters:

i2c_bus=2,100

.. the second I2C bus is registered, but the logic levels of the pins
are always high. When I dump the pad multiplexing registers I see that
the mux registers for the second I2C bus are set to mode 4 (gpio).

Does anyone have any suggestions how I should fix this? I can clearly
write a program to change the registers - I'm presuming there is a
kernel parameter way to do it.

Regards,

Christopher.

chrisf@goop.org wrote:

I'm using a 2.6.29 kernel I've build using OE. If I supply the command
line parameters:

i2c_bus=2,100

.. the second I2C bus is registered, but the logic levels of the pins
are always high. When I dump the pad multiplexing registers I see that
the mux registers for the second I2C bus are set to mode 4 (gpio).

Does anyone have any suggestions how I should fix this? I can clearly
write a program to change the registers - I'm presuming there is a
kernel parameter way to do it.

Hmm, looking at

http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=blob;f=arch/arm/mach-omap2/mux.c;h=026c4fc883a7f21816a7b7433cd96e62092a8bc4;hb=HEAD#l269

(line 269 and 271) it seems that pin mux for I2C2 is set correctly if CONFIG_OMAP_MUX is enabled in kernel. Not sure if the other pin mux for beagle is correct then, though.

If not, you can try to change it in U-Boot's board/omap3/beagle/beagle.h. For this, you could try to change

  MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M4)) /*GPIO_168*/\
  MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M4)) /*GPIO_183*/\

to

  MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M0)) /*I2C2_SCL*/\
  MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M0)) /*2C2_SDA*/\

Dirk

Cheers Dirk. I see what I've done now. I was certain I'd set
CONFIG_OMAP_MUX, but it turns out I'd updated openembedded/recipes/
linux/linux-omap-2.6.29/beagleboard/defconfig instead of openembedded/
recipes/linux/linux-omap/beagleboard/defconfig.

After rebuilding with CONFIG_OMAP_MUX I can now scan the bus with
"i2cdetect -y -r 2" and see devices.

BTW, I'm building my kernel in OE with:

bitbake -b openembedded/recipes/linux/linux-omap_2.6.29.bb

I've tried changing PREFERRED_VERSION_virtual/kernel to 2.6.29
openembedded/conf/machine/beagleboard.conf, when when I run:

bitbake virtual/kernel

... it still attempts to build 2.6.28. (I need to use 2.6.29 because
I'm stealing ~100ma of 3.3v power from TP3 so want to configure the
kernel with the frame buffer disabled, which didn't build in 2.6.28).

Another curiosity which caught me out was when I modify say
openembedded/recipes/linux/linux-omap/beagleboard/defconfig then run
the above "bitbake -b" nothing gets rebuild, even if I supply the -f
flag. To get my kernel to rebuild I have to first run:

bitbake -f -c clean -b openembedded/recipes/linux/linux-omap_2.6.29.bb