Skip to content

Commit 2e3036a

Browse files
committed
Merge tag 'mtd/for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD updates from Miquel Raynal: "MTD changes: - parsers: ofpart: add workaround for #size-cells 0 - dt-bindings: partitions: Fix partition node name pattern - dataflash: remove duplicate SPI ID table Raw NAND core changes: - Check the data only read pattern only once - Prepare the late addition of supported operation checks - Support for sequential cache reads - Fix nand_chip kdoc Raw NAND driver changes: - Fsl_elbc: Propagate HW ECC settings to HW - Marvell: Add missing layouts - Pasemi: Don't use static data to track per-device state - Sunxi: - Fix the size of the last OOB region - Remove an unnecessary check - Remove an unnecessary check - Clean up chips after failed init - Precompute the ECC_CTL register value - Embed sunxi_nand_hw_ecc by value - Update OOB layout to match hardware - tmio_nand: Remove driver - vf610_nfc: Use regular comments for functions SPI-NAND driver changes: - Add support for AllianceMemory AS5F34G04SND - Macronix: use scratch buffer for DMA operation NAND ECC changes: - Mediatek: - Add ECC support fot MT7986 IC - Add compatible for MT7986 - dt-bindings: Split ECC engine with rawnand controller SPI NOR changes: - Misc core fixes SPI NOR driver changes: - Spansion: Minor fixes" * tag 'mtd/for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (33 commits) mtd: parsers: ofpart: add workaround for #size-cells 0 mtd: rawnand: sunxi: Precompute the ECC_CTL register value mtd: rawnand: sunxi: Embed sunxi_nand_hw_ecc by value mtd: rawnand: sunxi: Update OOB layout to match hardware mtd: spi-nor: Sort headers alphabetically mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type mtd: nand: ecc-mtk: Add ECC support fot MT7986 IC dt-bindings: mtd: mediatek,nand-ecc-engine: Add compatible for MT7986 dt-bindings: mtd: Split ECC engine with rawnand controller mtd: rawnand: fsl_elbc: Propagate HW ECC settings to HW mtd: spinand: Add support for AllianceMemory AS5F34G04SND dt-bindings: mtd: partitions: Fix partition node name pattern mtd: spi-nor: Create macros to define chip IDs and geometries mtd: spi-nor: spansion: Make CFRx reg fields generic mtd: spi-nor: spansion: Consider reserved bits in CFR5 register mtd: spi-nor: core: fix implicit declaration warning mtd: spinand: macronix: use scratch buffer for DMA operation mtd: rawnand: Fix nand_chip kdoc mtd: rawnand: vf610_nfc: use regular comments for functions mtd: rawnand: Support for sequential cache reads ...
2 parents 60e2bf7 + f4440ab commit 2e3036a

33 files changed

