Pavankumar Kondeti | 38e508c | 2014-02-24 14:53:31 +0530 | [diff] [blame] | 1 | ICE40 FPGA based SPI-USB bridge |
| 2 | |
| 3 | Documentation/devicetree/bindings/spi/spi-bus.txt provides the details |
| 4 | of the required and optional properties of a SPI slave device node. |
| 5 | |
| 6 | The purpose of this document is to provide the additional properties |
| 7 | that are required to use the ICE40 FPGA based SPI slave device as a |
| 8 | USB host controller. |
| 9 | |
| 10 | Required properties: |
| 11 | - compatible : should be "lattice,ice40-spi-usb" |
| 12 | - <supply-name>-supply: handle to the regulator device tree node |
| 13 | Required "supply-name" is "core-vcc" and "spi-vcc" |
| 14 | - reset-gpio: gpio used to assert the bridge chip reset |
| 15 | - slave-select-gpio: gpio used to select the slave during configuration |
| 16 | loading |
| 17 | - config-done-gpio: gpio used to indicate the configuration status |
| 18 | - vcc-en-gpio: gpio used to enable the chip power supply |
| 19 | |
| 20 | Optional properties: |
| 21 | - interrupts: IRQ lines used by this controller |
| 22 | - clk-en-gpio: gpio used to enable the 19.2 MHZ clock to the bridge |
| 23 | chip. If it is not present, assume that the clock is available on |
| 24 | the bridge chip board. |
| 25 | - <supply-name>-supply: handle to the regulator device tree node |
| 26 | Optional "supply-name" is "gpio" used to power up the gpio bank |
| 27 | used by this device |
| 28 | |
| 29 | spi@f9923000 { |
| 30 | lattice,spi-usb@3 { |
| 31 | compatible = "lattice,ice40-spi-usb"; |
| 32 | reg = <3>; |
| 33 | spi-max-frequency = <50000000>; |
| 34 | spi-cpol = <1>; |
| 35 | spi-cpha = <1>; |
| 36 | interrupt-parent = <&msmgpio>; |
| 37 | interrupts = <121 0x8>; |
| 38 | core-vcc-supply = <&pm8226_l2>; |
| 39 | spi-vcc-supply = <&pm8226_l5>; |
| 40 | lattice,reset-gpio = <&msmgpio 114 0>; |
| 41 | lattice,slave-select-gpio = <&msmgpio 118 0>; |
| 42 | lattice,config-done-gpio = <&msmgpio 115 0>; |
| 43 | lattice,vcc-en-gpio = <&msmgpio 117 0>; |
| 44 | }; |
| 45 | }; |