Hello,
In my custom omapl138 board I would need CS3 and CS5 for mr25h256 chips. I'm customising
/ti/mcsdk_1_01_00_02/board-support/linux-3.3-psp03.22.00.06.sdk/arch/arm/mach-davinci/board-da850-evm.c
If I call there:
ret = da8xx_register_spi(0, da850evm_spi0_info, 2);
everything is fine and boot gives:
m25p80 spi0.0: mr25h256 (32 Kbytes)
Creating 1 MTD partitions on "mr25h256":
0x000000000000-0x000000008000 : "FRAM"
m25p80 spi0.1: mr25h256 (32 Kbytes)
Creating 1 MTD partitions on "mr25h256":
0x000000000000-0x000000008000 : "FRAM"
spi_davinci spi_davinci.0: Controller at 0xfec41000
spi_davinci spi_davinci.1: DMA: supported
spi_davinci spi_davinci.1: DMA: RX channel: 18, TX channel: 19, event queue: 0
m25p80 spi1.0: m25p64 (8192 Kbytes)
Creating 6 MTD partitions on "m25p80":
0x000000000000-0x000000010000 : "UBL"
0x000000010000-0x000000090000 : "U-Boot"
0x000000090000-0x0000000a0000 : "U-Boot-Env"
0x0000000a0000-0x000000320000 : "Kernel"
0x000000320000-0x000000720000 : "Filesystem"
0x0000007f0000-0x000000800000 : "MAC-Address"
Read MAC addr from SPI Flash: ff:ff:ff:ff:ff:ff
spi_davinci spi_davinci.1: Controller at 0xfef0e000
So configuration of SPI0 and SPI1 is fine - obviously FRAMs in SPI0 will not work as chip selects are wrong ones. In board info I have .chip_select = 0 and .chip_select =1 in spi_board_info. If I put there .chip_select = 3 and .chip_select =5, I get:
spi_davinci spi_davinci.0: DMA: supported
spi_davinci spi_davinci.0: DMA: RX channel: 14, TX channel: 15, event queue: 0
spi_davinci spi_davinci.0: cs3 >= max 2
spi_davinci spi_davinci.0: can't create new device for mr25h256
spi_davinci spi_davinci.0: cs5 >= max 2
spi_davinci spi_davinci.0: can't create new device for mr25h256
spi_davinci spi_davinci.0: Controller at 0xfec41000
Which is quite natural. If i change:
ret = da8xx_register_spi(0, da850evm_spi0_info, 6);
Result is quite dramatic:
spi_davinci spi_davinci.0: DMA: supported
spi_davinci spi_davinci.0: DMA: RX channel: 14, TX channel: 15, event queue: 0
m25p80 spi0.3: mr25h256 (32 Kbytes)
Creating 1 MTD partitions on "mr25h256":
0x000000000000-0x000000008000 : "FRAM"
m25p80 spi0.5: mr25h256 (32 Kbytes)
Creating 1 MTD partitions on "mr25h256":
0x000000000000-0x000000008000 : "FRAM"
spi_davinci spi_davinci.0: chipselect 0 already in use
spi_davinci spi_davinci.0: can't create new device for
spi_davinci spi_davinci.0: Controller at 0xfec41000
spi_davinci spi_davinci.1: DMA: supported
spi_davinci spi_davinci.1: DMA: RX channel: 18, TX channel: 19, event queue: 0
m25p80 spi1.0: m25p64 (8192 Kbytes)
Creating 6 MTD partitions on "m25p80":
0x000000000000-0x000000010000 : "UBL"
0x000000010000-0x000000090000 : "U-Boot"
0x000000090000-0x0000000a0000 : "U-Boot-Env"
0x0000000a0000-0x000000320000 : "Kernel"
0x000000320000-0x000000720000 : "Filesystem"
0x0000007f0000-0x000000800000 : "MAC-Address"
Read MAC addr from SPI Flash: ff:ff:ff:ff:ff:ff
spi_davinci spi_davinci.1: chipselect 0 already in use
spi_davinci spi_davinci.1: can't create new device for x·-Àˆ·-À˜·-À¤·-À
spi_davinci spi_davinci.1: chipselect 0 already in use
spi_davinci spi_davinci.1: can't create new device for m25p80
spi_davinci spi_davinci.1: Controller at 0xfef0e000
That 6 seems to cause an overflo I can not localize. I've gone through files spi.c, spi.h, devices-da8xx.c, spi-davinci.c, all functions and constants there related to "spi" "board", "platform" and "register" and so far haven't found the place of failure.
Couls someone please guide me a bit with this problem?
Risto