News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

Should flinfo show anything in TE0720 u-boot?

Started by jmccabe, November 14, 2019, 06:03:40 PM

Previous topic - Next topic

jmccabe

Hi,

As I understand it, there's a flinfo command in u-boot that's supposed to show info on the flash on the board. I've got a TE0720-03-2IF and, with the prebuilt u-boot from the reference design, flinfo isn't enabled.

--------------------------------------------------------------------------------
Xilinx First Stage Boot Loader (TE modified)
Release 2018.3  Feb 19 2019-12:53:54

Device IDCODE: 23727093
Device Name: 7z020 (7)
Device Revision: 2
--------------------------------------------------------------------------------
TE0720 TE_FsblHookBeforeHandoff_Custom

SoM: TE0720-03-2I  F SC REV:05
MAC: 80 1F 12 69 15 97

--------------------------------------------------------------------------------


U-Boot 2018.01 (Feb 12 2019 - 14:15:47 +0000) Xilinx Zynq ZC702

Board: Xilinx Zynq
Silicon: v3.1
I2C:   ready
DRAM:  ECC disabled 1 GiB
MMC:   sdhci_transfer_data: Error detected in status(0x208000)!
mmc@e0100000: 0 (SD), mmc@e0101000: 1 (eMMC)
Using default environment

In:    serial@e0000000
Out:   serial@e0000000
Err:   serial@e0000000
Board: Xilinx Zynq
Silicon: v3.1
Net:   ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
eth0: ethernet@e000b000
U-BOOT for petalinux
importing env from FSBL shared area at 0xFFFFFC00
Found valid magic
## Info: input data size = 27 = 0x1B

ethernet@e000b000 Waiting for PHY auto negotiation to complete.... done
BOOTP broadcast 1

Abort
Hit any key to stop autoboot:  0
Zynq> flinfo
Unknown command 'flinfo' - try 'help'
Zynq> help


So I've re-built u-boot with setting to enable the flinfo command (amongst some other things), so it now runs but doesn't show any info:

--------------------------------------------------------------------------------
Xilinx First Stage Boot Loader (TE modified)
Release 2018.3  Nov 14 2019-14:50:00

Device IDCODE: 23727093
Device Name: 7z020 (7)
Device Revision: 2
--------------------------------------------------------------------------------
TE0720 TE_FsblHookBeforeHandoff_Custom

SoM: TE0720-03-2I  F SC REV:05
MAC: 80 1F 12 69 15 97

--------------------------------------------------------------------------------


U-Boot 2018.01-00083-gd8fc4b3b70 (Nov 14 2019 - 14:45:28 +0000) Xilinx Zynq ZC702

Board: Xilinx Zynq
Silicon: v3.1
I2C:   ready
DRAM:  ECC disabled 1 GiB
MMC:   sdhci_transfer_data: Error detected in status(0x208000)!
mmc@e0100000: 0 (SD), mmc@e0101000: 1 (eMMC)
Using default environment

In:    serial@e0000000
Out:   serial@e0000000
Err:   serial@e0000000
Board: Xilinx Zynq
Silicon: v3.1
Net:   ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
eth0: ethernet@e000b000
U-BOOT for petalinux
importing env from FSBL shared area at 0xFFFFFC00
Found valid magic
## Info: input data size = 27 = 0x1B

ethernet@e000b000 Waiting for PHY auto negotiation to complete.... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3

Abort
Hit any key to stop autoboot:  0
K-CEMA-CSM> flinfo
K-CEMA-CSM>


Is this normal?

JH

Hi,
this depends on Xilinx uboot implementation. It's more question for xilinx forum.

you can use "sf probe"  to read some flash information
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842223/U-boot
br
John

jmccabe

Hi John,

sf probe shows:

SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiB

This goes back a little to my question the other day wrt device trees and u-boot; I'm trying to understand whether there's an issue related to the s25fl256s_64k reported and the 'compatible = "n25q128a11"' in this part of zynq-zc702.dts, which gets a mention in the config files for u-boot in the TE0720.
&qspi {
u-boot,dm-pre-reloc;
status = "okay";
is-dual = <0>;
num-cs = <1>;
flash@0 {
compatible = "n25q128a11";
reg = <0x0>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>;
spi-max-frequency = <50000000>;
#address-cells = <1>;
#size-cells = <1>;
partition@qspi-fsbl-uboot {
label = "qspi-fsbl-uboot";
reg = <0x0 0x100000>;
};
partition@qspi-linux {
label = "qspi-linux";
reg = <0x100000 0x500000>;
};
partition@qspi-device-tree {
label = "qspi-device-tree";
reg = <0x600000 0x20000>;
};
partition@qspi-rootfs {
label = "qspi-rootfs";
reg = <0x620000 0x5E0000>;
};
partition@qspi-bitstream {
label = "qspi-bitstream";
reg = <0xC00000 0x400000>;
};
};
};

JH

Hi,
"zynq-zc702.dts" is for
https://www.xilinx.com/products/boards-and-kits/ek-z7-zc702-g.html
you bough
TE0720 module. that's the different --> both zynq but different system configuration and periphery.

We provide reference design:
https://wiki.trenz-electronic.de/display/PD/TE0720+Test+Board
--> device tree depends on automatic generated part from petalinux which use hdf file from the vivado project and manual changes.
--> changes we have done on device tree: https://wiki.trenz-electronic.de/display/PD/TE0720+Test+Board#TE0720TestBoard-DeviceTree

Reference design includes also board part files for different assembly versions of the TE0720 and a petalinux template(for petalinux with our manual changes), FSBL template(SDK)...

br
John

jmccabe

John

Thanks to your reply earlier I took a look at the code; in the Xilinx v2018.3 branch of their u-boot repository the flinfo command maps onto "do_flinfo()" in flash.c which is:


static int do_flinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
#ifdef CONFIG_MTD_NOR_FLASH
ulong bank;
#endif

#ifdef CONFIG_MTD_NOR_FLASH
if (argc == 1) { /* print info for all FLASH banks */
for (bank=0; bank <CONFIG_SYS_MAX_FLASH_BANKS; ++bank) {
printf ("\nBank # %ld: ", bank+1);

flash_print_info (&flash_info[bank]);
}
return 0;
}

bank = simple_strtoul(argv[1], NULL, 16);
if ((bank < 1) || (bank > CONFIG_SYS_MAX_FLASH_BANKS)) {
printf ("Only FLASH Banks # 1 ... # %d supported\n",
CONFIG_SYS_MAX_FLASH_BANKS);
return 1;
}
printf ("\nBank # %ld: ", bank);
flash_print_info (&flash_info[bank-1]);
#endif /* CONFIG_MTD_NOR_FLASH */
return 0;
}


i.e., if CONFIG_MTD_NOR_FLASH is not set, it does nothing. Since CONFIG_MTD_NOR_FLASH's description is:


config MTD_NOR_FLASH
bool "Enable parallel NOR flash support"
help
  Enable support for parallel NOR flash.


and the TE0720 doesn't have parallel flash, it makes sense for flinfo to not appear to do anything useful.

John