OOM when allocating tensor with shape ... - 1024/64
I have not run any QSPi test in linux because reading /dev/mtdx contents gives bad data (firts 4 bytes are 0xCC), so I prefer first to find what is happening.
After having looking into the source code, I saw a command that there is a command to enable "quad mode" that is not implermeted for our ISSI chip.
1024 64pdf
I went back and checked u-boot from SDK 6.02. I don't see the code you mentioned. Here's a snippet of all the ISSI devices from drivers/mtd/spi/spi_flash_ids.c:
I have been able to run SDK6.02 u-boot in my board, but the issue is that the QSPI runs 2 or 3 times slower than with SDK5.02.
1024/128
- If a bootup the system with u-boot SDK5.02 and linux SDK6.02, I can read /dev/mtd0, /dev/mtd1, /dev/mtd2 .... with their right content.
FYI, the QSPI controller in the AM57xx only supports 1-bit writes and up to 4-bit reads. If you're having slowness with the writes, quad mode won't make an impact.
Copyright © 2008-2024 PicClick Inc. All Rights Reserved. You are the salt of the earth...You are the light of the world...
After having looking into the source code, I saw a command that there is a command to enable "quad mode" that is not implermeted for our ISSI chip.
Jose Carlos Billalabeitia said:Do you think that this behaviour in the u-boot may affect the bad behaviour in linux when reading /dev/mtdx devices?
The one register that is different is just a data register. Are you able to get a clock tree dump from Linux? This should work:
1024/8
1024 64solution
Jose Carlos Billalabeitia said: Here they are. As I told you only two registers are different.am57xx-clocks.rd1.bad.txtam57xx-clocks.rd1.good.txt
When I try writing it goes 2 or 3 times slower than in SDK6.02. When moving from SDK5.02 to SDK6.02 I tried to keep all the QSPI parameters in the dts files, so speed is the same as before 7680000. I expect the clock and all the other parameters to be the same.
In SDK5.02 "is25lp256" was not supported but "is25lp128" yes, that is basically similar execpt the size. I added "is25lp256" to the list of ISSI flash devices (ID=0x9d6019) and it worked fine.
Can you clarify in what way it is slower? Read speeds? Program speeds? What speed did you get on SDK 5.02? What do you get on 6.02? Is the clock speed correct on the bus? Are all 4 data pins being used as expected for reads?
I run "omapconf export ctt am57xx-clock.rd1" for good and bad scenarios and all the registers were the same except 0x4a005568 and 0x4a005570 as explained above.
Jose Carlos Billalabeitia said: I run "omapconf export ctt am57xx-clock.rd1" for good and bad scenarios and all the registers were the same except 0x4a005568 and 0x4a005570 as explained above.
Do you think that this behaviour in the u-boot may affect the bad behaviour in linux when reading /dev/mtdx devices? It is surprising that the linux behaviour on /dev/mtdx devices depends on what u-boot version the system booted up.
When I try writing it goes 2 or 3 times slower than in SDK6.02. When moving from SDK5.02 to SDK6.02 I tried to keep all the QSPI parameters in the dts files, so speed is the same as before 7680000. I expect the clock and all the other parameters to be the same.
Here they are. As I told you only two registers are different. am57xx-clocks.rd1.bad.txt DeviceName DRA72X_SR2.1 0x4A005100 0x00000110 0x4A005120 0x00000007 0x4A00512C 0x00010A04 0x4A005130 0x00000002 0x4A00513C 0x00000204 0x4A005140 0x0000003E 0x4A005144 0x00000005 0x4A005154 0x00000205 0x4A005158 0x00000204 0x4A00515C 0x00000006 0x4A005160 0x00000007 0x4A00516C 0x0081F409 0x4A005170 0x00000201 0x4A00519C 0x00000000 0x4A0051A0 0x00000007 0x4A0051AC 0x0000E903 0x4A0051B0 0x00000003 0x4A0051DC 0x00000000 0x4A0051E0 0x00000007 0x4A0051EC 0x00800501 0x4A0051F0 0x00000001 0x4A0051F4 0x00000001 0x4A005210 0x00000007 0x4A00521C 0x00014D04 0x4A005220 0x00000202 0x4A005228 0x00000208 0x4A005234 0x00000007 0x4A005240 0x00001E00 0x4A005244 0x00000001 0x4A005248 0x00000003 0x4A005254 0x00000000 0x4A005284 0x00000005 0x4A005290 0x00000000 0x4A005294 0x00000001 0x4A0052A4 0x00000000 0x4A0052A8 0x00000007 0x4A0052B4 0x0000FA04 0x4A0052B8 0x00000204 0x4A0052C0 0x00000228 0x4A0052C4 0x00000208 0x4A0052D8 0x00000007 0x4A0052E4 0x0004FD13 0x4A0052E8 0x00000003 0x4A005420 0x00070000 0x4A005520 0x01050000 0x4A005550 0x00030000 0x4A005558 0x00030000 0x4A005560 0x00030000 0x4A005568 0x01030000 0x4A005570 0x01030000 0x4A005578 0x00030000 0x4A005580 0x00000002 0x4A005620 0x00070000 0x4A005660 0x00070000 0x4A0056A0 0x00070000 0x4A005744 0x00030000 0x4A005764 0x00000001 0x4A008140 0x00000007 0x4A00814C 0x00006004 0x4A008150 0x00000804 0x4A008158 0x00000003 0x4A00815C 0x00000004 0x4A008160 0x0000000A 0x4A008164 0x00000002 0x4A008180 0x00000007 0x4A00818C 0x0401E009 0x4A008190 0x00000202 0x4A008200 0x00000007 0x4A00820C 0x04004B00 0x4A008210 0x0000000F 0x4A00821C 0x00000102 0x4A008728 0x00000001 0x4A008778 0x00000001 0x4A008780 0x00000001 0x4A008920 0x00070000 0x4A008B30 0x00000001 0x4A008B38 0x00000001 0x4A008B40 0x00000000 0x4A008C00 0x00030000 0x4A008E20 0x00030000 0x4A008E28 0x00030000 0x4A008E40 0x00030000 0x4A008E50 0x01000001 0x4A008F20 0x00070000 0x4A008F28 0x00030000 0x4A009020 0x00070000 0x4A009028 0x00070000 0x4A009030 0x00070000 0x4A009120 0x00070000 0x4A009130 0x00070000 0x4A009220 0x0A070000 0x4A009328 0x01070000 0x4A009330 0x01040002 0x4A009340 0x00000101 0x4A009348 0x00070000 0x4A009350 0x00040001 0x4A009358 0x00070000 0x4A009388 0x00070000 0x4A0093B0 0x00070000 0x4A0093B8 0x00070000 0x4A0093D0 0x08000002 0x4A0093E0 0x00000001 0x4A0093E8 0x00030000 0x4A0093F0 0x00070000 0x4A009620 0x00030000 0x4A009728 0x00030000 0x4A009730 0x00030000 0x4A009738 0x00030000 0x4A009740 0x00030000 0x4A009748 0x00030000 0x4A009750 0x00030000 0x4A009760 0x00020001 0x4A009768 0x00020001 0x4A009770 0x00020001 0x4A009778 0x00020001 0x4A009780 0x00020001 0x4A009788 0x00030000 0x4A009790 0x00030000 0x4A009798 0x00030000 0x4A0097A0 0x00020002 0x4A0097A8 0x00030000 0x4A0097B0 0x00030000 0x4A0097B8 0x00030000 0x4A0097C4 0x00030000 0x4A0097C8 0x00030000 0x4A0097D0 0x00030000 0x4A0097D8 0x00030000 0x4A0097F0 0x00030000 0x4A0097F8 0x00030000 0x4A009800 0x00030000 0x4A009808 0x00030000 0x4A009810 0x00020001 0x4A009818 0x00030000 0x4A009820 0x00030000 0x4A009828 0x00030000 0x4A009830 0x07030000 0x4A009838 0x01030000 0x4A009840 0x00010002 0x4A009848 0x00030000 0x4A009850 0x00010002 0x4A009858 0x00030000 0x4A009860 0x00030000 0x4A009868 0x00030000 0x4A009870 0x00030000 0x4A009878 0x00030000 0x4A009890 0x00030000 0x4A009898 0x00030000 0x4A0098A0 0x00030000 0x4A0098A8 0x00030000 0x4A0098B0 0x00030000 0x4A0098B8 0x00030000 0x4A0098C0 0x00000001 0x4A0098C8 0x00030000 0x4A0098D0 0x00030000 0x4A0098E0 0x00030000 0x4A0098E8 0x00030000 0x4A0098F0 0x00030000 0x4A0098F8 0x00030000 0x4A009904 0x00030000 0x4A009908 0x00030000 0x4AE06108 0x00000000 0x4AE0610C 0x00000000 0x4AE06114 0x00000000 0x4AE06118 0x00000000 0x4AE06128 0x00000000 0x4AE0612C 0x00000000 0x4AE06130 0x00000000 0x4AE06134 0x00000000 0x4AE06138 0x00000000 0x4AE06144 0x00000000 0x4AE06148 0x00000000 0x4AE0614C 0x00000000 0x4AE06150 0x00000000 0x4AE06154 0x00000000 0x4AE06158 0x00000000 0x4AE06164 0x00000000 0x4AE06168 0x00000000 0x4AE0616C 0x00000000 0x4AE06170 0x00000000 0x4AE06174 0x00000000 0x4AE06178 0x00000000 0x4AE06180 0x00000000 0x4AE06184 0x00000000 0x4AE06188 0x00000000 0x4AE0618C 0x00000000 0x4AE06190 0x00000000 0x4AE06194 0x00000000 0x4AE06198 0x00000000 0x4AE0619C 0x00000000 0x4AE061A0 0x00000000 0x4AE061A4 0x00000000 0x4AE061A8 0x00000000 0x4AE061AC 0x00000000 0x4AE061B0 0x00000000 0x4AE061B4 0x00000000 0x4AE061B8 0x00000000 0x4AE061BC 0x00000000 0x4AE061C0 0x00000000 0x4AE061C8 0x00000000 0x4AE061CC 0x00000000 0x4AE061D0 0x00000000 0x4AE061D4 0x00000000 0x4AE061D8 0x00000000 0x4AE061E0 0x00000000 0x4AE07830 0x00030000 0x4AE07838 0x00000001 0x4AE07840 0x01000002 0x4AE07878 0x00000002 0x4AE07880 0x00030000 0x4AE07888 0x00030000 am57xx-clocks.rd1.good.txt DeviceName DRA72X_SR2.1 0x4A005100 0x00000110 0x4A005120 0x00000007 0x4A00512C 0x00010A04 0x4A005130 0x00000002 0x4A00513C 0x00000204 0x4A005140 0x0000003E 0x4A005144 0x00000005 0x4A005154 0x00000205 0x4A005158 0x00000204 0x4A00515C 0x00000006 0x4A005160 0x00000007 0x4A00516C 0x0081F409 0x4A005170 0x00000201 0x4A00519C 0x00000000 0x4A0051A0 0x00000007 0x4A0051AC 0x0000E903 0x4A0051B0 0x00000003 0x4A0051DC 0x00000000 0x4A0051E0 0x00000007 0x4A0051EC 0x00800501 0x4A0051F0 0x00000001 0x4A0051F4 0x00000001 0x4A005210 0x00000007 0x4A00521C 0x00014D04 0x4A005220 0x00000202 0x4A005228 0x00000208 0x4A005234 0x00000007 0x4A005240 0x00001E00 0x4A005244 0x00000001 0x4A005248 0x00000003 0x4A005254 0x00000000 0x4A005284 0x00000005 0x4A005290 0x00000000 0x4A005294 0x00000001 0x4A0052A4 0x00000000 0x4A0052A8 0x00000007 0x4A0052B4 0x0000FA04 0x4A0052B8 0x00000204 0x4A0052C0 0x00000228 0x4A0052C4 0x00000208 0x4A0052D8 0x00000007 0x4A0052E4 0x0004FD13 0x4A0052E8 0x00000003 0x4A005420 0x00070000 0x4A005520 0x01050000 0x4A005550 0x00030000 0x4A005558 0x00030000 0x4A005560 0x00030000 0x4A005568 0x00030000 0x4A005570 0x00030000 0x4A005578 0x00030000 0x4A005580 0x00000002 0x4A005620 0x00070000 0x4A005660 0x00070000 0x4A0056A0 0x00070000 0x4A005744 0x00030000 0x4A005764 0x00000001 0x4A008140 0x00000007 0x4A00814C 0x00006004 0x4A008150 0x00000804 0x4A008158 0x00000003 0x4A00815C 0x00000004 0x4A008160 0x0000000A 0x4A008164 0x00000002 0x4A008180 0x00000007 0x4A00818C 0x0401E009 0x4A008190 0x00000202 0x4A008200 0x00000007 0x4A00820C 0x04004B00 0x4A008210 0x0000000F 0x4A00821C 0x00000102 0x4A008728 0x00000001 0x4A008778 0x00000001 0x4A008780 0x00000001 0x4A008920 0x00070000 0x4A008B30 0x00000001 0x4A008B38 0x00000001 0x4A008B40 0x00000000 0x4A008C00 0x00030000 0x4A008E20 0x00030000 0x4A008E28 0x00030000 0x4A008E40 0x00030000 0x4A008E50 0x01000001 0x4A008F20 0x00070000 0x4A008F28 0x00030000 0x4A009020 0x00070000 0x4A009028 0x00070000 0x4A009030 0x00070000 0x4A009120 0x00070000 0x4A009130 0x00070000 0x4A009220 0x0A070000 0x4A009328 0x01070000 0x4A009330 0x01040002 0x4A009340 0x00000101 0x4A009348 0x00070000 0x4A009350 0x00040001 0x4A009358 0x00070000 0x4A009388 0x00070000 0x4A0093B0 0x00070000 0x4A0093B8 0x00070000 0x4A0093D0 0x08000002 0x4A0093E0 0x00000001 0x4A0093E8 0x00030000 0x4A0093F0 0x00070000 0x4A009620 0x00030000 0x4A009728 0x00030000 0x4A009730 0x00030000 0x4A009738 0x00030000 0x4A009740 0x00030000 0x4A009748 0x00030000 0x4A009750 0x00030000 0x4A009760 0x00020001 0x4A009768 0x00020001 0x4A009770 0x00020001 0x4A009778 0x00020001 0x4A009780 0x00020001 0x4A009788 0x00030000 0x4A009790 0x00030000 0x4A009798 0x00030000 0x4A0097A0 0x00020002 0x4A0097A8 0x00030000 0x4A0097B0 0x00030000 0x4A0097B8 0x00030000 0x4A0097C4 0x00030000 0x4A0097C8 0x00030000 0x4A0097D0 0x00030000 0x4A0097D8 0x00030000 0x4A0097F0 0x00030000 0x4A0097F8 0x00030000 0x4A009800 0x00030000 0x4A009808 0x00030000 0x4A009810 0x00020001 0x4A009818 0x00030000 0x4A009820 0x00030000 0x4A009828 0x00030000 0x4A009830 0x07030000 0x4A009838 0x01030000 0x4A009840 0x00010002 0x4A009848 0x00030000 0x4A009850 0x00010002 0x4A009858 0x00030000 0x4A009860 0x00030000 0x4A009868 0x00030000 0x4A009870 0x00030000 0x4A009878 0x00030000 0x4A009890 0x00030000 0x4A009898 0x00030000 0x4A0098A0 0x00030000 0x4A0098A8 0x00030000 0x4A0098B0 0x00030000 0x4A0098B8 0x00030000 0x4A0098C0 0x00000001 0x4A0098C8 0x00030000 0x4A0098D0 0x00030000 0x4A0098E0 0x00030000 0x4A0098E8 0x00030000 0x4A0098F0 0x00030000 0x4A0098F8 0x00030000 0x4A009904 0x00030000 0x4A009908 0x00030000 0x4AE06108 0x00000000 0x4AE0610C 0x00000000 0x4AE06114 0x00000000 0x4AE06118 0x00000000 0x4AE06128 0x00000000 0x4AE0612C 0x00000000 0x4AE06130 0x00000000 0x4AE06134 0x00000000 0x4AE06138 0x00000000 0x4AE06144 0x00000000 0x4AE06148 0x00000000 0x4AE0614C 0x00000000 0x4AE06150 0x00000000 0x4AE06154 0x00000000 0x4AE06158 0x00000000 0x4AE06164 0x00000000 0x4AE06168 0x00000000 0x4AE0616C 0x00000000 0x4AE06170 0x00000000 0x4AE06174 0x00000000 0x4AE06178 0x00000000 0x4AE06180 0x00000000 0x4AE06184 0x00000000 0x4AE06188 0x00000000 0x4AE0618C 0x00000000 0x4AE06190 0x00000000 0x4AE06194 0x00000000 0x4AE06198 0x00000000 0x4AE0619C 0x00000000 0x4AE061A0 0x00000000 0x4AE061A4 0x00000000 0x4AE061A8 0x00000000 0x4AE061AC 0x00000000 0x4AE061B0 0x00000000 0x4AE061B4 0x00000000 0x4AE061B8 0x00000000 0x4AE061BC 0x00000000 0x4AE061C0 0x00000000 0x4AE061C8 0x00000000 0x4AE061CC 0x00000000 0x4AE061D0 0x00000000 0x4AE061D4 0x00000000 0x4AE061D8 0x00000000 0x4AE061E0 0x00000000 0x4AE07830 0x00030000 0x4AE07838 0x00000001 0x4AE07840 0x01000002 0x4AE07878 0x00000002 0x4AE07880 0x00030000 0x4AE07888 0x00030000
1024 64maths
1024 64answer
- If a bootup the system with u-boot SDK6.02 and linux SDK6.02, then when I read with "hexdump" /dev/mtd0 the first 4 bytes are CC CC CC CC and the rest is the right content. If I read /dev/mtd1, /dev/mtd2 .... and get the same as when reading /dev/mtd0.
1024/16
1. Global clocking differences. To compare the two we could dump a clock tree rd1 file, e.g. "omapconf export ctt am57xx-clocks.rd1". We can compare the good and the bad.
I run "omapconf export ctt am57xx-clock.rd1" for good and bad scenarios and all the registers were the same except 0x4a005568 and 0x4a005570 as explained above.
{"is25lq040b", INFO(0x9d4013, 0x0, 64 * 1024, 8, 0) }, {"is25lp032", INFO(0x9d6016, 0x0, 64 * 1024, 64, 0) }, {"is25lp064", INFO(0x9d6017, 0x0, 64 * 1024, 128, 0) }, {"is25lp128", INFO(0x9d6018, 0x0, 64 * 1024, 256, 0) },#endif
1024/32
I think if we had a better idea of why it's slower we could probably narrow down the corresponding software difference faster.
Jose Carlos Billalabeitia said: When I try writing it goes 2 or 3 times slower than in SDK6.02. When moving from SDK5.02 to SDK6.02 I tried to keep all the QSPI parameters in the dts files, so speed is the same as before 7680000. I expect the clock and all the other parameters to be the same. After having looking into the source code, I saw a command that there is a command to enable "quad mode" that is not implermeted for our ISSI chip.
Just as a comment, I don´t know if this can create a side effect but I see an strange thing in the QSPI mtd linux devices:
Billa qspi_registers.txt // BAD LINUX ("omapconf export ctt am57xx-clocks.rd1"): 0x4A005568 0x01030000 0x4A005570 0x01030000 U-BOOT ("md 0x4b300000"): 4b300000: 4f400000 4f400000 4f400000 4f400000 ..@O..@O..@O..@O 4b300010: 00000008 00000008 00000008 00000008 ................ 4b300020: 00000003 00000000 00000000 00000000 ................ 4b300030: 00000000 00000000 00000000 00000000 ................ 4b300040: 80000000 00000000 00000000 00020000 ................ 4b300050: 00000000 00000000 00020203 00020203 ................ 4b300060: 00020203 00000002 00000000 00000000 ................ DIFFERENCE ----> 4b300068: 00000000 // GOOD LINUX ("omapconf export ctt am57xx-clocks.rd1"): 0x4A005568 0x00030000 0x4A005570 0x00030000 U-BOOT ("md 0x4b300000"): 4b300000: 4f400000 4f400000 4f400000 4f400000 ..@O..@O..@O..@O 4b300010: 00000008 00000008 00000008 00000008 ................ 4b300020: 00000003 00000000 00000000 00000000 ................ 4b300030: 00000000 00000000 00000000 00000000 ................ 4b300040: 80000000 00000000 00000000 00020000 ................ 4b300050: 00000000 00000000 00020203 00020203 ................ 4b300060: 00020203 00000002 00000012 00000000 ................ DIFFERENCE -----> 4b300068: 00000012 NOTE: When trying to visualize the QSPI registers 0x4b300000-0x4B300070 in Linux, with "omapconf" it crashes.
Jose Carlos Billalabeitia said: I have been looking into the u-boot code, specilly at "spi-nor-ids.c" and have seen: { INFO("is25lp256", 0x9d6019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ) }, and have changed by { INFO("is25lp256", 0x9d6019, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, or by { INFO("is25lp256", 0x9d6019, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_QUAD_READ) }, but in any case the QSPI speed varies.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Presumably you've performed a similar test from Linux too? Can you share specific details of your test, e.g. are you executing commands from the terminal, did you write a custom user space app, etc.? I'm wondering if the IDK experienced a similar slowdown or if it is specific to your QSPI flash.