Skip to contentSkip to conversation

spi: orion: support armada extended baud rates

PATCH Superseded [email protected] 1 participant 1 message Sep 8, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 spi: orion: support armada extended baud rates

From: Greg Ungerer <[email protected]>

The Armada SoC family implementation of this SPI hardware module has extended the configuration register to allow for a wider range of SPI clock rates. Specifically the Serial Baud Rate Pre-selection bits in the SPI Interface Configuration Register now also use bits 6 and 7 as well.

Modify the baud rate calculation to handle these differences for the Armada case. Potentially a baud rate can be setup using a number of different pre-scalar and scalar combinations. This code tries all possible pre-scalar divisors (8 in total) to try and find the most accurate set.

This change introduces (and documents) a new device tree compatible device name "armada-370-spi" to support this.

---
Changes in v2:
Introduced a new devicetree compatible name for armada SPI support.

Changes in v3:
Changed compatible devicetree name to armada-370-spi. Split change to armada-370-xp.dtsi out into separate patch

 .../devicetree/bindings/spi/spi-orion.txt          |   2 +-
 drivers/spi/spi-orion.c                            | 116 +++++++++++++++++----
 2 files changed, 95 insertions(+), 23 deletions(-)
Documentation/devicetree/bindings/spi/spi-orion.txt +1 -1
index a3ff50f..50c3a3d 100644
@@ -1,7 +1,7 @@
 Marvell Orion SPI device
 
 Required properties:
-- compatible : should be "marvell,orion-spi".
+- compatible : should be "marvell,orion-spi" or "marvell,armada-370-spi".
 - reg : offset and length of the register set for the device
 - cell-index : Which of multiple SPI controllers is this.
 Optional properties:
drivers/spi/spi-orion.c +94 -22

177 lines not on this page · raw message

Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html