LS1012A GPIO1 Pins

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

LS1012A GPIO1 Pins

1,367 Views
justinjonas
Contributor III

I am having an issue with GPIO1 pins. I have configured the RCW to enable GPIO1 pins 15-20 by disabling SDHC1. I have loaded this new RCW. In uboot I write to the GPIO1 DIR register to make all the pins output, and then I write all 1's to the DATA register but I only get 0xf60100 when I read the data registers back. Can you help me with this? Thank you for all of your help so far.

 

U-Boot 2016.01 (Jan 11 2017 - 15:11:44 -0700), Build: jenkins-mdl2-buildroot-ls1012a-rdb-23

SoC:  LS1012AE (0x87040010)
Clock Configuration:
       CPU0(A53):800  MHz
       Bus:      250  MHz  DDR:      1000 MT/s
Reset Configuration Word (RCW):
       00000000: 08000008 00000000 00000000 00000000
       00000010: 35080000 c000000c 40000000 00001800
       00000020: 00000000 00000000 00000000 00014171
       00000030: 00000000 00c28120 00000096 00000000
I2C:   ready
DRAM:  1022 MiB
SEC: RNG instantiated
Using SERDES1 Protocol: 13576 (0x3508)
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected S25FS512S_256K with page size 512 Bytes, erase size 128 KiB, total 64 MiB
PCIe1: Root Complex no link, regs @ 0x3400000
In:    serial
Out:   serial
Err:   serial
Model: LS1012A RDB Board
Board: LS1012ARDB Version: RevB, boot from QSPI: bank2
SATA link 0 timeout.
AHCI 0001.0301 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: 64bit ncq pm clo only pmp fbss pio slum part ccc apst
Found 0 device(s).
SCSI:  Net:   cbus_baseaddr: 0000000004000000, ddr_baseaddr: 0000000083800000, ddr_phys_baseaddr: 03800000
class init complete
tmu init complete
bmu1 init: done
bmu2 init: done
GPI1 init complete
GPI2 init complete
HGPI init complete
hif_tx_desc_init: Tx desc_base: 0000000083e40400, base_pa: 03e40400, desc_count: 64
hif_rx_desc_init: Rx desc base: 0000000083e40000, base_pa: 03e40000, desc_count: 64
HIF tx desc: base_va: 0000000083e40400, base_pa: 03e40400
HIF init complete
bmu1 enabled
bmu2 enabled
pfe_hw_init: done
pfe_firmware_init
pfe_load_elf: no of sections: 13
pfe_firmware_init: class firmware loaded
pfe_load_elf: no of sections: 10
pfe_firmware_init: tmu firmware loaded
ls1012a_configure_serdes 0
pfe_eth0, pfe_eth1
Hit any key to stop autoboot:  0
=> md 0x2300000
02300000: 00000000 00000000 00f60100 00f60100    ................
02300010: 00000000 00000000 00000000 00000000    ................
02300020: 00000000 00000000 00000000 00000000    ................
02300030: 00000000 00000000 00000000 00000000    ................
02300040: 00000000 00000000 00000000 00000000    ................
02300050: 00000000 00000000 00000000 00000000    ................
02300060: 00000000 00000000 00000000 00000000    ................
02300070: 00000000 00000000 00000000 00000000    ................
02300080: 00000000 00000000 00000000 00000000    ................
02300090: 00000000 00000000 00000000 00000000    ................
023000a0: 00000000 00000000 00000000 00000000    ................
023000b0: 00000000 00000000 00000000 00000000    ................
023000c0: 00000000 00000000 00000000 00000000    ................
023000d0: 00000000 00000000 00000000 00000000    ................
023000e0: 00000000 00000000 00000000 00000000    ................
023000f0: 00000000 00000000 00000000 00000000    ................
=> mm 0x2300000
02300000: 00000000 ? 0xffffffff
02300004: 00000000 ? 0xffffffff
02300008: 00000000 ? 0xffffffff
0230000c: 00f60100 ? .
=> md 0x2300000
02300000: ffffffff ffffffff 00f60100 00f60100    ................
02300010: 00000000 00000000 00000000 00000000    ................
02300020: 00000000 00000000 00000000 00000000    ................
02300030: 00000000 00000000 00000000 00000000    ................
02300040: 00000000 00000000 00000000 00000000    ................
02300050: 00000000 00000000 00000000 00000000    ................
02300060: 00000000 00000000 00000000 00000000    ................
02300070: 00000000 00000000 00000000 00000000    ................
02300080: 00000000 00000000 00000000 00000000    ................
02300090: 00000000 00000000 00000000 00000000    ................
023000a0: 00000000 00000000 00000000 00000000    ................
023000b0: 00000000 00000000 00000000 00000000    ................
023000c0: 00000000 00000000 00000000 00000000    ................
023000d0: 00000000 00000000 00000000 00000000    ................
023000e0: 00000000 00000000 00000000 00000000    ................
023000f0: 00000000 00000000 00000000 00000000    ................
=> mm 0x2300000
02300000: ffffffff ?
02300004: ffffffff ?
02300008: 00f60100 ? 0xffffffff
0230000c: 00f60100 ? 0xffffffff
02300010: 00000000 ? .
=> md 0x2300000
02300000: ffffffff ffffffff 00f60100 00000000    ................
02300010: 00000000 00000000 00000000 00000000    ................
02300020: 00000000 00000000 00000000 00000000    ................
02300030: 00000000 00000000 00000000 00000000    ................
02300040: 00000000 00000000 00000000 00000000    ................
02300050: 00000000 00000000 00000000 00000000    ................
02300060: 00000000 00000000 00000000 00000000    ................
02300070: 00000000 00000000 00000000 00000000    ................
02300080: 00000000 00000000 00000000 00000000    ................
02300090: 00000000 00000000 00000000 00000000    ................
023000a0: 00000000 00000000 00000000 00000000    ................
023000b0: 00000000 00000000 00000000 00000000    ................
023000c0: 00000000 00000000 00000000 00000000    ................
023000d0: 00000000 00000000 00000000 00000000    ................
023000e0: 00000000 00000000 00000000 00000000    ................
023000f0: 00000000 00000000 00000000 00000000    ................

Labels (1)
Tags (1)
0 Kudos
3 Replies

825 Views
justinjonas
Contributor III

Chapter 19 of the reference manual for the LS1012A gives a list of all of the GPIO pins that are output only, input only, or reserved. The pins that I was interested in did not read back the correct value because it is an output only port. This implies that read modify write will not work with the output only pins.

0 Kudos

825 Views
justinjonas
Contributor III

I checked the actual GPIO pins with a voltmeter. The pins are actually changing, but the GPIO data register doesn't report the correct value in uboot as shown above.

0 Kudos

825 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Justin Jonas,

Please refer to the following example about how to use GPIO registers.

Set GPDIR_1 = 0h00001000, GPODR_1 = 0h00001000 to configure the GPIO_1[13] pin as output and open drain pin.

Write data to generate the pulses through GPIO_1[13] .
a. Set GPDAT_1 = 0h00001000; (HIGH)
b. Set GPDAT_1 = 0h00000000; (LOW)


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos