lattice,sysconfig.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/fpga/lattice,sysconfig.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Lattice Slave SPI sysCONFIG FPGA manager
  7. maintainers:
  8. - Vladimir Georgiev <v.georgiev@metrotek.ru>
  9. description: |
  10. Lattice sysCONFIG port, which is used for FPGA configuration, among others,
  11. have Slave Serial Peripheral Interface. Only full reconfiguration is
  12. supported.
  13. Programming of ECP5 is done by writing uncompressed bitstream image in .bit
  14. format into FPGA's SRAM configuration memory.
  15. properties:
  16. compatible:
  17. enum:
  18. - lattice,sysconfig-ecp5
  19. reg:
  20. maxItems: 1
  21. program-gpios:
  22. description:
  23. A GPIO line connected to PROGRAMN (active low) pin of the device.
  24. Initiates configuration sequence.
  25. maxItems: 1
  26. init-gpios:
  27. description:
  28. A GPIO line connected to INITN (active low) pin of the device.
  29. Indicates that the FPGA is ready to be configured.
  30. maxItems: 1
  31. done-gpios:
  32. description:
  33. A GPIO line connected to DONE (active high) pin of the device.
  34. Indicates that the configuration sequence is complete.
  35. maxItems: 1
  36. required:
  37. - compatible
  38. - reg
  39. allOf:
  40. - $ref: /schemas/spi/spi-peripheral-props.yaml
  41. - if:
  42. properties:
  43. compatible:
  44. contains:
  45. const: lattice,sysconfig-ecp5
  46. then:
  47. properties:
  48. spi-max-frequency:
  49. maximum: 60000000
  50. unevaluatedProperties: false
  51. examples:
  52. - |
  53. #include <dt-bindings/gpio/gpio.h>
  54. spi {
  55. #address-cells = <1>;
  56. #size-cells = <0>;
  57. fpga-mgr@0 {
  58. compatible = "lattice,sysconfig-ecp5";
  59. reg = <0>;
  60. spi-max-frequency = <20000000>;
  61. program-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
  62. init-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>;
  63. done-gpios = <&gpio3 2 GPIO_ACTIVE_HIGH>;
  64. };
  65. };