Skip to content

Commit 78d9435

Browse files
committed
Add add SPI-NAND Flash controller driver for EN7581
Merge series from Lorenzo Bianconi <[email protected]>: Introduce support for SPI-NAND driver of the Airoha NAND Flash Interface found on Airoha ARM EN7581 SoCs.
2 parents 52267fe + 8bd0d55 commit 78d9435

File tree

5 files changed

+1214
-0
lines changed

5 files changed

+1214
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/airoha,en7581-snand.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: SPI-NAND flash controller for Airoha ARM SoCs
8+
9+
maintainers:
10+
- Lorenzo Bianconi <[email protected]>
11+
12+
allOf:
13+
- $ref: spi-controller.yaml#
14+
15+
properties:
16+
compatible:
17+
const: airoha,en7581-snand
18+
19+
reg:
20+
items:
21+
- description: spi base address
22+
- description: nfi2spi base address
23+
24+
clocks:
25+
maxItems: 1
26+
27+
clock-names:
28+
items:
29+
- const: spi
30+
31+
required:
32+
- compatible
33+
- reg
34+
- clocks
35+
- clock-names
36+
37+
unevaluatedProperties: false
38+
39+
examples:
40+
- |
41+
#include <dt-bindings/clock/en7523-clk.h>
42+
43+
soc {
44+
#address-cells = <2>;
45+
#size-cells = <2>;
46+
47+
spi@1fa10000 {
48+
compatible = "airoha,en7581-snand";
49+
reg = <0x0 0x1fa10000 0x0 0x140>,
50+
<0x0 0x1fa11000 0x0 0x160>;
51+
52+
clocks = <&scuclk EN7523_CLK_SPI>;
53+
clock-names = "spi";
54+
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
58+
flash@0 {
59+
compatible = "spi-nand";
60+
reg = <0>;
61+
spi-tx-bus-width = <1>;
62+
spi-rx-bus-width = <2>;
63+
};
64+
};
65+
};

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,15 @@ S: Supported
653653
F: fs/aio.c
654654
F: include/linux/*aio*.h
655655

656+
AIROHA SPI SNFI DRIVER
657+
M: Lorenzo Bianconi <[email protected]>
658+
M: Ray Liu <[email protected]>
659+
L: [email protected] (moderated for non-subscribers)
660+
661+
S: Maintained
662+
F: Documentation/devicetree/bindings/spi/airoha,en7581-snand.yaml
663+
F: drivers/spi/spi-airoha.c
664+
656665
AIRSPY MEDIA DRIVER
657666
658667
S: Orphan

drivers/spi/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ config SPI_MEM
5757

5858
comment "SPI Master Controller Drivers"
5959

60+
config SPI_AIROHA_SNFI
61+
tristate "Airoha SPI NAND Flash Interface"
62+
depends on ARCH_AIROHA || COMPILE_TEST
63+
depends on SPI_MASTER
64+
select REGMAP_MMIO
65+
help
66+
This enables support for SPI-NAND mode on the Airoha NAND
67+
Flash Interface found on Airoha ARM SoCs. This controller
68+
is implemented as a SPI-MEM controller.
69+
6070
config SPI_ALTERA
6171
tristate "Altera SPI Controller platform driver"
6272
select SPI_ALTERA_CORE

drivers/spi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ obj-$(CONFIG_SPI_SPIDEV) += spidev.o
1414
obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi-loopback-test.o
1515

1616
# SPI master controller drivers (bus)
17+
obj-$(CONFIG_SPI_AIROHA_SNFI) += spi-airoha-snfi.o
1718
obj-$(CONFIG_SPI_ALTERA) += spi-altera-platform.o
1819
obj-$(CONFIG_SPI_ALTERA_CORE) += spi-altera-core.o
1920
obj-$(CONFIG_SPI_ALTERA_DFL) += spi-altera-dfl.o

0 commit comments

Comments
 (0)