ls1028 gpio use issue

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

ls1028 gpio use issue

2,080 Views
540915622
Contributor III

I want to use gpio1_25 in ATF,uboot and kernel,wo found some problem.

1.In ATF, I use the following code to operate GPIO

QQ截图20201231144110.png

code output:
bit_num:2000000
dir:0
dir:2000000
dir:2000000
dat:0
dat:2000000
dat:0
Configure Pin Data Error!

The output looks like the direction is set correctly, but the data is not set successfully。

2.In uboot, I found that there is no gpio driver for ls1028.

3.In kernel,I found the GPIO driver gpio-mpc8xxx.c in the kernel, but I found that the code here should be problematic.

Question 1

Seen from the chip manual that ls1028 does not have the GPIO_IBE register。

QQ截图20201231143847.png

 

 

Question 2

The device tree obtained by of_property_read_bool is in little-endian mode. Why is bgpio_init registered in big-endian mode?

 
 

QQ截图20201231143137.png

 

 

0 Kudos
8 Replies

2,071 Views
ufedor
NXP Employee
NXP Employee

Please refer to the LSDK 20.12 Documentation:

https://docs.nxp.com/bundle/GUID-3FFCCD77-5220-414D-8664-09E6FB1B02C6/page/GUID-1ABF245E-9E9B-4BEB-B...

Please refer to the QorIQ LS1028A Reference Manual, 20.4 GPIO register descriptions where it is shown that GPIO bit 25 corresponds to 0x40.

0 Kudos

2,057 Views
540915622
Contributor III

In ATF, I have changed GPIO bit 25 corresponds to 0x40. But I still cannot successfully set the DATA register.

code output:

bit_num:40
dir:0
dir:40
dir:40
dat:0
dat:40
dat:0
Configure Pin Data Error!


Can you verify this code?

0 Kudos

2,052 Views
ufedor
NXP Employee
NXP Employee

Please provide additional information:

1) U-Boot log showing current RCW

2) dump of the GPIO CCSR registers (after the code is executed) obtained using U-Boot "md" command.

0 Kudos

2,031 Views
540915622
Contributor III

Did you see my reply?

0 Kudos

2,043 Views
540915622
Contributor III

I have replied the relevant code。

0 Kudos

2,049 Views
540915622
Contributor III

1. RCW

NOTICE: Fixed DDR on board

NOTICE: 2 GB DDR4, 32-bit, CL=11, ECC on
NOTICE: BL2: v1.5(release):LSDK-20.04-update-290520-1-gbd43880e2-dirty
NOTICE: BL2: Built : 11:07:11, Jan 4 2021
eeeeeee
bit_num:40
dir:0
dir:40
dir:40
dat:0
dat:40
dat:0
Configure Pin Data Error!
NOTICE: BL31: v1.5(release):LSDK-20.04-update-290520-1-gbd43880e2-dirty
NOTICE: BL31: Built : 11:07:18, Jan 4 2021
NOTICE: Welcome to LS1028 BL31 Phase


U-Boot 2019.10-g13dabf58-dirty (Dec 30 2020 - 15:53:41 +0800)

SoC: LS1028AE Rev1.0 (0x870b0010)
Clock Configuration:
CPU0(A72):1500 MHz CPU1(A72):1500 MHz
Bus: 400 MHz DDR: 1600 MT/s
Reset Configuration Word (RCW):
00000000: 3c004010 00000030 00000000 00000000
00000010: 00000000 018f0000 0030c000 00000000
00000020: 01e031a0 00002580 00000000 00000296
00000030: 00000000 00000010 00000000 00000000
00000040: 00000000 00000000 00000000 00000000
00000050: 00000000 00000000 00000000 00000000
00000060: 00000000 00000000 100e7514 00000000
00000070: bb580000 00000000
Model: MYIR MYD-JLS1028 Development Board
Board: MYD-JLS1028, Version: 1.0, boot from SD

2. => md 0x2300000
02300000: 00000040 00000000 00000000 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 ................

 

0 Kudos

2,046 Views
ufedor
NXP Employee
NXP Employee

GPIBE was present in Rev0 draft version under section 20.4.8, but is was unintentionally removed in LS1028ARM Rev0 - please see the register description attached.

 

0 Kudos

2,018 Views
540915622
Contributor III

I have already responded to the following two pieces of information above。
1) U-Boot log showing current RCW

2) dump of the GPIO CCSR registers (after the code is executed) obtained using U-Boot "md" command.

0 Kudos