mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 18:47:06 +00:00
7181eb9f81
Remove upstreamed patches: - 000-v5.18-01-dt-bindings-reset-add-dt-binding-header-for-Mediatek.patch - 000-v5.18-02-staging-mt7621-dts-align-resets-with-binding-documen.patch - 001-v5.18-01-dt-bindings-clock-mediatek-mt7621-sysc-add-reset-cel.patch - 001-v5.18-02-clk-ralink-make-system-controller-node-a-reset-provi.patch - 002-v6.0-MIPS-ralink-mt7621-avoid-to-init-common-ralink-reset.patch - 100-v5.16-PCI-mt7621-Add-MediaTek-MT7621-PCIe-host-controller-.patch - 101-v5.17-PCI-mt7621-Rename-mt7621_pci_-to-mt7621_pcie_.patch - 102-v5.17-PCI-mt7621-Declare-mt7621_pci_ops-static.patch - 103-v5.17-PCI-mt7621-Move-MIPS-setup-to-pcibios_root_bridge_pr.patch - 104-v5.17-PCI-mt7621-Drop-of_match_ptr-to-avoid-unused-variabl.patch - 105-v5.17-PCI-mt7621-Remove-unused-function-pcie_rmw.patch - 106-v5.17-PCI-Let-pcibios_root_bridge_prepare-access-bridge-wi.patch - 107-v6.2-PCI-mt7621-Add-sentinel-to-quirks-table.patch - 108-v6.3-PCI-mt7621-Delay-phy-ports-initialization.patch Manually refresh: - 006-v6.5-mips-ralink-introduce-commonly-used-remap-node-funct.patch - 320-MIPS-add-support-for-buggy-MT7621S-core-detection.patch - 405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch - 410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch - 805-pinctrl-AW9523.patch - 825-i2c-MIPS-adds-ralink-I2C-driver.patch - 830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch Automatically refresh: - 200-add-ralink-eth.patch - 314-MIPS-add-bootargs-override-property.patch - 315-owrt-hack-fix-mt7688-cache-issue.patch - 700-net-ethernet-mediatek-support-net-labels.patch - 720-Revert-net-phy-simplify-phy_link_change-arguments.patch - 721-NET-no-auto-carrier-off-support.patch - 800-dmaengine-mediatek-add-HSDMA-support-for-mt7621.patch - 802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch - 810-uvc-add-iPassion-iP2970-support.patch - 821-SPI-ralink-add-Ralink-SoC-spi-driver.patch - 835-asoc-add-mt7620-support.patch - 840-serial-add-ugly-custom-baud-rate-hack.patch - 845-pwm-add-mediatek-support.patch - 850-awake-rt305x-dwc2-controller.patch Tested-by: Andre Heider <a.heider@gmail.com> # netgear,wac124 Tested-by: Andrey Jr. Melnikov <temnota.am@gmail.com> # Xiaomi Mi Router 3G Tested-by: Timo Dorfner <timo.capa@gmail.com> # mt7621/mir3g mt7621/rm2100 Reviewed-by: Shiji Yang <yangshiji66@qq.com> Co-Developed-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Signed-off-by: Nick Hainke <vincent@systemli.org>
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)
|
|
+ NO_SFDP_FLAGS(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
|
|
@@ -1620,6 +1620,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
|
|
@@ -617,6 +617,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;
|