Not able to configure UART2 to act as GPIO on LS1028A-RDB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Not able to configure UART2 to act as GPIO on LS1028A-RDB

1,218 Views
pb3
Contributor II

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.

0 Kudos
Reply
2 Replies

1,177 Views
pb3
Contributor II

Thanks, I've already tried this and it does not work. However I consulted this issue with our electronics Team and based on what they say, on LS1028ARDB it is physically not possible to configure this GPIO as an output.

0 Kudos
Reply

1,179 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please try the following u-boot commands.

=> gpio set MPC@023000006
gpio: pin MPC@023000006 (gpio 6) value is 1
=> gpio status MPC@023000006
Bank MPC@02300000:
MPC@023000006: output: 1 [ ]
=> gpio clear MPC@023000006
gpio: pin MPC@023000006 (gpio 6) value is 0
=> gpio status MPC@023000006
Bank MPC@02300000:
MPC@023000006: output: 0 [ ]
=> gpio set MPC@023000000
gpio: pin MPC@023000000 (gpio 0) value is 1
=>

0 Kudos
Reply