set GPIO2_DAT15/SDHC2_DAT4 as GPIO

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

set GPIO2_DAT15/SDHC2_DAT4 as GPIO

881 Views
dz_tiger
Contributor II

Hi,

In the LX2160A Reference Manual, for IIC7_SDA/SDHC2_DAT4/GPIO2_DAT15/XSPI1_B_DATA4, you need to modify the Reset Configuration Word (RCW) to select the GPIO function for this pin. SDHC2_BASE_PMUX=2 is set:

Reset Configuration Word (RCW):
00000000: 4c434330 304c004c 00000000 00000000
00000010: 00000000 0c010000 00000000 00000000
00000020: 390001a0 00002580 00000000 1b009640
00000030: 08008410 00000049 00000000 00000000
00000040: 00000000 00000000 00000000 00000000
00000050: 00000000 00000000 00000000 00000000
00000060: 00000000 00000000 000270a5 00000000
00000070: 88a80011 00150002

GPIO2_DAT15:

gpio set 47 shows (gpio 47) value is 1

But there is no output from the GPIO pin. Do I have to add anything in device tree? What else is missing or wrong?

Thank you,

dz_tiger

0 Kudos
Reply
3 Replies

782 Views
dz_tiger
Contributor II

After adding SDHC2_DAT74_PMUX=1, it works.

Case close. Thank you,

Dz_tiger

0 Kudos
Reply

805 Views
dz_tiger
Contributor II
Hi Kenli,
 
Thank you for your reply on the GPIO pin. 
I have rebuilt and flashed RCW with SDHC2_DAT74_PMUX=1. But I'm still not getting 1.8v on PIN C26. 
I assume C26 is the right pin from LX2160A-1919583.pdf
 
My current RCW settings are:
Reset Configuration Word (RCW):
       00000000: 4c434330 304c004c 00000000 00000000
       00000010: 00000000 0c010000 00000000 00000000
       00000020: 390001a0 00002580 00000000 1b009640
       00000030: 08008408 00000049 00000000 00000000
       00000040: 00000000 00000000 00000000 00000000
       00000050: 00000000 00000000 00000000 00000000
       00000060: 00000000 00000000 000270a5 00000000
       00000070: 88a80011 00150002
 
 
I'm a little confused: 
On "User guide Rev. 6.1.55_2.2.0 — 24 January 2024" for LX2160ARDB, 
 

 

 
  1. The GPIO2_DAT15, shall be at BANK-2, pin number 47, On Pin C26
  2. I used uboot command: gpio set 47  or gpio mpc@0231000015
  3. In the above User Manual, it needs to set BRDCFG5[2] to 1 . Not sure if I have to do the similar to GPIO2_DAT15,
  4. I2c mw 66 55 64, which chip has address 66, and what register (55) for GPIO2_DAT15 gpio pin?
 

gpio1.png

Thank you,
Dz_tiger
0 Kudos
Reply

834 Views
kenli
NXP Employee
NXP Employee

You must set the RCW field SDHC2_DAT74_PMUX=1 to mux the SDHC2_DAT4 pin as GPIO, as SDHC2_BASE_PMUX does not control this specific pin.

Best regards
0 Kudos
Reply