xref: /freebsd/sys/contrib/device-tree/Bindings/spi/spi-pl022.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/spi-pl022.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: ARM PL022 SPI controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Linus Walleij <linus.walleij@linaro.org>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel VadotallOf:
13cb7aa33aSEmmanuel Vadot  - $ref: spi-controller.yaml#
14*aa1a8ff2SEmmanuel Vadot  - $ref: /schemas/arm/primecell.yaml#
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel Vadot# We need a select here so we don't match all nodes with 'arm,primecell'
17c66ec88fSEmmanuel Vadotselect:
18c66ec88fSEmmanuel Vadot  properties:
19c66ec88fSEmmanuel Vadot    compatible:
20c66ec88fSEmmanuel Vadot      contains:
21c66ec88fSEmmanuel Vadot        const: arm,pl022
22c66ec88fSEmmanuel Vadot  required:
23c66ec88fSEmmanuel Vadot    - compatible
24c66ec88fSEmmanuel Vadot
25c66ec88fSEmmanuel Vadotproperties:
26c66ec88fSEmmanuel Vadot  compatible:
27c66ec88fSEmmanuel Vadot    items:
28c66ec88fSEmmanuel Vadot      - const: arm,pl022
29c66ec88fSEmmanuel Vadot      - const: arm,primecell
30c66ec88fSEmmanuel Vadot
31c66ec88fSEmmanuel Vadot  reg:
32c66ec88fSEmmanuel Vadot    maxItems: 1
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel Vadot  interrupts:
35c66ec88fSEmmanuel Vadot    maxItems: 1
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadot  clocks:
38c66ec88fSEmmanuel Vadot    maxItems: 2
39c66ec88fSEmmanuel Vadot
40c66ec88fSEmmanuel Vadot  clock-names:
41c66ec88fSEmmanuel Vadot    items:
42c9ccf3a3SEmmanuel Vadot      - const: sspclk
43c66ec88fSEmmanuel Vadot      - const: apb_pclk
44c66ec88fSEmmanuel Vadot
45c66ec88fSEmmanuel Vadot  pl022,autosuspend-delay:
46c66ec88fSEmmanuel Vadot    description: delay in ms following transfer completion before the
47c66ec88fSEmmanuel Vadot      runtime power management system suspends the device. A setting of 0
48c66ec88fSEmmanuel Vadot      indicates no delay and the device will be suspended immediately.
49cb7aa33aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
50c66ec88fSEmmanuel Vadot
51c66ec88fSEmmanuel Vadot  pl022,rt:
52c66ec88fSEmmanuel Vadot    description: indicates the controller should run the message pump with realtime
53c66ec88fSEmmanuel Vadot      priority to minimise the transfer latency on the bus (boolean)
54c66ec88fSEmmanuel Vadot    type: boolean
55c66ec88fSEmmanuel Vadot
56c66ec88fSEmmanuel Vadot  dmas:
57c66ec88fSEmmanuel Vadot    description:
58c66ec88fSEmmanuel Vadot      Two or more DMA channel specifiers following the convention outlined
59c66ec88fSEmmanuel Vadot      in bindings/dma/dma.txt
60c66ec88fSEmmanuel Vadot    minItems: 2
61c66ec88fSEmmanuel Vadot    maxItems: 32
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel Vadot  dma-names:
64c66ec88fSEmmanuel Vadot    description:
65c66ec88fSEmmanuel Vadot      There must be at least one channel named "tx" for transmit and named "rx"
66c66ec88fSEmmanuel Vadot      for receive.
67c66ec88fSEmmanuel Vadot    minItems: 2
68c66ec88fSEmmanuel Vadot    maxItems: 32
69c66ec88fSEmmanuel Vadot    additionalItems: true
70c66ec88fSEmmanuel Vadot    items:
71c66ec88fSEmmanuel Vadot      - const: rx
72c66ec88fSEmmanuel Vadot      - const: tx
73c66ec88fSEmmanuel Vadot
74e67e8565SEmmanuel Vadot  resets:
75e67e8565SEmmanuel Vadot    maxItems: 1
76e67e8565SEmmanuel Vadot
77c66ec88fSEmmanuel Vadotrequired:
78c66ec88fSEmmanuel Vadot  - compatible
79c66ec88fSEmmanuel Vadot  - reg
80c66ec88fSEmmanuel Vadot  - interrupts
81c66ec88fSEmmanuel Vadot
826be33864SEmmanuel VadotunevaluatedProperties: false
836be33864SEmmanuel Vadot
84c66ec88fSEmmanuel Vadotexamples:
85c66ec88fSEmmanuel Vadot  - |
86c66ec88fSEmmanuel Vadot    spi@e0100000 {
87c66ec88fSEmmanuel Vadot      compatible = "arm,pl022", "arm,primecell";
88c66ec88fSEmmanuel Vadot      reg = <0xe0100000 0x1000>;
89c66ec88fSEmmanuel Vadot      #address-cells = <1>;
90c66ec88fSEmmanuel Vadot      #size-cells = <0>;
91c66ec88fSEmmanuel Vadot      interrupts = <0 31 0x4>;
92c66ec88fSEmmanuel Vadot      dmas = <&dma_controller 23 1>,
93c66ec88fSEmmanuel Vadot        <&dma_controller 24 0>;
94c66ec88fSEmmanuel Vadot      dma-names = "rx", "tx";
95c66ec88fSEmmanuel Vadot
96d5b0e70fSEmmanuel Vadot      flash@1 {
97c66ec88fSEmmanuel Vadot        compatible = "st,m25p80";
98c66ec88fSEmmanuel Vadot        reg = <1>;
99c66ec88fSEmmanuel Vadot        spi-max-frequency = <12000000>;
100c66ec88fSEmmanuel Vadot        spi-cpol;
101c66ec88fSEmmanuel Vadot        spi-cpha;
102c66ec88fSEmmanuel Vadot        pl022,interface = <0>;
103c66ec88fSEmmanuel Vadot        pl022,com-mode = <0x2>;
104c66ec88fSEmmanuel Vadot        pl022,rx-level-trig = <0>;
105c66ec88fSEmmanuel Vadot        pl022,tx-level-trig = <0>;
106c66ec88fSEmmanuel Vadot        pl022,ctrl-len = <0x11>;
107c66ec88fSEmmanuel Vadot        pl022,wait-state = <0>;
108c66ec88fSEmmanuel Vadot        pl022,duplex = <0>;
109c66ec88fSEmmanuel Vadot      };
110c66ec88fSEmmanuel Vadot    };
111c66ec88fSEmmanuel Vadot...
112