mtd: rawnand: tegra: add devicetree binding
Subsystems (4)
PATCH v2 2/6 mtd: rawnand: tegra: add devicetree binding
From: Lucas Stach <[email protected]>
This adds the devicetree binding for the Tegra 2 NAND flash controller.
--- .../bindings/mtd/nvidia,tegra20-nand.txt | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +62 -0
@@ -0,0 +1,62 @@ +NVIDIA Tegra NAND Flash controller + +Required properties: +- compatible: Must be one of: + - "nvidia,tegra20-nand" +- reg: MMIO address range +- interrupts: interrupt output of the NFC controller +- clocks: Must contain an entry for each entry in clock-names. + See ../clocks/clock-bindings.txt for details. +- clock-names: Must include the following entries: + - nand +- resets: Must contain an entry for each entry in reset-names. + See ../reset/reset.txt for details. +- reset-names: Must include the following entries: + - nand + +Optional children nodes: +Individual NAND chips are children of the NAND controller node. Currently +only one NAND chip supported. + +Required children node properties: +- reg: An integer ranging from 1 to 6 representing the CS line to use. + +Optional children node properties: +- nand-ecc-mode: String, operation mode of the NAND ecc mode. "hw" by default +- nand-ecc-algo: string, algorithm of NAND ECC. + Supported values are: "rs", "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. Supported strength using HW ECC modes are: + - RS: 4, 6, 8 + - BCH: 4, 8, 14, 16 +- nand-ecc-step-size: integer representing the number of data bytes + that are covered by a single ECC step. Must be 512. +- wp-gpios: GPIO specifier for the write protect pin. + +Optional child node of NAND chip nodes: +Partitions: see partition.txt + + Example: + nand@70008000 { + compatible = "nvidia,tegra20-nand"; + reg = <0x70008000 0x100>; + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&tegra_car TEGRA20_CLK_NDFLASH>; + clock-names = "nand"; + resets = <&tegra_car 13>; + reset-names = "nand"; + + nand-chip@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <1>; + nand-bus-width = <8>; + nand-on-flash-bbt; + nand-ecc-algo = "bch"; + nand-ecc-step-size = <512>; + nand-ecc-strength = <8>; + wp-gpios = <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>; + }; + };
Signature · 1 line
2.17.0
Miquel Raynal
maintainerHi Stefan,
Quoted 11 lines · Stefan Agner
From: Lucas Stach <[email protected]>
=20
This adds the devicetree binding for the Tegra 2 NAND flash controller.
=20Signed-off-by Lucas Stach <[email protected]>Signed-off-by Stefan Agner <[email protected]>--- .../bindings/mtd/nvidia,tegra20-nand.txt | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/nvidia,tegra20-=
nand.txt
Review
Quoted 2 lines
=20
(quoted diff) +0
-0
t b/Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt line 4
Quoted 9 lines
new file mode 100644
index 000000000000..49e472af1b39Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +4
-0@@ -0,0 +1,62 @@ +NVIDIA Tegra NAND Flash controller + +Required properties: +- compatible: Must be one of:
Nitpick: just put the compatible here as there is only one?
Quoted 8 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +8
-0+ - "nvidia,tegra20-nand" +- reg: MMIO address range +- interrupts: interrupt output of the NFC controller +- clocks: Must contain an entry for each entry in clock-names. + See ../clocks/clock-bindings.txt for details. +- clock-names: Must include the following entries: + - nand +- resets: Must contain an entry for each entry in reset-names.
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt line 22
Quoted 10 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +10
-0+ See ../reset/reset.txt for details. +- reset-names: Must include the following entries: + - nand + +Optional children nodes: +Individual NAND chips are children of the NAND controller node. Currently +only one NAND chip supported. + +Required children node properties: +- reg: An integer ranging from 1 to 6 representing the CS line to use.
=46rom 1? It usually starts at 0.
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt
Quoted 3 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +3
-0+ +Optional children node properties: +- nand-ecc-mode: String, operation mode of the NAND ecc mode. "hw" by de=
fault
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt
Quoted 4 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +4
-0+- nand-ecc-algo: string, algorithm of NAND ECC. + Supported values are: "rs", "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 presen=
t false
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt line 35
Quoted 6 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +6
-0+- nand-ecc-strength: integer representing the number of bits to correct + per ECC step. Supported strength using HW ECC modes are: + - RS: 4, 6, 8 + - BCH: 4, 8, 14, 16 +- nand-ecc-step-size: integer representing the number of data bytes + that are covered by a single ECC step. Must be 512.
Please don't re-explain nand generic DT properties, point to nand.txt instead.
Quoted 13 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +13
-0+- wp-gpios: GPIO specifier for the write protect pin. + +Optional child node of NAND chip nodes: +Partitions: see partition.txt + + Example: + nand@70008000 { + compatible =3D "nvidia,tegra20-nand"; + reg =3D <0x70008000 0x100>; + interrupts =3D <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; + clocks =3D <&tegra_car TEGRA20_CLK_NDFLASH>; + clock-names =3D "nand"; + resets =3D <&tegra_car 13>;
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt line 58
Quoted 10 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +10
-0+ reset-names =3D "nand"; + + nand-chip@0 { + reg =3D <0>; + #address-cells =3D <1>; + #size-cells =3D <1>; + nand-bus-width =3D <8>; + nand-on-flash-bbt; + nand-ecc-algo =3D "bch"; + nand-ecc-step-size =3D <512>;
In the driver you only refer to step sizes of 512 B, you can remove the property from the bindings.
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt line 62
Quoted 4 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +4
-0+ nand-ecc-strength =3D <8>; + wp-gpios =3D <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>; + }; + };
--=20
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Rob Herring
maintainerQuoted 17 lines · Miquel Raynal
Hi Stefan,
Quoted 12 lines · Stefan Agner
From: Lucas Stach <[email protected]>
This adds the devicetree binding for the Tegra 2 NAND flash controller.
Signed-off-by Lucas Stach <[email protected]>Signed-off-by Stefan Agner <[email protected]>--- .../bindings/mtd/nvidia,tegra20-nand.txt | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt
Quoted 12 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt line 4
Quoted 10 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +4
-0@@ -0,0 +1,62 @@ +NVIDIA Tegra NAND Flash controller + +Required properties: +- compatible: Must be one of:Nitpick: just put the compatible here as there is only one?
No, this is how I ask people to format it.
Rob
Miquel Raynal
maintainerHi Rob,
Quoted 6 lines · Rob Herring
Quoted 5 lines · Miquel Raynal
Hi Stefan,
=20
On Sun, 27 May 2018 23:54:38 +0200, Stefan Agner <[email protected]> wrote:
=20
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
From: Lucas Stach <[email protected]>
=20
This adds the devicetree binding for the Tegra 2 NAND flash controller.
=20Signed-off-by Lucas Stach <[email protected]>Signed-off-by Stefan Agner <[email protected]>---
.../bindings/mtd/nvidia,tegra20-nand.txt| 62 +++++++++++++++++=
++
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/nvidia,tegr=
a20-nand.txt
Quoted 2 lines
Quoted 2 lines
Review
Quoted 2 lines
=20
(quoted diff) +0
-0
d.txt b/Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt
Quoted 11 lines
Quoted 11 lines
Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt line 4
Quoted 9 lines
new file mode 100644
index 000000000000..49e472af1b39Documentation/devicetree/bindings/mtd/nvidia,tegra20-nand.txt new file +4
-0@@ -0,0 +1,62 @@ +NVIDIA Tegra NAND Flash controller + +Required properties: +- compatible: Must be one of: =20=20
Nitpick: just put the compatible here as there is only one? =20
Quoted 2 lines
=20
No, this is how I ask people to format it.
Oh, ok, I'll remember it for my own DT patches then :)
Thanks,
Miqu=C3=A8l