From 20fdf8161f05d0dd90d3e8cdfd8d7e71bc5b541c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 15 Jun 2013 10:56:08 -0600 Subject: [PATCH] Add support for the SAM4L Xplained Pro I/O1 module --- arch/arm/src/sam34/chip/sam4l_pinmap.h | 60 +++++++++++++------------- arch/arm/src/sam34/sam4l_clockconfig.c | 6 +-- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/arch/arm/src/sam34/chip/sam4l_pinmap.h b/arch/arm/src/sam34/chip/sam4l_pinmap.h index 68f4b2074d7..4b061f73947 100644 --- a/arch/arm/src/sam34/chip/sam4l_pinmap.h +++ b/arch/arm/src/sam34/chip/sam4l_pinmap.h @@ -386,36 +386,36 @@ /* Serial Peripheral Interface */ -#define GPIO_SPI_MISO_1 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN21) -#define GPIO_SPI_MISO_2 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN27) -#define GPIO_SPI_MISO_3 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN4) -#define GPIO_SPI_MISO_4 (GPIO_FUNCB | GPIO_PORTA | GPIO_PIN3) -#define GPIO_SPI_MISO_5 (GPIO_FUNCB | GPIO_PORTB | GPIO_PIN14) -#define GPIO_SPI_MISO_6 (GPIO_FUNCB | GPIO_PORTC | GPIO_PIN28) -#define GPIO_SPI_MOSI_1 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN22) -#define GPIO_SPI_MOSI_2 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN28) -#define GPIO_SPI_MOSI_3 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN5) -#define GPIO_SPI_MOSI_4 (GPIO_FUNCB | GPIO_PORTB | GPIO_PIN15) -#define GPIO_SPI_MOSI_5 (GPIO_FUNCB | GPIO_PORTC | GPIO_PIN29) -#define GPIO_SPI_NPCS0_1 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN24) -#define GPIO_SPI_NPCS0_2 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN30) -#define GPIO_SPI_NPCS0_3 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN3) -#define GPIO_SPI_NPCS0_4 (GPIO_FUNCB | GPIO_PORTA | GPIO_PIN2) -#define GPIO_SPI_NPCS0_5 (GPIO_FUNCB | GPIO_PORTC | GPIO_PIN31) -#define GPIO_SPI_NPCS1_1 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN31) -#define GPIO_SPI_NPCS1_2 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN2) -#define GPIO_SPI_NPCS1_3 (GPIO_FUNCB | GPIO_PORTB | GPIO_PIN13) -#define GPIO_SPI_NPCS1_4 (GPIO_FUNCC | GPIO_PORTA | GPIO_PIN13) -#define GPIO_SPI_NPCS2_1 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN0) -#define GPIO_SPI_NPCS2_2 (GPIO_FUNCB | GPIO_PORTB | GPIO_PIN11) -#define GPIO_SPI_NPCS2_3 (GPIO_FUNCC | GPIO_PORTA | GPIO_PIN14) -#define GPIO_SPI_NPCS3_1 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN1) -#define GPIO_SPI_NPCS3_2 (GPIO_FUNCB | GPIO_PORTB | GPIO_PIN12) -#define GPIO_SPI_NPCS3_3 (GPIO_FUNCC | GPIO_PORTA | GPIO_PIN15) -#define GPIO_SPI_SCK_1 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN23) -#define GPIO_SPI_SCK_2 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN29) -#define GPIO_SPI_SCK_3 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN6) -#define GPIO_SPI_SCK_4 (GPIO_FUNCB | GPIO_PORTC | GPIO_PIN30) +#define GPIO_SPI0_MISO_1 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN21) +#define GPIO_SPI0_MISO_2 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN27) +#define GPIO_SPI0_MISO_3 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN4) +#define GPIO_SPI0_MISO_4 (GPIO_FUNCB | GPIO_PORTA | GPIO_PIN3) +#define GPIO_SPI0_MISO_5 (GPIO_FUNCB | GPIO_PORTB | GPIO_PIN14) +#define GPIO_SPI0_MISO_6 (GPIO_FUNCB | GPIO_PORTC | GPIO_PIN28) +#define GPIO_SPI0_MOSI_1 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN22) +#define GPIO_SPI0_MOSI_2 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN28) +#define GPIO_SPI0_MOSI_3 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN5) +#define GPIO_SPI0_MOSI_4 (GPIO_FUNCB | GPIO_PORTB | GPIO_PIN15) +#define GPIO_SPI0_MOSI_5 (GPIO_FUNCB | GPIO_PORTC | GPIO_PIN29) +#define GPIO_SPI0_NPCS0_1 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN24) +#define GPIO_SPI0_NPCS0_2 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN30) +#define GPIO_SPI0_NPCS0_3 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN3) +#define GPIO_SPI0_NPCS0_4 (GPIO_FUNCB | GPIO_PORTA | GPIO_PIN2) +#define GPIO_SPI0_NPCS0_5 (GPIO_FUNCB | GPIO_PORTC | GPIO_PIN31) +#define GPIO_SPI0_NPCS1_1 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN31) +#define GPIO_SPI0_NPCS1_2 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN2) +#define GPIO_SPI0_NPCS1_3 (GPIO_FUNCB | GPIO_PORTB | GPIO_PIN13) +#define GPIO_SPI0_NPCS1_4 (GPIO_FUNCC | GPIO_PORTA | GPIO_PIN13) +#define GPIO_SPI0_NPCS2_1 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN0) +#define GPIO_SPI0_NPCS2_2 (GPIO_FUNCB | GPIO_PORTB | GPIO_PIN11) +#define GPIO_SPI0_NPCS2_3 (GPIO_FUNCC | GPIO_PORTA | GPIO_PIN14) +#define GPIO_SPI0_NPCS3_1 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN1) +#define GPIO_SPI0_NPCS3_2 (GPIO_FUNCB | GPIO_PORTB | GPIO_PIN12) +#define GPIO_SPI0_NPCS3_3 (GPIO_FUNCC | GPIO_PORTA | GPIO_PIN15) +#define GPIO_SPI0_SPCK_1 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN23) +#define GPIO_SPI0_SPCK_2 (GPIO_FUNCA | GPIO_PORTA | GPIO_PIN29) +#define GPIO_SPI0_SPCK_3 (GPIO_FUNCA | GPIO_PORTC | GPIO_PIN6) +#define GPIO_SPI0_SPCK_4 (GPIO_FUNCB | GPIO_PORTC | GPIO_PIN30) /* Timer/Counters */ diff --git a/arch/arm/src/sam34/sam4l_clockconfig.c b/arch/arm/src/sam34/sam4l_clockconfig.c index 59bd62bf09d..c02368dc86e 100644 --- a/arch/arm/src/sam34/sam4l_clockconfig.c +++ b/arch/arm/src/sam34/sam4l_clockconfig.c @@ -425,11 +425,11 @@ # define SAM_DFLLO_REFCLK SCIF_GCCTRL_OSCSEL_RCSYS # elif defined(BOARD_DFLL0_SOURCE_OSC32K) # define SAM_DFLLO_REFCLK SCIF_GCCTRL_OSCSEL_OSC32K -# elif define(BOARD_DFLL0_SOURCE_OSC0) +# elif defined(BOARD_DFLL0_SOURCE_OSC0) # define SAM_DFLLO_REFCLK SCIF_GCCTRL_OSCSEL_OSC0 -# elif define(BOARD_DFLL0_SOURCE_RC80M) +# elif defined(BOARD_DFLL0_SOURCE_RC80M) # define SAM_DFLLO_REFCLK SCIF_GCCTRL_OSCSEL_RC80M -# elif define(BOARD_DFLL0_SOURCE_RC32K) +# elif defined(BOARD_DFLL0_SOURCE_RC32K) # define SAM_DFLLO_REFCLK SCIF_GCCTRL_OSCSEL_RC32K # else # error No DFLL0 source for reference clock defined