--- /dev/null
+/*
+ * Copyright (C) 2015 Czech Technical University in Prague
+ *
+ * Authors:
+ * - Michal Sojka <sojkam1@fel.cvut.cz>
+ *
+ * This document contains proprietary information belonging to Czech
+ * Technical University in Prague. Passing on and copying of this
+ * document, and communication of its contents is not permitted
+ * without prior written authorization.
+ *
+ */
+
+#ifndef _TMS570_HYDCTR_SPI_DEF_H
+#define _TMS570_HYDCTR_SPI_DEF_H
+
+/* Identifiers of SPI devices (=chips) */
+
+enum spi_device {
+ SPIDEV_MCP6S93_TH1,
+ SPIDEV_MCP6S93_TH2,
+ SPIDEV_MCP6S93_6ADC,
+ SPIDEV_TPS65381_PWR,
+ SPIDEV_MCP6S93_SENSUP,
+ SPIDEV_MCP6S93_DAC,
+
+ _SPIDEV_COUNT
+};
+
+
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2015 Czech Technical University in Prague
+ *
+ * Authors:
+ * - Michal Sojka <sojkam1@fel.cvut.cz>
+ *
+ * This document contains proprietary information belonging to Czech
+ * Technical University in Prague. Passing on and copying of this
+ * document, and communication of its contents is not permitted
+ * without prior written authorization.
+ *
+ */
+
+#include "drv/spi_def.h"
+#include "drv/spi_tms570.h"
+
+const spi_dev_t spi_devs[_SPIDEV_COUNT] = {
+ [SPIDEV_MCP6S93_TH1] = {
+ .iface = SPI_IFACE3,
+ .cs = SPI_CS_4,
+ .dfsel = 0,
+ .wdel = 0,
+ .cshold = 1,
+ .dlen = 0
+ },
+ [SPIDEV_MCP6S93_TH2] = {
+ .iface = SPI_IFACE3,
+ .cs = SPI_CS_5,
+ .dfsel = 0,
+ .wdel = 0,
+ .cshold = 1,
+ .dlen = 0
+ },
+ [SPIDEV_MCP6S93_6ADC] = {
+ .iface = SPI_IFACE3,
+ .cs = SPI_CS_0,
+ .dfsel = 0,
+ .wdel = 0,
+ .cshold = 1,
+ .dlen = 0
+ },
+ [SPIDEV_TPS65381_PWR] = {
+ .iface = SPI_IFACE2,
+ .cs = SPI_CS_1,
+ .dfsel = 0,
+ .wdel = 0,
+ .cshold = 1,
+ .dlen = 0
+ },
+ [SPIDEV_MCP6S93_SENSUP] = {
+ .iface = SPI_IFACE5,
+ .cs = SPI_CS_3,
+ .dfsel = 0,
+ .wdel = 0,
+ .cshold = 1,
+ .dlen = 0
+ },
+ [SPIDEV_MCP6S93_DAC] = {
+ .iface = SPI_IFACE5,
+ .cs = SPI_CS_2,
+ .dfsel = 0,
+ .wdel = 0,
+ .cshold = 1,
+ .dlen = 0
+ },
+};
| (dev->cshold & 0x1) << 28
| (dev->dfsel & 0x3) << 24;
+#if defined(TARGET_TMS570_RPP)
/* GPIO CS -- setting the multiplexer */
if (cs > 0xff) {
switch (cs & 0xFF00) {
break;
}
}
+#endif
}
rq_len = msg->rq_len;