Skip to content

Commit 1e4fa02

Browse files
committed
Merge tag 'mtd/for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull mtd updates from Miquel Raynal: "MTD core changes: - Fix refcount error in del_mtd_device() - Fix possible resource leak in init_mtd() - Set ROOT_DEV for partitions marked as rootfs in DT - Describe marking rootfs partitions in the bindings - Fix device name leak when register device fails in add_mtd_device() - Try to find OF node for every MTD partition - simplify (a bit) code find partition-matching dynamic OF node MTD driver changes: - pxa2xx-flash maps: fix memory leak in probe - BCM parser: refer to ARCH_BCMBCA instead of ARCH_BCM4908 - lpddr2_nvm: Fix possible null-ptr-deref - inftlcore: fix repeated words in comments - lart: remove driver - tplink: - Add TP-Link SafeLoader partitions table parser and bindings - Describe TP-Link SafeLoader parser - Describe TP-Link SafeLoader dynamic subpartitions - mtdoops: - Panic caused mtdoops to call mtdoops_erase function immediately - Add mtdoops_erase function and move mtdoops_inc_counter after it - Change printk() to counterpart pr_ functions MTD binding cleanup: - Fixed-partitions: Fix 'sercomm,scpart-id' schema - Standardize the style in the examples - Drop object types when referencing other files - Argue in favor of keeping additionalProperties set to true - NVMEM-cells: - Inherit from MTD partitions - Drop range property from example - Partitions: - Change qcom,smem-part partition type - Constrain the list of parsers - Physmap: Reuse the generic definitions - SPI-NOR: Drop common properties - Sunxi-nand: Add an example to validate the bindings - Onenand: Mention the expected node name - Ingenic: Mark partitions in the controller node as deprecated - NAND: - Standardize the child node name - Drop common properties already defined in generic files - nand-chip.yaml should reference mtd.yaml - Remove useless file about partitions - Clarify all partition subnodes SPI NOR core changes: - Add support for flash reset using the dt reset-gpios property. - Update hwcaps.mask to include 8D-8D-8D read and page program ops when xSPI profile 1.0 table is defined. - Bypass zero erase size in spi_nor_find_best_erase_type(). - Fix select_uniform_erase to skip 0 erase size - Add generic flash driver. If a flash is not found in the flash_info array, fall back to the generic flash driver which is described solely by the flash's SFDP tables. - Fix the number of bytes for the dummy cycles in spi_nor_spimem_check_readop(). - Introduce SPI_NOR_QUAD_PP flag, as PP_1_1_4 is not SFDP discoverable. SPI NOR manufacturer drivers changes: - Spansion: - use PARSE_SFDP for s28hs512t, - add support for s28hl512t, s28hl01gt, and s28hs01gt. - Gigadevice: Replace default_init() with post_bfpt() for gd25q256. - Micron - ST: Enable locking for mt25qu256a. - Winbond: Add support for W25Q512NW-IQ. - ISSI: Use PARSE_SFDP and SPI_NOR_QUAD_PP. Raw NAND core changes: - Drop obsolete dependencies on COMPILE_TEST - MAINTAINERS: rectify entry for MESON NAND controller bindings - Drop EXPORT_SYMBOL_GPL for nanddev_erase() Raw NAND driver changes: - marvell: Enable NFC/DEVBUS arbiter - gpmi: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync - mpc5121: Replace NO_IRQ by 0 - lpc32xx_{slc,mlc}: - Switch to using pm_ptr() - Switch to using gpiod API - lpc32xx_mlc: Switch to using pm_ptr() - cadence: Support 64-bit slave dma interface - rockchip: Describe rk3128-nfc in the bindings - brcmnand: Update interrupts description in the bindings SPI-NAND driver changes: - winbond: - Add Winbond W25N02KV flash support - Fix flash identification" * tag 'mtd/for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (76 commits) mtd: rawnand: Drop obsolete dependencies on COMPILE_TEST mtd: maps: pxa2xx-flash: fix memory leak in probe mtd: core: Fix refcount error in del_mtd_device() mtd: spi-nor: add SFDP fixups for Quad Page Program mtd: spi-nor: issi: is25wp256: Init flash based on SFDP mtd: spi-nor: winbond: add support for W25Q512NW-IQ mtd: spi-nor: micron-st: Enable locking for mt25qu256a mtd: spi-nor: Fix the number of bytes for the dummy cycles mtd: spi-nor: gigadevice: gd25q256: replace gd25q256_default_init with gd25q256_post_bfpt mtd: spi-nor: Fix formatting in spi_nor_read_raw() kerneldoc comment mtd: spi-nor: sysfs: print JEDEC ID for generic flash driver mtd: spi-nor: add generic flash driver mtd: spi-nor: fix select_uniform_erase to skip 0 erase size mtd: spi-nor: move function declaration out of sfdp.h mtd: spi-nor: remember full JEDEC flash ID mtd: spi-nor: sysfs: hide manufacturer if it is not set mtd: spi-nor: hide jedec_id sysfs attribute if not present mtd: spi-nor: Check for zero erase size in spi_nor_find_best_erase_type() mtd: rawnand: marvell: Enable NFC/DEVBUS arbiter mtd: parsers: refer to ARCH_BCMBCA instead of ARCH_BCM4908 ...
2 parents a594533 + a34506e commit 1e4fa02

Some content is hidden

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

69 files changed

+1177
-1280
lines changed

Documentation/ABI/testing/sysfs-bus-spi-devices-spi-nor

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ Contact: [email protected]
55
Description: (RO) The JEDEC ID of the SPI NOR flash as reported by the
66
flash device.
77

8+
The attribute is not present if the flash doesn't support
9+
the "Read JEDEC ID" command (9Fh). This is the case for
10+
non-JEDEC compliant flashes.
811

912
What: /sys/bus/spi/devices/.../spi-nor/manufacturer
1013
Date: April 2021
1114
KernelVersion: 5.14
1215
1316
Description: (RO) Manufacturer of the SPI NOR flash.
1417

18+
The attribute is not present if the flash device isn't
19+
known to the kernel and is only probed by its SFDP
20+
tables.
1521

1622
What: /sys/bus/spi/devices/.../spi-nor/partname
1723
Date: April 2021

Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ maintainers:
1414
- Maxime Ripard <[email protected]>
1515

1616
properties:
17-
"#address-cells": true
18-
"#size-cells": true
19-
2017
compatible:
2118
enum:
2219
- allwinner,sun4i-a10-nand
@@ -49,12 +46,8 @@ properties:
4946
dma-names:
5047
const: rxtx
5148

52-
pinctrl-names: true
53-
5449
patternProperties:
55-
"^pinctrl-[0-9]+$": true
56-
57-
"^nand@[a-f0-9]+$":
50+
"^nand@[a-f0-9]$":
5851
type: object
5952
properties:
6053
reg:
@@ -91,6 +84,29 @@ required:
9184
- clocks
9285
- clock-names
9386

94-
additionalProperties: false
87+
unevaluatedProperties: false
88+
89+
examples:
90+
- |
91+
#include <dt-bindings/interrupt-controller/arm-gic.h>
92+
#include <dt-bindings/clock/sun6i-rtc.h>
93+
#include <dt-bindings/clock/sun8i-a23-a33-ccu.h>
94+
#include <dt-bindings/reset/sun8i-a23-a33-ccu.h>
95+
96+
nand-controller@1c03000 {
97+
compatible = "allwinner,sun8i-a23-nand-controller";
98+
reg = <0x01c03000 0x1000>;
99+
interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
100+
clocks = <&ccu CLK_BUS_NAND>, <&ccu CLK_NAND>;
101+
clock-names = "ahb", "mod";
102+
resets = <&ccu RST_BUS_NAND>;
103+
reset-names = "ahb";
104+
dmas = <&dma 5>;
105+
dma-names = "rxtx";
106+
pinctrl-names = "default";
107+
pinctrl-0 = <&nand_pins &nand_cs0_pin &nand_rb0_pin>;
108+
#address-cells = <1>;
109+
#size-cells = <0>;
110+
};
95111
96112
...

Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,14 @@ properties:
3535
interrupts:
3636
maxItems: 1
3737

