xref: /freebsd-src/sys/contrib/device-tree/Bindings/fpga/xlnx,fpga-slave-serial.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1*fac71e4eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*fac71e4eSEmmanuel Vadot%YAML 1.2
3*fac71e4eSEmmanuel Vadot---
4*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/fpga/xlnx,fpga-slave-serial.yaml#
5*fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*fac71e4eSEmmanuel Vadot
7*fac71e4eSEmmanuel Vadottitle: Xilinx Slave Serial SPI FPGA
8*fac71e4eSEmmanuel Vadot
9*fac71e4eSEmmanuel Vadotmaintainers:
10*fac71e4eSEmmanuel Vadot  - Nava kishore Manne <nava.kishore.manne@amd.com>
11*fac71e4eSEmmanuel Vadot
12*fac71e4eSEmmanuel Vadotdescription: |
13*fac71e4eSEmmanuel Vadot  Xilinx Spartan-6 and 7 Series FPGAs support a method of loading the bitstream
14*fac71e4eSEmmanuel Vadot  over what is referred to as slave serial interface.The slave serial link is
15*fac71e4eSEmmanuel Vadot  not technically SPI, and might require extra circuits in order to play nicely
16*fac71e4eSEmmanuel Vadot  with other SPI slaves on the same bus.
17*fac71e4eSEmmanuel Vadot
18*fac71e4eSEmmanuel Vadot  Datasheets:
19*fac71e4eSEmmanuel Vadot    https://www.xilinx.com/support/documentation/user_guides/ug380.pdf
20*fac71e4eSEmmanuel Vadot    https://www.xilinx.com/support/documentation/user_guides/ug470_7Series_Config.pdf
21*fac71e4eSEmmanuel Vadot    https://www.xilinx.com/support/documentation/application_notes/xapp583-fpga-configuration.pdf
22*fac71e4eSEmmanuel Vadot
23*fac71e4eSEmmanuel VadotallOf:
24*fac71e4eSEmmanuel Vadot  - $ref: /schemas/spi/spi-peripheral-props.yaml#
25*fac71e4eSEmmanuel Vadot
26*fac71e4eSEmmanuel Vadotproperties:
27*fac71e4eSEmmanuel Vadot  compatible:
28*fac71e4eSEmmanuel Vadot    enum:
29*fac71e4eSEmmanuel Vadot      - xlnx,fpga-slave-serial
30*fac71e4eSEmmanuel Vadot
31*fac71e4eSEmmanuel Vadot  spi-cpha: true
32*fac71e4eSEmmanuel Vadot
33*fac71e4eSEmmanuel Vadot  spi-max-frequency:
34*fac71e4eSEmmanuel Vadot    maximum: 60000000
35*fac71e4eSEmmanuel Vadot
36*fac71e4eSEmmanuel Vadot  reg:
37*fac71e4eSEmmanuel Vadot    maxItems: 1
38*fac71e4eSEmmanuel Vadot
39*fac71e4eSEmmanuel Vadot  prog_b-gpios:
40*fac71e4eSEmmanuel Vadot    description:
41*fac71e4eSEmmanuel Vadot      config pin (referred to as PROGRAM_B in the manual)
42*fac71e4eSEmmanuel Vadot    maxItems: 1
43*fac71e4eSEmmanuel Vadot
44*fac71e4eSEmmanuel Vadot  done-gpios:
45*fac71e4eSEmmanuel Vadot    description:
46*fac71e4eSEmmanuel Vadot      config status pin (referred to as DONE in the manual)
47*fac71e4eSEmmanuel Vadot    maxItems: 1
48*fac71e4eSEmmanuel Vadot
49*fac71e4eSEmmanuel Vadot  init-b-gpios:
50*fac71e4eSEmmanuel Vadot    description:
51*fac71e4eSEmmanuel Vadot      initialization status and configuration error pin
52*fac71e4eSEmmanuel Vadot      (referred to as INIT_B in the manual)
53*fac71e4eSEmmanuel Vadot    maxItems: 1
54*fac71e4eSEmmanuel Vadot
55*fac71e4eSEmmanuel Vadotrequired:
56*fac71e4eSEmmanuel Vadot  - compatible
57*fac71e4eSEmmanuel Vadot  - reg
58*fac71e4eSEmmanuel Vadot  - prog_b-gpios
59*fac71e4eSEmmanuel Vadot  - done-gpios
60*fac71e4eSEmmanuel Vadot  - init-b-gpios
61*fac71e4eSEmmanuel Vadot
62*fac71e4eSEmmanuel VadotadditionalProperties: false
63*fac71e4eSEmmanuel Vadot
64*fac71e4eSEmmanuel Vadotexamples:
65*fac71e4eSEmmanuel Vadot  - |
66*fac71e4eSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
67*fac71e4eSEmmanuel Vadot    spi {
68*fac71e4eSEmmanuel Vadot      #address-cells = <1>;
69*fac71e4eSEmmanuel Vadot      #size-cells = <0>;
70*fac71e4eSEmmanuel Vadot      fpga_mgr_spi: fpga-mgr@0 {
71*fac71e4eSEmmanuel Vadot        compatible = "xlnx,fpga-slave-serial";
72*fac71e4eSEmmanuel Vadot        spi-max-frequency = <60000000>;
73*fac71e4eSEmmanuel Vadot        spi-cpha;
74*fac71e4eSEmmanuel Vadot        reg = <0>;
75*fac71e4eSEmmanuel Vadot        prog_b-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
76*fac71e4eSEmmanuel Vadot        init-b-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
77*fac71e4eSEmmanuel Vadot        done-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
78*fac71e4eSEmmanuel Vadot      };
79*fac71e4eSEmmanuel Vadot    };
80*fac71e4eSEmmanuel Vadot...
81