xref: /freebsd/sys/contrib/device-tree/Bindings/spi/fsl,spi-fsl-qspi.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22eb4d8dcSEmmanuel Vadot%YAML 1.2
32eb4d8dcSEmmanuel Vadot---
42eb4d8dcSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/fsl,spi-fsl-qspi.yaml#
52eb4d8dcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
62eb4d8dcSEmmanuel Vadot
72eb4d8dcSEmmanuel Vadottitle: Freescale Quad Serial Peripheral Interface (QuadSPI)
82eb4d8dcSEmmanuel Vadot
92eb4d8dcSEmmanuel Vadotmaintainers:
102eb4d8dcSEmmanuel Vadot  - Han Xu <han.xu@nxp.com>
112eb4d8dcSEmmanuel Vadot
122eb4d8dcSEmmanuel VadotallOf:
13*cb7aa33aSEmmanuel Vadot  - $ref: spi-controller.yaml#
142eb4d8dcSEmmanuel Vadot
152eb4d8dcSEmmanuel Vadotproperties:
162eb4d8dcSEmmanuel Vadot  compatible:
172eb4d8dcSEmmanuel Vadot    oneOf:
182eb4d8dcSEmmanuel Vadot      - enum:
192eb4d8dcSEmmanuel Vadot          - fsl,vf610-qspi
202eb4d8dcSEmmanuel Vadot          - fsl,imx6sx-qspi
212eb4d8dcSEmmanuel Vadot          - fsl,imx7d-qspi
222eb4d8dcSEmmanuel Vadot          - fsl,imx6ul-qspi
232eb4d8dcSEmmanuel Vadot          - fsl,ls1021a-qspi
242eb4d8dcSEmmanuel Vadot          - fsl,ls2080a-qspi
252eb4d8dcSEmmanuel Vadot      - items:
262eb4d8dcSEmmanuel Vadot          - enum:
272eb4d8dcSEmmanuel Vadot              - fsl,ls1043a-qspi
282eb4d8dcSEmmanuel Vadot          - const: fsl,ls1021a-qspi
292eb4d8dcSEmmanuel Vadot      - items:
302eb4d8dcSEmmanuel Vadot          - enum:
312eb4d8dcSEmmanuel Vadot              - fsl,imx8mq-qspi
322eb4d8dcSEmmanuel Vadot          - const: fsl,imx7d-qspi
332eb4d8dcSEmmanuel Vadot
342eb4d8dcSEmmanuel Vadot  reg:
352eb4d8dcSEmmanuel Vadot    items:
362eb4d8dcSEmmanuel Vadot      - description: registers
372eb4d8dcSEmmanuel Vadot      - description: memory mapping
382eb4d8dcSEmmanuel Vadot
392eb4d8dcSEmmanuel Vadot  reg-names:
402eb4d8dcSEmmanuel Vadot    items:
412eb4d8dcSEmmanuel Vadot      - const: QuadSPI
422eb4d8dcSEmmanuel Vadot      - const: QuadSPI-memory
432eb4d8dcSEmmanuel Vadot
442eb4d8dcSEmmanuel Vadot  interrupts:
452eb4d8dcSEmmanuel Vadot    maxItems: 1
462eb4d8dcSEmmanuel Vadot
472eb4d8dcSEmmanuel Vadot  clocks:
482eb4d8dcSEmmanuel Vadot    items:
492eb4d8dcSEmmanuel Vadot      - description: SoC SPI qspi_en clock
502eb4d8dcSEmmanuel Vadot      - description: SoC SPI qspi clock
512eb4d8dcSEmmanuel Vadot
522eb4d8dcSEmmanuel Vadot  clock-names:
532eb4d8dcSEmmanuel Vadot    items:
542eb4d8dcSEmmanuel Vadot      - const: qspi_en
552eb4d8dcSEmmanuel Vadot      - const: qspi
562eb4d8dcSEmmanuel Vadot
572eb4d8dcSEmmanuel Vadotrequired:
582eb4d8dcSEmmanuel Vadot  - compatible
592eb4d8dcSEmmanuel Vadot  - reg
602eb4d8dcSEmmanuel Vadot  - reg-names
612eb4d8dcSEmmanuel Vadot  - interrupts
622eb4d8dcSEmmanuel Vadot  - clocks
632eb4d8dcSEmmanuel Vadot  - clock-names
642eb4d8dcSEmmanuel Vadot
652eb4d8dcSEmmanuel VadotunevaluatedProperties: false
662eb4d8dcSEmmanuel Vadot
672eb4d8dcSEmmanuel Vadotexamples:
682eb4d8dcSEmmanuel Vadot  - |
692eb4d8dcSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
702eb4d8dcSEmmanuel Vadot    #include <dt-bindings/clock/fsl,qoriq-clockgen.h>
712eb4d8dcSEmmanuel Vadot
722eb4d8dcSEmmanuel Vadot    soc {
732eb4d8dcSEmmanuel Vadot        #address-cells = <2>;
742eb4d8dcSEmmanuel Vadot        #size-cells = <2>;
752eb4d8dcSEmmanuel Vadot
762eb4d8dcSEmmanuel Vadot        spi@1550000 {
772eb4d8dcSEmmanuel Vadot            compatible = "fsl,ls1021a-qspi";
782eb4d8dcSEmmanuel Vadot            reg = <0x0 0x1550000 0x0 0x100000>,
792eb4d8dcSEmmanuel Vadot                  <0x0 0x40000000 0x0 0x10000000>;
802eb4d8dcSEmmanuel Vadot            reg-names = "QuadSPI", "QuadSPI-memory";
812eb4d8dcSEmmanuel Vadot            interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
822eb4d8dcSEmmanuel Vadot            #address-cells = <1>;
832eb4d8dcSEmmanuel Vadot            #size-cells = <0>;
842eb4d8dcSEmmanuel Vadot            clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(2)>,
852eb4d8dcSEmmanuel Vadot                     <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(2)>;
862eb4d8dcSEmmanuel Vadot            clock-names = "qspi_en", "qspi";
872eb4d8dcSEmmanuel Vadot
882eb4d8dcSEmmanuel Vadot            flash@0 {
892eb4d8dcSEmmanuel Vadot                compatible = "jedec,spi-nor";
902eb4d8dcSEmmanuel Vadot                spi-max-frequency = <50000000>;
912eb4d8dcSEmmanuel Vadot                reg = <0>;
922eb4d8dcSEmmanuel Vadot                spi-rx-bus-width = <4>;
932eb4d8dcSEmmanuel Vadot                spi-tx-bus-width = <4>;
942eb4d8dcSEmmanuel Vadot            };
952eb4d8dcSEmmanuel Vadot        };
962eb4d8dcSEmmanuel Vadot    };
97