Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:04

0001 /**
0002  * @file
0003  *
0004  * @ingroup raspberrypi_gpio
0005  *
0006  * @brief Raspberry PI 1 rev2 GPIO interface definitions.
0007  */
0008 
0009 /*
0010  *  Copyright (c) 2015 Andre Marques <andre.lousa.marques at gmail.com>
0011  *
0012  *  The license and distribution terms for this file may be
0013  *  found in the file LICENSE in this distribution or at
0014  *  http://www.rtems.org/license/LICENSE.
0015  */
0016 
0017 #define JTAG_PIN_COUNT 5
0018 #define SPI_PIN_COUNT 5
0019 #define I2C_PIN_COUNT 2
0020 
0021 const rtems_gpio_pin_conf jtag_config[JTAG_PIN_COUNT] = {
0022   { /*arm_tdi */
0023     .pin_number = 4,
0024     .function = BSP_SPECIFIC,
0025     .pull_mode = NO_PULL_RESISTOR,
0026     .interrupt = NULL,
0027     .output_enabled = FALSE,
0028     .logic_invert = FALSE,
0029     .bsp_specific = &alt_func_def[5]
0030   },
0031   { /* arm_trst */
0032     .pin_number = 22,
0033     .function = BSP_SPECIFIC,
0034     .pull_mode = NO_PULL_RESISTOR,
0035     .interrupt = NULL,
0036     .output_enabled = FALSE,
0037     .logic_invert = FALSE,
0038     .bsp_specific = &alt_func_def[4]
0039   },
0040   { /* arm_tdo */
0041     .pin_number = 24,
0042     .function = BSP_SPECIFIC,
0043     .pull_mode = NO_PULL_RESISTOR,
0044     .interrupt = NULL,
0045     .output_enabled = FALSE,
0046     .logic_invert = FALSE,
0047     .bsp_specific = &alt_func_def[4]
0048   },
0049   { /* arm_tck */
0050     .pin_number = 25,
0051     .function = BSP_SPECIFIC,
0052     .pull_mode = NO_PULL_RESISTOR,
0053     .interrupt = NULL,
0054     .output_enabled = FALSE,
0055     .logic_invert = FALSE,
0056     .bsp_specific = &alt_func_def[4]
0057   },
0058   { /* arm_tms */
0059     .pin_number = 27,
0060     .function = BSP_SPECIFIC,
0061     .pull_mode = NO_PULL_RESISTOR,
0062     .interrupt = NULL,
0063     .output_enabled = FALSE,
0064     .logic_invert = FALSE,
0065     .bsp_specific = &alt_func_def[4]
0066   }
0067 };
0068 
0069 const rtems_gpio_pin_conf spi_config[SPI_PIN_COUNT] = {
0070   { /* spi_miso */
0071     .pin_number = 7,
0072     .function = BSP_SPECIFIC,
0073     .pull_mode = NO_PULL_RESISTOR,
0074     .interrupt = NULL,
0075     .output_enabled = FALSE,
0076     .logic_invert = FALSE,
0077     .bsp_specific = &alt_func_def[0]
0078   },
0079   { /* spi_mosi */
0080     .pin_number = 8,
0081     .function = BSP_SPECIFIC,
0082     .pull_mode = NO_PULL_RESISTOR,
0083     .interrupt = NULL,
0084     .output_enabled = FALSE,
0085     .logic_invert = FALSE,
0086     .bsp_specific = &alt_func_def[0]
0087   },
0088   { /* spi_sclk */
0089     .pin_number = 9,
0090     .function = BSP_SPECIFIC,
0091     .pull_mode = NO_PULL_RESISTOR,
0092     .interrupt = NULL,
0093     .output_enabled = FALSE,
0094     .logic_invert = FALSE,
0095     .bsp_specific = &alt_func_def[0]
0096   },
0097   { /* spi_ce_0 */
0098     .pin_number = 10,
0099     .function = BSP_SPECIFIC,
0100     .pull_mode = NO_PULL_RESISTOR,
0101     .interrupt = NULL,
0102     .output_enabled = FALSE,
0103     .logic_invert = FALSE,
0104     .bsp_specific = &alt_func_def[0]
0105   },
0106   { /* spi_ce_1 */
0107     .pin_number = 11,
0108     .function = BSP_SPECIFIC,
0109     .pull_mode = NO_PULL_RESISTOR,
0110     .interrupt = NULL,
0111     .output_enabled = FALSE,
0112     .logic_invert = FALSE,
0113     .bsp_specific = &alt_func_def[0]
0114   }
0115 };
0116 
0117 const rtems_gpio_pin_conf i2c_config[I2C_PIN_COUNT] = {
0118   { /* i2c_sda */
0119     .pin_number = 2,
0120     .function = BSP_SPECIFIC,
0121     .pull_mode = PULL_UP,
0122     .interrupt = NULL,
0123     .output_enabled = FALSE,
0124     .logic_invert = FALSE,
0125     .bsp_specific = &alt_func_def[0]
0126   },
0127   { /* i2c_scl */
0128     .pin_number = 3,
0129     .function = BSP_SPECIFIC,
0130     .pull_mode = PULL_UP,
0131     .interrupt = NULL,
0132     .output_enabled = FALSE,
0133     .logic_invert = FALSE,
0134     .bsp_specific = &alt_func_def[0]
0135   }
0136 };