BeagleBoard xM 2.6.38 kernel bug (mis-configured TFP410/AUX_3V3 GPIOs)

Hi,

I found a mistake in the configuration of the GPIOs for the
BeagleBoard xM kernel. I found this while using the Ubuntu 2.6.37
beagleboard kernel, however, the affected code is the same in the
Ubuntu 2.6.38 beagleboard kernel.

Inside:
/arch/arm/mach-omap2/board-omap3beagle.c

beagle_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned
ngpio)

Configures the gpio+1/gpio+2 pins for the BeagleBoardxM/BeagleBoardxM
rev C boards. However, the code is doing this backwards (at least on
the revA3 xM boards). The code is setting up gpio+1 as nDVI_PWR_EN and
gpio+2 as DVI_LDO_EN.

However as shown in the schematics: http://i.imgur.com/PdouU.png
   gpio+1 is connected to the AUX_3V3_DIS (1=disable the AUX_3V3 rail,
0=leave the AUX_3V3 rail alone)
   gpio+2 is connected to the DVI_PU signal (1=enable the TFP410
0=power down TFP410)

This usually would be unnoticed, but if you try turning off the TFP410
you end up disabling the AUX_3V3 rail (and losing your serial console
in the process). The fix is simply swapping gpio+1 with gpio+2 (and
vice versa) also gpio+2 should probably be renamed to "nAUX_3V3" or
"AUX_3V3_DIS" since it's connected with an inverter and doesn't just
turn off the DVI LDO.

It's a pretty simple patch, if someone knows the right place to send
it to/what version they want a patch from I can make one to send out.
The only complication is that the xM revA2 schematics have the
nDVI_PWR_EN elsewhere (however gpio+2 as the DVI_LDO_EN is still
wrong).

Thanks
-Jonathan

Note: If anyone tests this they should be sure to remove power from
their beagleboard between tests because the TPS65950 retains its state
across reboots (and at least in my configuration).

Hi,

I found a mistake in the configuration of the GPIOs for the
BeagleBoard xM kernel. I found this while using the Ubuntu 2.6.37
beagleboard kernel, however, the affected code is the same in the
Ubuntu 2.6.38 beagleboard kernel.

Inside:
/arch/arm/mach-omap2/board-omap3beagle.c

beagle_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned
ngpio)

Configures the gpio+1/gpio+2 pins for the BeagleBoardxM/BeagleBoardxM
rev C boards. However, the code is doing this backwards (at least on
the revA3 xM boards). The code is setting up gpio+1 as nDVI_PWR_EN and
gpio+2 as DVI_LDO_EN.

However as shown in the schematics: http://i.imgur.com/PdouU.png
gpio+1 is connected to the AUX_3V3_DIS (1=disable the AUX_3V3 rail,
0=leave the AUX_3V3 rail alone)
gpio+2 is connected to the DVI_PU signal (1=enable the TFP410
0=power down TFP410)

This usually would be unnoticed, but if you try turning off the TFP410
you end up disabling the AUX_3V3 rail (and losing your serial console
in the process). The fix is simply swapping gpio+1 with gpio+2 (and
vice versa) also gpio+2 should probably be renamed to “nAUX_3V3” or
“AUX_3V3_DIS” since it’s connected with an inverter and doesn’t just
turn off the DVI LDO.

It’s a pretty simple patch, if someone knows the right place to send
it to/what version they want a patch from I can make one to send out.
The only complication is that the xM revA2 schematics have the
nDVI_PWR_EN elsewhere (however gpio+2 as the DVI_LDO_EN is still
wrong).

Please copy this list with any BeagleBoard-specific patches, but the main list for our kernel patches is http://vger.kernel.org/vger-lists.html#linux-omap. I believe the guide at http://www.kernel.org/pub/linux/docs/lkml/ mostly applies, but Tony Lindgren is the maintainer of linux-omap. The git tree is listed at the link for the mail list and you should create your patch for the top of that tree.