Skip to content

Commit 4dbf09f

Browse files
committed
Merge tag 'mtd/for-5.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD updates from Richard Weinberger: "MTD core changes: - New AFS partition parser - Update MAINTAINERS entry - Use of fall-throughs markers NAND core changes: - Support having the bad block markers in either the first, second or last page of a block. The combination of all three location is now possible. - Constification of NAND_OP_PARSER(_PATTERN) elements. - Generic NAND DT bindings changed to yaml format (can be used to check the proposed bindings. First platform to be fully supported: sunxi. - Stopped using several legacy hooks. - Preparation to use the generic NAND layer with the addition of several helpers and the removal of the struct nand_chip from generic functions. - Kconfig cleanup to prepare the introduction of external ECC engines support. - Fallthrough comments. - Introduction of the SPI-mem dirmap API for SPI-NAND devices. Raw NAND controller drivers changes: - nandsim: - Switch to ->exec-op(). - meson: - Misc cleanups and fixes. - New OOB layout. - Sunxi: - A23/A33 NAND DMA support. - Ingenic: - Full reorganization and cleanup. - Clear separation between NAND controller and ECC engine. - Support JZ4740 an JZ4725B. - Denali: - Clear controller/chip separation. - ->exec_op() migration. - Various cleanups. - fsl_elbc: - Enable software ECC support. - Atmel: - Sam9x60 support. - GPMI: - Introduce the GPMI_IS_MXS() macro. - Various trivial/spelling/coding style fixes. SPI NOR core changes: - Print all JEDEC ID bytes on error - Fix comment of spi_nor_find_best_erase_type() - Add region locking flags for s25fl512s SPI NOR controller drivers changes: - intel-spi: - Avoid crossing 4K address boundary on read/write - Add support for Intel Comet Lake SPI serial flash" * tag 'mtd/for-5.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (120 commits) mtd: part: fix incorrect format specifier for an unsigned long long mtd: lpddr_cmds: Mark expected switch fall-through mtd: phram: Mark expected switch fall-throughs mtd: cfi_cmdset_0002: Mark expected switch fall-throughs mtd: cfi_util: mark expected switch fall-throughs MAINTAINERS: MTD Git repository is hosted on kernel.org MAINTAINERS: Update jffs2 entry mtd: afs: add v2 partition parsing mtd: afs: factor the IIS read into partition parser mtd: afs: factor footer parsing into the v1 part parsing mtd: factor out v1 partition parsing mtd: afs: simplify partition detection mtd: afs: simplify partition parsing mtd: partitions: Add OF support to AFS partitions mtd: partitions: Add AFS partitions DT bindings mtd: afs: Move AFS partition parser to parsers subdir mtd: maps: Make uclinux_ram_map static mtd: maps: Allow MTD_PHYSMAP with MTD_RAM MAINTAINERS: Add myself as MTD maintainer MAINTAINERS: Remove my name from the MTD and NAND entries ...
2 parents 983dfa4 + 3008ba8 commit 4dbf09f

187 files changed

Lines changed: 4763 additions & 2862 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/memory-controllers/atmel,ebi.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Required properties:
1515
"atmel,at91sam9g45-ebi"
1616
"atmel,at91sam9x5-ebi"
1717
"atmel,sama5d3-ebi"
18+
"microchip,sam9x60-ebi"
1819

