ramips: fix Tenbay T-MB5EU v1 Wireless MAC
[openwrt/openwrt.git] / target / linux / ramips / patches-5.4 / 405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
1 From 52d14545d2fc276b1bf9ccf48d4612fab6edfb6a Mon Sep 17 00:00:00 2001
2 From: David Bauer <mail@david-bauer.net>
3 Date: Thu, 6 May 2021 17:49:55 +0200
4 Subject: [PATCH] mtd: spi-nor: Add support for BoHong bh25q128as
5
6 Add MTD support for the BoHong bh25q128as SPI NOR chip.
7 The chip has 16MB of total capacity, divided into a total of 256
8 sectors, each 64KB sized. The chip also supports 4KB sectors.
9 Additionally, it supports dual and quad read modes.
10
11 Functionality was verified on an Tenbay WR1800K / MTK MT7621 board.
12
13 Signed-off-by: David Bauer <mail@david-bauer.net>
14 ---
15 drivers/mtd/spi-nor/Makefile | 1 +
16 drivers/mtd/spi-nor/bohong.c | 21 +++++++++++++++++++++
17 drivers/mtd/spi-nor/core.c | 1 +
18 drivers/mtd/spi-nor/core.h | 1 +
19 4 files changed, 24 insertions(+)
20 create mode 100644 drivers/mtd/spi-nor/bohong.c
21
22 --- a/drivers/mtd/spi-nor/spi-nor.c
23 +++ b/drivers/mtd/spi-nor/spi-nor.c
24 @@ -2233,6 +2233,10 @@ static const struct flash_info spi_nor_i
25
26 { "at45db081d", INFO(0x1f2500, 0, 64 * 1024, 16, SECT_4K) },
27
28 + /* BoHong Microelectronics */
29 + { "bh25q128as", INFO(0x684018, 0, 64 * 1024, 256,
30 + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
31 +
32 /* EON -- en25xxx */
33 { "en25f32", INFO(0x1c3116, 0, 64 * 1024, 64, SECT_4K) },
34 { "en25p32", INFO(0x1c2016, 0, 64 * 1024, 64, 0) },