I am unable to set the pinmux using call to ti814x_mux_init()
Here is my board_mux structure:
static struct omap_board_mux board_mux[] __initdata = {
TI814X_MUX(MLBP_DAT_P, FCN8), /* GPIO1_09 */
TI814X_MUX(MLBP_DAT_N, FCN8), /* GPIO1_10 */
TI814X_MUX(VIN0_D0, FCN8), /* GPIO1_11 */
TI814X_MUX(VIN0_D1, FCN8), /* GPIO1_12 */
TI814X_MUX(I2C1_SCL, FCN1), /* I2C[1] SCL */
TI814X_MUX(I2C1_SDA, FCN1), /* I2C[1] SDA */
TI814X_MUX(UART0_DCDN, FCN6), /* I2C[2] SCL */
TI814X_MUX(UART0_DSRN, FCN6), /* I2C[2] SDA */
TI814X_MUX(DCAN0_TX, FCN6), /* I2C[3] SDA */
TI814X_MUX(DCAN0_RX, FCN6), /* I2C[3] SCL */
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
A dump of the registers shows they are all set to 0x01.
If I set the registers directly through the following code, I get the correct results. MUX_EVM() is a macro provided by the TI Pin Mux utility. All registers are set correctly.
static int user_pinmux_setup (void )
{
/* reserve memory region for our use */
if( request_mem_region( PMUXREG_BASE_ADDRESS, PINCNTL270,"user_gpio.ko") == NULL )
{
printk( KERN_CRIT
"user_gpio::user_gpio_pinmux_setup: unable to reserve I/O memory address at 0x%x\n",PMUXREG_BASE_ADDRESS);
return -EBUSY;
}
/* map physical memory */
TI814X_CTRL_BASE = ioremap(PMUXREG_BASE_ADDRESS,PINCNTL270);
/* call macro defined in pinmux.h */
MUX_EVM();
/* unmap physical memory */
iounmap(TI814X_CTRL_BASE);
/* release memory region */
release_mem_region(PMUXREG_BASE_ADDRESS, PINCNTL270);
return 0;
}
Also, once I am successful at setting the pinmux (using direct register writes), I cannot control the GPIO through the normal kernel driver calls (e.g. gpio_request(), gpio_direction_ouput(), etc). I have had this all working very successfully with the 816x SDK and the Netra EVM. I am able to control the GPIO through the sysfs interface with no problem using the 814x SDK and chipset.
So, is there an issue with the 814x SDK? I am trying to build the exact same code from the 816x environment in the 814x environment. Have the Linux libraries been implemented in the 814x environment?
As another datapoint, I have all 4 I2C busses working correctly, using simple Linux Read/Write/IOCTL calls into the driver. So, it appears as thought the Linux libraries work fine for I2C. But not GPIO.
Any help/thoughts would be appreciated.
Thanks