How to use the remaining pins as gpio after setting EC2 to IEEE1588 in LS1046A.

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

How to use the remaining pins as gpio after setting EC2 to IEEE1588 in LS1046A.

Jump to solution
1,240 Views
james13
Contributor I

Hi,

I set ec2 to ieee1588 in LS1046A and try to use the remaining pins as gpio.
However, there is no output even if gpio3_[19:23] is set as output and set to high.
May I know what issues are there?

GPIO test was performed using the following command.
ex)GPIO3_19 log->high->low
echo 435 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio435/direction
echo 0 > /sys/class/gpio/gpio435/value
echo 1 > /sys/class/gpio/gpio435/value

echo 0 > /sys/class/gpio/gpio435/value

 

 
0 Kudos
1 Solution
1,153 Views
June_Lu
NXP TechSupport
NXP TechSupport

Please refer to the document "Updates to LS1046A Reference Manual, Rev. 3" available on nxp.com.

In that document, it is mentioned in Table 3-11, “EC2 RGMII signal configuration,” remove reference to RCW[EC2]=010 for GPIO3 signal functionality.

View solution in original post

0 Kudos
5 Replies
1,186 Views
June_Lu
NXP TechSupport
NXP TechSupport

I have no LS1046ARDB in hand, but I checked the similar command in LS1028ARDB GPIO1_DAT24, voltage can change correctly when value change. LS1028ARDB software will be a good example for GPIO using. You maybe compare the software difference between LS1046ARDB and LS1028ARDB

root@TinyLinux:/sys/class/gpio# cat /sys/kernel/debug/gpio

gpiochip2: GPIOs 416-447, parent: platform/2320000.gpio, 2320000.gpio:

 

gpiochip1: GPIOs 448-479, parent: platform/2310000.gpio, 2310000.gpio:

 

gpiochip0: GPIOs 480-511, parent: platform/2300000.gpio, 2300000.gpio:

root@TinyLinux:/sys/class/gpio# echo 504 >/sys/class/gpio/export

root@TinyLinux:/sys/class/gpio# echo out > /sys/class/gpio/gpio504/direction

root@TinyLinux:/sys/class/gpio# echo 1 > /sys/class/gpio/gpio504/value

root@TinyLinux:/sys/class/gpio# echo 0 > /sys/class/gpio/gpio504/value

 

I think GPIO3_19 is number 435.

Would you change the  RCW[EC2] to 001.

It will be a good try to check if the GPIO work correctly. It will eliminate the effect of IEEE1588.

Note: the GPIOs are connected to RGMII in the LS1046ARDB layout although the RCW[EC2] may  be set different, please use the GPIO carefully to eliminate the signal conflict.

0 Kudos
1,175 Views
james13
Contributor I

After setting EC2 to GPIO3 (001), I tested it. It is normally controlled by GPIO.

But I want to use EC2 with IEEE1588 and GPIO3 (010).

Is there anything I need to remove from LSDK to use LS1046ARDB's EC2 as IEEE1588 and GPIO3[19:23]? Or is it an additional setting?

0 Kudos
1,154 Views
June_Lu
NXP TechSupport
NXP TechSupport

Please refer to the document "Updates to LS1046A Reference Manual, Rev. 3" available on nxp.com.

In that document, it is mentioned in Table 3-11, “EC2 RGMII signal configuration,” remove reference to RCW[EC2]=010 for GPIO3 signal functionality.

0 Kudos
1,230 Views
June_Lu
NXP TechSupport
NXP TechSupport

Please check the mux signal to confirm the value setting correct;

Get the right GPIO number to run the command; follow command LSDKUG_Rev21.08 page 500;

On the LS1046ARDB, GPIO3_[19:23] used for RGMII, GPIO setting will conflict.

0 Kudos
1,215 Views
james13
Contributor I

Hi.

If you check the RCW, EC2 is set to IEEE1588, not RGMII.

Reset Configuration Word (RCW):
00000000: 0c150012 0e000000 00000000 00000000
00000010: 13335577 40005012 60040000 c1000000
00000020: 00000000 00000000 00000000 0022caf0
00000030: 20124504 08063101 00000096 00000001

 

It is described as "When configured for IEEE1588, the EC2 pins that are not available for IEEE1588 are configured for GPIO" on page 231 of the LS1046ARM document. (GPIO3_[19:23])

However, these pins are not controlled by GPIO.

 

Check the gpio number with the command below.

root@localhost:~# cat /sys/kernel/debug/gpio
gpiochip3: GPIOs 384-415, parent: platform/2330000.gpio, 2330000.gpio:

gpiochip2: GPIOs 416-447, parent: platform/2320000.gpio, 2320000.gpio:

gpiochip1: GPIOs 448-479, parent: platform/2310000.gpio, 2310000.gpio:

gpiochip0: GPIOs 480-511, parent: platform/2300000.gpio, 2300000.gpio:
gpio-488 ( |softreset ) in lo

 

GPIO3_19 is number 435 right? (416+19)

0 Kudos