SAMA5D4-EK: Update pins used by HSMCI

This commit is contained in:
Gregory Nutt 2014-06-11 14:45:01 -06:00
parent fd710fc8db
commit 2cf637692a
5 changed files with 117 additions and 84 deletions

View File

@ -84,7 +84,7 @@ Contents
Development Environment
=======================
Several possible development environments may be use:
Several possible development environments may be used:
- Linux or OSX native
- Cygwin unders Windows

View File

@ -99,7 +99,7 @@ Contents
Development Environment
=======================
Several possible development environments may be use:
Several possible development environments may be used:
- Linux or OSX native
- Cygwin unders Windows

View File

@ -89,7 +89,7 @@ Contents
Development Environment
=======================
Several possible development environments may be use:
Several possible development environments may be used:
- Linux or OSX native
- Cygwin unders Windows
@ -783,7 +783,7 @@ PIO Usage
PE4/A4/MCI0_DB3 AUDIO_IRQ_PE4 AUDIO_IRQ
PE5/A5/CTS3 MCI0_CD_PE5 MCI0_CD
PE6/A6/TIOA3 MCI1_CD_PE6 MCI1_CD
PE7/A7/TIOB3/PWMFI1 MCI1_CD_PE6 EXP
PE7/A7/TIOB3/PWMFI1 EXP_PE7 EXP
PE8/A8/TCLK3/PWML3 LED_USER_PE8 LED_USER (D10)
PE9/A9/TIOA2 LED_POWER_PE9 LED_POWER (D9, Red)
PE10/A10/TIOB2 USBA_EN5V_PE10 EN5V_USBA
@ -1216,36 +1216,48 @@ HSMCI Card Slots
The SAMA4D4-EK provides a two SD memory card slots: (1) a full size SD
card slot (J10), and (2) a microSD memory card slot (J11).
HSMCI0
------
The full size SD card slot connects via HSMCI0. The card detect discrete
is available on PD17 (pulled high). The write protect discrete is tied to
ground and not i savailable to software. The slot supports 8-bit wide
is available on PE5 (pulled high). The write protect discrete is tied to
ground and is not available to software. The slot supports 8-bit wide
transfer mode, but the NuttX driver currently uses only the 4-bit wide
transfer mode
PD17 MCI0_CD
PD1 MCI0_DA0
PD2 MCI0_DA1
PD3 MCI0_DA2
PD4 MCI0_DA3
PD5 MCI0_DA4
PD6 MCI0_DA5
PD7 MCI0_DA6
PD8 MCI0_DA7
PD9 MCI0_CK
PD0 MCI0_CDA
PE2 PWR_MCI0
------------------------------ ------------------- -------------------------
SAMA5D4 PIO SIGNAL USAGE
------------------------------ ------------------- -------------------------
PC4/SPI0_NPCS1/MCI0_CK/PCK1 PC4 MCI0_CK, ISI_MCK, EXP
PC5/D0/MCI0_CDA PC5 MCI0_CDA, NAND_IO0
PC6/D1/MCI0_DA0 PC6 MCI0_DA0, NAND_IO1
PC7/D2/MCI0_DA1 PC7 MCI0_DA1, NAND_IO2
PC8/D3/MCI0_DA2 PC8 MCI0_DA2, NAND_IO3
PC9/D4/MCI0_DA3 PC9 MCI0_DA3, NAND_IO4
PC10/D5/MCI0_DA4 PC10 MCI0_DA4, NAND_IO5
PC11/D6/MCI0_DA5 PC11 MCI0_DA5, NAND_IO6
PC12/D7/MCI0_DA6 PC12 MCI0_DA6, NAND_IO7
PC13/NRD/NANDOE/MCI0_DA7 PC13 MCI0_DA7, NAND_RE
PE5/A5/CTS3 MCI0_CD_PE5 MCI0_CD
------------------------------ ------------------- -------------------------
HSMCI1
------
The microSD connects vi HSMCI1. The card detect discrete is available on
PD18 (pulled high):
PE14 (pulled high):
PD18 MCI1_CD
PB20 MCI1_DA0
PB21 MCI1_DA1
PB22 MCI1_DA2
PB23 MCI1_DA3
PB24 MCI1_CK
PB19 MCI1_CDA
------------------------------ ------------------- -------------------------
SAMA5D4 PIO SIGNAL USAGE
------------------------------ ------------------- -------------------------
PE14/A14/TCLK1/PWMH3 MCI1_CD_PE14 MCI1_CD
PE15/A15/SCK3/TIOA0 MCI1_PWR_PE15 MCI1_PWR
PE18/A18/TIOA5/MCI1_CK PE18 MCI1_CK, EXP
PE19/A19/TIOB5/MCI1_CDA PE19 MCI1_CDA, EXP
PE20/A20/TCLK5/MCI1_DA0 PE20 MCI1_DA0, EXP
PE21/A23/TIOA4/MCI1_DA1 PE21 MCI1_DA1, EXP
PE22/A24/TIOB4/MCI1_DA2 PE22 MCI1_DA2, EXP
PE23/A25/TCLK4/MCI1_DA3 PE23 MCI1_DA3, EXP
PE6/A6/TIOA3 MCI1_CD_PE6 MCI1_CD
------------------------------ ------------------- -------------------------
Configuration Settings
----------------------
@ -1259,8 +1271,8 @@ HSMCI Card Slots
System Type->ATSAMA5 Peripheral Support
CONFIG_SAMA5_HSMCI0=y : Enable HSMCI0 support
CONFIG_SAMA5_HSMCI1=y : Enable HSMCI1 support
CONFIG_SAMA5_DMAC0=y : DMAC0 is needed by HSMCI0
CONFIG_SAMA5_DMAC1=y : DMAC1 is needed by HSMCI1
CONFIG_SAMA5_XDMAC0=y : XDMAC0 is needed by HSMCI0 <- REVISIT
CONFIG_SAMA5_XDMAC1=y : XDMAC1 is needed by HSMCI1 <- REVISIT
System Type
CONFIG_SAMA5_PIO_IRQ=y : PIO interrupts needed

