Dear Sirs,
I have some problem with pinout control.
/board/ti/ti8148/evm.c
#define PADCTRL_BASE 0x48140000
#define PAD161_CNTRL (*(volatile unsigned int *)(PADCTRL_BASE + 0x0A80)) //GP0[15]
#define PAD163_CNTRL (*(volatile unsigned int *)(PADCTRL_BASE + 0x0A88)) //GP0[17]
#define PAD168_CNTRL (*(volatile unsigned int *)(PADCTRL_BASE + 0x0A9C)) //GP0[22]
#define PAD009_CNTRL (*(volatile unsigned int *)(PADCTRL_BASE + 0x0820)) //GP0[2]
#define CVDD_POWER_MNGR0 ( 1<<15 ) // GP0[15]
#define CVDD_POWER_MNGR1 ( 1<<22 ) // GP0[22]
#define CVDD_POWER_MNGR2 ( 1<<17 ) // GP0[17]
#define CVDD_FORSE_POWER ( 1<<2 ) // GP0[2]
int board_init(void)
{
.....
// GPIO0 CLK Enable
__raw_writel(0x2, CM_ALWON_GPIO_0_CLKCTRL);
while(__raw_readl(CM_ALWON_GPIO_0_CLKCTRL) != 0x2);
.....
val = PAD161_CNTRL;
PAD161_CNTRL = (volatile unsigned int) (BIT(16) | BIT(7)); // mux for GPIO, disable pullup, disable input
val = PAD163_CNTRL;
PAD163_CNTRL = (volatile unsigned int) (BIT(16) | BIT(7)); // mux for GPIO, disable pullup, disable input
val = PAD168_CNTRL;
PAD168_CNTRL = (volatile unsigned int) (BIT(16) | BIT(7)); // mux for GPIO, disable pullup, disable input
val = PAD009_CNTRL;
PAD009_CNTRL = (volatile unsigned int) (BIT(16) | BIT(7)); // mux for GPIO, disable pullup, disable input
// Enable Output on GPIO0
gpio_reg_val = __raw_readl(0x48032134); //0x4803 2134 (GPIO0 Output Enable)
gpio_reg_val |= ( CVDD_POWER_MNGR0|CVDD_POWER_MNGR1|CVDD_POWER_MNGR2|CVDD_FORSE_POWER );
__raw_writel(gpio_reg_val, 0x48032134);
// Clear any existing output data
gpio_reg_val = __raw_readl(0x48032190); //0x4803 2190 (GPIO0 Clear Data Output)
gpio_reg_val |= ( CVDD_POWER_MNGR0|CVDD_POWER_MNGR1|CVDD_POWER_MNGR2|CVDD_FORSE_POWER );
__raw_writel(gpio_reg_val, 0x48032190);
// Program the GPIO to change the voltage
gpio_reg_val = __raw_readl(0x48032194); //0x4803 2194 (GPIO0 Set Data Output)
gpio_reg_val |= (CVDD_POWER_MNGR0 | CVDD_POWER_MNGR2);
__raw_writel(gpio_reg_val, 0x48032194);
.....
}
All pins are in 3 state.
Please help me to find out what i have missed.
Thanks.