From: Miroslav Ondra Date: Mon, 19 Aug 2019 16:23:29 +0000 (+0200) Subject: fix spi baudrate to 6MHz on arm64. H5 can set only 6MHz or 12MHz X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=4096cf95485229d985efd260cb4fbee687ae2c80;p=graphit%2Funipi-kernel.git fix spi baudrate to 6MHz on arm64. H5 can set only 6MHz or 12MHz --- diff --git a/modules/unipi/src/unipi_common.h b/modules/unipi/src/unipi_common.h index 603456b..5a79c20 100644 --- a/modules/unipi/src/unipi_common.h +++ b/modules/unipi/src/unipi_common.h @@ -64,7 +64,14 @@ #define NEURONSPI_B_PER_WORD 8 #define NEURONSPI_DEFAULT_FREQ 600000 #define NEURONSPI_COMMON_FREQ 12000000 -#define NEURONSPI_SLOWER_FREQ 7500000 + +#if defined(CONFIG_ARM64) +/* on NanoPi there are only 12MHz and 6MHz available, not in between */ + #define NEURONSPI_SLOWER_FREQ 6000000 +#else + #define NEURONSPI_SLOWER_FREQ 7500000 +#endif + #define NEURONSPI_MAX_TX 60 //#define NEURONSPI_MAX_TX 256 #define NEURONSPI_MAX_BAUD 115200