From 6e315de0f422acf66c3505a4ed8c095a0f5d3424 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 6 Jan 2020 14:10:42 +0100 Subject: [PATCH] kernel: add support for GD25D05 SPI NOR This chip is used on newer RB912UAG-5HPnD r2 boards: Before: [ 0.642553] m25p80 spi0.0: unrecognized JEDEC id bytes: c8, 40, 10 [ 0.649381] NAND flash driver for the RouterBOARD 91x series After: [ 0.641714] m25p80 spi0.0: found gd25d05, expected m25p80 [ 0.649916] m25p80 spi0.0: gd25d05 (64 Kbytes) [ 0.655122] Creating 4 MTD partitions on "spi0.0": [ 0.660164] 0x000000000000-0x00000000c000 : "routerboot" [ 0.667782] 0x00000000c000-0x00000000d000 : "hard_config" [ 0.675073] 0x00000000d000-0x00000000e000 : "bios" [ 0.682613] 0x00000000e000-0x00000000f000 : "soft_config" [ 0.690304] NAND flash driver for the RouterBOARD 91x series Signed-off-by: Koen Vandeputte --- ...r-add-support-for-Gigadevice-GD25D05.patch | 29 +++++++++++++++++++ ...r-add-support-for-Gigadevice-GD25D05.patch | 29 +++++++++++++++++++ ...r-add-support-for-Gigadevice-GD25D05.patch | 29 +++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 target/linux/generic/pending-4.14/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch create mode 100644 target/linux/generic/pending-4.19/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch create mode 100644 target/linux/generic/pending-5.4/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch diff --git a/target/linux/generic/pending-4.14/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch b/target/linux/generic/pending-4.14/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch new file mode 100644 index 0000000000..5c71c9cf70 --- /dev/null +++ b/target/linux/generic/pending-4.14/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch @@ -0,0 +1,29 @@ +From d68b4aa22e8c625685bfad642dd7337948dc0ad1 Mon Sep 17 00:00:00 2001 +From: Koen Vandeputte +Date: Mon, 6 Jan 2020 13:07:56 +0100 +Subject: [PATCH] mtd: spi-nor: add support for Gigadevice GD25D05 + +Signed-off-by: Koen Vandeputte +--- + drivers/mtd/spi-nor/spi-nor.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c +index f4afe123e9dc..a34fa42d47a2 100644 +--- a/drivers/mtd/spi-nor/spi-nor.c ++++ b/drivers/mtd/spi-nor/spi-nor.c +@@ -2346,6 +2346,11 @@ static const struct flash_info spi_nor_ids[] = { + { "mb85rs1mt", INFO(0x047f27, 0, 128 * 1024, 1, SPI_NOR_NO_ERASE) }, + + /* GigaDevice */ ++ { ++ "gd25d05", INFO(0xc84010, 0, 64 * 1024, 1, ++ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | ++ SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) ++ }, + { + "gd25q16", INFO(0xc84015, 0, 64 * 1024, 32, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | +-- +2.17.1 + diff --git a/target/linux/generic/pending-4.19/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch b/target/linux/generic/pending-4.19/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch new file mode 100644 index 0000000000..5c71c9cf70 --- /dev/null +++ b/target/linux/generic/pending-4.19/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch @@ -0,0 +1,29 @@ +From d68b4aa22e8c625685bfad642dd7337948dc0ad1 Mon Sep 17 00:00:00 2001 +From: Koen Vandeputte +Date: Mon, 6 Jan 2020 13:07:56 +0100 +Subject: [PATCH] mtd: spi-nor: add support for Gigadevice GD25D05 + +Signed-off-by: Koen Vandeputte +--- + drivers/mtd/spi-nor/spi-nor.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c +index f4afe123e9dc..a34fa42d47a2 100644 +--- a/drivers/mtd/spi-nor/spi-nor.c ++++ b/drivers/mtd/spi-nor/spi-nor.c +@@ -2346,6 +2346,11 @@ static const struct flash_info spi_nor_ids[] = { + { "mb85rs1mt", INFO(0x047f27, 0, 128 * 1024, 1, SPI_NOR_NO_ERASE) }, + + /* GigaDevice */ ++ { ++ "gd25d05", INFO(0xc84010, 0, 64 * 1024, 1, ++ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | ++ SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) ++ }, + { + "gd25q16", INFO(0xc84015, 0, 64 * 1024, 32, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | +-- +2.17.1 + diff --git a/target/linux/generic/pending-5.4/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch b/target/linux/generic/pending-5.4/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch new file mode 100644 index 0000000000..5c71c9cf70 --- /dev/null +++ b/target/linux/generic/pending-5.4/481-mtd-spi-nor-add-support-for-Gigadevice-GD25D05.patch @@ -0,0 +1,29 @@ +From d68b4aa22e8c625685bfad642dd7337948dc0ad1 Mon Sep 17 00:00:00 2001 +From: Koen Vandeputte +Date: Mon, 6 Jan 2020 13:07:56 +0100 +Subject: [PATCH] mtd: spi-nor: add support for Gigadevice GD25D05 + +Signed-off-by: Koen Vandeputte +--- + drivers/mtd/spi-nor/spi-nor.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c +index f4afe123e9dc..a34fa42d47a2 100644 +--- a/drivers/mtd/spi-nor/spi-nor.c ++++ b/drivers/mtd/spi-nor/spi-nor.c +@@ -2346,6 +2346,11 @@ static const struct flash_info spi_nor_ids[] = { + { "mb85rs1mt", INFO(0x047f27, 0, 128 * 1024, 1, SPI_NOR_NO_ERASE) }, + + /* GigaDevice */ ++ { ++ "gd25d05", INFO(0xc84010, 0, 64 * 1024, 1, ++ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | ++ SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) ++ }, + { + "gd25q16", INFO(0xc84015, 0, 64 * 1024, 32, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | +-- +2.17.1 + -- 2.30.2