+782
-935
lines changed
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mtd/mediatek,mtk-nfc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek(MTK) SoCs raw NAND FLASH controller (NFC)
8+
9+
maintainers:
10+
- Xiangsheng Hou <[email protected]>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- mediatek,mt2701-nfc
16+
- mediatek,mt2712-nfc
17+
- mediatek,mt7622-nfc
18+
19+
reg:
20+
items:
21+
- description: Base physical address and size of NFI.
22+
23+
interrupts:
24+
items:
25+
- description: NFI interrupt
26+
27+
clocks:
28+
items:
29+
- description: clock used for the controller
30+
- description: clock used for the pad
31+
32+
clock-names:
33+
items:
34+
- const: nfi_clk
35+
- const: pad_clk
36+
37+
ecc-engine:
38+
description: device-tree node of the required ECC engine.
39+
$ref: /schemas/types.yaml#/definitions/phandle
40+
41+
patternProperties:
42+
"^nand@[a-f0-9]$":
43+
$ref: nand-chip.yaml#
44+
unevaluatedProperties: false
45+
properties:
46+
reg:
47+
maximum: 1
48+
nand-on-flash-bbt: true
49+
nand-ecc-mode:
50+
const: hw
51+
52+
allOf:
53+
- $ref: nand-controller.yaml#
54+
55+
- if:
56+
properties:
57+
compatible:
58+
contains:
59+
const: mediatek,mt2701-nfc
60+
then:
61+
patternProperties:
62+
"^nand@[a-f0-9]$":
63+
properties:
64+
nand-ecc-step-size:
65+
enum: [ 512, 1024 ]
66+
nand-ecc-strength:
67+
enum: [4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 36,
68+
40, 44, 48, 52, 56, 60]
69+
70+
- if:
71+
properties:
72+
compatible:
73+
contains:
74+
const: mediatek,mt2712-nfc
75+
then:
76+
patternProperties:
77+
"^nand@[a-f0-9]$":
78+
properties:
79+
nand-ecc-step-size:
80+
enum: [ 512, 1024 ]
81+
nand-ecc-strength:
82+
enum: [4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 36,
83+
40, 44, 48, 52, 56, 60, 68, 72, 80]
84+
85+
- if:
86+
properties:
87+
compatible:
88+
contains:
89+
const: mediatek,mt7622-nfc
90+
then:
91+
patternProperties:
92+
"^nand@[a-f0-9]$":
93+
properties:
94+
nand-ecc-step-size:
95+
const: 512
96+
nand-ecc-strength:
97+
enum: [4, 6, 8, 10, 12]
98+
99+
required:
100+
- compatible
101+
- reg
102+
- interrupts
103+
- clocks
104+
- clock-names
105+
- ecc-engine
106+
107+
unevaluatedProperties: false
108+
109+
examples:
110+
- |
111+
#include <dt-bindings/clock/mt2701-clk.h>
112+
#include <dt-bindings/interrupt-controller/arm-gic.h>
113+
#include <dt-bindings/interrupt-controller/irq.h>
114+
115+
soc {
116+
#address-cells = <2>;
117+
#size-cells = <2>;
118+
119+
nand-controller@1100d000 {
120+
compatible = "mediatek,mt2701-nfc";
121+
reg = <0 0x1100d000 0 0x1000>;
122+
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_LOW>;
123+
clocks = <&pericfg CLK_PERI_NFI>,
124+
<&pericfg CLK_PERI_NFI_PAD>;
125+
clock-names = "nfi_clk", "pad_clk";
126+
ecc-engine = <&bch>;
127+
#address-cells = <1>;
128+
#size-cells = <0>;
129+
130+
nand@0 {
131+
reg = <0>;
132+
133+
nand-on-flash-bbt;
134+
nand-ecc-mode = "hw";
135+
nand-ecc-step-size = <1024>;
136+
nand-ecc-strength = <24>;
137+
138+
partitions {
139+
compatible = "fixed-partitions";
140+
#address-cells = <1>;
141+
#size-cells = <1>;
142+
143+
preloader@0 {
144+
label = "pl";
145+
read-only;
146+
reg = <0x0 0x400000>;
147+
};
148+
android@400000 {
149+
label = "android";
150+
reg = <0x400000 0x12c00000>;
151+
};
152+
};
153+
};
154+
};
155+
};
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mtd/mediatek,nand-ecc-engine.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek(MTK) SoCs NAND ECC engine
8+
9+
maintainers:
10+
- Xiangsheng Hou <[email protected]>
11+
12+
description: |
13+
MTK NAND ECC engine can cowork with MTK raw NAND and SPI NAND controller.
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- mediatek,mt2701-ecc
19+
- mediatek,mt2712-ecc
20+
- mediatek,mt7622-ecc
21+
- mediatek,mt7986-ecc
22+
23+
reg:
24+
items:
25+
- description: Base physical address and size of ECC.
26+
27+
interrupts:
28+
items:
29+
- description: ECC interrupt
30+
31+
clocks:
32+
maxItems: 1
33+
34+
clock-names:
35+
const: nfiecc_clk
36+
37+
required:
38+
- compatible
39+
- reg
40+
- interrupts
41+
- clocks
42+
- clock-names
43+
44+
additionalProperties: false
45+
46+
examples:
47+
- |
48+
#include <dt-bindings/clock/mt2701-clk.h>
49+
#include <dt-bindings/interrupt-controller/arm-gic.h>
50+
#include <dt-bindings/interrupt-controller/irq.h>
51+
52+
soc {
53+
#address-cells = <2>;
54+
#size-cells = <2>;
55+
56+
bch: ecc@1100e000 {
57+
compatible = "mediatek,mt2701-ecc";
58+
reg = <0 0x1100e000 0 0x1000>;
59+
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_LOW>;
60+
clocks = <&pericfg CLK_PERI_NFI_ECC>;
61+
clock-names = "nfiecc_clk";
62+
};
63+
};

Documentation/devicetree/bindings/mtd/mtk-nand.txt

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)