Project

General

Profile

Adding a SPI peripheral through J700 on industrialIO board

Added by Mike Costa over 10 years ago

Hi,

We are designing a underboard that will have additional peripherals attached to the industrialio board through the J700 pins. We are using a mitydspl138f module. I was hoping to use SPI1 with CS0 on J700, but I just noticed that the onboard SPI flash on the l138F module uses CS0. is this correct? If so can you recommend a way for me to add a SPI device?

static struct spi_board_info mityomap_spi_flash_info[] = {
        {
                .modalias           = "m25p80",
                .platform_data      = &mityomap_spi_flash_data,
        .controller_data    = &spi_eprom_config,
                .mode               = SPI_MODE_0,
                .max_speed_hz       = 30000000,
                .bus_num            = 1,
                .chip_select        = 0,
        },
};

Replies (6)

RE: Adding a SPI peripheral through J700 on industrialIO board - Added by Michael Williamson over 10 years ago

Hi Mike,

The SPI drivers support using a regular OMAP GPIO for a chip select to gang up multiple devices on a SPI bus, so you could use one of the OMAP_GP0[X] signals brought out to J701 as an alternate chip select. If you look at the baseboard-manitowoc.c file you'll need to extend the spi1_cs[] array to add an external GPIO signal and another device to the controller. In this case, a codec chip (second element in array) and a can controller (third element in array) was added to the SPI1 controller in addition to the NOR FLASH (first element in array) defined in the SOM (board-mityomapl138.c) initialization.

-Mike

RE: Adding a SPI peripheral through J700 on industrialIO board - Added by Michael Williamson over 10 years ago

The GP0[] nets on J700 should also be usable for chip selects.

-Mike

RE: Adding a SPI peripheral through J700 on industrialIO board - Added by Mike Costa over 10 years ago

OK great, thanks. I will start another thread if I have any problems configuring the software. The schematic I have lists GP0_5, GP0_13, GP0_15 and GP0_6 all on J700. but I noticed they are all on J701 also, just checking that this is not a typo, or if there are some configuration requirements I should know about.

thanks
Mike

RE: Adding a SPI peripheral through J700 on industrialIO board - Added by Michael Williamson over 10 years ago

My take on that is the same. I'll need to check as to why those signals were brought to both connectors. I'll double check the layout for you and get back.

-Mike

RE: Adding a SPI peripheral through J700 on industrialIO board - Added by Joe Hung over 9 years ago

Hi Mike:

We are designing a spi device under SPI1 and already success create chip select from OMAP GPIO.
But how can we write linux application programs? Because we can't see any /dev/spi*.
The menuconfig device drivers -> SPI support setting below:

│           --- SPI support                                                                   │ │  
│ │ [*] Debug support for SPI drivers │ │
│ │ * SPI Master Controller Drivers │ │
│ │ <
> SPI controller driver for DaVinci SoC's │ │
│ │ Utilities for Bitbanging SPI masters │ │
│ │ <
> SPI controller driver for DaVinci/DA8xx SoC's │ │
│ │ < > GPIO-based bitbanging SPI Master │ │
│ │ < > Xilinx SPI controller common module │ │
│ │ < > DesignWare SPI controller core support │ │
│ │ * SPI Protocol Masters │ │
│ │ <
> User mode SPI device driver support │ │
│ │ < > Infineon TLE62X0 (for power switching) │ │
│ │

Thanks,
Joe

RE: Adding a SPI peripheral through J700 on industrialIO board - Added by Joe Hung over 9 years ago

Hi Mike:

Sorry about the setting of menuconfg, the format is error.

already check are
Debug support for SPI drivers
SPI controller driver for DaVinci SoC's
SPI controller driver for DaVinci/DA8xx SoC's
User mode SPI device driver support

Thanks,
Joe

    (1-6/6)
    Go to top
    Add picture from clipboard (Maximum size: 600 MB)