cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jcruchaga
Participant
Participant
1,714 Views
Registered: ‎08-25-2017

MTD partitions problem with Petalinux 2017.3

I am trying to run PetaLinux kernel on a custom board with a n25q512a flash memory. (https://www.micron.com/-/media/documents/products/data-sheet/nor-flash/serial-nor/n25q/n25q_512mb_1_8v_65nm.pdf) but nothing seems to work, linux does not see any MTD partitions.

 

PROBLEM ANALISYS

I've configured through petalinux-config 3 different partitions :

Flash partitionsFlash partitions

With such configuration, I run the U-Boot and I can properly load and install my BOOT.BIN/image.ub into such partitions (load_boot/install_boot/load_kernel/install_kernel), so qspi is well working. After that, I run petalinux kernel and I only can see these logs (nothing about mtd partitions):


...

[ 2.630755] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 2.637867] m25p80 spi0.0: unrecognized JEDEC id bytes: 00, 00, 00

...


 

Here my qspi configuration (see attached file system.dts):

spi@ff0f0000 {
u-boot,dm-pre-reloc;
compatible = "xlnx,zynqmp-qspi-1.0";
status = "okay";
clock-names = "ref_clk", "pclk";
interrupts = <0x0 0xf 0x4>;
interrupt-parent = <0x4>;
num-cs = <0x1>;
reg = <0x0 0xff0f0000 0x0 0x1000 0x0 0xc0000000 0x0 0x8000000>;
#address-cells = <0x1>;
#size-cells = <0x0>;
#stream-id-cells = <0x1>;
iommus = <0xe 0x873>;
power-domains = <0x1d>;
clocks = <0x3 0x35 0x3 0x1f>;
is-dual = <0x1>;
spi-rx-bus-width = <0x4>;
spi-tx-bus-width = <0x4>;

flash@0 {
compatible = "n25q512a", "micron,m25p80";
spi-tx-bus-width = <0x1>;
spi-rx-bus-width = <0x4>;
reg = <0x0>;
#address-cells = <0x1>;
#size-cells = <0x1>;
spi-max-frequency = <0x66ff300>;

partition@0x00000000 {
label = "boot";
reg = <0x0 0x2000000>;
};

partition@0x02000000 {
label = "bootenv";
reg = <0x2000000 0x40000>;
};

partition@0x02040000 {
label = "kernel";
reg = <0x2040000 0x1600000>;
};
};
};

With petalinux kernel running, if I execute "cat /proc/mtd" nothing returns, "mtdinfo"  returns Count of MTD devices:     0. So, I can't acces some flash partition.

Additionally I've checked next steps and every configuration is correct:
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841901/Linux+ZynqMP+GQSPI+Driver

I've detected as well into Uboot console "mtdparts" command returns "mtdids not defined, no default present"

 

Does someone know whats going on?

Thanks for your help,

Julen

0 Kudos
2 Replies
gudishak
Moderator
Moderator
1,679 Views
Registered: ‎06-27-2017

Hi @jcruchaga ,

 

It is not confirmed that flash is accessible in u-boot and you got no device when you run mtdparts command.

Could you please share the complete logs for u-boot and kernel?

2. Error related to JEDEC is occurs when flash is not detected by driver and I do not see any issue in QSPi device tree changes.

3. Are you sure whether your board is valided at bare-metal(standalone app/u-boot) by erase/write/read entire flash

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
jcruchaga
Participant
Participant
1,662 Views
Registered: ‎08-25-2017

Hi @gudishak ,

1.Could you please share the complete logs for u-boot and kernel? See attached file RunLogs.txt

2. Error related to JEDEC is occurs when flash is not detected by driver and I do not see any issue in QSPi device tree changes. OK

3. Are you sure whether your board is valided at bare-metal(standalone app/u-boot) by erase/write/read entire flash. We’ve validated such flash memory running load_boot/Install_boot/load_kernel/install_kernel commands in u-boot console, that use sf write, sf erase commands which are used to remove and write into flash memory. Is this enough to validate flash memory? Is there other way to do that?

Best Regards
Julen

0 Kudos