/openbmc/linux/Documentation/devicetree/bindings/mtd/ |
H A D | hisi504-nand.txt | 1 Hisilicon Hip04 Soc NAND controller DT binding 5 - compatible: Should be "hisilicon,504-nfc". 6 - reg: The first contains base physical address and size of 7 NAND controller's registers. The second contains base 8 physical address and size of NAND controller's buffer. 9 - interrupts: Interrupt number for nfc. 10 - nand-bus-width: See nand-controller.yaml. 11 - nand-ecc-mode: Support none and hw ecc mode. 12 - #address-cells: Partition address, should be set 1. 13 - #size-cells: Partition size, should be set 1. [all …]
|
H A D | raw-nand-chip.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Raw NAND Chip Common Properties 10 - Miquel Raynal <miquel.raynal@bootlin.com> 13 - $ref: nand-chip.yaml# 16 The ECC strength and ECC step size properties define the user 18 they request the ECC engine to correct {strength} bit errors per 19 {size} bytes for a particular raw NAND chip. [all …]
|
H A D | rockchip,nand-controller.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mtd/rockchip,nand-controller.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Rockchip SoCs NAND FLASH Controller (NFC) 10 - $ref: nand-controller.yaml# 13 - Heiko Stuebner <heiko@sntech.de> 18 - const: rockchip,px30-nfc 19 - const: rockchip,rk2928-nfc 20 - const: rockchip,rv1108-nfc [all …]
|
H A D | nvidia-tegra20-nand.txt | 1 NVIDIA Tegra NAND Flash controller 4 - compatible: Must be one of: 5 - "nvidia,tegra20-nand" 6 - reg: MMIO address range 7 - interrupts: interrupt output of the NFC controller 8 - clocks: Must contain an entry for each entry in clock-names. 9 See ../clocks/clock-bindings.txt for details. 10 - clock-names: Must include the following entries: 11 - nand 12 - resets: Must contain an entry for each entry in reset-names. [all …]
|
H A D | mediatek,mtk-nfc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mtd/mediatek,mtk-nfc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: MediaTek(MTK) SoCs raw NAND FLASH controller (NFC) 10 - Xiangsheng Hou <xiangsheng.hou@mediatek.com> 15 - mediatek,mt2701-nfc 16 - mediatek,mt2712-nfc 17 - mediatek,mt7622-nfc 21 - description: Base physical address and size of NFI. [all …]
|
H A D | denali,nand.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/mtd/denali,nand.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Denali NAND controller 10 - Masahiro Yamada <yamada.masahiro@socionext.com> 15 - altr,socfpga-denali-nand 16 - socionext,uniphier-denali-nand-v5a 17 - socionext,uniphier-denali-nand-v5b 19 reg-names: [all …]
|
H A D | amlogic,meson-nand.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mtd/amlogic,meson-nand.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Amlogic NAND Flash Controller (NFC) for GXBB/GXL/AXG family SoCs 10 - $ref: nand-controller.yaml 13 - liang.yang@amlogic.com 18 - amlogic,meson-gxl-nfc 19 - amlogic,meson-axg-nfc 24 reg-names: [all …]
|
H A D | marvell,nand-controller.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mtd/marvell,nand-controller.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Marvell NAND Flash Controller (NFC) 10 - Miquel Raynal <miquel.raynal@bootlin.com> 15 - items: 16 - const: marvell,armada-8k-nand-controller 17 - const: marvell,armada370-nand-controller 18 - enum: [all …]
|
H A D | vf610-nfc.txt | 1 Freescale's NAND flash controller (NFC) 3 This variant of the Freescale NAND flash controller (NFC) can be found on 7 - compatible: Should be set to "fsl,vf610-nfc". 8 - reg: address range of the NFC. 9 - interrupts: interrupt of the NFC. 10 - #address-cells: shall be set to 1. Encode the nand CS. 11 - #size-cells : shall be set to 0. 12 - assigned-clocks: main clock from the SoC, for Vybrid <&clks VF610_CLK_NFC>; 13 - assigned-clock-rates: The NAND bus timing is derived from this clock 14 rate and should not exceed maximum timing for any NAND memory chip [all …]
|
H A D | gpmi-nand.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mtd/gpmi-nand.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Freescale General-Purpose Media Interface (GPMI) 10 - Han Xu <han.xu@nxp.com> 13 The GPMI nand controller provides an interface to control the NAND 14 flash chips. The device tree may optionally contain sub-nodes 21 - enum: 22 - fsl,imx23-gpmi-nand [all …]
|
H A D | qcom,nandc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Qualcomm NAND controller 10 - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 15 - qcom,ipq806x-nand 16 - qcom,ipq4019-nand 17 - qcom,ipq6018-nand 18 - qcom,ipq8074-nand 19 - qcom,sdx55-nand [all …]
|
H A D | brcm,brcmnand.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Broadcom STB NAND Controller 10 - Brian Norris <computersforpeace@gmail.com> 11 - Kamal Dasu <kdasu.kdev@gmail.com> 14 The Broadcom Set-Top Box NAND controller supports low-level access to raw NAND 15 flash chips. It has a memory-mapped register interface for both control 25 -- Additional SoC-specific NAND controller properties -- 27 The NAND controller is integrated differently on the variety of SoCs on which [all …]
|
/openbmc/linux/drivers/mtd/nand/ |
H A D | ecc-sw-bch.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * This file provides ECC correction for more than 1 bit per block of data, 14 #include <linux/mtd/nand.h> 15 #include <linux/mtd/nand-ecc-sw-bch.h> 18 * nand_ecc_sw_bch_calculate - Calculate the ECC corresponding to a data block 19 * @nand: NAND device 21 * @code: Output buffer with ECC 23 int nand_ecc_sw_bch_calculate(struct nand_device *nand, in nand_ecc_sw_bch_calculate() argument 26 struct nand_ecc_sw_bch_conf *engine_conf = nand->ecc.ctx.priv; in nand_ecc_sw_bch_calculate() 29 memset(code, 0, engine_conf->code_size); in nand_ecc_sw_bch_calculate() [all …]
|
H A D | ecc.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Generic Error-Correcting Code (ECC) engine 10 * This file describes the abstraction of any NAND ECC engine. It has been 11 * designed to fit most cases, including parallel NANDs and SPI-NANDs. 13 * There are three main situations where instantiating this ECC engine makes 15 * - external: The ECC engine is outside the NAND pipeline, typically this 16 * is a software ECC engine, or an hardware engine that is 17 * outside the NAND controller pipeline. 18 * - pipelined: The ECC engine is inside the NAND pipeline, ie. on the 19 * controller's side. This is the case of most of the raw NAND [all …]
|
H A D | ecc-mxic.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Support for Macronix external hardware ECC engine for NAND devices, also 10 #include <linux/dma-mapping.h> 18 #include <linux/mtd/nand.h> 19 #include <linux/mtd/nand-ecc-mxic.h> 53 /* ECC Chunk Size */ 63 /* ECC Chunk Count */ 98 /* ECC machinery */ 124 static struct mxic_ecc_engine *nand_to_mxic(struct nand_device *nand) in nand_to_mxic() argument 126 struct nand_ecc_engine *eng = nand->ecc.engine; in nand_to_mxic() [all …]
|
/openbmc/linux/drivers/mtd/nand/raw/ |
H A D | tegra_nand.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (C) 2014-2015 Lucas Stach <dev@lynxeye.de> 10 #include <linux/dma-mapping.h> 34 #define COMMAND_TRANS_SIZE(size) ((((size) - 1) & 0xf) << 20) 40 #define COMMAND_CLE_SIZE(size) ((((size) - 1) & 0x3) << 4) 41 #define COMMAND_ALE_SIZE(size) ((((size) - 1) & 0xf) << 0) 156 #define OFFSET(val, off) ((val) < (off) ? 0 : (val) - (off)) 185 struct mtd_oob_region ecc; member 207 int bytes_per_step = DIV_ROUND_UP(BITS_PER_STEP_RS * chip->ecc.strength, in tegra_nand_ooblayout_rs_ecc() 211 return -ERANGE; in tegra_nand_ooblayout_rs_ecc() [all …]
|
H A D | sunxi_nand.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * https://github.com/yuq/sunxi-nfc-mtd 9 * https://github.com/hno/Allwinner-Info 16 #include <linux/dma-mapping.h> 70 #define NFC_PAGE_SHIFT(x) (((x) < 10 ? 0 : (x) - 10) << 8) 107 #define NFC_ADR_NUM(x) (((x) - 1) << 16) 161 * struct sunxi_nand_chip_sel - stores information related to NAND Chip Select 163 * @cs: the NAND CS id used to communicate with a NAND Chip 164 * @rb: the Ready/Busy pin ID. -1 means no R/B pin connected to the NFC 172 * struct sunxi_nand_hw_ecc - stores information related to HW ECC support [all …]
|
H A D | mtk_nand.c | 1 // SPDX-License-Identifier: GPL-2.0 OR MIT 3 * MTK NAND Flash controller driver. 6 * Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> 10 #include <linux/dma-mapping.h> 19 #include <linux/mtd/nand-ecc-mtk.h> 21 /* NAND controller register definition */ 89 #define MTK_NAME "mtk-nand" 126 struct nand_chip nand; member 146 struct mtk_ecc *ecc; member 178 static inline struct mtk_nfc_nand_chip *to_mtk_nand(struct nand_chip *nand) in to_mtk_nand() argument [all …]
|
H A D | nand_base.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * This is the generic MTD driver for NAND flash devices. It should be 5 * capable of working with almost all NAND chips currently available. 8 * http://www.linux-mtd.infradead.org/doc/nand.html 11 * 2002-2006 Thomas Gleixner (tglx@linutronix.de) 21 * Check, if mtd->ecctype should be set to MTD_ECC_HW 22 * if we have HW ECC support. 37 #include <linux/mtd/nand.h> 38 #include <linux/mtd/nand-ecc-sw-hamming.h> 39 #include <linux/mtd/nand-ecc-sw-bch.h> [all …]
|
H A D | stm32_fmc2_nand.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include <linux/dma-mapping.h> 27 /* ECC step size */ 36 /* Max requests done for a 8k nand page size */ 42 /* Max ECC buffer length */ 248 struct stm32_fmc2_nand nand; member 283 struct stm32_fmc2_nfc *nfc = to_stm32_nfc(chip->controller); in stm32_fmc2_nfc_timings_init() 284 struct stm32_fmc2_nand *nand = to_fmc2_nand(chip); in stm32_fmc2_nfc_timings_init() local 285 struct stm32_fmc2_timings *timings = &nand->timings; in stm32_fmc2_nfc_timings_init() 289 regmap_update_bits(nfc->regmap, FMC2_PCR, in stm32_fmc2_nfc_timings_init() [all …]
|
H A D | meson_nand.c | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 * Amlogic Meson Nand Flash Controller Driver 10 #include <linux/dma-mapping.h> 13 #include <linux/clk-provider.h> 81 #define ECC_CHECK_RETURN_FF (-1) 96 /* nand flash controller delay 3 ns */ 119 struct nand_chip nand; member 136 u32 strength; member 202 #define MESON_ECC_DATA(b, s, sz) { .bch = (b), .strength = (s), .size = (sz) } 214 static int meson_nand_calc_ecc_bytes(int step_size, int strength) in meson_nand_calc_ecc_bytes() argument [all …]
|
/openbmc/linux/drivers/mtd/nand/raw/ingenic/ |
H A D | ingenic_nand_drv.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Ingenic JZ47xx NAND driver 23 #include <linux/jz4780-nemc.h> 27 #define DRV_NAME "ingenic-nand" 44 struct ingenic_ecc *ecc; member 75 struct nand_ecc_ctrl *ecc = &chip->ecc; in qi_lb60_ooblayout_ecc() local 77 if (section || !ecc->total) in qi_lb60_ooblayout_ecc() 78 return -ERANGE; in qi_lb60_ooblayout_ecc() 80 oobregion->length = ecc->total; in qi_lb60_ooblayout_ecc() 81 oobregion->offset = 12; in qi_lb60_ooblayout_ecc() [all …]
|
/openbmc/u-boot/drivers/mtd/nand/raw/ |
H A D | Kconfig | 2 menuconfig NAND config 3 bool "Raw NAND Device Support" 4 if NAND 9 This option, if enabled, provides more flexible and linux-like 10 NAND initialization process. 15 Omit standard ECC layouts to safe space. Select this if your driver 16 is known to provide its own ECC layout. 19 bool "Support Atmel NAND controller" 22 Enable this driver for NAND flash platforms using an Atmel NAND 28 bool "Atmel Hardware ECC" [all …]
|
H A D | fsmc_nand.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <nand.h> 24 * ECC4 and ECC1 have 13 bytes and 3 bytes of ecc respectively for 512 bytes of 61 * ECC4 layout for NAND of pagesize 4096 bytes & OOBsize 224 bytes. 13*8 bytes 62 * of OOB size is reserved for ECC, Byte no. 0 & 1 reserved for bad block & 118 97 * ECC placement definitions in oobfree type format 98 * There are 13 bytes of ecc for every 512 byte block and it has to be read 101 * Managing the ecc bytes in the following way makes it easier for software to 102 * read ecc bytes consecutive to data bytes. This way is similar to 103 * oobfree structure maintained already in u-boot nand driver [all …]
|
/openbmc/linux/drivers/spi/ |
H A D | spi-mtk-snfi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Driver for the SPI-NAND mode of Mediatek NAND Flash Interface 7 // This driver is based on the SPI-NAND mtd driver from Mediatek SDK: 13 // like the following: (sizeof(FDM + ECC) = snf->nfi_cfg.spare_size) 14 // +---------+------+------+---------+------+------+-----+ 16 // +---------+------+------+---------+------+------+-----+ 17 // With auto-format turned on, DMA only returns this part: 18 // +---------+---------+-----+ 20 // +---------+---------+-----+ 21 // The FDM data will be filled to the registers, and ECC parity data isn't [all …]
|