Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mtd: convert vf610-nfc to yaml format

Convert binding doc vf610-nfc to yaml format.

Additional changes:
- ref to nand-controller.yaml.
- include arm-gic.h and vf610-clock.h in examples.
- add clocks and clock-names description.
- remove #address-cells, #size-cells assigned-clocks and
assigned-clock-rates.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

authored by

Frank Li and committed by
Miquel Raynal
78693ff6 0af2f6be

+89 -59
+89
Documentation/devicetree/bindings/mtd/fsl,vf610-nfc.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mtd/fsl,vf610-nfc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale's NAND flash controller (NFC) 8 + 9 + description: 10 + This variant of the Freescale NAND flash controller (NFC) can be found on 11 + Vybrid (vf610), MPC5125, MCF54418 and Kinetis K70. 12 + 13 + maintainers: 14 + - Frank Li <Frank.Li@nxp.com> 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - fsl,vf610-nfc 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + clocks: 28 + maxItems: 1 29 + 30 + clock-names: 31 + items: 32 + - const: nfc 33 + 34 + patternProperties: 35 + "^nand@[a-f0-9]$": 36 + type: object 37 + $ref: raw-nand-chip.yaml 38 + 39 + properties: 40 + compatible: 41 + const: fsl,vf610-nfc-nandcs 42 + 43 + reg: 44 + const: 0 45 + 46 + nand-ecc-strength: 47 + enum: [24, 32] 48 + 49 + nand-ecc-step-size: 50 + const: 2048 51 + 52 + unevaluatedProperties: false 53 + 54 + required: 55 + - compatible 56 + - reg 57 + - interrupts 58 + 59 + allOf: 60 + - $ref: nand-controller.yaml 61 + 62 + unevaluatedProperties: false 63 + 64 + examples: 65 + - | 66 + #include <dt-bindings/interrupt-controller/arm-gic.h> 67 + #include <dt-bindings/clock/vf610-clock.h> 68 + 69 + nand-controller@400e0000 { 70 + compatible = "fsl,vf610-nfc"; 71 + reg = <0x400e0000 0x4000>; 72 + #address-cells = <1>; 73 + #size-cells = <0>; 74 + interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 75 + clocks = <&clks VF610_CLK_NFC>; 76 + clock-names = "nfc"; 77 + assigned-clocks = <&clks VF610_CLK_NFC>; 78 + assigned-clock-rates = <33000000>; 79 + 80 + nand@0 { 81 + compatible = "fsl,vf610-nfc-nandcs"; 82 + reg = <0>; 83 + nand-bus-width = <8>; 84 + nand-ecc-mode = "hw"; 85 + nand-ecc-strength = <32>; 86 + nand-ecc-step-size = <2048>; 87 + nand-on-flash-bbt; 88 + }; 89 + };
-59
Documentation/devicetree/bindings/mtd/vf610-nfc.txt
··· 1 - Freescale's NAND flash controller (NFC) 2 - 3 - This variant of the Freescale NAND flash controller (NFC) can be found on 4 - Vybrid (vf610), MPC5125, MCF54418 and Kinetis K70. 5 - 6 - Required properties: 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 15 - in a board stuffing. Typical NAND memory timings derived from this 16 - clock are found in the SoC hardware reference manual. Furthermore, 17 - there might be restrictions on maximum rates when using hardware ECC. 18 - 19 - - #address-cells, #size-cells : Must be present if the device has sub-nodes 20 - representing partitions. 21 - 22 - Required children nodes: 23 - Children nodes represent the available nand chips. Currently the driver can 24 - only handle one NAND chip. 25 - 26 - Required properties: 27 - - compatible: Should be set to "fsl,vf610-nfc-cs". 28 - - nand-bus-width: see nand-controller.yaml 29 - - nand-ecc-mode: see nand-controller.yaml 30 - 31 - Required properties for hardware ECC: 32 - - nand-ecc-strength: supported strengths are 24 and 32 bit (see nand-controller.yaml) 33 - - nand-ecc-step-size: step size equals page size, currently only 2k pages are 34 - supported 35 - - nand-on-flash-bbt: see nand-controller.yaml 36 - 37 - Example: 38 - 39 - nfc: nand@400e0000 { 40 - compatible = "fsl,vf610-nfc"; 41 - #address-cells = <1>; 42 - #size-cells = <0>; 43 - reg = <0x400e0000 0x4000>; 44 - interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 45 - clocks = <&clks VF610_CLK_NFC>; 46 - clock-names = "nfc"; 47 - assigned-clocks = <&clks VF610_CLK_NFC>; 48 - assigned-clock-rates = <33000000>; 49 - 50 - nand@0 { 51 - compatible = "fsl,vf610-nfc-nandcs"; 52 - reg = <0>; 53 - nand-bus-width = <8>; 54 - nand-ecc-mode = "hw"; 55 - nand-ecc-strength = <32>; 56 - nand-ecc-step-size = <2048>; 57 - nand-on-flash-bbt; 58 - }; 59 - };