Skip to content

Commit 09888e9

Browse files
committed
Merge tag 'nand/for-6.9' into mtd/next
Raw NAND The main series brought is an update of the Broadcom support to support all BCMBCA SoCs and their specificity (ECC, write protection, configuration straps), plus a few misc fixes and changes in the main driver. Device tree updates are also part of this PR, initially because of a misunderstanding on my side. The STM32_FMC2 controller driver is also upgraded to properly support MP1 and MP25 SoCs. A new compatible is added for an Atmel flavor. Among all these feature changes, there is as well a load of continuous read related fixes, avoiding more corner conditions and clarifying the logic. Finally a few miscellaneous fixes are made to the core, the lpx32xx_mlc, fsl_lbc, Meson and Atmel controller driver, as well as final one in the Hynix vendor driver. SPI-NAND The ESMT support has been extended to match 5 bytes ID to avoid collisions. Winbond support on its side receives support for W25N04KV chips.
2 parents 2842dc9 + 4120aa0 commit 09888e9

Some content is hidden

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

54 files changed

+830
-200
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Required properties:
5656
"atmel,sama5d4-pmecc"
5757
"atmel,sama5d2-pmecc"
5858
"microchip,sam9x60-pmecc"
59+
"microchip,sam9x7-pmecc", "atmel,at91sam9g45-pmecc"
5960
- reg: should contain 2 register ranges. The first one is pointing to the PMECC
6061
block, and the second one to the PMECC_ERRLOC block.
6162

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

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ title: Broadcom STB NAND Controller
99
maintainers:
1010
- Brian Norris <computersforpeace@gmail.com>
1111
- Kamal Dasu <kdasu.kdev@gmail.com>
12+
- William Zhang <william.zhang@broadcom.com>
1213

1314
description: |
1415
The Broadcom Set-Top Box NAND controller supports low-level access to raw NAND
@@ -18,9 +19,10 @@ description: |
1819
supports basic PROGRAM and READ functions, among other features.
1920
2021
This controller was originally designed for STB SoCs (BCM7xxx) but is now
21-
available on a variety of Broadcom SoCs, including some BCM3xxx, BCM63xx, and
22-
iProc/Cygnus. Its history includes several similar (but not fully register
23-
compatible) versions.
22+
available on a variety of Broadcom SoCs, including some BCM3xxx, MIPS based
23+
Broadband SoC (BCM63xx), ARM based Broadband SoC (BCMBCA) and iProc/Cygnus.
24+
Its history includes several similar (but not fully register compatible)
25+
versions.
2426
2527
-- Additional SoC-specific NAND controller properties --
2628
@@ -53,7 +55,7 @@ properties:
5355
- brcm,brcmnand-v7.2
5456
- brcm,brcmnand-v7.3
5557
- const: brcm,brcmnand
56-
- description: BCM63138 SoC-specific NAND controller
58+
- description: BCMBCA SoC-specific NAND controller
5759
items:
5860
- const: brcm,nand-bcm63138
5961
- enum:
@@ -111,6 +113,13 @@ properties:
111113
earlier versions of this core that include WP
112114
type: boolean
113115

116+
brcm,wp-not-connected:
117+
description:
118+
Use this property when WP pin is not physically wired to the NAND chip.
119+
Write protection feature cannot be used. By default, controller assumes
120+
the pin is connected and feature is used.
121+
$ref: /schemas/types.yaml#/definitions/flag
122+
114123
patternProperties:
115124
"^nand@[a-f0-9]$":
116125
type: object
@@ -137,6 +146,15 @@ patternProperties:
137146
layout.
138147
$ref: /schemas/types.yaml#/definitions/uint32
139148

149+
brcm,nand-ecc-use-strap:
150+
description:
151+
This property requires the host system to get the ECC related
152+
settings from the SoC NAND boot strap configuration instead of
153+
the generic NAND ECC settings. This is a common hardware design
154+
on BCMBCA based boards. This strap ECC option and generic NAND
155+
ECC option can not be specified at the same time.
156+
$ref: /schemas/types.yaml#/definitions/flag
157+
140158
unevaluatedProperties: false
141159

142160
allOf:
@@ -177,19 +195,35 @@ allOf:
177195
- const: iproc-idm
178196
- const: iproc-ext
179197
- if:
198+
required:
199+
- interrupts
180200
properties:
181201
interrupts:
182202
minItems: 2
183203
then:
184204
required:
185205
- interrupt-names
186206

207+
- if:
208+
patternProperties:
209+
"^nand@[a-f0-9]$":
210+
required:
211+
- brcm,nand-ecc-use-strap
212+
then:
213+
patternProperties:
214+
"^nand@[a-f0-9]$":
215+
properties:
216+
nand-ecc-strength: false
217+
nand-ecc-step-size: false
218+
nand-ecc-maximize: false
219+
nand-ecc-algo: false
220+
brcm,nand-oob-sector-size: false
221+
187222
unevaluatedProperties: false
188223

189224
required:
190225
- reg
191226
- reg-names
192-
- interrupts
193227

194228
examples:
195229
- |

Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ properties:
1414
enum:
1515
- st,stm32mp15-fmc2
1616
- st,stm32mp1-fmc2-nfc
17+
- st,stm32mp25-fmc2-nfc
1718

1819
reg:
1920
minItems: 6
20-
maxItems: 7
21+
maxItems: 12
2122

