Hi, I'm trying to use UART2 on LS1028ARDB to act as GPIO output.
I did the following:
1) Changed RCW:
UART2_SOUTSIN_PMUX=1
2) Changed CPLD mux so that UART2 pins are forwarded to uBUS1
//board_init
reg = QIXIS_READ(brdcfg[3]);
reg &= ~(0x30);
reg |= 0x20;
QIXIS_WRITE(brdcfg[3], reg);
3) Enabled support for SYSFS_GPIO in Linux Kernel
CONFIG_GPIO_SYSFS=y
4) Configured pins through SYSFS
a) UART2_SOUT -> GPIO1_DAT07 uBUS1 TX (it works)
cd /sys/class/gpio
echo 487 > export
cd gpio487
echo "out" > direction
echo "1" > value // Voltage changes to 3.3V
echo "0" > value // Voltage changes to around 0.0V
b) UART2_SIN -> GPIO1_DAT6 uBUS1 RX (does not work)
cd /sys/class/gpio
echo 486 > export
cd gpio486
echo "out" > direction
echo "1" > value // Voltage changes to 3.3V
echo "0" > value // Voltage keeps on level 3.3V
What did I do wrong? According to LS1028A RM GPIO1_DAT06 (UART2_SIN) is I/O pin so it should work in both functions output and input.