38-
"#address-cells": true
39-
"#size-cells": true
40-
4138
required:
4239
- compatible
4340
- reg
4441
- clocks
4542
- clock-names
4643
- interrupts
4744

48-
additionalProperties: true
45+
unevaluatedProperties: true
4946

5047
examples:
5148
- |

Documentation/devicetree/bindings/mtd/arm,pl353-nand-r2p1.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ unevaluatedProperties: false
3434
examples:
3535
- |
3636
smcc: memory-controller@e000e000 {
37-
compatible = "arm,pl353-smc-r2p1", "arm,primecell";
38-
reg = <0xe000e000 0x0001000>;
39-
clock-names = "memclk", "apb_pclk";
40-
clocks = <&clkc 11>, <&clkc 44>;
41-
ranges = <0x0 0x0 0xe1000000 0x1000000 /* Nand CS region */
42-
0x1 0x0 0xe2000000 0x2000000 /* SRAM/NOR CS0 region */
43-
0x2 0x0 0xe4000000 0x2000000>; /* SRAM/NOR CS1 region */
44-
#address-cells = <2>;
45-
#size-cells = <1>;
46-
47-
nfc0: nand-controller@0,0 {
48-
compatible = "arm,pl353-nand-r2p1";
49-
reg = <0 0 0x1000000>;
50-
#address-cells = <1>;
51-
#size-cells = <0>;
52-
};
37+
compatible = "arm,pl353-smc-r2p1", "arm,primecell";
38+
reg = <0xe000e000 0x0001000>;
39+
clock-names = "memclk", "apb_pclk";
40+
clocks = <&clkc 11>, <&clkc 44>;
41+
ranges = <0x0 0x0 0xe1000000 0x1000000 /* Nand CS region */
42+
0x1 0x0 0xe2000000 0x2000000 /* SRAM/NOR CS0 region */
43+
0x2 0x0 0xe4000000 0x2000000>; /* SRAM/NOR CS1 region */
44+
#address-cells = <2>;
45+
#size-cells = <1>;
46+
47+
nfc0: nand-controller@0,0 {
48+
compatible = "arm,pl353-nand-r2p1";
49+
reg = <0 0 0x1000000>;
50+
#address-cells = <1>;
51+
#size-cells = <0>;
52+
};
5353
};

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ Optional properties:
4545
- atmel,rb: an integer identifying the native Ready/Busy pin. Only meaningful
4646
on sama5 SoCs.
4747

48-
All generic properties described in
49-
Documentation/devicetree/bindings/mtd/{common,nand}.txt also apply to the NAND
50-
device node, and NAND partitions should be defined under the NAND node as
51-
described in Documentation/devicetree/bindings/mtd/partition.txt.
48+
All generic properties are described in the generic yaml files under
49+
Documentation/devicetree/bindings/mtd/.
5250

5351
* ECC engine (PMECC) bindings:
5452

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

Lines changed: 52 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ properties:
8686
minItems: 1
8787
items:
8888
- description: NAND CTLRDY interrupt
89-
- description: FLASH_DMA_DONE if flash DMA is available
90-
- description: FLASH_EDU_DONE if EDU is available
89+
- description: FLASH_DMA_DONE (if flash DMA is available) or FLASH_EDU_DONE (if EDU is available)
9190

9291
interrupt-names:
9392
minItems: 1
9493
items:
9594
- const: nand_ctlrdy
96-
- const: flash_dma_done
97-
- const: flash_edu_done
95+
- enum:
96+
- flash_dma_done
97+
- flash_edu_done
9898

9999
clocks:
100100
maxItems: 1
@@ -173,6 +173,13 @@ allOf:
173173
- const: nand
174174
- const: iproc-idm
175175
- const: iproc-ext
176+
- if:
177+
properties:
178+
interrupts:
179+
minItems: 2
180+
then:
181+
required:
182+
- interrupt-names
176183

