Skip to content

Commit 1364b40

Browse files
committed
Merge tag 'mtd/for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull mtd updates from "Core MTD changes: - otp: - Put factory OTP/NVRAM into the entropy pool - Clean up on error in mtd_otp_nvmem_add() MTD devices changes: - sm_ftl: Fix typos in comments - Use SPDX license headers - pismo: Switch back to use i2c_driver's .probe() - mtdpart: Drop useless LIST_HEAD - st_spi_fsm: Use the devm_clk_get_enabled() helper function DT binding changes: - partitions: - Include TP-Link SafeLoader in allowed list - Add missing type for "linux,rootfs" - Extend the nand node names filter - Create a file for raw NAND chip properties - Mark nand-ecc-placement deprecated - Describe nand-ecc-mode - Prevent NAND chip unevaluated properties in all NAND bindings with a NAND chip reference. - Qcom: Fix a property position - Marvell: Convert to YAML DT schema Raw NAND chip drivers changes: - Macronix: OTP access for MX30LFxG18AC - Add basic Sandisk manufacturer ops - Add support for Sandisk SDTNQGAMA Raw NAND controller driver changes: - Meson: - Replace integer consts with proper defines - Allow waiting w/o wired ready/busy pin - Check buffer length validity - Fix unaligned DMA buffers handling - dt-bindings: Fix 'nand-rb' property - Arasan: Revert "mtd: rawnand: arasan: Prevent an unsupported configuration" as this limitation is no longer true thanks to the recent efforts in improving the clocks support in this driver SPI-NAND changes: - Gigadevice: add support for GD5F2GQ5xExxH - Macronix: Add support for serial NAND flashes" * tag 'mtd/for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (38 commits) dt-bindings: mtd: marvell-nand: Convert to YAML DT scheme dt-bindings: mtd: ti,am654: Prevent unevaluated properties dt-bindings: mtd: mediatek: Prevent NAND chip unevaluated properties dt-bindings: mtd: mediatek: Reference raw-nand-chip.yaml dt-bindings: mtd: stm32: Prevent NAND chip unevaluated properties dt-bindings: mtd: rockchip: Prevent NAND chip unevaluated properties dt-bindings: mtd: intel: Prevent NAND chip unevaluated properties dt-bindings: mtd: denali: Prevent NAND chip unevaluated properties dt-bindings: mtd: brcmnand: Prevent NAND chip unevaluated properties dt-bindings: mtd: meson: Prevent NAND chip unevaluated properties dt-bindings: mtd: sunxi: Prevent NAND chip unevaluated properties dt-bindings: mtd: ingenic: Prevent NAND chip unevaluated properties dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties dt-bindings: mtd: qcom: Fix a property position dt-bindings: mtd: Describe nand-ecc-mode dt-bindings: mtd: Mark nand-ecc-placement deprecated dt-bindings: mtd: Create a file for raw NAND chip properties dt-bindings: mtd: Accept nand related node names mtd: sm_ftl: Fix typos in comments mtd: otp: clean up on error in mtd_otp_nvmem_add() ...
2 parents 84fccbb + cf431a5 commit 1364b40

42 files changed

Lines changed: 805 additions & 299 deletions

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/mtd/allwinner,sun4i-a10-nand.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@ properties:
4949
patternProperties:
5050
"^nand@[a-f0-9]$":
5151
type: object
52+
$ref: raw-nand-chip.yaml
5253
properties:
5354
reg:
5455
minimum: 0
5556
maximum: 7
5657

57-
nand-ecc-mode: true
58-
5958
nand-ecc-algo:
6059
const: bch
6160

@@ -75,7 +74,7 @@ patternProperties:
7574
minimum: 0
7675
maximum: 1
7776

78-
additionalProperties: false
77+
unevaluatedProperties: false
7978

8079
required:
8180
- compatible

Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ properties:
4040
patternProperties:
4141
"^nand@[0-7]$":
4242
type: object
43+
$ref: raw-nand-chip.yaml
4344
properties:
4445
reg:
4546
minimum: 0
@@ -58,6 +59,14 @@ patternProperties:
5859
meson-gxl-nfc 8, 16, 24, 30, 40, 50, 60
5960
meson-axg-nfc 8
6061
62+
nand-rb:
63+
maxItems: 1
64+
items:
65+
maximum: 0
66+
67+
unevaluatedProperties: false
68+
69+
6170
required:
6271
- compatible
6372
- reg
@@ -87,6 +96,7 @@ examples:
8796
8897
nand@0 {
8998
reg = <0>;
99+
nand-rb = <0>;
90100
};
91101
};
92102

Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ properties:
114114
patternProperties:
115115
"^nand@[a-f0-9]$":
116116
type: object
117+
$ref: raw-nand-chip.yaml
117118
properties:
118119
compatible:
119120
const: brcm,nandcs
@@ -136,6 +137,8 @@ patternProperties:
136137
layout.
137138
$ref: /schemas/types.yaml#/definitions/uint32
138139

140+
unevaluatedProperties: false
141+
139142
allOf:
140143
- $ref: nand-controller.yaml#
141144
- if:

Documentation/devicetree/bindings/mtd/denali,nand.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ properties:
6363
minItems: 1
6464
maxItems: 2
6565

66+
patternProperties:
67+
"^nand@[a-f0-9]$":
68+
type: object
69+
$ref: raw-nand-chip.yaml
70+
unevaluatedProperties: false
71+
6672
allOf:
6773
- $ref: nand-controller.yaml
6874

@@ -74,7 +80,6 @@ allOf:
7480
then:
7581
patternProperties:
7682
"^nand@[a-f0-9]$":
77-
type: object
7883
properties:
7984
nand-ecc-strength:
8085
enum:
@@ -92,7 +97,6 @@ allOf:
9297
then:
9398
patternProperties:
9499
"^nand@[a-f0-9]$":
95-
type: object
96100
properties:
97101
nand-ecc-strength:
98102
enum:
@@ -111,7 +115,6 @@ allOf:
111115
then:
112116
patternProperties:
113117
"^nand@[a-f0-9]$":
114-
type: object
115118
properties:
116119
nand-ecc-strength:
117120
enum:

Documentation/devicetree/bindings/mtd/ingenic,nand.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ properties:
3939
patternProperties:
4040
"^nand@[a-f0-9]$":
4141
type: object
42+
$ref: raw-nand-chip.yaml
4243
properties:
44+
4345
rb-gpios:
4446
description: GPIO specifier for the busy pin.
4547
maxItems: 1
@@ -48,6 +50,8 @@ patternProperties:
4850
description: GPIO specifier for the write-protect pin.
4951
maxItems: 1
5052

53+
unevaluatedProperties: false
54+
5155
required:
5256
- compatible
5357
- reg

Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,16 @@ properties:
4242
patternProperties:
4343
"^nand@[a-f0-9]$":
4444
type: object
45+
$ref: raw-nand-chip.yaml
4546
properties:
4647
reg:
4748
minimum: 0
4849
maximum: 1
4950

50-
nand-ecc-mode: true
51-
5251
nand-ecc-algo:
5352
const: hw
5453

55-
additionalProperties: false
54+
unevaluatedProperties: false
5655

