Robert nelson Kernel: Reenabling the "hidden" I2C bus

Hi,

as I understood, one I2C bus of the beaglebone is used to handle the
EEPROMs of the capes.

With Robert Nelsons kernel Linux beaglebone 3.2.32-psp25 I can see
two I2c buses below /sys:

    /sys/devices/platform/omap/omap_i2c.1
    /sys/devices/platform/omap/omap_i2c.3

. For me it looks like that the bus with the EEPROMs are hidden from
the user.

I have two questions regarding this particular omap_i2c.2:
1.) I looked into linux/arch/arm/mach-omap2/board-omap3beagle.c
     but didnt find anything appropiate...
     Is it possible to modify the kernel source so that this
     bus is also shown below /sys?

2.) Is this bus technically different (other features for example)
     from the two others?

Thank you very much in advance for any help!
Best regards,
mcc

No it isn't.. the at24c cape eeprom's are on bus 3:

static struct i2c_board_info __initdata cape_i2c_boardinfo[] = {
  {
    I2C_BOARD_INFO("tlv320aic3x", 0x1b),
  },
        {
                I2C_BOARD_INFO("24c256", 0x54),
                .platform_data = &cape_eeprom_info,
        },
        {
                I2C_BOARD_INFO("24c256", 0x55),
                .platform_data = &cape_eeprom_info,
        },
        {
                I2C_BOARD_INFO("24c256", 0x56),
                .platform_data = &cape_eeprom_info,
        },
        {
                I2C_BOARD_INFO("24c256", 0x57),
                .platform_data = &cape_eeprom_info,
        },
};

static void i2c2_init(int evm_id, int profile)
{
        setup_pin_mux(i2c2_pin_mux);
        omap_register_i2c_bus(3, 100, cape_i2c_boardinfo,
                        ARRAY_SIZE(cape_i2c_boardinfo));
        return;
}

Regards,

i2c0 on the schematic is i2c bus 1 in Linux. PMIC and baseboard EEPROM
ride on this bus.

i2c2 on the schematic is i2c bus 3 in Linux. Capes ride on this bus.

-Andrew

Andrew Bradford <andrew@bradfordembedded.com> [12-10-20 16:41]:

> as I understood, one I2C bus of the beaglebone is used to handle the
> EEPROMs of the capes.
>
> With Robert Nelsons kernel Linux beaglebone 3.2.32-psp25 I can see
> two I2c buses below /sys:
>
> /sys/devices/platform/omap/omap_i2c.1
> /sys/devices/platform/omap/omap_i2c.3
>
> . For me it looks like that the bus with the EEPROMs are hidden from
> the user.

i2c0 on the schematic is i2c bus 1 in Linux. PMIC and baseboard EEPROM
ride on this bus.

i2c2 on the schematic is i2c bus 3 in Linux. Capes ride on this bus.

-Andrew

--

Hi Robert, Hi Andrew,

sorry...what I wrote was misleading...

I meant: What do I need to patch/modifiy to make all three I2C-busse
available -- for example below

   /sys/devices/platform/omap/...

Thank you very much in advance for any help!

Best regards,
mcc

Something like: "completely untested"

diff --git a/arch/arm/mach-omap2/board-am335xevm.c
b/arch/arm/mach-omap2/board-am335xevm.c
index 3b0cb4e..bb10f6b 100644
--- a/arch/arm/mach-omap2/board-am335xevm.c
+++ b/arch/arm/mach-omap2/board-am335xevm.c
@@ -2762,6 +2762,13 @@ static void i2c1_init(int evm_id, int profile)
        return;
}

+static void i2c1_init_bone(int evm_id, int profile)
+{
+ setup_pin_mux(i2c1_pin_mux);
+ omap_register_i2c_bus(2, 100, NULL, 0);
+ return;
+}

Robert Nelson <robertcnelson@gmail.com> [12-10-20 17:26]: