I've got a TMS320DM8148 chip and I'm running the u-boot that came with the dm814x evm. I'm trying to set a pin mux value for a very specific pin, GPIO1[13]. The mux control register for this pin is called PINCNTL107 with reset value 0x00040000 at address 0x481409A8. I put the following line into u-boot.min:
/*
* baord specific muxing of pins
*/
void set_muxconf_regs(void)
{
u32 i, add, val;
u32 pad_conf[] = {
#include "mux.h"
};
for (i = 0; i<N_PINS; i++)
{
add = PIN_CTRL_BASE + (i*4);
val = __raw_readl(add);
val |= pad_conf[i];
__raw_writel(val, add);
}
/* MMC/SD pull-down enable */
__raw_writel(0x000C0040, 0x48140928);
__raw_writel(0x00040080, 0x481409A8);
}
and stopped the boot process in the u-boot min prompt and issued the following command
TI-MIN#md.l 0x481409a8
481409a8: 00000001 00000001 00020001 00000001 ................
481409b8: 00020001 00000001 00060001 00060001 ................
481409c8: 00060001 00020080 00020002 00020002 ................
481409d8: 00020002 00020002 00060001 00020001 ................
481409e8: 00000002 00020002 00060080 00060002 ................
481409f8: 00060081 00010001 00020001 00020001 ................
48140a08: 00010001 00010081 00060001 00040020 ............ ...
48140a18: 000e0001 000e0001 000c0001 000e0001 ................
48140a28: 000e0001 000c0001 000c0001 000c0001 ................
48140a38: 000c0001 000c0001 000c0001 000c0001 ................
48140a48: 000c0001 000c0001 000c0001 000c0001 ................
48140a58: 000c0001 00040001 000c0001 000c0001 ................
48140a68: 000c0001 000e0001 000c0001 000e0001 ................
48140a78: 000e0001 000c0001 00040001 00040001 ................
48140a88: 00040001 00060001 00060001 00060001 ................
48140a98: 00060001 00020010 00000010 00000010 ................
TI-MIN#
Notice that the value at 0x481409A8 is 1...ignoring the fact that I put in a line to write in the value 0x000400800 the value 1 doesn't even make sense because the spec says that for every PINCTL register the 18th bit must always be 1. some of the extra values printed above make sense, but not the one I care about.
I started looking into this because I can only control GPIO pins connected to bank 0, and not banks 1,2 and 3. Calling 'md.l 0x481409A8 1' crashes u-boot, but the linux kernel and u-boot stage 2 both report a value of 1 in that register.
thanks,
-Chris