This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM355x GPMC configuration problem



Hello, to everyone!

Hopefully someone can help me.

My current task is to interface an FPGA from the phyCore-AM355x module running linux 3.2.

The FPGA is connected to the CS1 of the GPMC and should be accessed synchrounos, with address and data (16bit) multiplexed. CS0 is connected to a nand flash.

My problem is that I'm not able to produce any action on the gpmc pins when I try to read something. But I can see some actions for example on the ADV pin during boot.

What I,ve done so far is:

1.) configure the pin mux with the following information:

{"gpmc_ad0.gpmc_ad0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad1.gpmc_ad1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad2.gpmc_ad2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad3.gpmc_ad3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad4.gpmc_ad4", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad5.gpmc_ad5", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad6.gpmc_ad6", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad7.gpmc_ad7", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad8.gpmc_ad8", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad9.gpmc_ad9", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad10.gpmc_ad10",OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad11.gpmc_ad11",OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad12.gpmc_ad12",OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad13.gpmc_ad13",OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad14.gpmc_ad14",OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad15.gpmc_ad15",OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_wait0.gpmc_wait0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_wpn.gpmc_wpn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_csn0.gpmc_csn0", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
{"gpmc_csn1.gpmc_csn1", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
{"gpmc_advn_ale.gpmc_advn_ale", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
{"gpmc_oen_ren.gpmc_oen_ren", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
{"gpmc_wen.gpmc_wen", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
{"gpmc_ben0_cle.gpmc_ben0_cle", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
{"gpmc_clk.gpmc_clk", OMAP_MUX_MODE0 | AM33XX_PULL_DISA | AM33XX_INPUT_EN},

2. request gpmc cs with gpmc_cs_request(cs, 4,&phys_base) in a platform device driver

got base address 0x01000000

3. configuring gpmc cs1 registers in a platform device driver

GPMC_CONFIG1: 0x29001200
GPMC_CONFIG2: 0x00020200
GPMC_CONFIG3: 0x22010110
GPMC_CONFIG4: 0x02016211
GPMC_CONFIG5: 0x01010202
GPMC_CONFIG6: 0x80000000
GPMC_CONFIG7: 0x00000F41

used gpmc timing struct

.sync_clk = 0,

.cs_on = 0,
.cs_rd_off = 11,
.cs_wr_off = 11,

.adv_on = 0,
.adv_rd_off = 2,
.adv_wr_off = 2,

.oe_on = 3,
.we_on = 3,
.we_off = 11,
.oe_off = 11,

.page_burst_access = 1,
.access = 10,
.rd_cycle = 11,
.wr_cycle = 11,

.cs_cycle_delay = 10,
.cs_delay_en = 0,
.wr_access = 0,
.wr_data_mux_bus = 0,

4. remap io with ioremap_nocache(phys_base, 4)

getting base address 0xE0C7A000

5. reading from address 0xE0C7A000 with ioread16(gInfo.mBaseAddr + pAddr)

and nothing happens............ no action on any pin (CS1, CLK, ADV.....)

At the moment I've no idea what I've missed or what I've done wrong.

I believe everything is ok from the linux side because the platform driver shows up in the /proc fs and cat /proc/iomem also shows my driver as well as the nand on the memory regions:

00000000-00000000 : fpga.0
01000000-01000003 : fpga

00000000-00000000 : omap2-nand.0
08000000-08000003 : omap2-nand

Maybe some one can give me a hint?

Best regard Reinhard