diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-12-29 16:47:08 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-12-29 16:47:08 +0100 |
commit | 3cdba2b9eea0900a32817e2e7e2ce474190d4f51 (patch) | |
tree | cf9f3de1c1458c6b48f2fc16431777320361e924 /boards | |
parent | 588169f12218ed26121fdebc6878a729d69438ba (diff) |
osmo-sdr: update GPIO definitions in board.h
Diffstat (limited to 'boards')
-rw-r--r-- | boards/osmo-sdr/board.h | 157 |
1 files changed, 25 insertions, 132 deletions
diff --git a/boards/osmo-sdr/board.h b/boards/osmo-sdr/board.h index 6275983..e130ceb 100644 --- a/boards/osmo-sdr/board.h +++ b/boards/osmo-sdr/board.h @@ -130,132 +130,6 @@ /// are named using the following convention: PIN_* for a constant which defines
/// a single Pin instance (but may include several PIOs sharing the same
/// controller), and PINS_* for a list of Pin instances.
-///
-/// !ADC
-/// - PIN_ADC0_AD0
-/// - PIN_ADC0_AD1
-/// - PIN_ADC0_AD2
-/// - PIN_ADC0_AD3
-/// - PIN_ADC0_AD4
-/// - PIN_ADC0_AD5
-/// - PIN_ADC0_AD6
-/// - PIN_ADC0_AD7
-/// - PINS_ADC
-///
-/// !DBGU
-/// - PINS_DBGU
-///
-/// !EBI
-/// - PIN_EBI_DATA_BUS
-/// - PIN_EBI_NCS0
-/// - PIN_EBI_NRD
-/// - PIN_EBI_NWE
-/// - PIN_EBI_PSRAM_ADDR_BUS
-/// - PIN_EBI_PSRAM_NBS
-/// - PIN_EBI_A1
-/// - PIN_EBI_NCS2
-/// - PIN_EBI_LCD_RS
-///
-/// !LEDs
-/// - PIN_LED_0
-/// - PIN_LED_1
-/// - PIN_LED_2
-/// - PINS_LEDS
-///
-/// !MCI
-/// - PINS_MCI
-/// - PIN_MCI_DAT0
-/// - PIN_MCI_CD
-///
-/// !Push buttons
-/// - PIN_PUSHBUTTON_1
-/// - PIN_PUSHBUTTON_2
-/// - PINS_PUSHBUTTONS
-/// - PUSHBUTTON_BP1
-/// - PUSHBUTTON_BP2
-///
-/// !PWMC
-/// - PIN_PWMC_PWMH0
-/// - PIN_PWMC_PWML0
-/// - PIN_PWMC_PWMH1
-/// - PIN_PWMC_PWML1
-/// - PIN_PWMC_PWMH2
-/// - PIN_PWMC_PWML2
-/// - PIN_PWM_LED0
-/// - PIN_PWM_LED1
-/// - PIN_PWM_LED2
-/// - CHANNEL_PWM_LED0
-/// - CHANNEL_PWM_LED1
-/// - CHANNEL_PWM_LED2
-///
-/// !SPI0
-/// - PIN_SPI0_MISO
-/// - PIN_SPI0_MOSI
-/// - PIN_SPI0_SPCK
-/// - PIN_SPI0_NPCS2_PC14
-/// - PINS_SPI0
-///
-/// !SPI1
-/// - PIN_SPI1_MISO
-/// - PIN_SPI1_MOSI
-/// - PIN_SPI1_SPCK
-/// - PINS_SPI1
-/// - PIN_SPI1_NPCS3
-///
-/// ! SSC
-/// - PIN_SSC_TD
-/// - PIN_SSC_TK
-/// - PIN_SSC_TF
-/// - PINS_SSC_CODEC
-///
-/// ! PCK0
-/// - PIN_PCK0
-///
-/// !TWI
-/// - TWI_V3XX
-/// - PIN_TWI_TWD0
-/// - PIN_TWI_TWCK0
-/// - PINS_TWI0
-/// - PIN_TWI_TWD1
-/// - PIN_TWI_TWCK1
-/// - PINS_TWI1
-///
-/// !USART0
-/// - PIN_USART0_RXD
-/// - PIN_USART0_TXD
-/// - PIN_USART0_CTS
-/// - PIN_USART0_RTS
-/// - PIN_USART0_SCK
-///
-/// !USART1
-/// - PIN_USART1_RXD
-/// - PIN_USART1_TXD
-/// - PIN_USART1_CTS
-/// - PIN_USART1_RTS
-/// - PIN_USART1_SCK
-///
-/// !USB
-/// - PIN_USB_VBUS
-///
-/// ADC_AD0 pin definition.
-#define PIN_ADC0_AD0 {1 << 21, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
-/// ADC_AD1 pin definition.
-#define PIN_ADC0_AD1 {1 << 30, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
-/// ADC_AD2 pin definition.
-#define PIN_ADC0_AD2 {1 << 3, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_INPUT, PIO_DEFAULT}
-/// ADC_AD3 pin definition.
-#define PIN_ADC0_AD3 {1 << 4, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_INPUT, PIO_DEFAULT}
-/// ADC_AD4 pin definition.
-#define PIN_ADC0_AD4 {1 << 15, AT91C_BASE_PIOC, AT91C_ID_PIOC, PIO_INPUT, PIO_DEFAULT}
-/// ADC_AD5 pin definition.
-#define PIN_ADC0_AD5 {1 << 16, AT91C_BASE_PIOC, AT91C_ID_PIOC, PIO_INPUT, PIO_DEFAULT}
-/// ADC_AD6 pin definition.
-#define PIN_ADC0_AD6 {1 << 17, AT91C_BASE_PIOC, AT91C_ID_PIOC, PIO_INPUT, PIO_DEFAULT}
-/// ADC_AD7 pin definition.
-#define PIN_ADC0_AD7 {1 << 18, AT91C_BASE_PIOC, AT91C_ID_PIOC, PIO_INPUT, PIO_DEFAULT}
-
-/// Pins ADC
-#define PINS_ADC PIN_ADC0_AD0, PIN_ADC0_AD1, PIN_ADC0_AD2, PIN_ADC0_AD3, PIN_ADC0_AD4, PIN_ADC0_AD5, PIN_ADC0_AD6, PIN_ADC0_AD7
/// DBGU pins (DTXD and DRXD) definitions, PA11,12.
#define PINS_DBGU {0x00001800, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
@@ -267,6 +141,7 @@ /// List of all LEDs definitions.
#define PINS_LEDS PIN_LED_1, PIN_LED_2
+/// SPI0 to FPGA
/// SPI0 MISO pin definition.
#define PIN_SPI0_MISO {1 << 13, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
/// SPI0 MOSI pin definition.
@@ -276,30 +151,33 @@ /// SPI0 chip select 0 pin definition.
#define PIN_SPI0_NPCS0_PA16 {1 << 16, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
#define PIN_SPI0_NPCS0 PIN_SPI0_NPCS0_PA16
-/// SPI0 chip select 2 pin definition.
-#define PIN_SPI0_NPCS2_PC14 {1 << 14, AT91C_BASE_PIOC, AT91C_ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT}
/// List of SPI0 pin definitions (MISO, MOSI & SPCK).
-#define PINS_SPI0 PIN_SPI0_MISO, PIN_SPI0_MOSI, PIN_SPI0_SPCK
+#define PINS_SPI0 PIN_SPI0_MISO, PIN_SPI0_MOSI, PIN_SPI0_SPCK, PIN_SPI0_NPCS0
/// SSC pins definition.
#define PIN_SSC_TD {0x1 << 26, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+#define PIN_SSC_RD {0x1 << 27, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
#define PIN_SSC_TK {0x1 << 28, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+#define PIN_SSC_RK {0x1 << 29, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
#define PIN_SSC_TF {0x1 << 30, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
-#define PINS_SSC_CODEC PIN_SSC_TD, PIN_SSC_TK, PIN_SSC_TF
+#define PIN_SSC_RF {0x1 << 31, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
+#define PINS_SSC PIN_SSC_TD, PIN_SSC_RD, PIN_SSC_TK, PIN_SSC_RK, PIN_SSC_TF, PIN_SSC_RK
/// PCK0
#define PIN_PCK0 {0x1 << 21, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
-/// TWI pins definition.
+/// TWI pins to Si570 and E4K on Rx board
#define TWI_V3XX
#define PIN_TWI_TWD0 {0x1 << 9, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
#define PIN_TWI_TWCK0 {0x1 << 10, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
#define PINS_TWI0 PIN_TWI_TWD0, PIN_TWI_TWCK0
+
+/// TWI1 to extension connector
#define PIN_TWI_TWD1 {0x1 << 24, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
#define PIN_TWI_TWCK1 {0x1 << 25, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
#define PINS_TWI1 PIN_TWI_TWD1, PIN_TWI_TWCK1
-/// USART0
+/// USART0 on extension connector
#define PIN_USART0_RXD {0x1 << 19, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
#define PIN_USART0_TXD {0x1 << 18, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
#define PIN_USART0_CTS {0x1 << 8, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT}
@@ -316,6 +194,21 @@ /// USB VBus monitoring pin definition.
#define PIN_USB_VBUS {1 << 10, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_INPUT, PIO_DEFAULT}
+/// misc GPIO (default: FPGA/RF: power down)
+#define PIN_RFSTBY {1 << 1, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT}
+#define PIN_PDWN {1 << 0, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT}
+#define PIN_INT0 {1 << 17, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
+#define PIN_FON {1 << 16, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT}
+#define PINS_MISC PIN_RFSTBY, PIN_PDWN, PIN_INT0, PIN_FON
+
+/// FPGA JTAG
+#define PIN_FPGA_TDI {1 << 8, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_OUTPUT_1, PIO_PULLUP}
+#define PIN_FPGA_TCK {1 << 7, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_OUTPUT_1, PIO_PULLUP}
+#define PIN_FPGA_TDO {1 << 6, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_INPUT, PIO_PULLUP}
+#define PIN_FPGA_TMS {1 << 5, AT91C_BASE_PIOB, AT91C_ID_PIOB, PIO_INPUT, PIO_PULLUP}
+#define PINS_FPGA_JTAG PIN_FPGA_TDI, PIN_FPGA_TCK, PIN_FPGA_TDO, PIN_FPGA_TMS
+
+
//------------------------------------------------------------------------------
/// \page "OsmoSDR - Memories"
/// This page lists definitions related to internal & external on-board memories.
|