177184
unevaluatedProperties: false
178185

@@ -184,51 +191,52 @@ required:
184191
examples:
185192
- |
186193
nand-controller@f0442800 {
187-
compatible = "brcm,brcmnand-v7.0", "brcm,brcmnand";
188-
reg = <0xf0442800 0x600>,
189-
<0xf0443000 0x100>;
190-
reg-names = "nand", "flash-dma";
191-
interrupt-parent = <&hif_intr2_intc>;
192-
interrupts = <24>, <4>;
194+
compatible = "brcm,brcmnand-v7.0", "brcm,brcmnand";
195+
reg = <0xf0442800 0x600>,
196+
<0xf0443000 0x100>;
197+
reg-names = "nand", "flash-dma";
198+
interrupt-parent = <&hif_intr2_intc>;
199+
interrupts = <24>, <4>;
200+
interrupt-names = "nand_ctlrdy", "flash_dma_done";
201+
202+
#address-cells = <1>;
203+
#size-cells = <0>;
204+
205+
nand@1 {
206+
compatible = "brcm,nandcs";
207+
reg = <1>; // Chip select 1
208+
nand-on-flash-bbt;
209+
nand-ecc-strength = <12>;
210+
nand-ecc-step-size = <512>;
193211
194212
#address-cells = <1>;
195-
#size-cells = <0>;
196-
197-
nand@1 {
198-
compatible = "brcm,nandcs";
199-
reg = <1>; // Chip select 1
200-
nand-on-flash-bbt;
201-
nand-ecc-strength = <12>;
202-
nand-ecc-step-size = <512>;
203-
204-
#address-cells = <1>;
205-
#size-cells = <1>;
206-
};
213+
#size-cells = <1>;
214+
};
207215
};
208216
- |
209217
nand-controller@10000200 {
210-
compatible = "brcm,nand-bcm63168", "brcm,nand-bcm6368",
211-
"brcm,brcmnand-v4.0", "brcm,brcmnand";
212-
reg = <0x10000200 0x180>,
213-
<0x100000b0 0x10>,
214-
<0x10000600 0x200>;
215-
reg-names = "nand", "nand-int-base", "nand-cache";
216-
interrupt-parent = <&periph_intc>;
217-
interrupts = <50>;
218-
clocks = <&periph_clk 20>;
219-
clock-names = "nand";
218+
compatible = "brcm,nand-bcm63168", "brcm,nand-bcm6368",
219+
"brcm,brcmnand-v4.0", "brcm,brcmnand";
220+
reg = <0x10000200 0x180>,
221+
<0x100000b0 0x10>,
222+
<0x10000600 0x200>;
223+
reg-names = "nand", "nand-int-base", "nand-cache";
224+
interrupt-parent = <&periph_intc>;
225+
interrupts = <50>;
226+
clocks = <&periph_clk 20>;
227+
clock-names = "nand";
228+
229+
#address-cells = <1>;
230+
#size-cells = <0>;
231+
232+
nand@0 {
233+
compatible = "brcm,nandcs";
234+
reg = <0>;
235+
nand-on-flash-bbt;
236+
nand-ecc-strength = <1>;
237+
nand-ecc-step-size = <512>;
220238
221239
#address-cells = <1>;
222-
#size-cells = <0>;
223-
224-
nand@0 {
225-
compatible = "brcm,nandcs";
226-
reg = <0>;
227-
nand-on-flash-bbt;
228-
nand-ecc-strength = <1>;
229-
nand-ecc-step-size = <512>;
230-
231-
#address-cells = <1>;
232-
#size-cells = <1>;
233-
};
240+
#size-cells = <1>;
241+
};
234242
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,6 @@ examples:
145145
#size-cells = <0>;
146146
147147
nand@0 {
148-
reg = <0>;
148+
reg = <0>;
149149
};
150150
};

0 commit comments

Comments
 (0)