1920
- reg: Contains offset/length value for EBI memory mapping.
2021
This property might contain several entries if the EBI
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mtd/allwinner,sun4i-a10-nand.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Allwinner A10 NAND Controller Device Tree Bindings
8+
9+
allOf:
10+
- $ref: "nand-controller.yaml"
11+
12+
maintainers:
13+
- Chen-Yu Tsai <wens@csie.org>
14+
- Maxime Ripard <maxime.ripard@bootlin.com>
15+
16+
properties:
17+
"#address-cells": true
18+
"#size-cells": true
19+
20+
compatible:
21+
enum:
22+
- allwinner,sun4i-a10-nand
23+
- allwinner,sun8i-a23-nand-controller
24+
reg:
25+
maxItems: 1
26+
27+
interrupts:
28+
maxItems: 1
29+
30+
clocks:
31+
items:
32+
- description: Bus Clock
33+
- description: Module Clock
34+
35+
clock-names:
36+
items:
37+
- const: ahb
38+
- const: mod
39+
40+
resets:
41+
maxItems: 1
42+
43+
reset-names:
44+
const: ahb
45+
46+
dmas:
47+
maxItems: 1
48+
49+
dma-names:
50+
const: rxtx
51+
52+
pinctrl-names: true
53+
54+
patternProperties:
55+
"^pinctrl-[0-9]+$": true
56+
57+
"^nand@[a-f0-9]+$":
58+
properties:
59+
reg:
60+
maxItems: 1
61+
minimum: 0
62+
maximum: 7
63+
64+
nand-ecc-mode: true
65+
66+
nand-ecc-algo:
67+
const: bch
68+
69+
nand-ecc-step-size:
70+
enum: [ 512, 1024 ]
71+
72+
nand-ecc-strength:
73+
maximum: 80
74+
75+
allwinner,rb:
76+
description:
77+
Contains the native Ready/Busy IDs.
78+
allOf:
79+
- $ref: /schemas/types.yaml#/definitions/uint32-array
80+
- minItems: 1
81+
maxItems: 2
82+
items:
83+
minimum: 0
84+
maximum: 1
85+
86+
additionalProperties: false
87+
88+
required:
89+
- compatible
90+
- reg
91+
- interrupts
92+
- clocks
93+
- clock-names
94+
95+
additionalProperties: false
96+
97+
...

‎Documentation/devicetree/bindings/mtd/atmel-nand.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Required properties:
1414
"atmel,at91sam9261-nand-controller"
1515
"atmel,at91sam9g45-nand-controller"
1616
"atmel,sama5d3-nand-controller"
17+
"microchip,sam9x60-nand-controller"
1718
- ranges: empty ranges property to forward EBI ranges definitions.
1819
- #address-cells: should be set to 2.
1920
- #size-cells: should be set to 1.

‎Documentation/devicetree/bindings/mtd/denali-nand.txt‎

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,48 @@ Required properties:
77
"socionext,uniphier-denali-nand-v5b" - for Socionext UniPhier (v5b)
88
- reg : should contain registers location and length for data and reg.
99
- reg-names: Should contain the reg names "nand_data" and "denali_reg"
10+
- #address-cells: should be 1. The cell encodes the chip select connection.
11+
- #size-cells : should be 0.
1012
- interrupts : The interrupt number.
1113
- clocks: should contain phandle of the controller core clock, the bus
1214
interface clock, and the ECC circuit clock.
1315
- clock-names: should contain "nand", "nand_x", "ecc"
1416

15-
Optional properties:
16-
- nand-ecc-step-size: see nand.txt for details. If present, the value must be
17-
512 for "altr,socfpga-denali-nand"
18-
1024 for "socionext,uniphier-denali-nand-v5a"
19-
1024 for "socionext,uniphier-denali-nand-v5b"
20-
- nand-ecc-strength: see nand.txt for details. Valid values are:
21-
8, 15 for "altr,socfpga-denali-nand"
22-
8, 16, 24 for "socionext,uniphier-denali-nand-v5a"
23-
8, 16 for "socionext,uniphier-denali-nand-v5b"
24-
- nand-ecc-maximize: see nand.txt for details
25-
26-
The device tree may optionally contain sub-nodes describing partitions of the
17+
Sub-nodes:
18+
Sub-nodes represent available NAND chips.
19+
20+
Required properties:
21+
- reg: should contain the bank ID of the controller to which each chip
22+
select is connected.
23+
24+
Optional properties:
25+
- nand-ecc-step-size: see nand.txt for details.
26+
If present, the value must be
27+
512 for "altr,socfpga-denali-nand"
28+
1024 for "socionext,uniphier-denali-nand-v5a"
29+
1024 for "socionext,uniphier-denali-nand-v5b"
30+
- nand-ecc-strength: see nand.txt for details. Valid values are:
31+
8, 15 for "altr,socfpga-denali-nand"
32+
8, 16, 24 for "socionext,uniphier-denali-nand-v5a"
33+
8, 16 for "socionext,uniphier-denali-nand-v5b"
34+
- nand-ecc-maximize: see nand.txt for details
35+
36+
The chip nodes may optionally contain sub-nodes describing partitions of the
2737
address space. See partition.txt for more detail.
2838

