Hi Sir :
I work on DM8148 platform and use DVRRDK_03.00.00.00 to develop our system.
I want to control GPIO1_9 in uboot and below is my code.
#define GPIO0_BASE 0x48032000
#define GPIO1_BASE 0x4804C000
#define PINCNTLx_BASE 0x48140800
#define GPIO_CLKCTRL_VAL 0x102
add=CM_ALWON_GPIO_1_CLKCTRL;
regVal = GPIO_CLKCTRL_VAL;
writel(regVal,add);
add=PINCNTLx_BASE+(64-1)*4; ////pinmux64
regVal = (1<<18)|(1 << 16)|0x80; //gpio1(9)
writel(regVal,add);
add=GPIO1_BASE+0x134; ////Output Enable Register:Output Data Enable
regVal = readl(add);
regVal &= 0xfffffdff; ////GP1(9) Output,0 = The corresponding GPIO port is configured as an output.
writel(regVal,add);
add=GPIO1_BASE+0x13c; ////GPIO_DATAOUT Register Field Descriptions
regVal = readl(add);
regVal &= 0xfffffdff; ////GP1(9) Output 0
writel(regVal,add);
I can control GPIO0_28 but I can not control GPIO1_9.
I can not figure out the reason, please kindly give me some suggestion!
Best regard,
Marcus