5756
required:
5857
- compatible
Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mtd/marvell,nand-controller.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Marvell NAND Flash Controller (NFC)
8+
9+
maintainers:
10+
- Miquel Raynal <miquel.raynal@bootlin.com>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- items:
16+
- const: marvell,armada-8k-nand-controller
17+
- const: marvell,armada370-nand-controller
18+
- enum:
19+
- marvell,armada370-nand-controller
20+
- marvell,pxa3xx-nand-controller
21+
- description: legacy bindings
22+
deprecated: true
23+
enum:
24+
- marvell,armada-8k-nand
25+
- marvell,armada370-nand
26+
- marvell,pxa3xx-nand
27+
28+
reg:
29+
maxItems: 1
30+
31+
interrupts:
32+
maxItems: 1
33+
34+
clocks:
35+
description:
36+
Shall reference the NAND controller clocks, the second one is
37+
is only needed for the Armada 7K/8K SoCs
38+
minItems: 1
39+
maxItems: 2
40+
41+
clock-names:
42+
minItems: 1
43+
items:
44+
- const: core
45+
- const: reg
46+
47+
dmas:
48+
maxItems: 1
49+
50+
dma-names:
51+
items:
52+
- const: data
53+
54+
marvell,system-controller:
55+
$ref: /schemas/types.yaml#/definitions/phandle
56+
description: Syscon node that handles NAND controller related registers
57+
58+
patternProperties:
59+
"^nand@[a-f0-9]$":
60+
type: object
61+
$ref: raw-nand-chip.yaml
62+
63+
properties:
64+
reg:
65+
minimum: 0
66+
maximum: 3
67+
68+
nand-rb:
69+
items:
70+
- minimum: 0
71+
maximum: 1
72+
73+
nand-ecc-step-size:
74+
const: 512
75+
76+
nand-ecc-strength:
77+
enum: [1, 4, 8, 12, 16]
78+
79+
nand-ecc-mode:
80+
const: hw
81+
82+
marvell,nand-keep-config:
83+
$ref: /schemas/types.yaml#/definitions/flag
84+
description:
85+
Orders the driver not to take the timings from the core and
86+
leaving them completely untouched. Bootloader timings will then
87+
be used.
88+
89+
marvell,nand-enable-arbiter:
90+
$ref: /schemas/types.yaml#/definitions/flag
91+
description:
92+
To enable the arbiter, all boards blindly used it,
93+
this bit was set by the bootloader for many boards and even if
94+
it is marked reserved in several datasheets, it might be needed to set
95+
it (otherwise it is harmless).
96+
deprecated: true
97+
98+
required:
99+
- reg
100+
- nand-rb
101+
102+
unevaluatedProperties: false
103+
104+
required:
105+
- compatible
106+
- reg
107+
- interrupts
108+
- clocks
109+
110+
allOf:
111+
- $ref: nand-controller.yaml#
112+
113+
- if:
114+
properties:
115+
compatible:
116+
contains:
117+
const: marvell,pxa3xx-nand-controller
118+
then:
119+
required:
120+
- dmas
121+
- dma-names
122+
123+
- if:
124+
properties:
125+
compatible:
126+
contains:
127+
const: marvell,armada-8k-nand-controller
128+
then:
129+
properties:
130+
clocks:
131+
minItems: 2
132+
133+
clock-names:
134+
minItems: 2
135+
136+
required:
137+
- marvell,system-controller
138+
139+
else:
140+
properties:
141+
clocks:
142+
minItems: 1
143+
144+
clock-names:
145+
minItems: 1
146+
147+
148+
unevaluatedProperties: false
149+
150+
examples:
151+
- |
152+
#include <dt-bindings/interrupt-controller/arm-gic.h>
153+
nand_controller: nand-controller@d0000 {
154+
compatible = "marvell,armada370-nand-controller";
155+
reg = <0xd0000 0x54>;
156+
#address-cells = <1>;
157+
#size-cells = <0>;
158+
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
159+
clocks = <&coredivclk 0>;
160+
161+
nand@0 {
162+
reg = <0>;
163+
label = "main-storage";
164+
nand-rb = <0>;
165+
nand-ecc-mode = "hw";
166+
marvell,nand-keep-config;
167+
nand-on-flash-bbt;
168+
nand-ecc-strength = <4>;
169+
nand-ecc-step-size = <512>;
170+
171+
partitions {
172+
compatible = "fixed-partitions";
173+
#address-cells = <1>;
174+
#size-cells = <1>;
175+
176+
partition@0 {
177+
label = "Rootfs";
178+
reg = <0x00000000 0x40000000>;
179+
};
180+
};
181+
};
182+
};
183+
184+
- |
185+
cp0_nand_controller: nand-controller@720000 {
186+
compatible = "marvell,armada-8k-nand-controller",
187+
"marvell,armada370-nand-controller";
188+
reg = <0x720000 0x54>;
189+
#address-cells = <1>;
190+
#size-cells = <0>;
191+
interrupts = <115 IRQ_TYPE_LEVEL_HIGH>;
192+
clock-names = "core", "reg";
193+
clocks = <&cp0_clk 1 2>,
194+
<&cp0_clk 1 17>;
195+
marvell,system-controller = <&cp0_syscon0>;
196+
197+
nand@0 {
198+
reg = <0>;
199+
label = "main-storage";
200+
nand-rb = <0>;
201+
nand-ecc-mode = "hw";
202+
nand-ecc-strength = <8>;
203+
nand-ecc-step-size = <512>;
204+
};
205+
};
206+
207+
- |
208+
nand-controller@43100000 {
209+
compatible = "marvell,pxa3xx-nand-controller";
210+
reg = <0x43100000 90>;
211+
interrupts = <45>;
212+
clocks = <&clks 1>;
213+
clock-names = "core";
214+
dmas = <&pdma 97 3>;
215+
dma-names = "data";
216+
#address-cells = <1>;
217+
#size-cells = <0>;
218+
nand@0 {
219+
reg = <0>;
220+
nand-rb = <0>;
221+
nand-ecc-mode = "hw";
222+
marvell,nand-keep-config;
223+
};
224+
};
225+
226+
...

0 commit comments

Comments
 (0)