public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] cmd: nand: Add support to print the manufacturer, model and size
@ 2024-03-18 12:26 Mihai Sain
  2024-03-18 13:19 ` Alexander Dahl
  0 siblings, 1 reply; 2+ messages in thread
From: Mihai Sain @ 2024-03-18 12:26 UTC (permalink / raw)
  To: trini, sjg, seanga2, u-boot; +Cc: Mihai Sain

Add support to nand info for printing the manufacturer,model and size.

U-Boot> nand info

Device 0: nand0, sector size 256 KiB
  Manufacturer  MACRONIX
  Model         MX30LF4G28AD
  Device size        512 MiB
  Page size         4096 b
  OOB size           256 b
  Erase size      262144 b
  ecc strength         8 bits
  ecc step size      512 b
  subpagesize       4096 b
  options       0x00004200
  bbt options   0x00028000

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
 cmd/nand.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmd/nand.c b/cmd/nand.c
index fe834c4ac5..f5cfaab37c 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -418,6 +418,9 @@ static void nand_print_and_set_info(int idx)
 		printf("%dx ", chip->numchips);
 	printf("%s, sector size %u KiB\n",
 	       mtd->name, mtd->erasesize >> 10);
+	printf("  Manufacturer  %s \n", chip->onfi_params.manufacturer);
+	printf("  Model         %s \n", chip->onfi_params.model);
+	printf("  Device size   %8d MiB\n", (int)(chip->chipsize >> 20));
 	printf("  Page size     %8d b\n", mtd->writesize);
 	printf("  OOB size      %8d b\n", mtd->oobsize);
 	printf("  Erase size    %8d b\n", mtd->erasesize);
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-18 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 12:26 [PATCH] cmd: nand: Add support to print the manufacturer, model and size Mihai Sain
2024-03-18 13:19 ` Alexander Dahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox