Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: cros_ec: spi: Add a DT property to delay asserting the CS

Some ECs need a little time for waking up before they can accept
SPI data at a high speed. Add a "google,cros-ec-spi-pre-delay"
property to the DT binding to configure this.

If this property isn't set, then no delay will be added. However,
if set it will cause a delay equal to the value passed to it to
be inserted at the beginning of a transaction.

Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Alexandru M Stan and committed by
Lee Jones
f44c21ff 57b33ff0

+4
+4
Documentation/devicetree/bindings/mfd/cros-ec.txt
··· 18 18 - reg: SPI chip select 19 19 20 20 Optional properties (SPI): 21 + - google,cros-ec-spi-pre-delay: Some implementations of the EC need a little 22 + time to wake up from sleep before they can receive SPI transfers at a high 23 + clock rate. This property specifies the delay, in usecs, between the 24 + assertion of the CS to the start of the first clock pulse. 21 25 - google,cros-ec-spi-msg-delay: Some implementations of the EC require some 22 26 additional processing time in order to accept new transactions. If the delay 23 27 between transactions is not long enough the EC may not be able to respond