mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-09-07 00:38:05 -04:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
8
Documentation/devicetree/bindings/mtd/arm-versatile.txt
Normal file
8
Documentation/devicetree/bindings/mtd/arm-versatile.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
Flash device on ARM Versatile board
|
||||
|
||||
Required properties:
|
||||
- compatible : must be "arm,versatile-flash";
|
||||
- bank-width : width in bytes of flash interface.
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
17
Documentation/devicetree/bindings/mtd/atmel-dataflash.txt
Normal file
17
Documentation/devicetree/bindings/mtd/atmel-dataflash.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
* Atmel Data Flash
|
||||
|
||||
Required properties:
|
||||
- compatible : "atmel,<model>", "atmel,<series>", "atmel,dataflash".
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
||||
|
||||
Example:
|
||||
|
||||
flash@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "atmel,at45db321d", "atmel,at45", "atmel,dataflash";
|
||||
spi-max-frequency = <25000000>;
|
||||
reg = <1>;
|
||||
};
|
109
Documentation/devicetree/bindings/mtd/atmel-nand.txt
Normal file
109
Documentation/devicetree/bindings/mtd/atmel-nand.txt
Normal file
|
@ -0,0 +1,109 @@
|
|||
Atmel NAND flash
|
||||
|
||||
Required properties:
|
||||
- compatible : "atmel,at91rm9200-nand".
|
||||
- reg : should specify localbus address and size used for the chip,
|
||||
and hardware ECC controller if available.
|
||||
If the hardware ECC is PMECC, it should contain address and size for
|
||||
PMECC, PMECC Error Location controller and ROM which has lookup tables.
|
||||
- atmel,nand-addr-offset : offset for the address latch.
|
||||
- atmel,nand-cmd-offset : offset for the command latch.
|
||||
- #address-cells, #size-cells : Must be present if the device has sub-nodes
|
||||
representing partitions.
|
||||
|
||||
- gpios : specifies the gpio pins to control the NAND device. detect is an
|
||||
optional gpio and may be set to 0 if not present.
|
||||
|
||||
Optional properties:
|
||||
- atmel,nand-has-dma : boolean to support dma transfer for nand read/write.
|
||||
- nand-ecc-mode : String, operation mode of the NAND ecc mode, soft by default.
|
||||
Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first",
|
||||
"soft_bch".
|
||||
- atmel,has-pmecc : boolean to enable Programmable Multibit ECC hardware.
|
||||
Only supported by at91sam9x5 or later sam9 product.
|
||||
- atmel,pmecc-cap : error correct capability for Programmable Multibit ECC
|
||||
Controller. Supported values are: 2, 4, 8, 12, 24.
|
||||
- atmel,pmecc-sector-size : sector size for ECC computation. Supported values
|
||||
are: 512, 1024.
|
||||
- atmel,pmecc-lookup-table-offset : includes two offsets of lookup table in ROM
|
||||
for different sector size. First one is for sector size 512, the next is for
|
||||
sector size 1024.
|
||||
- nand-bus-width : 8 or 16 bus width if not present 8
|
||||
- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
|
||||
- Nand Flash Controller(NFC) is a slave driver under Atmel nand flash
|
||||
- Required properties:
|
||||
- compatible : "atmel,sama5d3-nfc".
|
||||
- reg : should specify the address and size used for NFC command registers,
|
||||
NFC registers and NFC Sram. NFC Sram address and size can be absent
|
||||
if don't want to use it.
|
||||
- clocks: phandle to the peripheral clock
|
||||
- Optional properties:
|
||||
- atmel,write-by-sram: boolean to enable NFC write by sram.
|
||||
|
||||
Examples:
|
||||
nand0: nand@40000000,0 {
|
||||
compatible = "atmel,at91rm9200-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0x40000000 0x10000000
|
||||
0xffffe800 0x200
|
||||
>;
|
||||
atmel,nand-addr-offset = <21>; /* ale */
|
||||
atmel,nand-cmd-offset = <22>; /* cle */
|
||||
nand-on-flash-bbt;
|
||||
nand-ecc-mode = "soft";
|
||||
gpios = <&pioC 13 0 /* rdy */
|
||||
&pioC 14 0 /* nce */
|
||||
0 /* cd */
|
||||
>;
|
||||
partition@0 {
|
||||
...
|
||||
};
|
||||
};
|
||||
|
||||
/* for PMECC supported chips */
|
||||
nand0: nand@40000000 {
|
||||
compatible = "atmel,at91rm9200-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = < 0x40000000 0x10000000 /* bus addr & size */
|
||||
0xffffe000 0x00000600 /* PMECC addr & size */
|
||||
0xffffe600 0x00000200 /* PMECC ERRLOC addr & size */
|
||||
0x00100000 0x00100000 /* ROM addr & size */
|
||||
>;
|
||||
atmel,nand-addr-offset = <21>; /* ale */
|
||||
atmel,nand-cmd-offset = <22>; /* cle */
|
||||
nand-on-flash-bbt;
|
||||
nand-ecc-mode = "hw";
|
||||
atmel,has-pmecc; /* enable PMECC */
|
||||
atmel,pmecc-cap = <2>;
|
||||
atmel,pmecc-sector-size = <512>;
|
||||
atmel,pmecc-lookup-table-offset = <0x8000 0x10000>;
|
||||
gpios = <&pioD 5 0 /* rdy */
|
||||
&pioD 4 0 /* nce */
|
||||
0 /* cd */
|
||||
>;
|
||||
partition@0 {
|
||||
...
|
||||
};
|
||||
};
|
||||
|
||||
/* for NFC supported chips */
|
||||
nand0: nand@40000000 {
|
||||
compatible = "atmel,at91rm9200-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
...
|
||||
nfc@70000000 {
|
||||
compatible = "atmel,sama5d3-nfc";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
clocks = <&hsmc_clk>
|
||||
reg = <
|
||||
0x70000000 0x10000000 /* NFC Command Registers */
|
||||
0xffffc000 0x00000070 /* NFC HSMC regs */
|
||||
0x00200000 0x00100000 /* NFC SRAM banks */
|
||||
>;
|
||||
};
|
||||
};
|
94
Documentation/devicetree/bindings/mtd/davinci-nand.txt
Normal file
94
Documentation/devicetree/bindings/mtd/davinci-nand.txt
Normal file
|
@ -0,0 +1,94 @@
|
|||
Device tree bindings for Texas instruments Davinci/Keystone NAND controller
|
||||
|
||||
This file provides information, what the device node for the davinci/keystone
|
||||
NAND interface contains.
|
||||
|
||||
Documentation:
|
||||
Davinci DM646x - http://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf
|
||||
Kestone - http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: "ti,davinci-nand"
|
||||
"ti,keystone-nand"
|
||||
|
||||
- reg: Contains 2 offset/length values:
|
||||
- offset and length for the access window.
|
||||
- offset and length for accessing the AEMIF
|
||||
control registers.
|
||||
|
||||
- ti,davinci-chipselect: number of chipselect. Indicates on the
|
||||
davinci_nand driver which chipselect is used
|
||||
for accessing the nand.
|
||||
Can be in the range [0-3].
|
||||
|
||||
Recommended properties :
|
||||
|
||||
- ti,davinci-mask-ale: mask for ALE. Needed for executing address
|
||||
phase. These offset will be added to the base
|
||||
address for the chip select space the NAND Flash
|
||||
device is connected to.
|
||||
If not set equal to 0x08.
|
||||
|
||||
- ti,davinci-mask-cle: mask for CLE. Needed for executing command
|
||||
phase. These offset will be added to the base
|
||||
address for the chip select space the NAND Flash
|
||||
device is connected to.
|
||||
If not set equal to 0x10.
|
||||
|
||||
- ti,davinci-mask-chipsel: mask for chipselect address. Needed to mask
|
||||
addresses for given chipselect.
|
||||
|
||||
- nand-ecc-mode: operation mode of the NAND ecc mode. ECC mode
|
||||
valid values for davinci driver:
|
||||
- "none"
|
||||
- "soft"
|
||||
- "hw"
|
||||
|
||||
- ti,davinci-ecc-bits: used ECC bits, currently supported 1 or 4.
|
||||
|
||||
- nand-bus-width: buswidth 8 or 16. If not present 8.
|
||||
|
||||
- nand-on-flash-bbt: use flash based bad block table support. OOB
|
||||
identifier is saved in OOB area. If not present
|
||||
false.
|
||||
|
||||
Deprecated properties:
|
||||
|
||||
- ti,davinci-ecc-mode: operation mode of the NAND ecc mode. ECC mode
|
||||
valid values for davinci driver:
|
||||
- "none"
|
||||
- "soft"
|
||||
- "hw"
|
||||
|
||||
- ti,davinci-nand-buswidth: buswidth 8 or 16. If not present 8.
|
||||
|
||||
- ti,davinci-nand-use-bbt: use flash based bad block table support. OOB
|
||||
identifier is saved in OOB area. If not present
|
||||
false.
|
||||
|
||||
Nand device bindings may contain additional sub-nodes describing partitions of
|
||||
the address space. See partition.txt for more detail. The NAND Flash timing
|
||||
values must be programmed in the chip select’s node of AEMIF
|
||||
memory-controller (see Documentation/devicetree/bindings/memory-controllers/
|
||||
davinci-aemif.txt).
|
||||
|
||||
Example(da850 EVM ):
|
||||
|
||||
nand_cs3@62000000 {
|
||||
compatible = "ti,davinci-nand";
|
||||
reg = <0x62000000 0x807ff
|
||||
0x68000000 0x8000>;
|
||||
ti,davinci-chipselect = <1>;
|
||||
ti,davinci-mask-ale = <0>;
|
||||
ti,davinci-mask-cle = <0>;
|
||||
ti,davinci-mask-chipsel = <0>;
|
||||
nand-ecc-mode = "hw";
|
||||
ti,davinci-ecc-bits = <4>;
|
||||
nand-on-flash-bbt;
|
||||
|
||||
partition@180000 {
|
||||
label = "ubifs";
|
||||
reg = <0x180000 0x7e80000>;
|
||||
};
|
||||
};
|
23
Documentation/devicetree/bindings/mtd/denali-nand.txt
Normal file
23
Documentation/devicetree/bindings/mtd/denali-nand.txt
Normal file
|
@ -0,0 +1,23 @@
|
|||
* Denali NAND controller
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "denali,denali-nand-dt"
|
||||
- reg : should contain registers location and length for data and reg.
|
||||
- reg-names: Should contain the reg names "nand_data" and "denali_reg"
|
||||
- interrupts : The interrupt number.
|
||||
- dm-mask : DMA bit mask
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
||||
|
||||
Examples:
|
||||
|
||||
nand: nand@ff900000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "denali,denali-nand-dt";
|
||||
reg = <0xff900000 0x100000>, <0xffb80000 0x10000>;
|
||||
reg-names = "nand_data", "denali_reg";
|
||||
interrupts = <0 144 4>;
|
||||
dma-mask = <0xffffffff>;
|
||||
};
|
16
Documentation/devicetree/bindings/mtd/elm.txt
Normal file
16
Documentation/devicetree/bindings/mtd/elm.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
Error location module
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "ti,am33xx-elm"
|
||||
- reg: physical base address and size of the registers map.
|
||||
- interrupts: Interrupt number for the elm.
|
||||
|
||||
Optional properties:
|
||||
- ti,hwmods: Name of the hwmod associated to the elm
|
||||
|
||||
Example:
|
||||
elm: elm@0 {
|
||||
compatible = "ti,am3352-elm";
|
||||
reg = <0x48080000 0x2000>;
|
||||
interrupts = <4>;
|
||||
};
|
49
Documentation/devicetree/bindings/mtd/flctl-nand.txt
Normal file
49
Documentation/devicetree/bindings/mtd/flctl-nand.txt
Normal file
|
@ -0,0 +1,49 @@
|
|||
FLCTL NAND controller
|
||||
|
||||
Required properties:
|
||||
- compatible : "renesas,shmobile-flctl-sh7372"
|
||||
- reg : Address range of the FLCTL
|
||||
- interrupts : flste IRQ number
|
||||
- nand-bus-width : bus width to NAND chip
|
||||
|
||||
Optional properties:
|
||||
- dmas: DMA specifier(s)
|
||||
- dma-names: name for each DMA specifier. Valid names are
|
||||
"data_tx", "data_rx", "ecc_tx", "ecc_rx"
|
||||
|
||||
The DMA fields are not used yet in the driver but are listed here for
|
||||
completing the bindings.
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
||||
|
||||
Example:
|
||||
|
||||
flctl@e6a30000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "renesas,shmobile-flctl-sh7372";
|
||||
reg = <0xe6a30000 0x100>;
|
||||
interrupts = <0x0d80>;
|
||||
|
||||
nand-bus-width = <16>;
|
||||
|
||||
dmas = <&dmac 1 /* data_tx */
|
||||
&dmac 2;> /* data_rx */
|
||||
dma-names = "data_tx", "data_rx";
|
||||
|
||||
system@0 {
|
||||
label = "system";
|
||||
reg = <0x0 0x8000000>;
|
||||
};
|
||||
|
||||
userdata@8000000 {
|
||||
label = "userdata";
|
||||
reg = <0x8000000 0x10000000>;
|
||||
};
|
||||
|
||||
cache@18000000 {
|
||||
label = "cache";
|
||||
reg = <0x18000000 0x8000000>;
|
||||
};
|
||||
};
|
35
Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
Normal file
35
Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
Normal file
|
@ -0,0 +1,35 @@
|
|||
* Freescale Quad Serial Peripheral Interface(QuadSPI)
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "fsl,vf610-qspi"
|
||||
- reg : the first contains the register location and length,
|
||||
the second contains the memory mapping address and length
|
||||
- reg-names: Should contain the reg names "QuadSPI" and "QuadSPI-memory"
|
||||
- interrupts : Should contain the interrupt for the device
|
||||
- clocks : The clocks needed by the QuadSPI controller
|
||||
- clock-names : the name of the clocks
|
||||
|
||||
Optional properties:
|
||||
- fsl,qspi-has-second-chip: The controller has two buses, bus A and bus B.
|
||||
Each bus can be connected with two NOR flashes.
|
||||
Most of the time, each bus only has one NOR flash
|
||||
connected, this is the default case.
|
||||
But if there are two NOR flashes connected to the
|
||||
bus, you should enable this property.
|
||||
(Please check the board's schematic.)
|
||||
|
||||
Example:
|
||||
|
||||
qspi0: quadspi@40044000 {
|
||||
compatible = "fsl,vf610-qspi";
|
||||
reg = <0x40044000 0x1000>, <0x20000000 0x10000000>;
|
||||
reg-names = "QuadSPI", "QuadSPI-memory";
|
||||
interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks VF610_CLK_QSPI0_EN>,
|
||||
<&clks VF610_CLK_QSPI0>;
|
||||
clock-names = "qspi_en", "qspi";
|
||||
|
||||
flash0: s25fl128s@0 {
|
||||
....
|
||||
};
|
||||
};
|
67
Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
Normal file
67
Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
Normal file
|
@ -0,0 +1,67 @@
|
|||
Freescale Localbus UPM programmed to work with NAND flash
|
||||
|
||||
Required properties:
|
||||
- compatible : "fsl,upm-nand".
|
||||
- reg : should specify localbus chip select and size used for the chip.
|
||||
- fsl,upm-addr-offset : UPM pattern offset for the address latch.
|
||||
- fsl,upm-cmd-offset : UPM pattern offset for the command latch.
|
||||
|
||||
Optional properties:
|
||||
- fsl,upm-wait-flags : add chip-dependent short delays after running the
|
||||
UPM pattern (0x1), after writing a data byte (0x2) or after
|
||||
writing out a buffer (0x4).
|
||||
- fsl,upm-addr-line-cs-offsets : address offsets for multi-chip support.
|
||||
The corresponding address lines are used to select the chip.
|
||||
- gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins
|
||||
(R/B#). For multi-chip devices, "n" GPIO definitions are required
|
||||
according to the number of chips.
|
||||
- chip-delay : chip dependent delay for transferring data from array to
|
||||
read registers (tR). Required if property "gpios" is not used
|
||||
(R/B# pins not connected).
|
||||
|
||||
Each flash chip described may optionally contain additional sub-nodes
|
||||
describing partitions of the address space. See partition.txt for more
|
||||
detail.
|
||||
|
||||
Examples:
|
||||
|
||||
upm@1,0 {
|
||||
compatible = "fsl,upm-nand";
|
||||
reg = <1 0 1>;
|
||||
fsl,upm-addr-offset = <16>;
|
||||
fsl,upm-cmd-offset = <8>;
|
||||
gpios = <&qe_pio_e 18 0>;
|
||||
|
||||
flash {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "...";
|
||||
|
||||
partition@0 {
|
||||
...
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
upm@3,0 {
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
compatible = "tqc,tqm8548-upm-nand", "fsl,upm-nand";
|
||||
reg = <3 0x0 0x800>;
|
||||
fsl,upm-addr-offset = <0x10>;
|
||||
fsl,upm-cmd-offset = <0x08>;
|
||||
/* Multi-chip NAND device */
|
||||
fsl,upm-addr-line-cs-offsets = <0x0 0x200>;
|
||||
fsl,upm-wait-flags = <0x5>;
|
||||
chip-delay = <25>; // in micro-seconds
|
||||
|
||||
nand@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "fs";
|
||||
reg = <0x00000000 0x10000000>;
|
||||
};
|
||||
};
|
||||
};
|
54
Documentation/devicetree/bindings/mtd/fsmc-nand.txt
Normal file
54
Documentation/devicetree/bindings/mtd/fsmc-nand.txt
Normal file
|
@ -0,0 +1,54 @@
|
|||
ST Microelectronics Flexible Static Memory Controller (FSMC)
|
||||
NAND Interface
|
||||
|
||||
Required properties:
|
||||
- compatible : "st,spear600-fsmc-nand", "stericsson,fsmc-nand"
|
||||
- reg : Address range of the mtd chip
|
||||
- reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd"
|
||||
|
||||
Optional properties:
|
||||
- bank-width : Width (in bytes) of the device. If not present, the width
|
||||
defaults to 1 byte
|
||||
- nand-skip-bbtscan: Indicates the the BBT scanning should be skipped
|
||||
- timings: array of 6 bytes for NAND timings. The meanings of these bytes
|
||||
are:
|
||||
byte 0 TCLR : CLE to RE delay in number of AHB clock cycles, only 4 bits
|
||||
are valid. Zero means one clockcycle, 15 means 16 clock
|
||||
cycles.
|
||||
byte 1 TAR : ALE to RE delay, 4 bits are valid. Same format as TCLR.
|
||||
byte 2 THIZ : number of HCLK clock cycles during which the data bus is
|
||||
kept in Hi-Z (tristate) after the start of a write access.
|
||||
Only valid for write transactions. Zero means zero cycles,
|
||||
255 means 255 cycles.
|
||||
byte 3 THOLD : number of HCLK clock cycles to hold the address (and data
|
||||
when writing) after the command deassertation. Zero means
|
||||
one cycle, 255 means 256 cycles.
|
||||
byte 4 TWAIT : number of HCLK clock cycles to assert the command to the
|
||||
NAND flash in response to SMWAITn. Zero means 1 cycle,
|
||||
255 means 256 cycles.
|
||||
byte 5 TSET : number of HCLK clock cycles to assert the address before the
|
||||
command is asserted. Zero means one cycle, 255 means 256
|
||||
cycles.
|
||||
- bank: default NAND bank to use (0-3 are valid, 0 is the default).
|
||||
|
||||
Example:
|
||||
|
||||
fsmc: flash@d1800000 {
|
||||
compatible = "st,spear600-fsmc-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0xd1800000 0x1000 /* FSMC Register */
|
||||
0xd2000000 0x0010 /* NAND Base DATA */
|
||||
0xd2020000 0x0010 /* NAND Base ADDR */
|
||||
0xd2010000 0x0010>; /* NAND Base CMD */
|
||||
reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
|
||||
|
||||
bank-width = <1>;
|
||||
nand-skip-bbtscan;
|
||||
timings = /bits/ 8 <0 0 0 2 3 0>;
|
||||
bank = <1>;
|
||||
|
||||
partition@0 {
|
||||
...
|
||||
};
|
||||
};
|
47
Documentation/devicetree/bindings/mtd/gpio-control-nand.txt
Normal file
47
Documentation/devicetree/bindings/mtd/gpio-control-nand.txt
Normal file
|
@ -0,0 +1,47 @@
|
|||
GPIO assisted NAND flash
|
||||
|
||||
The GPIO assisted NAND flash uses a memory mapped interface to
|
||||
read/write the NAND commands and data and GPIO pins for the control
|
||||
signals.
|
||||
|
||||
Required properties:
|
||||
- compatible : "gpio-control-nand"
|
||||
- reg : should specify localbus chip select and size used for the chip. The
|
||||
resource describes the data bus connected to the NAND flash and all accesses
|
||||
are made in native endianness.
|
||||
- #address-cells, #size-cells : Must be present if the device has sub-nodes
|
||||
representing partitions.
|
||||
- gpios : specifies the gpio pins to control the NAND device. nwp is an
|
||||
optional gpio and may be set to 0 if not present.
|
||||
|
||||
Optional properties:
|
||||
- bank-width : Width (in bytes) of the device. If not present, the width
|
||||
defaults to 1 byte.
|
||||
- chip-delay : chip dependent delay for transferring data from array to
|
||||
read registers (tR). If not present then a default of 20us is used.
|
||||
- gpio-control-nand,io-sync-reg : A 64-bit physical address for a read
|
||||
location used to guard against bus reordering with regards to accesses to
|
||||
the GPIO's and the NAND flash data bus. If present, then after changing
|
||||
GPIO state and before and after command byte writes, this register will be
|
||||
read to ensure that the GPIO accesses have completed.
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
||||
|
||||
Examples:
|
||||
|
||||
gpio-nand@1,0 {
|
||||
compatible = "gpio-control-nand";
|
||||
reg = <1 0x0000 0x2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
gpios = <&banka 1 0 /* rdy */
|
||||
&banka 2 0 /* nce */
|
||||
&banka 3 0 /* ale */
|
||||
&banka 4 0 /* cle */
|
||||
0 /* nwp */>;
|
||||
|
||||
partition@0 {
|
||||
...
|
||||
};
|
||||
};
|
137
Documentation/devicetree/bindings/mtd/gpmc-nand.txt
Normal file
137
Documentation/devicetree/bindings/mtd/gpmc-nand.txt
Normal file
|
@ -0,0 +1,137 @@
|
|||
Device tree bindings for GPMC connected NANDs
|
||||
|
||||
GPMC connected NAND (found on OMAP boards) are represented as child nodes of
|
||||
the GPMC controller with a name of "nand".
|
||||
|
||||
All timing relevant properties as well as generic gpmc child properties are
|
||||
explained in a separate documents - please refer to
|
||||
Documentation/devicetree/bindings/bus/ti-gpmc.txt
|
||||
|
||||
For NAND specific properties such as ECC modes or bus width, please refer to
|
||||
Documentation/devicetree/bindings/mtd/nand.txt
|
||||
|
||||
|
||||
Required properties:
|
||||
|
||||
- reg: The CS line the peripheral is connected to
|
||||
|
||||
Optional properties:
|
||||
|
||||
- nand-bus-width: Set this numeric value to 16 if the hardware
|
||||
is wired that way. If not specified, a bus
|
||||
width of 8 is assumed.
|
||||
|
||||
- ti,nand-ecc-opt: A string setting the ECC layout to use. One of:
|
||||
"sw" 1-bit Hamming ecc code via software
|
||||
"hw" <deprecated> use "ham1" instead
|
||||
"hw-romcode" <deprecated> use "ham1" instead
|
||||
"ham1" 1-bit Hamming ecc code
|
||||
"bch4" 4-bit BCH ecc code
|
||||
"bch8" 8-bit BCH ecc code
|
||||
"bch16" 16-bit BCH ECC code
|
||||
Refer below "How to select correct ECC scheme for your device ?"
|
||||
|
||||
- ti,nand-xfer-type: A string setting the data transfer type. One of:
|
||||
|
||||
"prefetch-polled" Prefetch polled mode (default)
|
||||
"polled" Polled mode, without prefetch
|
||||
"prefetch-dma" Prefetch enabled sDMA mode
|
||||
"prefetch-irq" Prefetch enabled irq mode
|
||||
|
||||
- elm_id: <deprecated> use "ti,elm-id" instead
|
||||
- ti,elm-id: Specifies phandle of the ELM devicetree node.
|
||||
ELM is an on-chip hardware engine on TI SoC which is used for
|
||||
locating ECC errors for BCHx algorithms. SoC devices which have
|
||||
ELM hardware engines should specify this device node in .dtsi
|
||||
Using ELM for ECC error correction frees some CPU cycles.
|
||||
|
||||
For inline partition table parsing (optional):
|
||||
|
||||
- #address-cells: should be set to 1
|
||||
- #size-cells: should be set to 1
|
||||
|
||||
Example for an AM33xx board:
|
||||
|
||||
gpmc: gpmc@50000000 {
|
||||
compatible = "ti,am3352-gpmc";
|
||||
ti,hwmods = "gpmc";
|
||||
reg = <0x50000000 0x1000000>;
|
||||
interrupts = <100>;
|
||||
gpmc,num-cs = <8>;
|
||||
gpmc,num-waitpins = <2>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0 0x08000000 0x2000>; /* CS0: NAND */
|
||||
elm_id = <&elm>;
|
||||
|
||||
nand@0,0 {
|
||||
reg = <0 0 0>; /* CS0, offset 0 */
|
||||
nand-bus-width = <16>;
|
||||
ti,nand-ecc-opt = "bch8";
|
||||
ti,nand-xfer-type = "polled";
|
||||
|
||||
gpmc,sync-clk-ps = <0>;
|
||||
gpmc,cs-on-ns = <0>;
|
||||
gpmc,cs-rd-off-ns = <44>;
|
||||
gpmc,cs-wr-off-ns = <44>;
|
||||
gpmc,adv-on-ns = <6>;
|
||||
gpmc,adv-rd-off-ns = <34>;
|
||||
gpmc,adv-wr-off-ns = <44>;
|
||||
gpmc,we-off-ns = <40>;
|
||||
gpmc,oe-off-ns = <54>;
|
||||
gpmc,access-ns = <64>;
|
||||
gpmc,rd-cycle-ns = <82>;
|
||||
gpmc,wr-cycle-ns = <82>;
|
||||
gpmc,wr-access-ns = <40>;
|
||||
gpmc,wr-data-mux-bus-ns = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/* partitions go here */
|
||||
};
|
||||
};
|
||||
|
||||
How to select correct ECC scheme for your device ?
|
||||
--------------------------------------------------
|
||||
Higher ECC scheme usually means better protection against bit-flips and
|
||||
increased system lifetime. However, selection of ECC scheme is dependent
|
||||
on various other factors also like;
|
||||
|
||||
(1) support of built in hardware engines.
|
||||
Some legacy OMAP SoC do not have ELM harware engine, so those SoC cannot
|
||||
support ecc-schemes with hardware error-correction (BCHx_HW). However
|
||||
such SoC can use ecc-schemes with software library for error-correction
|
||||
(BCHx_HW_DETECTION_SW). The error correction capability with software
|
||||
library remains equivalent to their hardware counter-part, but there is
|
||||
slight CPU penalty when too many bit-flips are detected during reads.
|
||||
|
||||
(2) Device parameters like OOBSIZE.
|
||||
Other factor which governs the selection of ecc-scheme is oob-size.
|
||||
Higher ECC schemes require more OOB/Spare area to store ECC syndrome,
|
||||
so the device should have enough free bytes available its OOB/Spare
|
||||
area to accommodate ECC for entire page. In general following expression
|
||||
helps in determining if given device can accommodate ECC syndrome:
|
||||
"2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE"
|
||||
where
|
||||
OOBSIZE number of bytes in OOB/spare area
|
||||
PAGESIZE number of bytes in main-area of device page
|
||||
ECC_BYTES number of ECC bytes generated to protect
|
||||
512 bytes of data, which is:
|
||||
'3' for HAM1_xx ecc schemes
|
||||
'7' for BCH4_xx ecc schemes
|
||||
'14' for BCH8_xx ecc schemes
|
||||
'26' for BCH16_xx ecc schemes
|
||||
|
||||
Example(a): For a device with PAGESIZE = 2048 and OOBSIZE = 64 and
|
||||
trying to use BCH16 (ECC_BYTES=26) ecc-scheme.
|
||||
Number of ECC bytes per page = (2 + (2048 / 512) * 26) = 106 B
|
||||
which is greater than capacity of NAND device (OOBSIZE=64)
|
||||
Hence, BCH16 cannot be supported on given device. But it can
|
||||
probably use lower ecc-schemes like BCH8.
|
||||
|
||||
Example(b): For a device with PAGESIZE = 2048 and OOBSIZE = 128 and
|
||||
trying to use BCH16 (ECC_BYTES=26) ecc-scheme.
|
||||
Number of ECC bytes per page = (2 + (2048 / 512) * 26) = 106 B
|
||||
which can be accommodated in the OOB/Spare area of this device
|
||||
(OOBSIZE=128). So this device can use BCH16 ecc-scheme.
|
98
Documentation/devicetree/bindings/mtd/gpmc-nor.txt
Normal file
98
Documentation/devicetree/bindings/mtd/gpmc-nor.txt
Normal file
|
@ -0,0 +1,98 @@
|
|||
Device tree bindings for NOR flash connect to TI GPMC
|
||||
|
||||
NOR flash connected to the TI GPMC (found on OMAP boards) are represented as
|
||||
child nodes of the GPMC controller with a name of "nor".
|
||||
|
||||
All timing relevant properties as well as generic GPMC child properties are
|
||||
explained in a separate documents. Please refer to
|
||||
Documentation/devicetree/bindings/bus/ti-gpmc.txt
|
||||
|
||||
Required properties:
|
||||
- bank-width: Width of NOR flash in bytes. GPMC supports 8-bit and
|
||||
16-bit devices and so must be either 1 or 2 bytes.
|
||||
- compatible: Documentation/devicetree/bindings/mtd/mtd-physmap.txt
|
||||
- gpmc,cs-on-ns: Chip-select assertion time
|
||||
- gpmc,cs-rd-off-ns: Chip-select de-assertion time for reads
|
||||
- gpmc,cs-wr-off-ns: Chip-select de-assertion time for writes
|
||||
- gpmc,oe-on-ns: Output-enable assertion time
|
||||
- gpmc,oe-off-ns: Output-enable de-assertion time
|
||||
- gpmc,we-on-ns Write-enable assertion time
|
||||
- gpmc,we-off-ns: Write-enable de-assertion time
|
||||
- gpmc,access-ns: Start cycle to first data capture (read access)
|
||||
- gpmc,rd-cycle-ns: Total read cycle time
|
||||
- gpmc,wr-cycle-ns: Total write cycle time
|
||||
- linux,mtd-name: Documentation/devicetree/bindings/mtd/mtd-physmap.txt
|
||||
- reg: Chip-select, base address (relative to chip-select)
|
||||
and size of NOR flash. Note that base address will be
|
||||
typically 0 as this is the start of the chip-select.
|
||||
|
||||
Optional properties:
|
||||
- gpmc,XXX Additional GPMC timings and settings parameters. See
|
||||
Documentation/devicetree/bindings/bus/ti-gpmc.txt
|
||||
|
||||
Optional properties for partition table parsing:
|
||||
- #address-cells: should be set to 1
|
||||
- #size-cells: should be set to 1
|
||||
|
||||
Example:
|
||||
|
||||
gpmc: gpmc@6e000000 {
|
||||
compatible = "ti,omap3430-gpmc", "simple-bus";
|
||||
ti,hwmods = "gpmc";
|
||||
reg = <0x6e000000 0x1000>;
|
||||
interrupts = <20>;
|
||||
gpmc,num-cs = <8>;
|
||||
gpmc,num-waitpins = <4>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
|
||||
ranges = <0 0 0x10000000 0x08000000>;
|
||||
|
||||
nor@0,0 {
|
||||
compatible = "cfi-flash";
|
||||
linux,mtd-name= "intel,pf48f6000m0y1be";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0 0 0x08000000>;
|
||||
bank-width = <2>;
|
||||
|
||||
gpmc,mux-add-data;
|
||||
gpmc,cs-on-ns = <0>;
|
||||
gpmc,cs-rd-off-ns = <186>;
|
||||
gpmc,cs-wr-off-ns = <186>;
|
||||
gpmc,adv-on-ns = <12>;
|
||||
gpmc,adv-rd-off-ns = <48>;
|
||||
gpmc,adv-wr-off-ns = <48>;
|
||||
gpmc,oe-on-ns = <54>;
|
||||
gpmc,oe-off-ns = <168>;
|
||||
gpmc,we-on-ns = <54>;
|
||||
gpmc,we-off-ns = <168>;
|
||||
gpmc,rd-cycle-ns = <186>;
|
||||
gpmc,wr-cycle-ns = <186>;
|
||||
gpmc,access-ns = <114>;
|
||||
gpmc,page-burst-access-ns = <6>;
|
||||
gpmc,bus-turnaround-ns = <12>;
|
||||
gpmc,cycle2cycle-delay-ns = <18>;
|
||||
gpmc,wr-data-mux-bus-ns = <90>;
|
||||
gpmc,wr-access-ns = <186>;
|
||||
gpmc,cycle2cycle-samecsen;
|
||||
gpmc,cycle2cycle-diffcsen;
|
||||
|
||||
partition@0 {
|
||||
label = "bootloader-nor";
|
||||
reg = <0 0x40000>;
|
||||
};
|
||||
partition@0x40000 {
|
||||
label = "params-nor";
|
||||
reg = <0x40000 0x40000>;
|
||||
};
|
||||
partition@0x80000 {
|
||||
label = "kernel-nor";
|
||||
reg = <0x80000 0x200000>;
|
||||
};
|
||||
partition@0x280000 {
|
||||
label = "filesystem-nor";
|
||||
reg = <0x240000 0x7d80000>;
|
||||
};
|
||||
};
|
||||
};
|
46
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
Normal file
46
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
Normal file
|
@ -0,0 +1,46 @@
|
|||
Device tree bindings for GPMC connected OneNANDs
|
||||
|
||||
GPMC connected OneNAND (found on OMAP boards) are represented as child nodes of
|
||||
the GPMC controller with a name of "onenand".
|
||||
|
||||
All timing relevant properties as well as generic gpmc child properties are
|
||||
explained in a separate documents - please refer to
|
||||
Documentation/devicetree/bindings/bus/ti-gpmc.txt
|
||||
|
||||
Required properties:
|
||||
|
||||
- reg: The CS line the peripheral is connected to
|
||||
- gpmc,device-width Width of the ONENAND device connected to the GPMC
|
||||
in bytes. Must be 1 or 2.
|
||||
|
||||
Optional properties:
|
||||
|
||||
- dma-channel: DMA Channel index
|
||||
|
||||
For inline partition table parsing (optional):
|
||||
|
||||
- #address-cells: should be set to 1
|
||||
- #size-cells: should be set to 1
|
||||
|
||||
Example for an OMAP3430 board:
|
||||
|
||||
gpmc: gpmc@6e000000 {
|
||||
compatible = "ti,omap3430-gpmc";
|
||||
ti,hwmods = "gpmc";
|
||||
reg = <0x6e000000 0x1000000>;
|
||||
interrupts = <20>;
|
||||
gpmc,num-cs = <8>;
|
||||
gpmc,num-waitpins = <4>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
|
||||
onenand@0 {
|
||||
reg = <0 0 0>; /* CS0, offset 0 */
|
||||
gpmc,device-width = <2>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/* partitions go here */
|
||||
};
|
||||
};
|
58
Documentation/devicetree/bindings/mtd/gpmi-nand.txt
Normal file
58
Documentation/devicetree/bindings/mtd/gpmi-nand.txt
Normal file
|
@ -0,0 +1,58 @@
|
|||
* Freescale General-Purpose Media Interface (GPMI)
|
||||
|
||||
The GPMI nand controller provides an interface to control the
|
||||
NAND flash chips. We support only one NAND chip now.
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "fsl,<chip>-gpmi-nand"
|
||||
- reg : should contain registers location and length for gpmi and bch.
|
||||
- reg-names: Should contain the reg names "gpmi-nand" and "bch"
|
||||
- interrupts : BCH interrupt number.
|
||||
- interrupt-names : Should be "bch".
|
||||
- dmas: DMA specifier, consisting of a phandle to DMA controller node
|
||||
and GPMI DMA channel ID.
|
||||
Refer to dma.txt and fsl-mxs-dma.txt for details.
|
||||
- dma-names: Must be "rx-tx".
|
||||
|
||||
Optional properties:
|
||||
- nand-on-flash-bbt: boolean to enable on flash bbt option if not
|
||||
present false
|
||||
- fsl,use-minimum-ecc: Protect this NAND flash with the minimum ECC
|
||||
strength required. The required ECC strength is
|
||||
automatically discoverable for some flash
|
||||
(e.g., according to the ONFI standard).
|
||||
However, note that if this strength is not
|
||||
discoverable or this property is not enabled,
|
||||
the software may chooses an implementation-defined
|
||||
ECC scheme.
|
||||
- fsl,no-blockmark-swap: Don't swap the bad block marker from the OOB
|
||||
area with the byte in the data area but rely on the
|
||||
flash based BBT for identifying bad blocks.
|
||||
NOTE: this is only valid in conjunction with
|
||||
'nand-on-flash-bbt'.
|
||||
WARNING: on i.MX28 blockmark swapping cannot be
|
||||
disabled for the BootROM in the FCB. Thus,
|
||||
partitions written from Linux with this feature
|
||||
turned on may not be accessible by the BootROM
|
||||
code.
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
||||
|
||||
Examples:
|
||||
|
||||
gpmi-nand@8000c000 {
|
||||
compatible = "fsl,imx28-gpmi-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0x8000c000 2000>, <0x8000a000 2000>;
|
||||
reg-names = "gpmi-nand", "bch";
|
||||
interrupts = <41>;
|
||||
interrupt-names = "bch";
|
||||
dmas = <&dma_apbh 4>;
|
||||
dma-names = "rx-tx";
|
||||
|
||||
partition@0 {
|
||||
...
|
||||
};
|
||||
};
|
50
Documentation/devicetree/bindings/mtd/lpc32xx-mlc.txt
Normal file
50
Documentation/devicetree/bindings/mtd/lpc32xx-mlc.txt
Normal file
|
@ -0,0 +1,50 @@
|
|||
NXP LPC32xx SoC NAND MLC controller
|
||||
|
||||
Required properties:
|
||||
- compatible: "nxp,lpc3220-mlc"
|
||||
- reg: Address and size of the controller
|
||||
- interrupts: The NAND interrupt specification
|
||||
- gpios: GPIO specification for NAND write protect
|
||||
|
||||
The following required properties are very controller specific. See the LPC32xx
|
||||
User Manual 7.5.14 MLC NAND Timing Register (the values here are specified in
|
||||
Hz, to make them independent of actual clock speed and to provide for good
|
||||
accuracy:)
|
||||
- nxp,tcea_delay: TCEA_DELAY
|
||||
- nxp,busy_delay: BUSY_DELAY
|
||||
- nxp,nand_ta: NAND_TA
|
||||
- nxp,rd_high: RD_HIGH
|
||||
- nxp,rd_low: RD_LOW
|
||||
- nxp,wr_high: WR_HIGH
|
||||
- nxp,wr_low: WR_LOW
|
||||
|
||||
Optional subnodes:
|
||||
- Partitions, see Documentation/devicetree/bindings/mtd/partition.txt
|
||||
|
||||
Example:
|
||||
|
||||
mlc: flash@200A8000 {
|
||||
compatible = "nxp,lpc3220-mlc";
|
||||
reg = <0x200A8000 0x11000>;
|
||||
interrupts = <11 0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
nxp,tcea-delay = <333333333>;
|
||||
nxp,busy-delay = <10000000>;
|
||||
nxp,nand-ta = <18181818>;
|
||||
nxp,rd-high = <31250000>;
|
||||
nxp,rd-low = <45454545>;
|
||||
nxp,wr-high = <40000000>;
|
||||
nxp,wr-low = <83333333>;
|
||||
gpios = <&gpio 5 19 1>; /* GPO_P3 19, active low */
|
||||
|
||||
mtd0@00000000 {
|
||||
label = "boot";
|
||||
reg = <0x00000000 0x00064000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
...
|
||||
|
||||
};
|
52
Documentation/devicetree/bindings/mtd/lpc32xx-slc.txt
Normal file
52
Documentation/devicetree/bindings/mtd/lpc32xx-slc.txt
Normal file
|
@ -0,0 +1,52 @@
|
|||
NXP LPC32xx SoC NAND SLC controller
|
||||
|
||||
Required properties:
|
||||
- compatible: "nxp,lpc3220-slc"
|
||||
- reg: Address and size of the controller
|
||||
- nand-on-flash-bbt: Use bad block table on flash
|
||||
- gpios: GPIO specification for NAND write protect
|
||||
|
||||
The following required properties are very controller specific. See the LPC32xx
|
||||
User Manual:
|
||||
- nxp,wdr-clks: Delay before Ready signal is tested on write (W_RDY)
|
||||
- nxp,rdr-clks: Delay before Ready signal is tested on read (R_RDY)
|
||||
(The following values are specified in Hz, to make them independent of actual
|
||||
clock speed:)
|
||||
- nxp,wwidth: Write pulse width (W_WIDTH)
|
||||
- nxp,whold: Write hold time (W_HOLD)
|
||||
- nxp,wsetup: Write setup time (W_SETUP)
|
||||
- nxp,rwidth: Read pulse width (R_WIDTH)
|
||||
- nxp,rhold: Read hold time (R_HOLD)
|
||||
- nxp,rsetup: Read setup time (R_SETUP)
|
||||
|
||||
Optional subnodes:
|
||||
- Partitions, see Documentation/devicetree/bindings/mtd/partition.txt
|
||||
|
||||
Example:
|
||||
|
||||
slc: flash@20020000 {
|
||||
compatible = "nxp,lpc3220-slc";
|
||||
reg = <0x20020000 0x1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
nxp,wdr-clks = <14>;
|
||||
nxp,wwidth = <40000000>;
|
||||
nxp,whold = <100000000>;
|
||||
nxp,wsetup = <100000000>;
|
||||
nxp,rdr-clks = <14>;
|
||||
nxp,rwidth = <40000000>;
|
||||
nxp,rhold = <66666666>;
|
||||
nxp,rsetup = <100000000>;
|
||||
nand-on-flash-bbt;
|
||||
gpios = <&gpio 5 19 1>; /* GPO_P3 19, active low */
|
||||
|
||||
mtd0@00000000 {
|
||||
label = "phy3250-boot";
|
||||
reg = <0x00000000 0x00064000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
...
|
||||
|
||||
};
|
29
Documentation/devicetree/bindings/mtd/m25p80.txt
Normal file
29
Documentation/devicetree/bindings/mtd/m25p80.txt
Normal file
|
@ -0,0 +1,29 @@
|
|||
* MTD SPI driver for ST M25Pxx (and similar) serial flash chips
|
||||
|
||||
Required properties:
|
||||
- #address-cells, #size-cells : Must be present if the device has sub-nodes
|
||||
representing partitions.
|
||||
- compatible : Should be the manufacturer and the name of the chip. Bear in mind
|
||||
the DT binding is not Linux-only, but in case of Linux, see the
|
||||
"spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c for the list
|
||||
of supported chips.
|
||||
- reg : Chip-Select number
|
||||
- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
|
||||
|
||||
Optional properties:
|
||||
- m25p,fast-read : Use the "fast read" opcode to read data from the chip instead
|
||||
of the usual "read" opcode. This opcode is not supported by
|
||||
all chips and support for it can not be detected at runtime.
|
||||
Refer to your chips' datasheet to check if this is supported
|
||||
by your chip.
|
||||
|
||||
Example:
|
||||
|
||||
flash: m25p80@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "spansion,m25p80";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <40000000>;
|
||||
m25p,fast-read;
|
||||
};
|
84
Documentation/devicetree/bindings/mtd/mtd-physmap.txt
Normal file
84
Documentation/devicetree/bindings/mtd/mtd-physmap.txt
Normal file
|
@ -0,0 +1,84 @@
|
|||
CFI or JEDEC memory-mapped NOR flash, MTD-RAM (NVRAM...)
|
||||
|
||||
Flash chips (Memory Technology Devices) are often used for solid state
|
||||
file systems on embedded devices.
|
||||
|
||||
- compatible : should contain the specific model of mtd chip(s)
|
||||
used, if known, followed by either "cfi-flash", "jedec-flash",
|
||||
"mtd-ram" or "mtd-rom".
|
||||
- reg : Address range(s) of the mtd chip(s)
|
||||
It's possible to (optionally) define multiple "reg" tuples so that
|
||||
non-identical chips can be described in one node.
|
||||
- bank-width : Width (in bytes) of the bank. Equal to the
|
||||
device width times the number of interleaved chips.
|
||||
- device-width : (optional) Width of a single mtd chip. If
|
||||
omitted, assumed to be equal to 'bank-width'.
|
||||
- #address-cells, #size-cells : Must be present if the device has
|
||||
sub-nodes representing partitions (see below). In this case
|
||||
both #address-cells and #size-cells must be equal to 1.
|
||||
- no-unaligned-direct-access: boolean to disable the default direct
|
||||
mapping of the flash.
|
||||
On some platforms (e.g. MPC5200) a direct 1:1 mapping may cause
|
||||
problems with JFFS2 usage, as the local bus (LPB) doesn't support
|
||||
unaligned accesses as implemented in the JFFS2 code via memcpy().
|
||||
By defining "no-unaligned-direct-access", the flash will not be
|
||||
exposed directly to the MTD users (e.g. JFFS2) any more.
|
||||
- linux,mtd-name: allow to specify the mtd name for retro capability with
|
||||
physmap-flash drivers as boot loader pass the mtd partition via the old
|
||||
device name physmap-flash.
|
||||
- use-advanced-sector-protection: boolean to enable support for the
|
||||
advanced sector protection (Spansion: PPB - Persistent Protection
|
||||
Bits) locking.
|
||||
|
||||
For JEDEC compatible devices, the following additional properties
|
||||
are defined:
|
||||
|
||||
- vendor-id : Contains the flash chip's vendor id (1 byte).
|
||||
- device-id : Contains the flash chip's device id (1 byte).
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
||||
|
||||
Example:
|
||||
|
||||
flash@ff000000 {
|
||||
compatible = "amd,am29lv128ml", "cfi-flash";
|
||||
reg = <ff000000 01000000>;
|
||||
bank-width = <4>;
|
||||
device-width = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
fs@0 {
|
||||
label = "fs";
|
||||
reg = <0 f80000>;
|
||||
};
|
||||
firmware@f80000 {
|
||||
label ="firmware";
|
||||
reg = <f80000 80000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
|
||||
Here an example with multiple "reg" tuples:
|
||||
|
||||
flash@f0000000,0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "intel,PC48F4400P0VB", "cfi-flash";
|
||||
reg = <0 0x00000000 0x02000000
|
||||
0 0x02000000 0x02000000>;
|
||||
bank-width = <2>;
|
||||
partition@0 {
|
||||
label = "test-part1";
|
||||
reg = <0 0x04000000>;
|
||||
};
|
||||
};
|
||||
|
||||
An example using SRAM:
|
||||
|
||||
sram@2,0 {
|
||||
compatible = "samsung,k6f1616u6a", "mtd-ram";
|
||||
reg = <2 0 0x00200000>;
|
||||
bank-width = <2>;
|
||||
};
|
||||
|
19
Documentation/devicetree/bindings/mtd/mxc-nand.txt
Normal file
19
Documentation/devicetree/bindings/mtd/mxc-nand.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
* Freescale's mxc_nand
|
||||
|
||||
Required properties:
|
||||
- compatible: "fsl,imxXX-nand"
|
||||
- reg: address range of the nfc block
|
||||
- interrupts: irq to be used
|
||||
- nand-bus-width: see nand.txt
|
||||
- nand-ecc-mode: see nand.txt
|
||||
- nand-on-flash-bbt: see nand.txt
|
||||
|
||||
Example:
|
||||
|
||||
nand@d8000000 {
|
||||
compatible = "fsl,imx27-nand";
|
||||
reg = <0xd8000000 0x1000>;
|
||||
interrupts = <29>;
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-mode = "hw";
|
||||
};
|
21
Documentation/devicetree/bindings/mtd/nand.txt
Normal file
21
Documentation/devicetree/bindings/mtd/nand.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
* MTD generic binding
|
||||
|
||||
- nand-ecc-mode : String, operation mode of the NAND ecc mode.
|
||||
Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first",
|
||||
"soft_bch".
|
||||
- nand-bus-width : 8 or 16 bus width if not present 8
|
||||
- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
|
||||
|
||||
- nand-ecc-strength: integer representing the number of bits to correct
|
||||
per ECC step.
|
||||
|
||||
- nand-ecc-step-size: integer representing the number of data bytes
|
||||
that are covered by a single ECC step.
|
||||
|
||||
The ECC strength and ECC step size properties define the correction capability
|
||||
of a controller. Together, they say a controller can correct "{strength} bit
|
||||
errors per {size} bytes".
|
||||
|
||||
The interpretation of these parameters is implementation-defined, so not all
|
||||
implementations must support all possible combinations. However, implementations
|
||||
are encouraged to further specify the value(s) they support.
|
50
Documentation/devicetree/bindings/mtd/orion-nand.txt
Normal file
50
Documentation/devicetree/bindings/mtd/orion-nand.txt
Normal file
|
@ -0,0 +1,50 @@
|
|||
NAND support for Marvell Orion SoC platforms
|
||||
|
||||
Required properties:
|
||||
- compatible : "marvell,orion-nand".
|
||||
- reg : Base physical address of the NAND and length of memory mapped
|
||||
region
|
||||
|
||||
Optional properties:
|
||||
- cle : Address line number connected to CLE. Default is 0
|
||||
- ale : Address line number connected to ALE. Default is 1
|
||||
- bank-width : Width in bytes of the device. Default is 1
|
||||
- chip-delay : Chip dependent delay for transferring data from array to read
|
||||
registers in usecs
|
||||
|
||||
The device tree may optionally contain sub-nodes describing partitions of the
|
||||
address space. See partition.txt for more detail.
|
||||
|
||||
Example:
|
||||
|
||||
nand@f4000000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
cle = <0>;
|
||||
ale = <1>;
|
||||
bank-width = <1>;
|
||||
chip-delay = <25>;
|
||||
compatible = "marvell,orion-nand";
|
||||
reg = <0xf4000000 0x400>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0000000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "uImage";
|
||||
reg = <0x0100000 0x200000>;
|
||||
};
|
||||
|
||||
partition@300000 {
|
||||
label = "dtb";
|
||||
reg = <0x0300000 0x100000>;
|
||||
};
|
||||
|
||||
partition@400000 {
|
||||
label = "root";
|
||||
reg = <0x0400000 0x7d00000>;
|
||||
};
|
||||
};
|
71
Documentation/devicetree/bindings/mtd/partition.txt
Normal file
71
Documentation/devicetree/bindings/mtd/partition.txt
Normal file
|
@ -0,0 +1,71 @@
|
|||
Representing flash partitions in devicetree
|
||||
|
||||
Partitions can be represented by sub-nodes of an mtd device. This can be used
|
||||
on platforms which have strong conventions about which portions of a flash are
|
||||
used for what purposes, but which don't use an on-flash partition table such
|
||||
as RedBoot.
|
||||
NOTE: if the sub-node has a compatible string, then it is not a partition.
|
||||
|
||||
#address-cells & #size-cells must both be present in the mtd device. There are
|
||||
two valid values for both:
|
||||
<1>: for partitions that require a single 32-bit cell to represent their
|
||||
size/address (aka the value is below 4 GiB)
|
||||
<2>: for partitions that require two 32-bit cells to represent their
|
||||
size/address (aka the value is 4 GiB or greater).
|
||||
|
||||
Required properties:
|
||||
- reg : The partition's offset and size within the mtd bank.
|
||||
|
||||
Optional properties:
|
||||
- label : The label / name for this partition. If omitted, the label is taken
|
||||
from the node name (excluding the unit address).
|
||||
- read-only : This parameter, if present, is a hint to Linux that this
|
||||
partition should only be mounted read-only. This is usually used for flash
|
||||
partitions containing early-boot firmware images or data which should not be
|
||||
clobbered.
|
||||
|
||||
Examples:
|
||||
|
||||
|
||||
flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0000000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
uimage@100000 {
|
||||
reg = <0x0100000 0x200000>;
|
||||
};
|
||||
};
|
||||
|
||||
flash@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <2>;
|
||||
|
||||
/* a 4 GiB partition */
|
||||
partition@0 {
|
||||
label = "filesystem";
|
||||
reg = <0x00000000 0x1 0x00000000>;
|
||||
};
|
||||
};
|
||||
|
||||
flash@2 {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
/* an 8 GiB partition */
|
||||
partition@0 {
|
||||
label = "filesystem #1";
|
||||
reg = <0x0 0x00000000 0x2 0x00000000>;
|
||||
};
|
||||
|
||||
/* a 4 GiB partition */
|
||||
partition@200000000 {
|
||||
label = "filesystem #2";
|
||||
reg = <0x2 0x00000000 0x1 0x00000000>;
|
||||
};
|
||||
};
|
43
Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
Normal file
43
Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
Normal file
|
@ -0,0 +1,43 @@
|
|||
PXA3xx NAND DT bindings
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: Should be set to one of the following:
|
||||
marvell,pxa3xx-nand
|
||||
marvell,armada370-nand
|
||||
- reg: The register base for the controller
|
||||
- interrupts: The interrupt to map
|
||||
- #address-cells: Set to <1> if the node includes partitions
|
||||
|
||||
Optional properties:
|
||||
|
||||
- marvell,nand-enable-arbiter: Set to enable the bus arbiter
|
||||
- marvell,nand-keep-config: Set to keep the NAND controller config as set
|
||||
by the bootloader
|
||||
- num-cs: Number of chipselect lines to usw
|
||||
- nand-on-flash-bbt: boolean to enable on flash bbt option if
|
||||
not present false
|
||||
- nand-ecc-strength: number of bits to correct per ECC step
|
||||
- nand-ecc-step-size: number of data bytes covered by a single ECC step
|
||||
|
||||
The following ECC strength and step size are currently supported:
|
||||
|
||||
- nand-ecc-strength = <1>, nand-ecc-step-size = <512>
|
||||
- nand-ecc-strength = <4>, nand-ecc-step-size = <512>
|
||||
- nand-ecc-strength = <8>, nand-ecc-step-size = <512>
|
||||
|
||||
Example:
|
||||
|
||||
nand0: nand@43100000 {
|
||||
compatible = "marvell,pxa3xx-nand";
|
||||
reg = <0x43100000 90>;
|
||||
interrupts = <45>;
|
||||
#address-cells = <1>;
|
||||
|
||||
marvell,nand-enable-arbiter;
|
||||
marvell,nand-keep-config;
|
||||
num-cs = <1>;
|
||||
|
||||
/* partitions (optional) */
|
||||
};
|
||||
|
31
Documentation/devicetree/bindings/mtd/spear_smi.txt
Normal file
31
Documentation/devicetree/bindings/mtd/spear_smi.txt
Normal file
|
@ -0,0 +1,31 @@
|
|||
* SPEAr SMI
|
||||
|
||||
Required properties:
|
||||
- compatible : "st,spear600-smi"
|
||||
- reg : Address range of the mtd chip
|
||||
- #address-cells, #size-cells : Must be present if the device has sub-nodes
|
||||
representing partitions.
|
||||
- interrupt-parent: Should be the phandle for the interrupt controller
|
||||
that services interrupts for this device
|
||||
- interrupts: Should contain the STMMAC interrupts
|
||||
- clock-rate : Functional clock rate of SMI in Hz
|
||||
|
||||
Optional properties:
|
||||
- st,smi-fast-mode : Flash supports read in fast mode
|
||||
|
||||
Example:
|
||||
|
||||
smi: flash@fc000000 {
|
||||
compatible = "st,spear600-smi";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0xfc000000 0x1000>;
|
||||
interrupt-parent = <&vic1>;
|
||||
interrupts = <12>;
|
||||
clock-rate = <50000000>; /* 50MHz */
|
||||
|
||||
flash@f8000000 {
|
||||
st,smi-fast-mode;
|
||||
...
|
||||
};
|
||||
};
|
26
Documentation/devicetree/bindings/mtd/st-fsm.txt
Normal file
26
Documentation/devicetree/bindings/mtd/st-fsm.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
* ST-Microelectronics SPI FSM Serial (NOR) Flash Controller
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "st,spi-fsm"
|
||||
- reg : Contains register's location and length.
|
||||
- reg-names : Should contain the reg names "spi-fsm"
|
||||
- interrupts : The interrupt number
|
||||
- pinctrl-0 : Standard Pinctrl phandle (see: pinctrl/pinctrl-bindings.txt)
|
||||
|
||||
Optional properties:
|
||||
- st,syscfg : Phandle to boot-device system configuration registers
|
||||
- st,boot-device-reg : Address of the aforementioned boot-device register(s)
|
||||
- st,boot-device-spi : Expected boot-device value if booted via this device
|
||||
|
||||
Example:
|
||||
spifsm: spifsm@fe902000{
|
||||
compatible = "st,spi-fsm";
|
||||
reg = <0xfe902000 0x1000>;
|
||||
reg-names = "spi-fsm";
|
||||
pinctrl-0 = <&pinctrl_fsm>;
|
||||
st,syscfg = <&syscfg_rear>;
|
||||
st,boot-device-reg = <0x958>;
|
||||
st,boot-device-spi = <0x1a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue