xref: /freebsd-src/sys/contrib/device-tree/Bindings/spi/microchip,mpfs-spi.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c9ccf3a3SEmmanuel Vadot%YAML 1.2
3c9ccf3a3SEmmanuel Vadot---
4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/spi/microchip,mpfs-spi.yaml#
5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c9ccf3a3SEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Microchip FPGA {Q,}SPI Controllers
87ef62cebSEmmanuel Vadot
97ef62cebSEmmanuel Vadotdescription:
107ef62cebSEmmanuel Vadot  SPI and QSPI controllers on Microchip PolarFire SoC and the "soft"/
117ef62cebSEmmanuel Vadot  fabric IP cores they are based on
12c9ccf3a3SEmmanuel Vadot
13c9ccf3a3SEmmanuel Vadotmaintainers:
14c9ccf3a3SEmmanuel Vadot  - Conor Dooley <conor.dooley@microchip.com>
15c9ccf3a3SEmmanuel Vadot
16c9ccf3a3SEmmanuel Vadotproperties:
17c9ccf3a3SEmmanuel Vadot  compatible:
187ef62cebSEmmanuel Vadot    oneOf:
197ef62cebSEmmanuel Vadot      - items:
20*b2d2a78aSEmmanuel Vadot          - enum:
21*b2d2a78aSEmmanuel Vadot              - microchip,mpfs-qspi
22*b2d2a78aSEmmanuel Vadot              - microchip,pic64gx-qspi
237ef62cebSEmmanuel Vadot          - const: microchip,coreqspi-rtl-v2
247ef62cebSEmmanuel Vadot      - const: microchip,coreqspi-rtl-v2 # FPGA QSPI
25*b2d2a78aSEmmanuel Vadot      - items:
26*b2d2a78aSEmmanuel Vadot          - const: microchip,pic64gx-spi
27*b2d2a78aSEmmanuel Vadot          - const: microchip,mpfs-spi
287ef62cebSEmmanuel Vadot      - const: microchip,mpfs-spi
29c9ccf3a3SEmmanuel Vadot
30c9ccf3a3SEmmanuel Vadot  reg:
31c9ccf3a3SEmmanuel Vadot    maxItems: 1
32c9ccf3a3SEmmanuel Vadot
33c9ccf3a3SEmmanuel Vadot  interrupts:
34c9ccf3a3SEmmanuel Vadot    maxItems: 1
35c9ccf3a3SEmmanuel Vadot
36c9ccf3a3SEmmanuel Vadot  clock-names:
37c9ccf3a3SEmmanuel Vadot    maxItems: 1
38c9ccf3a3SEmmanuel Vadot
39c9ccf3a3SEmmanuel Vadot  clocks:
40c9ccf3a3SEmmanuel Vadot    maxItems: 1
41c9ccf3a3SEmmanuel Vadot
42c9ccf3a3SEmmanuel Vadotrequired:
43c9ccf3a3SEmmanuel Vadot  - compatible
44c9ccf3a3SEmmanuel Vadot  - reg
45c9ccf3a3SEmmanuel Vadot  - interrupts
46c9ccf3a3SEmmanuel Vadot  - clocks
47c9ccf3a3SEmmanuel Vadot
480e8011faSEmmanuel VadotallOf:
490e8011faSEmmanuel Vadot  - $ref: spi-controller.yaml#
500e8011faSEmmanuel Vadot
510e8011faSEmmanuel Vadot  - if:
520e8011faSEmmanuel Vadot      properties:
530e8011faSEmmanuel Vadot        compatible:
540e8011faSEmmanuel Vadot          contains:
550e8011faSEmmanuel Vadot            const: microchip,mpfs-spi
560e8011faSEmmanuel Vadot    then:
570e8011faSEmmanuel Vadot      properties:
580e8011faSEmmanuel Vadot        num-cs:
590e8011faSEmmanuel Vadot          default: 1
600e8011faSEmmanuel Vadot
610e8011faSEmmanuel Vadot  - if:
620e8011faSEmmanuel Vadot      properties:
630e8011faSEmmanuel Vadot        compatible:
640e8011faSEmmanuel Vadot          contains:
650e8011faSEmmanuel Vadot            const: microchip,mpfs-spi
660e8011faSEmmanuel Vadot      not:
670e8011faSEmmanuel Vadot        required:
680e8011faSEmmanuel Vadot          - cs-gpios
690e8011faSEmmanuel Vadot    then:
700e8011faSEmmanuel Vadot      properties:
710e8011faSEmmanuel Vadot        num-cs:
720e8011faSEmmanuel Vadot          maximum: 1
730e8011faSEmmanuel Vadot
74c9ccf3a3SEmmanuel VadotunevaluatedProperties: false
75c9ccf3a3SEmmanuel Vadot
76c9ccf3a3SEmmanuel Vadotexamples:
77c9ccf3a3SEmmanuel Vadot  - |
78c9ccf3a3SEmmanuel Vadot    #include "dt-bindings/clock/microchip,mpfs-clock.h"
79c9ccf3a3SEmmanuel Vadot    spi@20108000 {
80c9ccf3a3SEmmanuel Vadot        compatible = "microchip,mpfs-spi";
81c9ccf3a3SEmmanuel Vadot        reg = <0x20108000 0x1000>;
82c9ccf3a3SEmmanuel Vadot        clocks = <&clkcfg CLK_SPI0>;
83c9ccf3a3SEmmanuel Vadot        interrupt-parent = <&plic>;
84c9ccf3a3SEmmanuel Vadot        interrupts = <54>;
85c9ccf3a3SEmmanuel Vadot    };
86c9ccf3a3SEmmanuel Vadot...
87