1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/fsl-imx-cspi.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Freescale (Enhanced) Configurable Serial Peripheral Interface (CSPI/eCSPI) for i.MX
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Shawn Guo <shawnguo@kernel.org>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel VadotallOf:
13cb7aa33aSEmmanuel Vadot  - $ref: /schemas/spi/spi-controller.yaml#
14c66ec88fSEmmanuel Vadot
15c66ec88fSEmmanuel Vadotproperties:
16c66ec88fSEmmanuel Vadot  compatible:
17c66ec88fSEmmanuel Vadot    oneOf:
18c66ec88fSEmmanuel Vadot      - const: fsl,imx1-cspi
19c66ec88fSEmmanuel Vadot      - const: fsl,imx21-cspi
20c66ec88fSEmmanuel Vadot      - const: fsl,imx27-cspi
21c66ec88fSEmmanuel Vadot      - const: fsl,imx31-cspi
22c66ec88fSEmmanuel Vadot      - const: fsl,imx35-cspi
23c66ec88fSEmmanuel Vadot      - const: fsl,imx51-ecspi
24c66ec88fSEmmanuel Vadot      - const: fsl,imx53-ecspi
25c66ec88fSEmmanuel Vadot      - items:
26*aa1a8ff2SEmmanuel Vadot          - enum:
27*aa1a8ff2SEmmanuel Vadot              - fsl,imx25-cspi
28*aa1a8ff2SEmmanuel Vadot              - fsl,imx50-cspi
29*aa1a8ff2SEmmanuel Vadot              - fsl,imx51-cspi
30*aa1a8ff2SEmmanuel Vadot              - fsl,imx53-cspi
31*aa1a8ff2SEmmanuel Vadot          - const: fsl,imx35-cspi
32*aa1a8ff2SEmmanuel Vadot      - items:
338bab661aSEmmanuel Vadot          - const: fsl,imx8mp-ecspi
348bab661aSEmmanuel Vadot          - const: fsl,imx6ul-ecspi
358bab661aSEmmanuel Vadot      - items:
36c66ec88fSEmmanuel Vadot          - enum:
37c66ec88fSEmmanuel Vadot              - fsl,imx50-ecspi
38c66ec88fSEmmanuel Vadot              - fsl,imx6q-ecspi
39c66ec88fSEmmanuel Vadot              - fsl,imx6sx-ecspi
40c66ec88fSEmmanuel Vadot              - fsl,imx6sl-ecspi
41c66ec88fSEmmanuel Vadot              - fsl,imx6sll-ecspi
42c66ec88fSEmmanuel Vadot              - fsl,imx6ul-ecspi
43c66ec88fSEmmanuel Vadot              - fsl,imx7d-ecspi
44c66ec88fSEmmanuel Vadot              - fsl,imx8mq-ecspi
45c66ec88fSEmmanuel Vadot              - fsl,imx8mm-ecspi
46c66ec88fSEmmanuel Vadot              - fsl,imx8mn-ecspi
47c66ec88fSEmmanuel Vadot          - const: fsl,imx51-ecspi
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot  reg:
50c66ec88fSEmmanuel Vadot    maxItems: 1
51c66ec88fSEmmanuel Vadot
52c66ec88fSEmmanuel Vadot  interrupts:
53c66ec88fSEmmanuel Vadot    maxItems: 1
54c66ec88fSEmmanuel Vadot
55c66ec88fSEmmanuel Vadot  clocks:
56c66ec88fSEmmanuel Vadot    items:
57c66ec88fSEmmanuel Vadot      - description: SoC SPI ipg clock
58c66ec88fSEmmanuel Vadot      - description: SoC SPI per clock
59c66ec88fSEmmanuel Vadot
60c66ec88fSEmmanuel Vadot  clock-names:
61c66ec88fSEmmanuel Vadot    items:
62c66ec88fSEmmanuel Vadot      - const: ipg
63c66ec88fSEmmanuel Vadot      - const: per
64c66ec88fSEmmanuel Vadot
65c66ec88fSEmmanuel Vadot  dmas:
66c66ec88fSEmmanuel Vadot    items:
67c66ec88fSEmmanuel Vadot      - description: DMA controller phandle and request line for RX
68c66ec88fSEmmanuel Vadot      - description: DMA controller phandle and request line for TX
69c66ec88fSEmmanuel Vadot
70c66ec88fSEmmanuel Vadot  dma-names:
71c66ec88fSEmmanuel Vadot    items:
72c66ec88fSEmmanuel Vadot      - const: rx
73c66ec88fSEmmanuel Vadot      - const: tx
74c66ec88fSEmmanuel Vadot
75c66ec88fSEmmanuel Vadot  fsl,spi-rdy-drctl:
76c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
77c66ec88fSEmmanuel Vadot    description: |
78c66ec88fSEmmanuel Vadot      Integer, representing the value of DRCTL, the register controlling
79c66ec88fSEmmanuel Vadot      the SPI_READY handling. Note that to enable the DRCTL consideration,
80c66ec88fSEmmanuel Vadot      the SPI_READY mode-flag needs to be set too.
81c66ec88fSEmmanuel Vadot      Valid values are: 0 (disabled), 1 (edge-triggered burst) and 2 (level-triggered burst).
82c66ec88fSEmmanuel Vadot    enum: [0, 1, 2]
83c66ec88fSEmmanuel Vadot
84c66ec88fSEmmanuel Vadotrequired:
85c66ec88fSEmmanuel Vadot  - compatible
86c66ec88fSEmmanuel Vadot  - reg
87c66ec88fSEmmanuel Vadot  - interrupts
88c66ec88fSEmmanuel Vadot  - clocks
89c66ec88fSEmmanuel Vadot  - clock-names
90c66ec88fSEmmanuel Vadot
91c66ec88fSEmmanuel VadotunevaluatedProperties: false
92c66ec88fSEmmanuel Vadot
93c66ec88fSEmmanuel Vadotexamples:
94c66ec88fSEmmanuel Vadot  - |
95c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/imx5-clock.h>
96c66ec88fSEmmanuel Vadot
97c66ec88fSEmmanuel Vadot    spi@70010000 {
98c66ec88fSEmmanuel Vadot        #address-cells = <1>;
99c66ec88fSEmmanuel Vadot        #size-cells = <0>;
100c66ec88fSEmmanuel Vadot        compatible = "fsl,imx51-ecspi";
101c66ec88fSEmmanuel Vadot        reg = <0x70010000 0x4000>;
102c66ec88fSEmmanuel Vadot        interrupts = <36>;
103c66ec88fSEmmanuel Vadot        clocks = <&clks IMX5_CLK_ECSPI1_IPG_GATE>,
104c66ec88fSEmmanuel Vadot                 <&clks IMX5_CLK_ECSPI1_PER_GATE>;
105c66ec88fSEmmanuel Vadot        clock-names = "ipg", "per";
106c66ec88fSEmmanuel Vadot    };
107