Information:
Problem:
We can not seem to create an RCW that makes these pins available as GPIO. No matter what we try, we can neither read nor write from these pins.
Details:
We've been at this for a few days now and are becoming increasingly frustrated. We can read/write GPIO1[16,18,20,22] (from the UART2 port) no problem, so it's not a kernel issue or anything wrong with the GPIO1 device, but nothing we do makes GPIO1[23:30] available. We are performing all our tests using the Linux kernel /dev/gpiochip0 IOCTL interface, and we have also tried setting the ports with PBI commands. Nothing works.
Request:
Can anyone look at the RCW we are using, and suggest whether there is something we are missing? I have also written a binary rcw.bin decompiler, and can verify that in the RCW binary loaded, IRQ_BASE is definitely 1, and IRQ_EXT is definitely 0. So it's not an issue of compiling and loading the wrong thing.
Any assistance would be appreciated, as this issue is holding up the product release.
Thank you in advance for any assistance.
P.S. Side note: can anyone explain RCW, bit 372, "IRQ_OUT". Is IRQ_OUT not applicable to the LS1046a? I can't find any other mention of this pin or function anywhere.
Solved! Go to Solution.
Please refer to the following suggestion from the AE team.
IRQ_BASE[373:381] defines the functionality of IRQ[3:11] pins.
GPIO1[26:31] functionality is selected when each bit in IRQ_BASE is 1 for the corresponding GPIOs.
This bit has to be set for each GPIO ,i.e., IRQ_BASE = 0b111111111
In the .rcw file shared by the customer please ask them to set IRQ_BASE = 511 (in decimal)
1. Program the binary on board.
2. By default, all the GPIOs are configured as input. Set the direction as output in the GPIO_DIR register.
3. Write on the data register.
It is correct to configure the following fields in RCW.
IRQ_BASE=1
IRQ_EXT=0
Please try the following gpio command in u-boot.
=> gpio status -a
Bank MPC@2320000_:
MPC@2320000_0: input: 0 [ ]
MPC@2320000_1: input: 0 [ ]
MPC@2320000_2: input: 0 [ ]
MPC@2320000_3: input: 0 [ ]
MPC@2320000_4: input: 0 [ ]
MPC@2320000_5: input: 0 [ ]
MPC@2320000_6: input: 0 [ ]
MPC@2320000_7: input: 0 [ ]
MPC@2320000_8: input: 0 [ ]
MPC@2320000_9: input: 0 [ ]
MPC@2320000_10: input: 0 [ ]
MPC@2320000_11: input: 0 [ ]
MPC@2320000_12: input: 0 [ ]
MPC@2320000_13: input: 0 [ ]
MPC@2320000_14: input: 0 [ ]
MPC@2320000_15: input: 0 [ ]
MPC@2320000_16: input: 0 [ ]
MPC@2320000_17: input: 0 [ ]
MPC@2320000_18: input: 0 [ ]
MPC@2320000_19: input: 0 [ ]
MPC@2320000_20: input: 0 [ ]
MPC@2320000_21: input: 0 [ ]
MPC@2320000_22: input: 0 [ ]
MPC@2320000_23: input: 0 [ ]
MPC@2320000_24: input: 0 [ ]
MPC@2320000_25: input: 0 [ ]
MPC@2320000_26: input: 0 [ ]
MPC@2320000_27: input: 0 [ ]
MPC@2320000_28: input: 0 [ ]
MPC@2320000_29: input: 0 [ ]
MPC@2320000_30: input: 0 [ ]
MPC@2320000_31: input: 0 [ ]
=> gpio clear mpc@2320000_27
gpio: pin mpc@2320000_27 (gpio 27) value is 0
=> gpio status mpc@2320000_27
Bank MPC@2320000_:
MPC@2320000_27: output: 0 [ ]
=> gpio set mpc@2320000_27
gpio: pin mpc@2320000_27 (gpio 27) value is 1
=> gpio status mpc@2320000_27
Bank MPC@2320000_:
MPC@2320000_27: output: 1 [ ]
=> gpio input mpc@2320000_27
gpio: pin mpc@2320000_27 (gpio 27) value is 0
=> gpio status mpc@2320000_27
Bank MPC@2320000_:
MPC@2320000_27: input: 0 [ ]
=>
Hi Yipingwang,
I appreciate your assistance with this.
The report from U-Boot looks good. The direction is correctly set to output, and the pin values change as expected when you issue the "gpio set" command. Unfortunately, the report appears to be wrong. The LS1046a never outputs anything on the physical pin.
Despite showing they are outputs, the pins all appear to be in High Z with a weak pulldown. Nothing appears on the scope when you toggle. Placing a 1K pullup on the pins to 3.3v will pull the pin to 3.2v. But they still do not move when you toggle. Also, the pins always read back as zero even with the pullup and the scope saying the voltage on them is 3.2v.
=> gpio status -a
Bank MPC@02300000:
MPC@023000000: input: 0 [ ]
MPC@023000001: input: 0 [ ]
MPC@023000002: input: 0 [ ]
MPC@023000003: input: 0 [ ]
MPC@023000004: input: 0 [ ]
MPC@023000005: input: 0 [ ]
MPC@023000006: input: 0 [ ]
MPC@023000007: input: 0 [ ]
MPC@023000008: input: 0 [ ]
MPC@023000009: input: 0 [ ]
MPC@0230000010: input: 0 [ ]
MPC@0230000011: input: 0 [ ]
MPC@0230000012: input: 0 [ ]
MPC@0230000013: input: 0 [ ]
MPC@0230000014: input: 0 [ ]
MPC@0230000015: input: 0 [ ]
MPC@0230000016: input: 0 [ ]
MPC@0230000017: input: 0 [ ]
MPC@0230000018: input: 1 [ ]
MPC@0230000019: input: 0 [ ]
MPC@0230000020: input: 0 [ ]
MPC@0230000021: input: 0 [ ]
MPC@0230000022: input: 1 [ ]
MPC@0230000023: output: 0 [ ]
MPC@0230000024: input: 0 [ ]
MPC@0230000025: output: 0 [ ]
MPC@0230000026: input: 0 [ ]
MPC@0230000027: output: 0 [ ]
MPC@0230000028: input: 0 [ ]
MPC@0230000029: output: 0 [ ]
MPC@0230000030: input: 0 [ ]
MPC@0230000031: input: 1 [ ]
Bank MPC@02310000:
MPC@023100000: input: 0 [ ]
MPC@023100001: input: 0 [ ]
MPC@023100002: input: 0 [ ]
MPC@023100003: input: 0 [ ]
MPC@023100004: input: 0 [ ]
MPC@023100005: input: 0 [ ]
MPC@023100006: input: 0 [ ]
MPC@023100007: input: 0 [ ]
MPC@023100008: input: 0 [ ]
MPC@023100009: input: 0 [ ]
MPC@0231000010: input: 1 [ ]
MPC@0231000011: input: 1 [ ]
MPC@0231000012: input: 1 [ ]
MPC@0231000013: input: 0 [ ]
MPC@0231000014: input: 0 [ ]
MPC@0231000015: input: 0 [ ]
MPC@0231000016: input: 0 [ ]
MPC@0231000017: input: 0 [ ]
MPC@0231000018: input: 0 [ ]
MPC@0231000019: input: 0 [ ]
MPC@0231000020: input: 0 [ ]
MPC@0231000021: input: 0 [ ]
MPC@0231000022: input: 0 [ ]
MPC@0231000023: input: 0 [ ]
MPC@0231000024: input: 0 [ ]
MPC@0231000025: input: 0 [ ]
MPC@0231000026: input: 0 [ ]
MPC@0231000027: input: 0 [ ]
MPC@0231000028: input: 0 [ ]
MPC@0231000029: input: 0 [ ]
MPC@0231000030: input: 0 [ ]
MPC@0231000031: input: 0 [ ]
Bank MPC@02320000:
MPC@023200000: input: 1 [ ]
MPC@023200001: input: 1 [ ]
MPC@023200002: input: 1 [ ]
MPC@023200003: input: 1 [ ]
MPC@023200004: input: 0 [ ]
MPC@023200005: input: 0 [ ]
MPC@023200006: input: 0 [ ]
MPC@023200007: input: 0 [ ]
MPC@023200008: input: 0 [ ]
MPC@023200009: input: 0 [ ]
MPC@0232000010: input: 0 [ ]
MPC@0232000011: input: 0 [ ]
MPC@0232000012: input: 1 [ ]
MPC@0232000013: input: 1 [ ]
MPC@0232000014: input: 1 [ ]
MPC@0232000015: input: 1 [ ]
MPC@0232000016: input: 1 [ ]
MPC@0232000017: input: 1 [ ]
MPC@0232000018: input: 0 [ ]
MPC@0232000019: input: 1 [ ]
MPC@0232000020: input: 1 [ ]
MPC@0232000021: input: 1 [ ]
MPC@0232000022: output: 0 [ ]
MPC@0232000023: output: 0 [ ]
MPC@0232000024: output: 0 [ ]
MPC@0232000025: output: 0 [ ]
MPC@0232000026: output: 0 [ ]
MPC@0232000027: output: 0 [ ]
MPC@0232000028: input: 0 [ ]
MPC@0232000029: input: 0 [ ]
MPC@0232000030: input: 0 [ ]
MPC@0232000031: input: 0 [ ]
Bank MPC@02330000:
MPC@023300000: input: 0 [ ]
MPC@023300001: input: 0 [ ]
MPC@023300002: input: 0 [ ]
MPC@023300003: input: 0 [ ]
MPC@023300004: input: 0 [ ]
MPC@023300005: input: 0 [ ]
MPC@023300006: input: 0 [ ]
MPC@023300007: input: 0 [ ]
MPC@023300008: input: 0 [ ]
MPC@023300009: input: 0 [ ]
MPC@0233000010: input: 0 [ ]
MPC@0233000011: input: 0 [ ]
MPC@0233000012: input: 0 [ ]
MPC@0233000013: input: 0 [ ]
MPC@0233000014: input: 0 [ ]
MPC@0233000015: input: 0 [ ]
MPC@0233000016: input: 0 [ ]
MPC@0233000017: input: 0 [ ]
MPC@0233000018: input: 0 [ ]
MPC@0233000019: input: 0 [ ]
MPC@0233000020: input: 0 [ ]
MPC@0233000021: input: 0 [ ]
MPC@0233000022: input: 0 [ ]
MPC@0233000023: input: 0 [ ]
MPC@0233000024: input: 0 [ ]
MPC@0233000025: input: 0 [ ]
MPC@0233000026: input: 0 [ ]
MPC@0233000027: input: 0 [ ]
MPC@0233000028: input: 0 [ ]
MPC@0233000029: input: 0 [ ]
MPC@0233000030: input: 0 [ ]
MPC@0233000031: input: 0 [ ]
=>
=> gpio set MPC@0230000023
gpio: pin MPC@0230000023 (gpio 23) value is 1
=> gpio set MPC@0230000027
gpio: pin MPC@0230000027 (gpio 27) value is 1
=> gpio status -a
Bank MPC@02300000:
MPC@023000000: input: 0 [ ]
MPC@023000001: input: 0 [ ]
MPC@023000002: input: 0 [ ]
MPC@023000003: input: 0 [ ]
MPC@023000004: input: 0 [ ]
MPC@023000005: input: 0 [ ]
MPC@023000006: input: 0 [ ]
MPC@023000007: input: 0 [ ]
MPC@023000008: input: 0 [ ]
MPC@023000009: input: 0 [ ]
MPC@0230000010: input: 0 [ ]
MPC@0230000011: input: 0 [ ]
MPC@0230000012: input: 0 [ ]
MPC@0230000013: input: 0 [ ]
MPC@0230000014: input: 0 [ ]
MPC@0230000015: input: 0 [ ]
MPC@0230000016: input: 0 [ ]
MPC@0230000017: input: 0 [ ]
MPC@0230000018: input: 1 [ ]
MPC@0230000019: input: 0 [ ]
MPC@0230000020: input: 0 [ ]
MPC@0230000021: input: 0 [ ]
MPC@0230000022: input: 1 [ ]
MPC@0230000023: output: 1 [ ]
MPC@0230000024: input: 0 [ ]
MPC@0230000025: output: 0 [ ]
MPC@0230000026: input: 0 [ ]
MPC@0230000027: output: 1 [ ]
MPC@0230000028: input: 0 [ ]
MPC@0230000029: output: 0 [ ]
MPC@0230000030: input: 0 [ ]
MPC@0230000031: input: 1 [ ]
=>
=>
=> gpio toggle MPC@0230000027
gpio: pin MPC@0230000027 (gpio 27) value is 0
=> gpio toggle MPC@0230000027
gpio: pin MPC@0230000027 (gpio 27) value is 1
=> gpio toggle MPC@0230000027
gpio: pin MPC@0230000027 (gpio 27) value is 0
=> gpio toggle MPC@0230000027
gpio: pin MPC@0230000027 (gpio 27) value is 1
=> gpio toggle MPC@0230000027
gpio: pin MPC@0230000027 (gpio 27) value is 0
=> gpio toggle MPC@0230000027
gpio: pin MPC@0230000027 (gpio 27) value is 1
=> gpio toggle MPC@0230000027
gpio: pin MPC@0230000027 (gpio 27) value is 0
=> gpio toggle MPC@0230000027
gpio: pin MPC@0230000027 (gpio 27) value is 1
Please refer to the following suggestion from the AE team.
IRQ_BASE[373:381] defines the functionality of IRQ[3:11] pins.
GPIO1[26:31] functionality is selected when each bit in IRQ_BASE is 1 for the corresponding GPIOs.
This bit has to be set for each GPIO ,i.e., IRQ_BASE = 0b111111111
In the .rcw file shared by the customer please ask them to set IRQ_BASE = 511 (in decimal)
1. Program the binary on board.
2. By default, all the GPIOs are configured as input. Set the direction as output in the GPIO_DIR register.
3. Write on the data register.
This worked! Thank you for your assistance.