2939
Examples:
3040

3141
nand: nand@ff900000 {
3242
#address-cells = <1>;
33-
#size-cells = <1>;
43+
#size-cells = <0>;
3444
compatible = "altr,socfpga-denali-nand";
3545
reg = <0xff900000 0x20>, <0xffb80000 0x1000>;
3646
reg-names = "nand_data", "denali_reg";
3747
clocks = <&nand_clk>, <&nand_x_clk>, <&nand_ecc_clk>;
3848
clock-names = "nand", "nand_x", "ecc";
3949
interrupts = <0 144 4>;
50+
51+
nand@0 {
52+
reg = <0>;
53+
}
4054
};

‎Documentation/devicetree/bindings/mtd/ingenic,jz4780-nand.txt‎

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
* Ingenic JZ4780 NAND/BCH
1+
* Ingenic JZ4780 NAND/ECC
22

33
This file documents the device tree bindings for NAND flash devices on the
44
JZ4780. NAND devices are connected to the NEMC controller (described in
55
memory-controllers/ingenic,jz4780-nemc.txt), and thus NAND device nodes must
66
be children of the NEMC node.
77

88
Required NAND controller device properties:
9-
- compatible: Should be set to "ingenic,jz4780-nand".
9+
- compatible: Should be one of:
10+
* ingenic,jz4740-nand
11+
* ingenic,jz4725b-nand
12+
* ingenic,jz4780-nand
1013
- reg: For each bank with a NAND chip attached, should specify a bank number,
1114
an offset of 0 and a size of 0x1000000 (i.e. the whole NEMC bank).
1215

1316
Optional NAND controller device properties:
14-
- ingenic,bch-controller: To make use of the hardware BCH controller, this
15-
property must contain a phandle for the BCH controller node. The required
17+
- ecc-engine: To make use of the hardware ECC controller, this
18+
property must contain a phandle for the ECC controller node. The required
1619
properties for this node are described below. If this is not specified,
17-
software BCH will be used instead.
20+
software ECC will be used instead.
1821

1922
Optional children nodes:
2023
- Individual NAND chips are children of the NAND controller node.
@@ -45,7 +48,7 @@ nemc: nemc@13410000 {
4548
#address-cells = <1>;
4649
#size-cells = <0>;
4750

48-
ingenic,bch-controller = <&bch>;
51+
ecc-engine = <&bch>;
4952

5053
nand@1 {
5154
reg = <1>;
@@ -67,14 +70,17 @@ nemc: nemc@13410000 {
6770
};
6871
};
6972

70-
The BCH controller is a separate SoC component used for error correction on
73+
The ECC controller is a separate SoC component used for error correction on
7174
NAND devices. The following is a description of the device properties for a
72-
BCH controller.
73-
74-
Required BCH properties:
75-
- compatible: Should be set to "ingenic,jz4780-bch".
76-
- reg: Should specify the BCH controller registers location and length.
77-
- clocks: Clock for the BCH controller.
75+
ECC controller.
76+
77+
Required ECC properties:
78+
- compatible: Should be one of:
79+
* ingenic,jz4740-ecc
80+
* ingenic,jz4725b-bch
81+
* ingenic,jz4780-bch
82+
- reg: Should specify the ECC controller registers location and length.
83+
- clocks: Clock for the ECC controller.
7884

7985
Example:
8086

‎Documentation/devicetree/bindings/mtd/mtd-physmap.txt‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,19 @@ An example using SRAM:
9696
bank-width = <2>;
9797
};
9898

99+
An example using gpio-addrs
100+
101+
flash@20000000 {
102+
#address-cells = <1>;
103+
#size-cells = <1>;
104+
compatible = "cfi-flash", "jedec-flash";
105+
reg = <0x20000000 0x02000000>;
106+
ranges = <0 0x00000000 0x02000000
107+
1 0x02000000 0x02000000>;
108+
bank-width = <2>;
109+
addr-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
110+
partition@0 {
111+
label = "test-part1";
112+
reg = <0 0x04000000>;
113+
};
114+
};

0 commit comments

Comments
 (0)