Dears:
The design uses SPI to control a device(Slave) and the below code is the PINMUX's configuration:
static struct pinmux_config spi0_pin_mux[] = {
{"spi0_sclk.spi0_sclk", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL | AM33XX_PIN_OUTPUT},
{"spi0_d0.spi0_d0", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL | AM33XX_INPUT_EN},
{"spi0_d1.spi0_d1", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL | AM33XX_PIN_OUTPUT},
{"spi0_cs0.spi0_cs0", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL | AM33XX_PIN_OUTPUT_PULLUP},
{NULL, 0},
};
static struct spi_board_info am335x_spi0_slave_info[] = {
{
.modalias = "spidev",
.irq = -1,
.max_speed_hz = 48000000,
.bus_num = 1,
.chip_select = 0,
.mode = SPI_MODE_3,
},
};
If d1 and d2 are connected, AM3358 can not receive data. Is there any issue about the code, and could you kindly help to give some suggestions about the SPI communication?
Btw, the kernel driver is coming from the spidev of reference code.