summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/fpga/lattice,sysconfig.yaml
blob: 164331eb627502dae2545ab636f1e7ede6e45a66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/lattice,sysconfig.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Lattice Slave SPI sysCONFIG FPGA manager

maintainers:
  - Vladimir Georgiev <v.georgiev@metrotek.ru>

description: |
  Lattice sysCONFIG port, which is used for FPGA configuration, among others,
  have Slave Serial Peripheral Interface. Only full reconfiguration is
  supported.

  Programming of ECP5 is done by writing uncompressed bitstream image in .bit
  format into FPGA's SRAM configuration memory.

properties:
  compatible:
    enum:
      - lattice,sysconfig-ecp5

  reg:
    maxItems: 1

  program-gpios:
    description:
      A GPIO line connected to PROGRAMN (active low) pin of the device.
      Initiates configuration sequence.
    maxItems: 1

  init-gpios:
    description:
      A GPIO line connected to INITN (active low) pin of the device.
      Indicates that the FPGA is ready to be configured.
    maxItems: 1

  done-gpios:
    description:
      A GPIO line connected to DONE (active high) pin of the device.
      Indicates that the configuration sequence is complete.
    maxItems: 1

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml

  - if:
      properties:
        compatible:
          contains:
            const: lattice,sysconfig-ecp5
    then:
      properties:
        spi-max-frequency:
          maximum: 60000000

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    spi {
        #address-cells = <1>;
        #size-cells = <0>;

        fpga-mgr@0 {
            compatible = "lattice,sysconfig-ecp5";
            reg = <0>;
            spi-max-frequency = <20000000>;
            program-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
            init-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>;
            done-gpios = <&gpio3 2 GPIO_ACTIVE_HIGH>;
        };
    };