2012-11-23 20:44:39 +08:00
|
|
|
Atmel SPI device
|
|
|
|
|
|
|
|
Required properties:
|
|
|
|
- compatible : should be "atmel,at91rm9200-spi".
|
|
|
|
- reg: Address and length of the register set for the device
|
|
|
|
- interrupts: Should contain spi interrupt
|
spi: atmel: update DT bindings documentation
- add new property "atmel,fifo-size"
- change "cs-gpios" to optional for SPI controller version >= 2.
Please be aware that the VERSION register can not be used to guess the
size of FIFOs. Indeed, for a given hardware version, the SPI controller
can be integrated on Atmel SoCs with different FIFO sizes. Also the
"atmel,fifo-size" property is optional as older SPI controllers don't
embed FIFO at all.
Besides, the FIFO size can not be read or guessed from other registers:
When designing the FIFO feature, no dedicated registers were added to
store this size. Unused spaces in the I/O register range are limited and
better reserved for future usages. Instead, the FIFO size of each
peripheral is documented in the programmer datasheet.
Finally, on a given SoC, there can be several instances of the SPI
controller with different FIFO sizes. This explain why we'd rather use a
dedicated DT property than use the "compatible" property.
For instance, sama5d2x SoCs come with some SPI controllers, the ones
inside Flexcoms, integrating 32 data FIFOs whereas other SPI controllers
use 16 data FIFOs. All these SPI controllers share the same IP version.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-16 18:09:30 +08:00
|
|
|
- cs-gpios: chipselects (optional for SPI controller version >= 2 with the
|
|
|
|
Chip Select Active After Transfer feature).
|
2013-12-17 19:01:34 +08:00
|
|
|
- clock-names: tuple listing input clock names.
|
|
|
|
Required elements: "spi_clk"
|
|
|
|
- clocks: phandles to input clocks.
|
2012-11-23 20:44:39 +08:00
|
|
|
|
spi: atmel: update DT bindings documentation
- add new property "atmel,fifo-size"
- change "cs-gpios" to optional for SPI controller version >= 2.
Please be aware that the VERSION register can not be used to guess the
size of FIFOs. Indeed, for a given hardware version, the SPI controller
can be integrated on Atmel SoCs with different FIFO sizes. Also the
"atmel,fifo-size" property is optional as older SPI controllers don't
embed FIFO at all.
Besides, the FIFO size can not be read or guessed from other registers:
When designing the FIFO feature, no dedicated registers were added to
store this size. Unused spaces in the I/O register range are limited and
better reserved for future usages. Instead, the FIFO size of each
peripheral is documented in the programmer datasheet.
Finally, on a given SoC, there can be several instances of the SPI
controller with different FIFO sizes. This explain why we'd rather use a
dedicated DT property than use the "compatible" property.
For instance, sama5d2x SoCs come with some SPI controllers, the ones
inside Flexcoms, integrating 32 data FIFOs whereas other SPI controllers
use 16 data FIFOs. All these SPI controllers share the same IP version.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-16 18:09:30 +08:00
|
|
|
Optional properties:
|
|
|
|
- atmel,fifo-size: maximum number of data the RX and TX FIFOs can store for FIFO
|
|
|
|
capable SPI controllers.
|
|
|
|
|
2012-11-23 20:44:39 +08:00
|
|
|
Example:
|
|
|
|
|
|
|
|
spi1: spi@fffcc000 {
|
|
|
|
compatible = "atmel,at91rm9200-spi";
|
|
|
|
reg = <0xfffcc000 0x4000>;
|
|
|
|
interrupts = <13 4 5>;
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
2013-12-17 19:01:34 +08:00
|
|
|
clocks = <&spi1_clk>;
|
|
|
|
clock-names = "spi_clk";
|
2012-11-23 20:44:39 +08:00
|
|
|
cs-gpios = <&pioB 3 0>;
|
spi: atmel: update DT bindings documentation
- add new property "atmel,fifo-size"
- change "cs-gpios" to optional for SPI controller version >= 2.
Please be aware that the VERSION register can not be used to guess the
size of FIFOs. Indeed, for a given hardware version, the SPI controller
can be integrated on Atmel SoCs with different FIFO sizes. Also the
"atmel,fifo-size" property is optional as older SPI controllers don't
embed FIFO at all.
Besides, the FIFO size can not be read or guessed from other registers:
When designing the FIFO feature, no dedicated registers were added to
store this size. Unused spaces in the I/O register range are limited and
better reserved for future usages. Instead, the FIFO size of each
peripheral is documented in the programmer datasheet.
Finally, on a given SoC, there can be several instances of the SPI
controller with different FIFO sizes. This explain why we'd rather use a
dedicated DT property than use the "compatible" property.
For instance, sama5d2x SoCs come with some SPI controllers, the ones
inside Flexcoms, integrating 32 data FIFOs whereas other SPI controllers
use 16 data FIFOs. All these SPI controllers share the same IP version.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-16 18:09:30 +08:00
|
|
|
atmel,fifo-size = <32>;
|
2012-11-23 20:44:39 +08:00
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
mmc-slot@0 {
|
|
|
|
compatible = "mmc-spi-slot";
|
|
|
|
reg = <0>;
|
|
|
|
gpios = <&pioC 4 0>; /* CD */
|
|
|
|
spi-max-frequency = <25000000>;
|
|
|
|
};
|
|
|
|
};
|