mtd: spi-nor: dosilicon: Add code

Change-Id: I5381085ecba283f82a709a855570bf2f72b7754f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin
2022-05-11 09:12:42 +08:00
committed by Tao Huang
parent 1a4a1dce06
commit 50920dc73c
4 changed files with 26 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
spi-nor-objs := core.o sfdp.o
spi-nor-objs += atmel.o
spi-nor-objs += catalyst.o
spi-nor-objs += dosilicon.o
spi-nor-objs += eon.o
spi-nor-objs += esmt.o
spi-nor-objs += everspin.o

View File

@@ -2058,6 +2058,7 @@ int spi_nor_sr2_bit7_quad_enable(struct spi_nor *nor)
static const struct spi_nor_manufacturer *manufacturers[] = {
&spi_nor_atmel,
&spi_nor_catalyst,
&spi_nor_dosilicon,
&spi_nor_eon,
&spi_nor_esmt,
&spi_nor_everspin,

View File

@@ -383,6 +383,7 @@ struct spi_nor_manufacturer {
/* Manufacturer drivers. */
extern const struct spi_nor_manufacturer spi_nor_atmel;
extern const struct spi_nor_manufacturer spi_nor_catalyst;
extern const struct spi_nor_manufacturer spi_nor_dosilicon;
extern const struct spi_nor_manufacturer spi_nor_eon;
extern const struct spi_nor_manufacturer spi_nor_esmt;
extern const struct spi_nor_manufacturer spi_nor_everspin;

View File

@@ -0,0 +1,23 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2022 Rockchip Electronics Co., Ltd.
*/
#include <linux/mtd/spi-nor.h>
#include "core.h"
static const struct flash_info dosilicon_parts[] = {
{ "FM25Q64A", INFO(0xf83217, 0, 64 * 1024, 128,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ "FM25M4AA", INFO(0xf84218, 0, 64 * 1024, 256,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ "FM25M64C", INFO(0xf84317, 0, 64 * 1024, 128,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
};
const struct spi_nor_manufacturer spi_nor_dosilicon = {
.name = "dosilicon",
.parts = dosilicon_parts,
.nparts = ARRAY_SIZE(dosilicon_parts),
};