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

dt-bindings: mtd: convert nxp-spifi.txt to yaml format

Convert nxp-spifi.txt to yaml format.

Additional changes:
- ref /schemas/spi/spi-controller.yaml.
- remove label in example.
- change node name to spi in example.
- remove child node in example.

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
27b045eb 19272b37

+74 -58
+74
Documentation/devicetree/bindings/mtd/nxp,lpc1773-spifi.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/nxp,lpc1773-spifi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: NXP SPI Flash Interface (SPIFI) 8 + 9 + description: 10 + NXP SPIFI is a specialized SPI interface for serial Flash devices. 11 + It supports one Flash device with 1-, 2- and 4-bits width in SPI 12 + mode 0 or 3. The controller operates in either command or memory 13 + mode. In memory mode the Flash is accessible from the CPU as 14 + normal memory. 15 + 16 + maintainers: 17 + - Frank Li <Frank.Li@nxp.com> 18 + 19 + properties: 20 + compatible: 21 + const: nxp,lpc1773-spifi 22 + 23 + reg: 24 + maxItems: 2 25 + 26 + reg-names: 27 + items: 28 + - const: spifi 29 + - const: flash 30 + 31 + interrupts: 32 + maxItems: 1 33 + 34 + clocks: 35 + maxItems: 2 36 + 37 + clock-names: 38 + items: 39 + - const: spifi 40 + - const: reg 41 + 42 + resets: 43 + maxItems: 1 44 + 45 + spi-cpol: 46 + enum: [0, 3] 47 + 48 + required: 49 + - compatible 50 + - reg 51 + - reg-names 52 + - interrupts 53 + - clocks 54 + - clock-names 55 + 56 + allOf: 57 + - $ref: /schemas/spi/spi-controller.yaml# 58 + 59 + unevaluatedProperties: false 60 + 61 + examples: 62 + - | 63 + #include <dt-bindings/clock/lpc18xx-ccu.h> 64 + 65 + spi@40003000 { 66 + compatible = "nxp,lpc1773-spifi"; 67 + reg = <0x40003000 0x1000>, <0x14000000 0x4000000>; 68 + reg-names = "spifi", "flash"; 69 + interrupts = <30>; 70 + clocks = <&ccu1 CLK_SPIFI>, <&ccu1 CLK_CPU_SPIFI>; 71 + clock-names = "spifi", "reg"; 72 + resets = <&rgu 53>; 73 + }; 74 +
-58
Documentation/devicetree/bindings/mtd/nxp-spifi.txt
··· 1 - * NXP SPI Flash Interface (SPIFI) 2 - 3 - NXP SPIFI is a specialized SPI interface for serial Flash devices. 4 - It supports one Flash device with 1-, 2- and 4-bits width in SPI 5 - mode 0 or 3. The controller operates in either command or memory 6 - mode. In memory mode the Flash is accessible from the CPU as 7 - normal memory. 8 - 9 - Required properties: 10 - - compatible : Should be "nxp,lpc1773-spifi" 11 - - reg : the first contains the register location and length, 12 - the second contains the memory mapping address and length 13 - - reg-names: Should contain the reg names "spifi" and "flash" 14 - - interrupts : Should contain the interrupt for the device 15 - - clocks : The clocks needed by the SPIFI controller 16 - - clock-names : Should contain the clock names "spifi" and "reg" 17 - 18 - Optional properties: 19 - - resets : phandle + reset specifier 20 - 21 - The SPI Flash must be a child of the SPIFI node and must have a 22 - compatible property as specified in bindings/mtd/jedec,spi-nor.txt 23 - 24 - Optionally it can also contain the following properties. 25 - - spi-cpol : Controller only supports mode 0 and 3 so either 26 - both spi-cpol and spi-cpha should be present or 27 - none of them 28 - - spi-cpha : See above 29 - - spi-rx-bus-width : Used to select how many pins that are used 30 - for input on the controller 31 - 32 - See bindings/spi/spi-bus.txt for more information. 33 - 34 - Example: 35 - spifi: spifi@40003000 { 36 - compatible = "nxp,lpc1773-spifi"; 37 - reg = <0x40003000 0x1000>, <0x14000000 0x4000000>; 38 - reg-names = "spifi", "flash"; 39 - interrupts = <30>; 40 - clocks = <&ccu1 CLK_SPIFI>, <&ccu1 CLK_CPU_SPIFI>; 41 - clock-names = "spifi", "reg"; 42 - resets = <&rgu 53>; 43 - 44 - flash@0 { 45 - compatible = "jedec,spi-nor"; 46 - spi-cpol; 47 - spi-cpha; 48 - spi-rx-bus-width = <4>; 49 - #address-cells = <1>; 50 - #size-cells = <1>; 51 - 52 - partition@0 { 53 - label = "data"; 54 - reg = <0 0x200000>; 55 - }; 56 - }; 57 - }; 58 -