Programming NOR Flash - P4080DS

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

Programming NOR Flash - P4080DS

1,596 Views
appalanaidug
Contributor II

Hello,

We are new to working on P4080DS board.

During one of the operations, NOR Flash got erased. So we could no longer boot from NOR flash.

Hence we prepared an SDCard for booting P4080DS with the following files provided

(ref thread https://community.nxp.com/message/1258726 ).

1.  u-boot-sdcard-2016.01+fslgit-r0.bin

2. fsl_fman_ucode_p4080_r3.0_106_2_18.bin

The U-boot log with SDCard boot is attached.

We wish to program the NOR flash now with files generated from SDK(v 1.2). 

May we know the steps to re-program the NOR flash.

 

1. What are the different files required to re-program the NOR flash.

2. Commands to program the NOR flash from the U-boot console 

3. How to enable PCIe1( which is disabled - as shown in the log) 

4. How to configure Ethernet ( in case tftp transfer is required, since the U-boot file shows the following errors)

Net:
MMC read: dev # 0, block # 1680, count 128 ...
Fman1: Uploading microcode version 106.2.18
Could not get PHY for P4080DS_MDIO12: addr 28
Failed to connect
Could not get PHY for P4080DS_MDIO12: addr 30
Failed to connect
Could not get PHY for P4080DS_MDIO12: addr 31
Failed to connect

MMC read: dev # 0, block # 1680, count 128 ...
Fman2: Uploading microcode version 106.2.18
Could not get PHY for P4080DS_MDIO4: addr 28
Failed to connect
Could not get PHY for P4080DS_MDIO4: addr 29
Failed to connect
Could not get PHY for P4080DS_MDIO4: addr 30
Failed to connect
Could not get PHY for P4080DS_MDIO4: addr 31
Failed to connect
FM1@DTSEC1 [PRIME]
Error: FM1@DTSEC1 address not set.
, FM1@DTSEC2
Error: FM1@DTSEC2 address not set.
, FM1@DTSEC3
Error: FM1@DTSEC3 address not set.
, FM1@DTSEC4
Error: FM1@DTSEC4 address not set.
, FM2@DTSEC1
Error: FM2@DTSEC1 address not set.
, FM2@DTSEC2
Error: FM2@DTSEC2 address not set.
, FM2@DTSEC3
Error: FM2@DTSEC3 address not set.
, FM2@DTSEC4
Error: FM2@DTSEC4 address not set.

Any help in this regard is requested.

Thank you in advance.

0 Kudos
12 Replies

1,325 Views
ufedor
NXP Employee
NXP Employee

Please confirm that P4080DS board is directly connected to the Linux host PC having IP 192.168.1.5

Gateway also should be 192.168.1.5

0 Kudos

1,325 Views
appalanaidug
Contributor II

Hello ,

Thankyou for the help

P4080ds is connected to "windows pc" directly with the above ipaddr and gateway set. I changed the gateway also to be same as ipaddr but with the same response.

Two questions regarding the above issue

1. Should the board be connected to "linux host pc" alone? ( My pc is a windows pc running linux on VMware . My tftp server is also on the windows machine. The above serverip matches with that of the windows system)

2.  In the section " 9.8.1.7.2 About U-Boot and network interfaces"  of the SDK v2.0 reference manual, an example log shows RCW as shown

rcw1.JPG

but RCW from my boot log is as shown

rcw2.JPG

Is the difference in RCW causing the issue?

Thankyou in advance.

0 Kudos

1,324 Views
ufedor
NXP Employee
NXP Employee

Concerning the host it is of course possible to use Windows and TFTP server running on it.

The FM1@DTSEC2 operation though the EC2 is not affected by the RCW difference.

0 Kudos

1,324 Views
appalanaidug
Contributor II

hello,

Even after setting the environment variables, the u-boot log shows 

Failed to connect
FM1@DTSEC1, FM1@DTSEC2 [PRIME], FM1@DTSEC3, FM1@DTSEC4, FM2@DTSEC1, FM2@DTSEC2, FM2@DTSEC3, FM2@DTSEC4

1. Is it because it has failed to connect to FM1@DTSEC2, ping to serverip fails?

2. Any other u-boot file for sdcard boot for P4080DS is required?

Thankyou in advance.

0 Kudos

1,324 Views
ufedor
NXP Employee
NXP Employee

To ensure that the issue is not caused by a hardware please try to program complete NOR Flash image using CodeWarrior Flash Programmer.

The image "QorIQ_SDK_V2.0_P4080DS_20160527_NOR_Flash.bin" is provided in the "QorIQ Linux SDK v2.0 PPCE500MC IMAGE.iso":

https://freescaleesd.flexnetoperations.com/337170/647/10322647/QorIQ%20Linux%20SDK%20v2.0%20PPCE500M... 

0 Kudos

1,325 Views
appalanaidug
Contributor II

Hello,

Thankyou for the help.

the ethernet issue is solved on programming the nor flash image from QorIQ Linux SDK v2.0 PPCE500MC IMAGE.iso

0 Kudos

1,325 Views
ufedor
NXP Employee
NXP Employee

NOR Flash recover

Download "QorIQ Linux SDK v2.0 PPCE500MC IMAGE.iso" which contains complete NOR Flash image "QorIQ_SDK_V2.0_P4080DS_20160527_NOR_Flash.bin" from:

https://nxp.flexnetoperations.com/control/frse/download?element=7726177 

Configuring U-Boot Network Parameters to establish Ethernet connection with TFTP server.

Ensure that SW7 is in default state. 

In U-Boot execute the following commands:

=>tftp 1000000 QorIQ_SDK_V2.0_P4080DS_20160527_NOR_Flash.bin
=>erase e8000000 +$filesize
=>cp.b 1000000 e8000000 $filesize

0 Kudos

1,325 Views
appalanaidug
Contributor II

Hello,

Thank you for the help.

I am trying to configure U-Boot Network Parameters to establish Ethernet connection with TFTP server on P4080DS board.

the initial u-boot log shows the following errors

Net:
MMC read: dev # 0, block # 1680, count 128 ...
Fman1: Uploading microcode version 106.2.18
Could not get PHY for P4080DS_MDIO12: addr 28
Failed to connect
Could not get PHY for P4080DS_MDIO12: addr 30
Failed to connect
Could not get PHY for P4080DS_MDIO12: addr 31
Failed to connect

MMC read: dev # 0, block # 1680, count 128 ...
Fman2: Uploading microcode version 106.2.18
Could not get PHY for P4080DS_MDIO4: addr 28
Failed to connect
Could not get PHY for P4080DS_MDIO4: addr 29
Failed to connect
Could not get PHY for P4080DS_MDIO4: addr 30
Failed to connect
Could not get PHY for P4080DS_MDIO4: addr 31
Failed to connect
FM1@DTSEC1 [PRIME], FM1@DTSEC2, FM1@DTSEC3, FM1@DTSEC4, FM2@DTSEC1, FM2@DTSEC2, FM2@DTSEC3, FM2@DTSEC4
Hit any key to stop autoboot: 0

 

I have set "ipaddr","netmask", "ethaddr","eth1addr" ,"serverip"  variables. Print of environment variables is as shown

=> printenv
baudrate=115200
bdev=sda3
bootcmd=setenv bootargs root=/dev/$bdev rw console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr - $fdtaddr
bootdelay=10
bootfile=uImage
consoledev=ttyS0
eth1addr=00:04:9f:03:c2:6c
eth2addr=00:04:9f:03:c2:6d
eth3addr=00:04:9f:03:c2:6e
eth4addr=00:04:9f:03:c2:6f
eth5addr=00:04:9f:03:c2:70
eth6addr=00:04:9f:03:c2:71
eth7addr=00:04:9f:03:c2:72
ethact=FM1@DTSEC1
ethaddr=00:04:9f:03:c2:6b
ethprime=FM1@DTSEC1
fdtaddr=c00000
fdtfile=p4080ds/p4080ds.dtb
fman_ucode=7fe13360
hwconfig=fsl_ddr:ctlr_intlv=cacheline,bank_intlv=cs0_cs1;usb1:dr_mode=host,phy_type=ulpi;usb2:dr_mode=peripheral,phy_type=ulpi
ipaddr=192.168.1.10
loadaddr=1000000
netdev=eth0
netmask=255.255.255.0
nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr - $fdtaddr
ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr
ramdiskaddr=2000000
ramdiskfile=p4080ds/ramdisk.uboot
rootpath=/opt/nfsroot
serverip=192.168.1.5
stderr=serial
stdin=serial
stdout=serial
tftpflash=tftpboot $loadaddr $uboot && protect off $ubootaddr +$filesize && erase $ubootaddr +$filesize && cp.b $loadaddr $ubootaddr $filesize && protect on $ubootaddr +$filesize && cmp.b $loadaddr $ubootaddr $filesize
uboot=u-boot.bin
ubootaddr=0xFFF40000

Environment size: 1666/8188 bytes

print of "mdio list" and "mac" is as shown

=> mdio list
FSL_MDIO0:
FM_TGEC_MDIO:
P4080DS_MDIO0:
0 - Vitesse VSC8244 <--> FM1@DTSEC2
P4080DS_MDIO8:
P4080DS_MDIO4:
P4080DS_MDIO12:
P4080DS_MDIO1:
P4080DS_MDIO3:
=> mac
ID: NXID v1
SN: 52134630018
Errata: .
Build date: 2015/05/22 13:31:53
Eth0: 00:04:9f:03:c2:6b
Eth1: 00:04:9f:03:c2:6c
Eth2: 00:04:9f:03:c2:6d
Eth3: 00:04:9f:03:c2:6e
Eth4: 00:04:9f:03:c2:6f
Eth5: 00:04:9f:03:c2:70
Eth6: 00:04:9f:03:c2:71
Eth7: 00:04:9f:03:c2:72
CRC: ffffffff (should be be4dbe77)

But when i try to ping the serverip, the following result is observed.

=> ping 192.168.1.5
Using FM1@DTSEC2 device

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.5 is not alive

"tftp" command also fails with the same error.( hence i cannot run this command to copy nor flash image to board)

Any step which i missed out , to configure Ethernet link with the board is requested.

the full U-boot log is attached for reference.

Thankyou in advance.

0 Kudos

1,325 Views
ufedor
NXP Employee
NXP Employee

Ensure that correct Ethernet port is used.

Refer to the P4080 Development System User’s Guide, 5.1.3 Ethernet (EC)

0 Kudos

1,325 Views
appalanaidug
Contributor II

Hello,

Thankyou for the help..

I have connected the ethernet cable to the same port as specified in the P4080ds user guide. All the above log is with the cable connected to the same port on the board.

I am new to Linux and this development board.

Since the cable connection is to the same port and also led on the port glows, I feel some settings on software need to be modified.

I request your help on the following points..

1. Commands to check if the u-boot settings correspond to this ethernet channel (EC2) with required phy address

2. How to check if " Ipaddr" set in u-boot corresponds to this port on the hardware

Thankyou in advance..

0 Kudos

1,326 Views
ufedor
NXP Employee
NXP Employee

The following should be set in the environment variables:

ethact=FM1@DTSEC2

ethprime=FM1@DTSEC2

0 Kudos

1,326 Views
appalanaidug
Contributor II

hello,

Thankyou for the help.

I modified the environment variables as suggested.

But even now ping fails with the same error. The following is the environment set.

=> pri
baudrate=115200
bdev=sda3
bootcmd=setenv bootargs root=/dev/$bdev rw console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr - $fdtaddr
bootdelay=10
bootfile=uImage
consoledev=ttyS0
eth1addr=00:04:9f:03:c2:6c
eth2addr=00:04:9f:03:c2:6d
eth3addr=00:04:9f:03:c2:6e
eth4addr=00:04:9f:03:c2:6f
eth5addr=00:04:9f:03:c2:70
eth6addr=00:04:9f:03:c2:71
eth7addr=00:04:9f:03:c2:72
ethact=FM1@DTSEC2
ethaddr=00:04:9f:03:c2:6b
ethprime=FM1@DTSEC2
fdtaddr=c00000
fdtfile=p4080ds/p4080ds.dtb
fman_ucode=7fe13360
gatewayip=192.168.1.15
hwconfig=fsl_ddr:ctlr_intlv=cacheline,bank_intlv=cs0_cs1;usb1:dr_mode=host,phy_type=ulpi;usb2:dr_mode=peripheral,phy_type=ulpi
ipaddr=192.168.1.10
loadaddr=1000000
netdev=eth0
netmask=255.255.255.0
nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr - $fdtaddr
ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr
ramdiskaddr=2000000
ramdiskfile=p4080ds/ramdisk.uboot
rootpath=/opt/nfsroot
serverip=192.168.1.5
stderr=serial
stdin=serial
stdout=serial
tftpflash=tftpboot $loadaddr $uboot && protect off $ubootaddr +$filesize && erase $ubootaddr +$filesize && cp.b $loadaddr $ubootaddr $filesize && protect on $ubootaddr +$filesize && cmp.b $loadaddr $ubootaddr $filesize
uboot=u-boot.bin
ubootaddr=0xFFF40000

Environment size: 1691/8188 bytes
=> ping 192.168.1.5
Using FM1@DTSEC2 device

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.5 is not alive
=>

any wayout is requested.

Thankyou in advance.

0 Kudos