Activate I2C1 on BeagleBone

Hi,

According to the SRM the BeagleBone has 3 I2C buses from which 2 are on the expansion header. I can see i2c-1 and i2c-3 in the /dev-directory, but i2c-3 corresponds to the pins of I2C2 in the SRM. That's why I guess i2c-1 corresponds to I2C0 from the SRM which is only connected internally.

I use the 3.2 kernel from https://github.com/RobertCNelson/stable-kernel . Could someone please point me to the file/directory where I can activate i2c-2 (I2C1 in SRM), at least I guess I have to change something in the kernel source?

Best regards,

Well, that branch only supports the BeagleBoard/PandaBoard's.. It will
not boot on the BeagleBone.

pick either the v3.2.x or v3.8.x branch listed in these directions..
http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-LinuxBuildScript:

Regards,

Well, that branch only supports the BeagleBoard/PandaBoard's.. It will
not boot on the BeagleBone.

pick either the v3.2.x or v3.8.x branch listed in these directions..
http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-LinuxBuildScript:

Regards,

Ok, thanks. I had worked with a BeagleBoard before and thought I can use the kernel tree for the Bone as well.
The build script is cloning now and it will probably be a while with my connection. Any suggestions where I should look for the i2c settings? I think when I had the BeagleBoard it was somewhere in the omap2-directory, but it has been some time...

Ok. I got it working.
To add some value for others, here is what I did:

Use the build script from Robert: http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-LinuxBuildScript:

Change the following in KERNEL/arch/arm/mach-omap2/board-am335xevm.c :

The pin mux for i2c1 does not enable the pull-up resistors by default (maybe the kernel team can change this?), I used:

static struct pinmux_config i2c1_pin_mux[] = {
  {"spi0_d1.i2c1_sda", OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW |
        AM33XX_PIN_INPUT_PULLUP},
  {"spi0_cs0.i2c1_scl", OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW |
                     AM33XX_PIN_INPUT_PULLUP},
  {NULL, 0},
};

Add the init function to the beaglebone_dev_cfg:

static struct evm_dev_cfg beaglebone_dev_cfg[] = {
  {tps65217_init, DEV_ON_BASEBOARD, PROFILE_NONE},
         {i2c1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
  {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
         [...]

As I also could not set the bus frequency of the i2c-buses with the boot args without boot problems (https://groups.google.com/forum/#!category-topic/beagleboard/IQcSof7ZiwY ), I changed the bus frequency int the corresponding i2c2_init function:

omap_register_i2c_bus(3, 400, cape_i2c_boardinfo,
                         ARRAY_SIZE(cape_i2c_boardinfo));

Now, I hope I can connect faster devices to /dev/i2c-3 and slower ones to /dev/i2c-2.

Best regards,