2223
interrupts:
2324
maxItems: 1
@@ -92,6 +93,28 @@ allOf:
9293
- description: Chip select 1 command
9394
- description: Chip select 1 address space
9495

96+
- if:
97+
properties:
98+
compatible:
99+
contains:
100+
const: st,stm32mp25-fmc2-nfc
101+
then:
102+
properties:
103+
reg:
104+
items:
105+
- description: Chip select 0 data
106+
- description: Chip select 0 command
107+
- description: Chip select 0 address space
108+
- description: Chip select 1 data
109+
- description: Chip select 1 command
110+
- description: Chip select 1 address space
111+
- description: Chip select 2 data
112+
- description: Chip select 2 command
113+
- description: Chip select 2 address space
114+
- description: Chip select 3 data
115+
- description: Chip select 3 command
116+
- description: Chip select 3 address space
117+
95118
required:
96119
- compatible
97120
- reg

arch/arm/boot/dts/broadcom/bcm47622.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,20 @@
138138
status = "disabled";
139139
};
140140

141+
nand_controller: nand-controller@1800 {
142+
#address-cells = <1>;
143+
#size-cells = <0>;
144+
compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand";
145+
reg = <0x1800 0x600>, <0x2000 0x10>;
146+
reg-names = "nand", "nand-int-base";
147+
status = "disabled";
148+
149+
nandcs: nand@0 {
150+
compatible = "brcm,nandcs";
151+
reg = <0>;
152+
};
153+
};
154+
141155
uart0: serial@12000 {
142156
compatible = "arm,pl011", "arm,primecell";
143157
reg = <0x12000 0x1000>;

arch/arm/boot/dts/broadcom/bcm63138.dtsi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,12 @@
229229
reg-names = "nand", "nand-int-base";
230230
status = "disabled";
231231
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
232-
interrupt-names = "nand";
232+
interrupt-names = "nand_ctlrdy";
233+
234+
nandcs: nand@0 {
235+
compatible = "brcm,nandcs";
236+
reg = <0>;
237+
};
233238
};
234239

235240
serial@4400 {

arch/arm/boot/dts/broadcom/bcm63148.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,19 @@
119119
num-cs = <8>;
120120
status = "disabled";
121121
};
122+
123+
nand_controller: nand-controller@2000 {
124+
#address-cells = <1>;
125+
#size-cells = <0>;
126+
compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand";
127+
reg = <0x2000 0x600>, <0xf0 0x10>;
128+
reg-names = "nand", "nand-int-base";
129+
status = "disabled";
130+
131+
nandcs: nand@0 {
132+
compatible = "brcm,nandcs";
133+
reg = <0>;
134+
};
135+
};
122136
};
123137
};

arch/arm/boot/dts/broadcom/bcm63178.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,20 @@
129129
status = "disabled";
130130
};
131131

132+
nand_controller: nand-controller@1800 {
133+
#address-cells = <1>;
134+
#size-cells = <0>;
135+
compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand";
136+
reg = <0x1800 0x600>, <0x2000 0x10>;
137+
reg-names = "nand", "nand-int-base";
138+
status = "disabled";
139+
140+
nandcs: nand@0 {
141+
compatible = "brcm,nandcs";
142+
reg = <0>;
143+
};
144+
};
145+
132146
uart0: serial@12000 {
133147
compatible = "arm,pl011", "arm,primecell";
134148
reg = <0x12000 0x1000>;

arch/arm/boot/dts/broadcom/bcm6756.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@
139139
status = "disabled";
140140
};
141141

142+
nand_controller: nand-controller@1800 {
143+
#address-cells = <1>;
144+
#size-cells = <0>;
145+
compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand";
146+
reg = <0x1800 0x600>, <0x2000 0x10>;
147+
reg-names = "nand", "nand-int-base";
148+
status = "disabled";
149+
150+
nandcs: nand@0 {
151+
compatible = "brcm,nandcs";
152+
reg = <0>;
153+
};
154+
};
155+
142156
uart0: serial@12000 {
143157
compatible = "arm,pl011", "arm,primecell";
144158
reg = <0x12000 0x1000>;

arch/arm/boot/dts/broadcom/bcm6846.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,19 @@
119119
num-cs = <8>;
120120
status = "disabled";
121121
};
122+
123+
nand_controller: nand-controller@1800 {
124+
#address-cells = <1>;
125+
#size-cells = <0>;
126+
compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand";
127+
reg = <0x1800 0x600>, <0x2000 0x10>;
128+
reg-names = "nand", "nand-int-base";
129+
status = "disabled";
130+
131+
nandcs: nand@0 {
132+
compatible = "brcm,nandcs";
133+
reg = <0>;
134+
};
135+
};
122136
};
123137
};

arch/arm/boot/dts/broadcom/bcm6855.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,20 @@
129129
status = "disabled";
130130
};
131131

132+
nand_controller: nand-controller@1800 {
133+
#address-cells = <1>;
134+
#size-cells = <0>;
135+
compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand";
136+
reg = <0x1800 0x600>, <0x2000 0x10>;
137+
reg-names = "nand", "nand-int-base";
138+
status = "disabled";
139+
140+
nandcs: nand@0 {
141+
compatible = "brcm,nandcs";
142+
reg = <0>;
143+
};
144+
};
145+
132146
uart0: serial@12000 {
133147
compatible = "arm,pl011", "arm,primecell";
134148
reg = <0x12000 0x1000>;

0 commit comments

Comments
 (0)