#include "soc.h"
#include "ts72xx.h"
+#include <sound/cs4271.h>
+
/*************************************************************************
* IO map
*************************************************************************/
#endif
+/*************************************************************************
+ * EDB93xx I2S
+ *************************************************************************/
+static struct platform_device edb93xx_audio_device = {
+ .name = "edb93xx-audio",
+ .id = -1,
+};
+
+static void __init edb93xx_register_i2s(void)
+{
+ ep93xx_register_i2s();
+ platform_device_register(&edb93xx_audio_device);
+}
+
/*************************************************************************
* SPI Bus
*************************************************************************/
+static struct cs4271_platform_data edb93xx_cs4271_data = {
+ .gpio_nreset = EP93XX_GPIO_LINE_H(2),
+};
+
static struct spi_board_info ts72xx_spi_devices[] __initdata = {
{
.modalias = "tmp122",
.bus_num = 0,
.chip_select = 0,
},
+ {
+ .modalias = "cs4271",
+ .platform_data = &edb93xx_cs4271_data,
+ .max_speed_hz = 6000000,
+ .bus_num = 0,
+ .chip_select = 1,
+ .mode = SPI_MODE_3,
+ },
};
static struct gpiod_lookup_table ts72xx_spi_cs_gpio_table = {
.table = {
/* DIO_17 */
GPIO_LOOKUP("F", 2, "cs", GPIO_ACTIVE_LOW),
+ GPIO_LOOKUP("A", 6, "cs", GPIO_ACTIVE_LOW),
{ },
},
};
gpiod_add_lookup_table(&ts72xx_spi_cs_gpio_table);
ep93xx_register_spi(&ts72xx_spi_info, ts72xx_spi_devices,
ARRAY_SIZE(ts72xx_spi_devices));
+ edb93xx_register_i2s();
}
MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
SND_SOC_DAILINK_DEFS(hifi,
DAILINK_COMP_ARRAY(COMP_CPU("ep93xx-i2s")),
- DAILINK_COMP_ARRAY(COMP_CODEC("spi0.0", "cs4271-hifi")),
+ DAILINK_COMP_ARRAY(COMP_CODEC("spi0.1", "cs4271-hifi")),
DAILINK_COMP_ARRAY(COMP_PLATFORM("ep93xx-i2s")));
static struct snd_soc_dai_link edb93xx_dai = {