AT32AP7002 SD card Card Detect and Write Protect signals...

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am building a custom board with the AP7002, and I will need the LCDC, as well as SD card interface... I am using the NGW100 as reference design, but have come to a bind...

In the NGW100 schematics, the MCI port is used for the SD cardslot, and the CD and WP lines are on some GPIO's that are not used by the NGW100, but will be on my board, by the LCD controller.

How much of a hassle would it be for me to relocate those two lines to some other free GPIOs in terms of modifying a linux kernel to work with those new lines? Does Linux even need those lines?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It doesn't need those lines unless you're going to want automatic card detection. For example, the STK1000 doesn't have them connected.

It's no hassle at all to change the pins it's looking at though, in arch/avr32/boards/atngw100/setup.c you'll see some lines which look like

 struct mci_data something = {
.wp = GPIO_PIN_Px(m),
.cd = GPIO_PIN_Py(n),
}

As you can probably tell I don't have sources in front of me to copy it exactly, but the long and the short of it is that you simply need to change the 2 lines to have the right port letter and pin number for your new signal locations.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perfect, that is exactly what I needed to know... :)

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This support appears to have disappeared from the latest buildroot svn (which now uses Linux 2.6.24).

Can anyone shed light on how to set this up again ?

Thanks