Skip to content

Commit e523f11

Browse files
xuejianchengcomputersforpeace
authored andcommitted
mtd: spi-nor: add hisilicon spi-nor flash controller driver
Add hisilicon spi-nor flash controller driver Signed-off-by: Binquan Peng <pengbinquan@hisilicon.com> Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by: Jagan Teki <jteki@openedev.com> Reviewed-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
1 parent 595f0e1 commit e523f11

4 files changed

Lines changed: 521 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
HiSilicon SPI-NOR Flash Controller
2+
3+
Required properties:
4+
- compatible : Should be "hisilicon,fmc-spi-nor" and one of the following strings:
5+
"hisilicon,hi3519-spi-nor"
6+
- address-cells : Should be 1.
7+
- size-cells : Should be 0.
8+
- reg : Offset and length of the register set for the controller device.
9+
- reg-names : Must include the following two entries: "control", "memory".
10+
- clocks : handle to spi-nor flash controller clock.
11+
12+
Example:
13+
spi-nor-controller@10000000 {
14+
compatible = "hisilicon,hi3519-spi-nor", "hisilicon,fmc-spi-nor";
15+
#address-cells = <1>;
16+
#size-cells = <0>;
17+
reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
18+
reg-names = "control", "memory";
19+
clocks = <&clock HI3519_FMC_CLK>;
20+
spi-nor@0 {
21+
compatible = "jedec,spi-nor";
22+
reg = <0>;
23+
};
24+
};

‎drivers/mtd/spi-nor/Kconfig‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ config SPI_FSL_QUADSPI
3838
This controller does not support generic SPI. It only supports
3939
SPI NOR.
4040

41+
config SPI_HISI_SFC
42+
tristate "Hisilicon SPI-NOR Flash Controller(SFC)"
43+
depends on ARCH_HISI || COMPILE_TEST
44+
depends on HAS_IOMEM && HAS_DMA
45+
help
46+
This enables support for hisilicon SPI-NOR flash controller.
47+
4148
config SPI_NXP_SPIFI
4249
tristate "NXP SPI Flash Interface (SPIFI)"
4350
depends on OF && (ARCH_LPC18XX || COMPILE_TEST)

‎drivers/mtd/spi-nor/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o
22
obj-$(CONFIG_SPI_FSL_QUADSPI) += fsl-quadspi.o
3+
obj-$(CONFIG_SPI_HISI_SFC) += hisi-sfc.o
34
obj-$(CONFIG_MTD_MT81xx_NOR) += mtk-quadspi.o
45
obj-$(CONFIG_SPI_NXP_SPIFI) += nxp-spifi.o

0 commit comments

Comments
 (0)