View File

@ -32,37 +32,48 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* The SAMA4D4-EK provides a two SD memory card slots: (1) a full size SD card
* slot (J10), and (2) a microSD memory card slot (J11).
/* The SAMA4D4-EK provides a two SD memory card slots: (1) a full size SD
* card slot (J10), and (2) a microSD memory card slot (J11).
*
* The full size SD card slot connects via HSMCI0. The card detect discrete
* is available on PB17 (pulled high). The write protect descrete is tied to
* ground (via PP6) and not available to software. The slot supports 8-bit
* wide transfer mode, but the NuttX driver currently uses only the 4-bit
* wide transfer mode
* is available on PE5 (pulled high). The write protect discrete is tied to
* ground and is not available to software. The slot supports 8-bit wide
* transfer mode, but the NuttX driver currently uses only the 4-bit wide
* transfer mode
*
* PD17 MCI0_CD
* PD1 MCI0_DA0
* PD2 MCI0_DA1
* PD3 MCI0_DA2
* PD4 MCI0_DA3
* PD5 MCI0_DA4
* PD6 MCI0_DA5
* PD7 MCI0_DA6
* PD8 MCI0_DA7
* PD9 MCI0_CK
* PD0 MCI0_CDA
* ------------------------------ ------------------- -------------------------
* SAMA5D4 PIO SIGNAL USAGE
* ------------------------------ ------------------- -------------------------
* PC4/SPI0_NPCS1/MCI0_CK/PCK1 PC4 MCI0_CK, ISI_MCK, EXP
* PC5/D0/MCI0_CDA PC5 MCI0_CDA, NAND_IO0
* PC6/D1/MCI0_DA0 PC6 MCI0_DA0, NAND_IO1
* PC7/D2/MCI0_DA1 PC7 MCI0_DA1, NAND_IO2
* PC8/D3/MCI0_DA2 PC8 MCI0_DA2, NAND_IO3
* PC9/D4/MCI0_DA3 PC9 MCI0_DA3, NAND_IO4
* PC10/D5/MCI0_DA4 PC10 MCI0_DA4, NAND_IO5
* PC11/D6/MCI0_DA5 PC11 MCI0_DA5, NAND_IO6
* PC12/D7/MCI0_DA6 PC12 MCI0_DA6, NAND_IO7
* PC13/NRD/NANDOE/MCI0_DA7 PC13 MCI0_DA7, NAND_RE
* PE5/A5/CTS3 MCI0_CD_PE5 MCI0_CD
* ------------------------------ ------------------- -------------------------
*
* The microSD connects vi HSMCI1. The card detect discrete is available on
* PB18 (pulled high):
* PE14 (pulled high):
*
* PD18 MCI1_CD
* PB20 MCI1_DA0
* PB21 MCI1_DA1
* PB22 MCI1_DA2
* PB23 MCI1_DA3
* PB24 MCI1_CK
* PB19 MCI1_CDA
* ------------------------------ ------------------- -------------------------
* SAMA5D4 PIO SIGNAL USAGE
* ------------------------------ ------------------- -------------------------
* PE14/A14/TCLK1/PWMH3 MCI1_CD_PE14 MCI1_CD
* PE15/A15/SCK3/TIOA0 MCI1_PWR_PE15 MCI1_PWR
* PE18/A18/TIOA5/MCI1_CK PE18 MCI1_CK, EXP
* PE19/A19/TIOB5/MCI1_CDA PE19 MCI1_CDA, EXP
* PE20/A20/TCLK5/MCI1_DA0 PE20 MCI1_DA0, EXP
* PE21/A23/TIOA4/MCI1_DA1 PE21 MCI1_DA1, EXP
* PE22/A24/TIOB4/MCI1_DA2 PE22 MCI1_DA2, EXP
* PE23/A25/TCLK4/MCI1_DA3 PE23 MCI1_DA3, EXP
* PE6/A6/TIOA3 MCI1_CD_PE6 MCI1_CD
* ------------------------------ ------------------- -------------------------
*/
/****************************************************************************
@ -98,7 +109,7 @@
struct sam_hsmci_state_s
{
struct sdio_dev_s *hsmci; /* R/W device handle */
pio_pinset_t pincfg; /* Card detect PIO pin configuratin */
pio_pinset_t pincfg; /* Card detect PIO pin configuration */
uint8_t irq; /* Interrupt number (same as pid) */
uint8_t slotno; /* Slot number */
bool cd; /* TRUE: card is inserted */

