mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
251a382c28
Deleted (upstreamed): generic/backport-5.15/400-mtdblock-warn-if-opened-on-NAND.patch [01] generic/backport-5.15/420-v5.19-01-mtd-spinand-gigadevice-fix-Quad-IO-for-GD5F1GQ5UExxG.patch [02] bcm27xx/patches-5.15/950-0029-Revert-mailbox-avoid-timer-start-from-callback.patch [03] bcm27xx/patches-5.15/950-0417-bcm2711_thermal-Don-t-clamp-temperature-at-zero.patch [04] bcm27xx/patches-5.15/950-0740-drm-vc4-hvs-Fix-frame-count-register-readout.patch [05] bcm27xx/patches-5.15/950-0755-drm-vc4-hvs-Reset-muxes-at-probe-time.patch [06] bcm27xx/patches-5.15/950-0759-drm-vc4-txp-Don-t-set-TXP_VSTART_AT_EOF.patch [07] bcm27xx/patches-5.15/950-0760-drm-vc4-txp-Force-alpha-to-be-0xff-if-it-s-disabled.patch [08] bcm53xx/patches-5.15/031-v5.17-0005-ARM-dts-BCM5301X-update-CRU-block-description.patch [09] mediatek/patches-5.15/102-mt7629-enable-arch-timer.patch [10] Manually rebased: bcm27xx/patches-5.15/950-0741-drm-vc4-hvs-Use-pointer-to-HVS-in-HVS_READ-and-HVS_W.patch [01] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=f41c9418c5898c01634675150696da290fb86796 [02] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=d5b66645305c6f3a1b2cf75cee4157b07f293309 [03] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=119f99209d8531359bcb935f252ec435f9d21b13 [04] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=c4e1280abead1552e1764684079a43e222ccd163 [05] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=08465a1889cb48ec64431e9db745b5be15399251 [06] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=0e26a6da02e63b75b629573d13966c36aa6264f0 [07] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=01c9020b2e7c85e394879f34851805179ac3d1d8 [08] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=d47f85cc0171a5d3c5bd8cbb8a98983ca3357cbd [09] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=5151f24ac937ff7eb1f078257c66e3c0f0296010 [10] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.46&id=ffea838686b82fbb2801cdfad6ba5309d15c032d Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
76 lines
2.4 KiB
Diff
76 lines
2.4 KiB
Diff
From 52d14545d2fc276b1bf9ccf48d4612fab6edfb6a Mon Sep 17 00:00:00 2001
|
|
From: David Bauer <mail@david-bauer.net>
|
|
Date: Thu, 6 May 2021 17:49:55 +0200
|
|
Subject: [PATCH] mtd: spi-nor: Add support for BoHong bh25q128as
|
|
|
|
Add MTD support for the BoHong bh25q128as SPI NOR chip.
|
|
The chip has 16MB of total capacity, divided into a total of 256
|
|
sectors, each 64KB sized. The chip also supports 4KB sectors.
|
|
Additionally, it supports dual and quad read modes.
|
|
|
|
Functionality was verified on an Tenbay WR1800K / MTK MT7621 board.
|
|
|
|
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
---
|
|
drivers/mtd/spi-nor/Makefile | 1 +
|
|
drivers/mtd/spi-nor/bohong.c | 21 +++++++++++++++++++++
|
|
drivers/mtd/spi-nor/core.c | 1 +
|
|
drivers/mtd/spi-nor/core.h | 1 +
|
|
4 files changed, 24 insertions(+)
|
|
create mode 100644 drivers/mtd/spi-nor/bohong.c
|
|
|
|
--- a/drivers/mtd/spi-nor/Makefile
|
|
+++ b/drivers/mtd/spi-nor/Makefile
|
|
@@ -2,6 +2,7 @@
|
|
|
|
spi-nor-objs := core.o sfdp.o swp.o otp.o sysfs.o
|
|
spi-nor-objs += atmel.o
|
|
+spi-nor-objs += bohong.o
|
|
spi-nor-objs += catalyst.o
|
|
spi-nor-objs += eon.o
|
|
spi-nor-objs += esmt.o
|
|
--- /dev/null
|
|
+++ b/drivers/mtd/spi-nor/bohong.c
|
|
@@ -0,0 +1,21 @@
|
|
+// SPDX-License-Identifier: GPL-2.0
|
|
+/*
|
|
+ * Copyright (C) 2005, Intec Automation Inc.
|
|
+ * Copyright (C) 2014, Freescale Semiconductor, Inc.
|
|
+ */
|
|
+
|
|
+#include <linux/mtd/spi-nor.h>
|
|
+
|
|
+#include "core.h"
|
|
+
|
|
+static const struct flash_info bohong_parts[] = {
|
|
+ /* BoHong Microelectronics */
|
|
+ { "bh25q128as", INFO(0x684018, 0, 64 * 1024, 256,
|
|
+ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
|
+};
|
|
+
|
|
+const struct spi_nor_manufacturer spi_nor_bohong = {
|
|
+ .name = "bohong",
|
|
+ .parts = bohong_parts,
|
|
+ .nparts = ARRAY_SIZE(bohong_parts),
|
|
+};
|
|
--- a/drivers/mtd/spi-nor/core.c
|
|
+++ b/drivers/mtd/spi-nor/core.c
|
|
@@ -1841,6 +1841,7 @@ int spi_nor_sr2_bit7_quad_enable(struct
|
|
|
|
static const struct spi_nor_manufacturer *manufacturers[] = {
|
|
&spi_nor_atmel,
|
|
+ &spi_nor_bohong,
|
|
&spi_nor_catalyst,
|
|
&spi_nor_eon,
|
|
&spi_nor_esmt,
|
|
--- a/drivers/mtd/spi-nor/core.h
|
|
+++ b/drivers/mtd/spi-nor/core.h
|
|
@@ -473,6 +473,7 @@ struct sfdp {
|
|
|
|
/* Manufacturer drivers. */
|
|
extern const struct spi_nor_manufacturer spi_nor_atmel;
|
|
+extern const struct spi_nor_manufacturer spi_nor_bohong;
|
|
extern const struct spi_nor_manufacturer spi_nor_catalyst;
|
|
extern const struct spi_nor_manufacturer spi_nor_eon;
|
|
extern const struct spi_nor_manufacturer spi_nor_esmt;
|