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