View File

@ -302,47 +302,57 @@
#define IRQ_BTN_USER SAM_IRQ_PE13
/* HSMCI Card Slots *****************************************************************/
/* The SAMA4D4-EK provides a two SD memory card slots: (1) a full size SD card
* slot (J10), and (2) a microSD memory card slot (J11).
/* The SAMA4D4-EK provides a two SD memory card slots: (1) a full size SD
* card slot (J10), and (2) a microSD memory card slot (J11).
*
* The full size SD card slot connects via HSMCI0. The card detect discrete
* is available on PD17 (pulled high). The write protect descrete is tied to
* ground (via PP6) and not available to software. The slot supports 8-bit
* wide transfer mode, but the NuttX driver currently uses only the 4-bit
* wide transfer mode
* is available on PE5 (pulled high). The write protect discrete is tied to
* ground and is not available to software. The slot supports 8-bit wide
* transfer mode, but the NuttX driver currently uses only the 4-bit wide
* transfer mode
*
* PD17 MCI0_CD
* PD1 MCI0_DA0
* PD2 MCI0_DA1
* PD3 MCI0_DA2
* PD4 MCI0_DA3
* PD5 MCI0_DA4
* PD6 MCI0_DA5
* PD7 MCI0_DA6
* PD8 MCI0_DA7
* PD9 MCI0_CK
* PD0 MCI0_CDA
* ------------------------------ ------------------- -------------------------
* SAMA5D4 PIO SIGNAL USAGE
* ------------------------------ ------------------- -------------------------
* PC4/SPI0_NPCS1/MCI0_CK/PCK1 PC4 MCI0_CK, ISI_MCK, EXP
* PC5/D0/MCI0_CDA PC5 MCI0_CDA, NAND_IO0
* PC6/D1/MCI0_DA0 PC6 MCI0_DA0, NAND_IO1
* PC7/D2/MCI0_DA1 PC7 MCI0_DA1, NAND_IO2
* PC8/D3/MCI0_DA2 PC8 MCI0_DA2, NAND_IO3
* PC9/D4/MCI0_DA3 PC9 MCI0_DA3, NAND_IO4
* PC10/D5/MCI0_DA4 PC10 MCI0_DA4, NAND_IO5
* PC11/D6/MCI0_DA5 PC11 MCI0_DA5, NAND_IO6
* PC12/D7/MCI0_DA6 PC12 MCI0_DA6, NAND_IO7
* PC13/NRD/NANDOE/MCI0_DA7 PC13 MCI0_DA7, NAND_RE
* PE5/A5/CTS3 MCI0_CD_PE5 MCI0_CD
* ------------------------------ ------------------- -------------------------
*/
#define PIO_MCI0_CD (PIO_INPUT | PIO_CFG_DEFAULT | PIO_CFG_DEGLITCH | \
PIO_INT_BOTHEDGES | PIO_PORT_PIOD | PIO_PIN17)
#define IRQ_MCI0_CD SAM_IRQ_PD17
PIO_INT_BOTHEDGES | PIO_PORT_PIOE | PIO_PIN5)
#define IRQ_MCI0_CD SAM_IRQ_PE5
/* The microSD connects vi HSMCI1. The card detect discrete is available on
* PBD8 (pulled high):
* PE14 (pulled high):
*
* PD18 MCI1_CD
* PB20 MCI1_DA0
* PB21 MCI1_DA1
* PB22 MCI1_DA2
* PB23 MCI1_DA3
* PB24 MCI1_CK
* PB19 MCI1_CDA
* ------------------------------ ------------------- -------------------------
* SAMA5D4 PIO SIGNAL USAGE
* ------------------------------ ------------------- -------------------------
* PE14/A14/TCLK1/PWMH3 MCI1_CD_PE14 MCI1_CD
* PE15/A15/SCK3/TIOA0 MCI1_PWR_PE15 MCI1_PWR
* PE18/A18/TIOA5/MCI1_CK PE18 MCI1_CK, EXP
* PE19/A19/TIOB5/MCI1_CDA PE19 MCI1_CDA, EXP
* PE20/A20/TCLK5/MCI1_DA0 PE20 MCI1_DA0, EXP
* PE21/A23/TIOA4/MCI1_DA1 PE21 MCI1_DA1, EXP
* PE22/A24/TIOB4/MCI1_DA2 PE22 MCI1_DA2, EXP
* PE23/A25/TCLK4/MCI1_DA3 PE23 MCI1_DA3, EXP
* PE6/A6/TIOA3 MCI1_CD_PE6 MCI1_CD
* ------------------------------ ------------------- -------------------------
*/
#define PIO_MCI1_CD (PIO_INPUT | PIO_CFG_DEFAULT | PIO_CFG_DEGLITCH | \
PIO_INT_BOTHEDGES | PIO_PORT_PIOD | PIO_PIN18)
#define IRQ_MCI1_CD SAM_IRQ_PD18
PIO_INT_BOTHEDGES | PIO_PORT_PIOE | PIO_PIN14)
#define IRQ_MCI1_CD SAM_IRQ_PE14
/* USB Ports ************************************************************************/
/* The SAMA5D4 series-MB features three USB communication ports: