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  - Han Xu <han.xu@nxp.com>
11  - Kuldeep Singh <singh.kuldeep87k@gmail.com>
12
13allOf:
14  - $ref: spi-controller.yaml#
15
16properties:
17  compatible:
18    enum:
19      - nxp,imx8dxl-fspi
20      - nxp,imx8mm-fspi
21      - nxp,imx8mp-fspi
22      - nxp,imx8qxp-fspi
23      - nxp,lx2160a-fspi
24
25  reg:
26    items:
27      - description: registers address space
28      - description: memory mapped address space
29
30  reg-names:
31    items:
32      - const: fspi_base
33      - const: fspi_mmap
34
35  interrupts:
36    maxItems: 1
37
38  clocks:
39    items:
40      - description: SPI bus clock
41      - description: SPI serial clock
42
43  clock-names:
44    items:
45      - const: fspi_en
46      - const: fspi
47
48  power-domains:
49    maxItems: 1
50
51required:
52  - compatible
53  - reg
54  - reg-names
55  - interrupts
56  - clocks
57  - clock-names
58
59unevaluatedProperties: false
60
61examples:
62  - |
63    #include <dt-bindings/interrupt-controller/arm-gic.h>
64    #include <dt-bindings/clock/fsl,qoriq-clockgen.h>
65
66    soc {
67        #address-cells = <2>;
68        #size-cells = <2>;
69
70        spi@20c0000 {
71            compatible = "nxp,lx2160a-fspi";
72            reg = <0x0 0x20c0000 0x0 0x100000>,
73                  <0x0 0x20000000 0x0 0x10000000>;
74            reg-names = "fspi_base", "fspi_mmap";
75            interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
76            clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>,
77                     <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>;
78            clock-names = "fspi_en", "fspi";
79            #address-cells = <1>;
80            #size-cells = <0>;
81
82            flash@0 {
83                compatible = "jedec,spi-nor";
84                spi-max-frequency = <50000000>;
85                reg = <0>;
86                spi-rx-bus-width = <8>;
87                spi-tx-bus-width = <8>;
88            };
89        };
90    };
91