Skip to content

Commit 67df56d

Browse files
committed
Introduce Socionext F_OSPI SPI flash controller
Merge series from Kunihiko Hayashi <hayashi.kunihiko@socionext.com>: This series adds dt-bindings and a driver for Socionext F_OSPI controller for connecting an SPI Flash memory over up to 8-bit wide bus. The controller supports up to 4 chip selects.
2 parents 1a165a0 + bcd58c8 commit 67df56d

4 files changed

Lines changed: 770 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/socionext,f-ospi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Socionext F_OSPI controller
8+
9+
description: |
10+
The Socionext F_OSPI is a controller used to interface with flash
11+
memories using the SPI communication interface.
12+
13+
maintainers:
14+
- Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
15+
16+
allOf:
17+
- $ref: spi-controller.yaml#
18+
19+
properties:
20+
compatible:
21+
const: socionext,f-ospi
22+
23+
reg:
24+
maxItems: 1
25+
26+
clocks:
27+
maxItems: 1
28+
29+
num-cs:
30+
minimum: 1
31+
maximum: 4
32+
33+
required:
34+
- compatible
35+
- reg
36+
- clocks
37+
- "#address-cells"
38+
- "#size-cells"
39+
40+
unevaluatedProperties: false
41+
42+
examples:
43+
- |
44+
ospi0: spi@80000000 {
45+
compatible = "socionext,f-ospi";
46+
reg = <0x80000000 0x1000>;
47+
clocks = <&clks 0>;
48+
num-cs = <1>;
49+
#address-cells = <1>;
50+
#size-cells = <0>;
51+
52+
flash@0 {
53+
compatible = "spansion,s25fl128s", "jedec,spi-nor";
54+
reg = <0>;
55+
spi-max-frequency = <50000000>;
56+
};
57+
};

drivers/spi/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,15 @@ config SPI_SLAVE_MT27XX
906906
say Y or M here.If you are not sure, say N.
907907
SPI slave drivers for Mediatek MT27XX series ARM SoCs.
908908

909+
config SPI_SN_F_OSPI
910+
tristate "Socionext F_OSPI SPI flash controller"
911+
depends on OF && HAS_IOMEM
912+
depends on SPI_MEM
913+
help
914+
This enables support for the Socionext F_OSPI controller
915+
for connecting an SPI Flash memory over up to 8-bit wide bus.
916+
It supports indirect access mode only.
917+
909918
config SPI_SPRD
910919
tristate "Spreadtrum SPI controller"
911920
depends on ARCH_SPRD || COMPILE_TEST

drivers/spi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ obj-$(CONFIG_SPI_SH_MSIOF) += spi-sh-msiof.o
121121
obj-$(CONFIG_SPI_SH_SCI) += spi-sh-sci.o
122122
obj-$(CONFIG_SPI_SIFIVE) += spi-sifive.o
123123
obj-$(CONFIG_SPI_SLAVE_MT27XX) += spi-slave-mt27xx.o
124+
obj-$(CONFIG_SPI_SN_F_OSPI) += spi-sn-f-ospi.o
124125
obj-$(CONFIG_SPI_SPRD) += spi-sprd.o
125126
obj-$(CONFIG_SPI_SPRD_ADI) += spi-sprd-adi.o
126127
obj-$(CONFIG_SPI_STM32) += spi-stm32.o

0 commit comments

Comments
 (0)