mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-09 16:20:11 +00:00
Core changes:
- Add a sysfs attribute to expose available OOB size
Driver changes:
- Remove HAS_DMA dependency on various drivers
- Use dev_get_drvdata() instead of platform_get_drvdata() in docg3
- Replace msleep by usleep_range() in the dataflash driver
- Avoid VLA usage in nftl layers
- Remove useless .owner assignment in pismo
- Fix various issues in the CFI driver
- Improve TRX partition handling expose a DT compat for this part
parser
- Clarify OFFSET_CONTINUOUS meaning
NAND changes:
Core changes:
- Add Miquel as a NAND maintainer
- Add access mode to the nand_page_io_req struct
- Fix kernel-doc in rawnand.h
- Support bit-wise majority to recover from corrupted ONFI parameter
pages
- Stop checking FAIL bit after a SET_FEATURES, as documented in the
ONFI spec
Raw NAND Driver changes:
- Fix and cleanup the error path of many NAND controller drivers
- GPMI:
* Cleanup/simplification of a few aspects in the driver
* Take ECC setup specified in the DT into account
- sunxi: remove support for GPIO-based R/B polling
- MTK:
* Use of_device_get_match_data() instead of of_match_device()
* Add an entry in MAINTAINERS for this driver
* Fix nand-ecc-step-size and nand-ecc-strength description in the DT
bindings doc
- fsl_ifc: fix ->cmdfunc() to read more than one ONFI parameter page
OneNAND driver changes:
- samsung: use dev_get_drvdata() instead of platform_get_drvdata()
SPI NOR changes:
Core changes:
- Add support for a bunch of SPI NOR chips
- Clear EAR reg when switching to 3-byte addressing mode on Winbond
chips
SPI NOR controller driver changes:
- cadence: Add DMA support for direct mode reads
- hisi: Prefix a few functions with hisi_
- intel:
* Mark the driver as "dangerous" in Kconfig
* Fix atomic sequence handling
* Pass a 40us delay (instead of 0us) to readl_poll_timeout()
- fsl:
* fix a typo in a function name
* add support for IP variants embedded in the ls2080a and ls1080a
SoCs
- stm32: request exclusive control of the reset line
-----BEGIN PGP SIGNATURE-----
iQI5BAABCAAjBQJbGZ/KHBxib3Jpcy5icmV6aWxsb25AYm9vdGxpbi5jb20ACgkQ
Ze02AX4ItwBhLRAAqj0wXUjyO836NSqYboF21b+eLCLAOojydRCIQjbMYkEQ1ifZ
vLEwHy8vDYYnJyT+cXlP8wpImh7grhCrq3jPW/SDU2xljUC4TXAAVrfSYw6EJ5at
TJBum4+DVkTr3ZgBUI/RxDmao0i+29ztK/viHnLEeDziWaFGJqy0C8FtMwFf6MTF
LwbmCD0KppoLUP0CW/V+fITu8+FBOFsLdDXUi//GIIMeUE3smvGbhXrRZsFoXC3p
5sgo6Dn3f87uO/fK2x2YNf9uXAb2fRuqnCmXwu+AXEW1NLBzkU0TlxerPxbbrmAR
wNqBRK/mw+uIILAZgi8tiCRreFYGNNefK+cpf7lqFpZVgBWJJxBMkfy1UdXupUQx
N/2J+UpGKlGtevvW1CnTXvK0zeXg8FwGREXL4il02Sg57s7IkvG/xIoSN2Nofs9K
KULDJ8CE1BtH/LwdKHpe7DLzc1I3E8DRzzbVzEzZuW/ukMnqCgouF4wNsjmUJHmm
KfCNan8CWCU6QyqVIGd3ucm5RXwwaEiMrXxoCmjmkJy8+4eDTYNWgruFSU/adOtU
lABuvzVzoJ3UKvdxjlirg83EcWrazj4W2/COz+Hpxaa+vAwAPb1GoxyNKqGpdL8p
lugJOps4rHuFF6xJX/AwSrL5C1cmpuKXICqkErTieKT1YZhpx72v7rFXEK4=
=cHjU
-----END PGP SIGNATURE-----
Merge tag 'mtd/for-4.18' of git://git.infradead.org/linux-mtd
Pull MTD updates from Boris Brezillon:
"Core changes:
- Add a sysfs attribute to expose available OOB size
Driver changes:
- Remove HAS_DMA dependency on various drivers
- Use dev_get_drvdata() instead of platform_get_drvdata() in docg3
- Replace msleep by usleep_range() in the dataflash driver
- Avoid VLA usage in nftl layers
- Remove useless .owner assignment in pismo
- Fix various issues in the CFI driver
- Improve TRX partition handling expose a DT compat for this part
parser
- Clarify OFFSET_CONTINUOUS meaning
NAND core changes:
- Add Miquel as a NAND maintainer
- Add access mode to the nand_page_io_req struct
- Fix kernel-doc in rawnand.h
- Support bit-wise majority to recover from corrupted ONFI parameter
pages
- Stop checking FAIL bit after a SET_FEATURES, as documented in the
ONFI spec
Raw NAND Driver changes:
- Fix and cleanup the error path of many NAND controller drivers
- GPMI:
+ Cleanup/simplification of a few aspects in the driver
+ Take ECC setup specified in the DT into account
- sunxi: remove support for GPIO-based R/B polling
- MTK:
+ Use of_device_get_match_data() instead of of_match_device()
+ Add an entry in MAINTAINERS for this driver
+ Fix nand-ecc-step-size and nand-ecc-strength description in the
DT bindings doc
- fsl_ifc: fix ->cmdfunc() to read more than one ONFI parameter page
OneNAND driver changes:
- samsung: use dev_get_drvdata() instead of platform_get_drvdata()
SPI NOR core changes:
- Add support for a bunch of SPI NOR chips
- Clear EAR reg when switching to 3-byte addressing mode on Winbond
chips
SPI NOR controller driver changes:
- cadence: Add DMA support for direct mode reads
- hisi: Prefix a few functions with hisi_
- intel:
+ Mark the driver as "dangerous" in Kconfig
+ Fix atomic sequence handling
+ Pass a 40us delay (instead of 0us) to readl_poll_timeout()
- fsl:
+ fix a typo in a function name
+ add support for IP variants embedded in the ls2080a and ls1080a
SoCs
- stm32: request exclusive control of the reset line"
* tag 'mtd/for-4.18' of git://git.infradead.org/linux-mtd: (66 commits)
mtd: nand: Pass mode information to nand_page_io_req
mtd: cfi_cmdset_0002: Change erase one block to enable XIP once
mtd: cfi_cmdset_0002: Change erase functions to check chip good only
mtd: cfi_cmdset_0002: Change erase functions to retry for error
mtd: cfi_cmdset_0002: Change definition naming to retry write operation
mtd: cfi_cmdset_0002: Change write buffer to check correct value
mtd: cmdlinepart: Update comment for introduction of OFFSET_CONTINUOUS
mtd: bcm47xxpart: add of_match_table with a new DT binding
dt-bindings: mtd: document Broadcom's BCM47xx partitions
mtd: spi-nor: Add support for EN25QH32
mtd: spi-nor: Add support for is25wp series chips
mtd: spi-nor: Add Winbond w25q32jv support
mtd: spi-nor: fsl-quadspi: add support for ls2080a/ls1080a
mtd: spi-nor: stm32-quadspi: explicitly request exclusive reset control
mtd: spi-nor: intel: provide a range for poll_timout
mtd: spi-nor: fsl-quadspi: fix api naming typo _init_ahb_read
mtd: spi-nor: intel-spi: Explicitly mark the driver as dangerous in Kconfig
mtd: spi-nor: intel-spi: Fix atomic sequence handling
mtd: rawnand: Do not check FAIL bit when executing a SET_FEATURES op
mtd: rawnand: use bit-wise majority to recover the ONFI param page
...
177 lines
5.0 KiB
Plaintext
177 lines
5.0 KiB
Plaintext
MTK SoCs NAND FLASH controller (NFC) DT binding
|
|
|
|
This file documents the device tree bindings for MTK SoCs NAND controllers.
|
|
The functional split of the controller requires two drivers to operate:
|
|
the nand controller interface driver and the ECC engine driver.
|
|
|
|
The hardware description for both devices must be captured as device
|
|
tree nodes.
|
|
|
|
1) NFC NAND Controller Interface (NFI):
|
|
=======================================
|
|
|
|
The first part of NFC is NAND Controller Interface (NFI) HW.
|
|
Required NFI properties:
|
|
- compatible: Should be one of
|
|
"mediatek,mt2701-nfc",
|
|
"mediatek,mt2712-nfc",
|
|
"mediatek,mt7622-nfc".
|
|
- reg: Base physical address and size of NFI.
|
|
- interrupts: Interrupts of NFI.
|
|
- clocks: NFI required clocks.
|
|
- clock-names: NFI clocks internal name.
|
|
- ecc-engine: Required ECC Engine node.
|
|
- #address-cells: NAND chip index, should be 1.
|
|
- #size-cells: Should be 0.
|
|
|
|
Example:
|
|
|
|
nandc: nfi@1100d000 {
|
|
compatible = "mediatek,mt2701-nfc";
|
|
reg = <0 0x1100d000 0 0x1000>;
|
|
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_LOW>;
|
|
clocks = <&pericfg CLK_PERI_NFI>,
|
|
<&pericfg CLK_PERI_NFI_PAD>;
|
|
clock-names = "nfi_clk", "pad_clk";
|
|
ecc-engine = <&bch>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
};
|
|
|
|
Platform related properties, should be set in {platform_name}.dts:
|
|
- children nodes: NAND chips.
|
|
|
|
Children nodes properties:
|
|
- reg: Chip Select Signal, default 0.
|
|
Set as reg = <0>, <1> when need 2 CS.
|
|
Optional:
|
|
- nand-on-flash-bbt: Store BBT on NAND Flash.
|
|
- nand-ecc-mode: the NAND ecc mode (check driver for supported modes)
|
|
- nand-ecc-step-size: Number of data bytes covered by a single ECC step.
|
|
valid values:
|
|
512 and 1024 on mt2701 and mt2712.
|
|
512 only on mt7622.
|
|
1024 is recommended for large page NANDs.
|
|
- nand-ecc-strength: Number of bits to correct per ECC step.
|
|
The valid values that each controller supports:
|
|
mt2701: 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28,
|
|
32, 36, 40, 44, 48, 52, 56, 60.
|
|
mt2712: 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28,
|
|
32, 36, 40, 44, 48, 52, 56, 60, 68, 72, 80.
|
|
mt7622: 4, 6, 8, 10, 12, 14, 16.
|
|
The strength should be calculated as follows:
|
|
E = (S - F) * 8 / B
|
|
S = O / (P / Q)
|
|
E : nand-ecc-strength.
|
|
S : spare size per sector.
|
|
F : FDM size, should be in the range [1,8].
|
|
It is used to store free oob data.
|
|
O : oob size.
|
|
P : page size.
|
|
Q : nand-ecc-step-size.
|
|
B : number of parity bits needed to correct
|
|
1 bitflip.
|
|
According to MTK NAND controller design,
|
|
this number depends on max ecc step size
|
|
that MTK NAND controller supports.
|
|
If max ecc step size supported is 1024,
|
|
then it should be always 14. And if max
|
|
ecc step size is 512, then it should be
|
|
always 13.
|
|
If the result does not match any one of the listed
|
|
choices above, please select the smaller valid value from
|
|
the list.
|
|
(otherwise the driver will do the adjustment at runtime)
|
|
- pinctrl-names: Default NAND pin GPIO setting name.
|
|
- pinctrl-0: GPIO setting node.
|
|
|
|
Example:
|
|
&pio {
|
|
nand_pins_default: nanddefault {
|
|
pins_dat {
|
|
pinmux = <MT2701_PIN_111_MSDC0_DAT7__FUNC_NLD7>,
|
|
<MT2701_PIN_112_MSDC0_DAT6__FUNC_NLD6>,
|
|
<MT2701_PIN_114_MSDC0_DAT4__FUNC_NLD4>,
|
|
<MT2701_PIN_118_MSDC0_DAT3__FUNC_NLD3>,
|
|
<MT2701_PIN_121_MSDC0_DAT0__FUNC_NLD0>,
|
|
<MT2701_PIN_120_MSDC0_DAT1__FUNC_NLD1>,
|
|
<MT2701_PIN_113_MSDC0_DAT5__FUNC_NLD5>,
|
|
<MT2701_PIN_115_MSDC0_RSTB__FUNC_NLD8>,
|
|
<MT2701_PIN_119_MSDC0_DAT2__FUNC_NLD2>;
|
|
input-enable;
|
|
drive-strength = <MTK_DRIVE_8mA>;
|
|
bias-pull-up;
|
|
};
|
|
|
|
pins_we {
|
|
pinmux = <MT2701_PIN_117_MSDC0_CLK__FUNC_NWEB>;
|
|
drive-strength = <MTK_DRIVE_8mA>;
|
|
bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
|
|
};
|
|
|
|
pins_ale {
|
|
pinmux = <MT2701_PIN_116_MSDC0_CMD__FUNC_NALE>;
|
|
drive-strength = <MTK_DRIVE_8mA>;
|
|
bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&nandc {
|
|
status = "okay";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&nand_pins_default>;
|
|
nand@0 {
|
|
reg = <0>;
|
|
nand-on-flash-bbt;
|
|
nand-ecc-mode = "hw";
|
|
nand-ecc-strength = <24>;
|
|
nand-ecc-step-size = <1024>;
|
|
};
|
|
};
|
|
|
|
NAND chip optional subnodes:
|
|
- Partitions, see Documentation/devicetree/bindings/mtd/partition.txt
|
|
|
|
Example:
|
|
nand@0 {
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
preloader@0 {
|
|
label = "pl";
|
|
read-only;
|
|
reg = <0x00000000 0x00400000>;
|
|
};
|
|
android@00400000 {
|
|
label = "android";
|
|
reg = <0x00400000 0x12c00000>;
|
|
};
|
|
};
|
|
};
|
|
|
|
2) ECC Engine:
|
|
==============
|
|
|
|
Required BCH properties:
|
|
- compatible: Should be one of
|
|
"mediatek,mt2701-ecc",
|
|
"mediatek,mt2712-ecc",
|
|
"mediatek,mt7622-ecc".
|
|
- reg: Base physical address and size of ECC.
|
|
- interrupts: Interrupts of ECC.
|
|
- clocks: ECC required clocks.
|
|
- clock-names: ECC clocks internal name.
|
|
|
|
Example:
|
|
|
|
bch: ecc@1100e000 {
|
|
compatible = "mediatek,mt2701-ecc";
|
|
reg = <0 0x1100e000 0 0x1000>;
|
|
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_LOW>;
|
|
clocks = <&pericfg CLK_PERI_NFI_ECC>;
|
|
clock-names = "nfiecc_clk";
|
|
};
|