1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/spi/spi-nxp-fspi.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NXP Flex Serial Peripheral Interface (FSPI)
8
9maintainers:
10  - Kuldeep Singh <kuldeep.singh@nxp.com>
11
12allOf:
13  - $ref: "spi-controller.yaml#"
14
15properties:
16  compatible:
17    enum:
18      - nxp,imx8dxl-fspi
19      - nxp,imx8mm-fspi
20      - nxp,imx8mp-fspi
21      - nxp,imx8qxp-fspi
22      - nxp,lx2160a-fspi
23
24  reg:
25    items:
26      - description: registers address space
27      - description: memory mapped address space
28
29  reg-names:
30    items:
31      - const: fspi_base
32      - const: fspi_mmap
33
34  interrupts:
35    maxItems: 1
36
37  clocks:
38    items:
39      - description: SPI bus clock
40      - description: SPI serial clock
41
42  clock-names:
43    items:
44      - const: fspi_en
45      - const: fspi
46
47required:
48  - compatible
49  - reg
50  - reg-names
51  - interrupts
52  - clocks
53  - clock-names
54
55unevaluatedProperties: false
56
57examples:
58  - |
59    #include <dt-bindings/interrupt-controller/arm-gic.h>
60    #include <dt-bindings/clock/fsl,qoriq-clockgen.h>
61
62    soc {
63        #address-cells = <2>;
64        #size-cells = <2>;
65
66        spi@20c0000 {
67            compatible = "nxp,lx2160a-fspi";
68            reg = <0x0 0x20c0000 0x0 0x100000>,
69                  <0x0 0x20000000 0x0 0x10000000>;
70            reg-names = "fspi_base", "fspi_mmap";
71            interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
72            clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>,
73                     <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>;
74            clock-names = "fspi_en", "fspi";
75            #address-cells = <1>;
76            #size-cells = <0>;
77
78            flash@0 {
79                compatible = "jedec,spi-nor";
80                spi-max-frequency = <50000000>;
81                reg = <0>;
82                spi-rx-bus-width = <8>;
83                spi-tx-bus-width = <8>;
84            };
85        };
86    };
87