Commit efebdf4b authored by Miquel Raynal's avatar Miquel Raynal
Browse files

Merge tag 'nand/for-6.18' into mtd/next



* Raw NAND:
- Add support for Loongson-2K1000 and Loongson-2K0500 NAND controllers,
  including extra features, such as chip select and 6-byte NAND ID
  reading support.
- Drop the s3c2410 driver.

* SPI NAND:
- Important SPI NAND continuous read improvements and fixes.
- Add support for FudanMicro FM25S01A.
- Add support for continuous reads in Gigadevice vendor driver.

* ECC:
- Add support for the Realtek ECC engine.

This PR comes with the usual amount of various miscellaneous fixes.

Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parents 0473d5b9 1001cc11
Loading
Loading
Loading
Loading
+53 −3
Original line number Diff line number Diff line
@@ -4,13 +4,14 @@
$id: http://devicetree.org/schemas/mtd/loongson,ls1b-nand-controller.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Loongson-1 NAND Controller
title: Loongson NAND Controller

maintainers:
  - Keguang Zhang <keguang.zhang@gmail.com>
  - Binbin Zhou <zhoubinbin@loongson.cn>

description:
  The Loongson-1 NAND controller abstracts all supported operations,
  The Loongson NAND controller abstracts all supported operations,
  meaning it does not support low-level access to raw NAND flash chips.
  Moreover, the controller is paired with the DMA engine to perform
  READ and PROGRAM functions.
@@ -24,18 +25,23 @@ properties:
      - enum:
          - loongson,ls1b-nand-controller
          - loongson,ls1c-nand-controller
          - loongson,ls2k0500-nand-controller
          - loongson,ls2k1000-nand-controller
      - items:
          - enum:
              - loongson,ls1a-nand-controller
          - const: loongson,ls1b-nand-controller

  reg:
    maxItems: 2
    minItems: 2
    maxItems: 3

  reg-names:
    minItems: 2
    items:
      - const: nand
      - const: nand-dma
      - const: dma-config

  dmas:
    maxItems: 1
@@ -52,6 +58,27 @@ required:

unevaluatedProperties: false

if:
  properties:
    compatible:
      contains:
        enum:
          - loongson,ls2k1000-nand-controller

then:
  properties:
    reg:
      minItems: 3
    reg-names:
      minItems: 3

else:
  properties:
    reg:
      maxItems: 2
    reg-names:
      maxItems: 2

examples:
  - |
    nand-controller@1fe78000 {
@@ -70,3 +97,26 @@ examples:
            nand-ecc-algo = "hamming";
        };
    };

  - |
    nand-controller@1fe26000 {
        compatible = "loongson,ls2k1000-nand-controller";
        reg = <0x1fe26000 0x24>,
              <0x1fe26040 0x4>,
              <0x1fe00438 0x8>;
        reg-names = "nand", "nand-dma", "dma-config";
        dmas = <&apbdma0 0>;
        dma-names = "rxtx";

        #address-cells = <1>;
        #size-cells = <0>;

        nand@0 {
            reg = <0>;
            label = "ls2k1000-nand";
            nand-use-soft-ecc-engine;
            nand-ecc-algo = "bch";
            nand-ecc-strength = <8>;
            nand-ecc-step-size = <512>;
        };
    };
+41 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mtd/realtek,rtl9301-ecc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Realtek SoCs NAND ECC engine

maintainers:
  - Markus Stockhausen <markus.stockhausen@gmx.de>

properties:
  compatible:
    const: realtek,rtl9301-ecc

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    soc {
        #address-cells = <1>;
        #size-cells = <1>;

        ecc0: ecc@1a600 {
            compatible = "realtek,rtl9301-ecc";
            reg = <0x1a600 0x54>;
        };
    };
+0 −56
Original line number Diff line number Diff line
* Samsung S3C2410 and compatible NAND flash controller

Required properties:
- compatible : The possible values are:
	"samsung,s3c2410-nand"
	"samsung,s3c2412-nand"
	"samsung,s3c2440-nand"
- reg : register's location and length.
- #address-cells, #size-cells : see nand-controller.yaml
- clocks : phandle to the nand controller clock
- clock-names : must contain "nand"

Optional child nodes:
Child nodes representing the available nand chips.

Optional child properties:
- nand-ecc-mode : see nand-controller.yaml
- nand-on-flash-bbt : see nand-controller.yaml

Each child device node may optionally contain a 'partitions' sub-node,
which further contains sub-nodes describing the flash partition mapping.
See mtd.yaml for more detail.

Example:

nand-controller@4e000000 {
	compatible = "samsung,s3c2440-nand";
	reg = <0x4e000000 0x40>;

	#address-cells = <1>;
        #size-cells = <0>;

	clocks = <&clocks HCLK_NAND>;
	clock-names = "nand";

	nand {
		nand-ecc-mode = "soft";
		nand-on-flash-bbt;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "u-boot";
				reg = <0 0x040000>;
			};

			partition@40000 {
				label = "kernel";
				reg = <0x040000 0x500000>;
			};
		};
	};
};
+1 −1
Original line number Diff line number Diff line
@@ -16992,7 +16992,7 @@ F: Documentation/devicetree/bindings/*/loongson,ls1*.yaml
F:	arch/mips/include/asm/mach-loongson32/
F:	arch/mips/loongson32/
F:	drivers/*/*loongson1*
F:	drivers/mtd/nand/raw/loongson1-nand-controller.c
F:	drivers/mtd/nand/raw/loongson-nand-controller.c
F:	drivers/net/ethernet/stmicro/stmmac/dwmac-loongson1.c
F:	sound/soc/loongson/loongson1_ac97.c
+8 −0
Original line number Diff line number Diff line
@@ -61,6 +61,14 @@ config MTD_NAND_ECC_MEDIATEK
	help
	  This enables support for the hardware ECC engine from Mediatek.

config MTD_NAND_ECC_REALTEK
        tristate "Realtek RTL93xx hardware ECC engine"
        depends on HAS_IOMEM
        depends on MACH_REALTEK_RTL || COMPILE_TEST
        select MTD_NAND_ECC
        help
          This enables support for the hardware ECC engine from Realtek.

endmenu

endmenu
Loading