arm: mvebu: turris_mox: Fix early SPI communication
authorMarek Behún <marek.behun@nic.cz>
Wed, 8 Apr 2020 10:02:03 +0000 (12:02 +0200)
committerStefan Roese <sr@denx.de>
Tue, 14 Apr 2020 11:16:42 +0000 (13:16 +0200)
commitb80ca8176dc0e78d3fb22b2389c847a5d96ee583
treeae9fa14843e7238e8b157f1d8680e3c3264b6e82
parent27f48f7dc4f57d0109f6333eb5148d0e9c3dbd95
arm: mvebu: turris_mox: Fix early SPI communication

The SPI clock signal changes value when the SPI configuration register
is configured. This can sometimes lead to the device misinterpreting
the enablement of the SPI controller as actual clock tick.
This can be solved by first setting the SPI CS1 pin from GPIO to SPI mode,
and only after that writing the SPI configuration register.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
board/CZ.NIC/turris_mox/turris_mox.c