Hi, we have a custom board that is unlike the BBB or am335x_evm. We found the best approach for our development is to start with the -Template version of the board port kernel source in SDK 06 and incrementally add support from the -Base for those features we do have in common with the BBB & am335x_evm.
We'd like to enable the i2c0 peripheral for use in user space and have added the following code to /arch/arm/mach-omap2/board-am335xevm.c
#ifdef CONFIG_OMAP_MUX
/*
* Setting SYSBOOT[5] should set xdma_event_intr0 pin to mode 3 thereby
* allowing clkout1 to be available on xdma_event_intr0.
* However, on some boards (like EVM-SK), SYSBOOT[5] isn't properly
* latched.
* To be extra cautious, setup the pin-mux manually.
* If any modules/usecase requries it in different mode, then subsequent
* module init call will change the mux accordingly.
AM33XX_INPUT_EN | AM33XX_PIN_OUTPUT),
AM33XX_MUX(I2C0_SCL, OMAP_MUX_MODE0 | AM33XX_SLEWCTRL_SLOW |
AM33XX_INPUT_EN | AM33XX_PIN_OUTPUT),
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL