Message ID | CAMgqO2y9MYDj6antOaWLBRKU8vGEwqCB-Y1TkXTSWsmsed+W6A@mail.gmail.com |
---|---|
State | Changes Requested |
Delegated to: | Ambarus Tudor |
Headers | show |
Series | spi-nor: Add support for xt25f32b/xt25f128b | expand |
On 6/29/20 6:57 PM, microcai wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > >>From 5e308ec7332d01e84a3a5233f4cb8bd5a00026cf Mon Sep 17 00:00:00 2001 > From: microcai <microcaicai@gmail.com> > Date: Mon, 29 Jun 2020 23:36:40 +0800 > Subject: [PATCH] spi-nor: Add support for xt25f32b/xt25f128b > > The RockPi4b dev board ship with xt25f32b solded. add these ids so the > board's spi flash can be accessed within linux. I couldn't find datasheets for neither of these flashes. Can you point me to them? Were both the flashes tested? Daniel tested xt25f128b, maybe you can sync with him for the xt25f128b flash: https://patchwork.ozlabs.org/project/linux-mtd/patch/20200206171941.GA2398@makrotopia.org/ > > Signed-off-by: microcai <microcaicai@gmail.com> You need your full name here. Cheers, ta
diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile index 653923896205..3f7a52d7fa0b 100644 --- a/drivers/mtd/spi-nor/Makefile +++ b/drivers/mtd/spi-nor/Makefile @@ -17,6 +17,7 @@ spi-nor-objs += sst.o spi-nor-objs += winbond.o spi-nor-objs += xilinx.o spi-nor-objs += xmc.o +spi-nor-objs += xtx.o obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o obj-$(CONFIG_MTD_SPI_NOR) += controllers/ diff --git a/drivers/mtd/spi-nor/xtx.c b/drivers/mtd/spi-nor/xtx.c new file mode 100644 index 000000000000..05f2d69401b2 --- /dev/null +++ b/drivers/mtd/spi-nor/xtx.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 xtx_parts[] = { + /* XTX (Shenzhen Xin Tian Xia Tech) */ + { "xt25f32b", INFO(0x0b4016, 0, 64 * 1024, 64, SECT_4K) }, + { "xt25f128b", INFO(0x0b4018, 0, 64 * 1024, 256, SECT_4K) }, +}; + +const struct spi_nor_manufacturer spi_nor_xtx = { + .name = "xtx", + .parts = xtx_parts, + .nparts = ARRAY_SIZE(xtx_parts), +};