[PATCH v2 6/6] cmd: nand: Add new optional sub-command 'onfi'

Mihai.Sain at microchip.com Mihai.Sain at microchip.com
Wed Mar 20 15:08:48 CET 2024


Hi Alex,

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

Override the ONFI timing mode at runtime.

Signed-off-by: Alexander Dahl <ada at thorsis.com>
---

I used the same board sam9x75-curiosity to test mode 5 😊

I forced in nfc driver the mode 5:
+       if (conf->timings.sdr.tRC_min < 20000)

And I ran the nand torture on 16 MiB:

=> nand onfi 0
=> hsmc decode

MCK rate: 270 MHz

SMC_SETUP2:     0x00000007
SMC_PULSE2:     0x22112211
SMC_CYCLE2:     0x00220022
SMC_MODE2:      0x001f0003
NCS_RD: setup: 0 (0 ns), pulse: 34 (102 ns), hold: 0 (0 ns), cycle: 34 (102 ns)
   NRD: setup: 0 (0 ns), pulse: 17 (51 ns), hold: 17 (51 ns), cycle: 34 (102 ns)
NCS_WR: setup: 0 (0 ns), pulse: 34 (102 ns), hold: 0 (0 ns), cycle: 34 (102 ns)
   NWE: setup: 7 (21 ns), pulse: 17 (51 ns), hold: 10 (30 ns), cycle: 34 (102 ns)
Standard read applied
TDF optimization enabled
TDF cycles: 15 (45 ns)
Data Bus Width: 8-bit bus
NWAIT Mode: 0
Write operation controlled by NWE signal
Read operation controlled by NRD signal

=> time nand torture 0x800000 0x1000000

NAND torture: device 0 offset 0x800000 size 0x1000000 (block size 0x40000)
 Passed: 64, failed: 0

time: 30.152 seconds

=> nand onfi 5
=> hsmc decode

MCK rate: 270 MHz

SMC_SETUP2:     0x00000001
SMC_PULSE2:     0x0b060804
SMC_CYCLE2:     0x000b0008
SMC_MODE2:      0x001f0003
NCS_RD: setup: 0 (0 ns), pulse: 11 (33 ns), hold: 0 (0 ns), cycle: 11 (33 ns)
   NRD: setup: 0 (0 ns), pulse: 6 (18 ns), hold: 5 (15 ns), cycle: 11 (33 ns)
NCS_WR: setup: 0 (0 ns), pulse: 8 (24 ns), hold: 0 (0 ns), cycle: 8 (24 ns)
   NWE: setup: 1 (3 ns), pulse: 4 (12 ns), hold: 3 (9 ns), cycle: 8 (24 ns)
Standard read applied
TDF optimization enabled
TDF cycles: 15 (45 ns)
Data Bus Width: 8-bit bus
NWAIT Mode: 0
Write operation controlled by NWE signal
Read operation controlled by NRD signal

=> time nand torture 0x800000 0x1000000

NAND torture: device 0 offset 0x800000 size 0x1000000 (block size 0x40000)
 Passed: 64, failed: 0

time: 15.891 seconds

Best regards,
Mihai Sain


More information about the U-Boot mailing list