Changeset 151e53f in rtems


Ignore:
Timestamp:
Aug 18, 2015, 2:30:48 PM (6 years ago)
Author:
Ketul Shah <ketulshah1993@…>
Branches:
5, master
Children:
1f242285
Parents:
b09a578
git-author:
Ketul Shah <ketulshah1993@…> (08/18/15 14:30:48)
git-committer:
Ben Gras <ben@…> (08/18/15 15:05:55)
Message:

Beagle: GPIO support (for BBB)

GPIO Driver Development for BeagleBone? Black based on the generic GPIO API

Location:
c/src/lib
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/beagle/Makefile.am

    rb09a578 r151e53f  
    4040include_bsp_HEADERS += include/irq.h
    4141include_bsp_HEADERS += include/i2c.h
     42include_bsp_HEADERS += include/beagleboneblack.h
     43include_bsp_HEADERS += include/bbb-gpio.h
    4244
    4345include_libcpu_HEADERS =
     
    8385libbsp_a_SOURCES += ../../shared/sbrk.c
    8486libbsp_a_SOURCES += ../../shared/src/stackalloc.c
     87libbsp_a_SOURCES += ../../shared/gpio.c
    8588libbsp_a_SOURCES += ../../shared/cpucounterdiff.c
    8689libbsp_a_SOURCES += ../../shared/timerstub.c
     
    115118libbsp_a_SOURCES += misc/i2c.c
    116119
     120# GPIO
     121libbsp_a_SOURCES += gpio/bbb-gpio.c
     122
    117123#RTC
    118124libbsp_a_SOURCES += rtc.c
  • c/src/lib/libbsp/arm/beagle/include/bsp.h

    rb09a578 r151e53f  
    3232#include <bsp/start.h>
    3333#include <bsp/default-initial-extension.h>
     34#include <bsp/beagleboneblack.h>
    3435
    3536#include <rtems.h>
     
    168169#define BEAGLE_BASE_UART_2      0x4806C000
    169170#define BEAGLE_BASE_UART_3      0x49020000
     171#endif
     172
     173/* GPIO pin config */
     174#if IS_AM335X
     175#define BSP_GPIO_PIN_COUNT 128
     176#define BSP_GPIO_PINS_PER_BANK 32
     177#endif
     178
     179#if IS_DM3730
     180#define BSP_GPIO_PIN_COUNT 192
     181#define BSP_GPIO_PINS_PER_BANK 32
    170182#endif
    171183
  • c/src/lib/libbsp/arm/beagle/preinstall.am

    rb09a578 r151e53f  
    111111PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/i2c.h
    112112
     113$(PROJECT_INCLUDE)/bsp/beagleboneblack.h: include/beagleboneblack.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     114        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/beagleboneblack.h
     115PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/beagleboneblack.h
     116
     117$(PROJECT_INCLUDE)/bsp/bbb-gpio.h: include/bbb-gpio.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     118        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bbb-gpio.h
     119PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bbb-gpio.h
     120
    113121$(PROJECT_INCLUDE)/libcpu/arm-cp15.h: ../../../libcpu/arm/shared/include/arm-cp15.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
    114122        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/arm-cp15.h
  • c/src/lib/libcpu/arm/shared/include/am335x.h

    rb09a578 r151e53f  
    301301#define AM335X_RTC_KICK0_KEY    0x83E70B13
    302302#define AM335X_RTC_KICK1_KEY    0x95A4F1E0
     303
     304/* GPIO memory-mapped registers */
     305
     306#define AM335X_GPIO0_BASE           0x44E07000
     307    /* GPIO Bank 0 base Register */
     308#define AM335X_GPIO1_BASE           0x4804C000
     309    /* GPIO Bank 1 base Register */
     310#define AM335X_GPIO2_BASE           0x481AC000
     311    /* GPIO Bank 2 base Register */
     312#define AM335X_GPIO3_BASE           0x481AE000
     313    /* GPIO Bank 3 base Register */
     314
     315#define AM335X_GPIO_REVISION        0x00
     316#define AM335X_GPIO_SYSCONFIG       0x10
     317#define AM335X_GPIO_EOI             0x20
     318#define AM335X_GPIO_IRQSTATUS_RAW_0 0x24
     319#define AM335X_GPIO_IRQSTATUS_RAW_1 0x28
     320#define AM335X_GPIO_IRQSTATUS_0     0x2C
     321#define AM335X_GPIO_IRQSTATUS_1     0x30
     322#define AM335X_GPIO_IRQSTATUS_SET_0 0x34
     323#define AM335X_GPIO_IRQSTATUS_SET_1 0x38
     324#define AM335X_GPIO_IRQSTATUS_CLR_0 0x3C
     325#define AM335X_GPIO_IRQSTATUS_CLR_1 0x40
     326#define AM335X_GPIO_IRQWAKEN_0      0x44
     327#define AM335X_GPIO_IRQWAKEN_1      0x48
     328#define AM335X_GPIO_SYSSTATUS       0x114
     329#define AM335X_GPIO_CTRL            0x130
     330#define AM335X_GPIO_OE              0x134
     331#define AM335X_GPIO_DATAIN          0x138
     332#define AM335X_GPIO_DATAOUT         0x13C
     333#define AM335X_GPIO_LEVELDETECT0    0x140
     334#define AM335X_GPIO_LEVELDETECT1    0x144
     335#define AM335X_GPIO_RISINGDETECT    0x148
     336#define AM335X_GPIO_FALLINGDETECT   0x14C
     337#define AM335X_GPIO_DEBOUNCENABLE   0x150
     338#define AM335X_GPIO_DEBOUNCINGTIME  0x154
     339#define AM335X_GPIO_CLEARDATAOUT    0x190
     340#define AM335X_GPIO_SETDATAOUT      0x194
     341
     342/* AM335X Pad Configuration Register Base */
     343#define AM335X_PADCONF_BASE 0x44E10000
     344
     345/* Memory mapped register offset for Control Module */
     346#define AM335X_CONF_GPMC_AD0 0x800
     347#define AM335X_CONF_GPMC_AD1 0x804
     348#define AM335X_CONF_GPMC_AD2 0x808
     349#define AM335X_CONF_GPMC_AD3 0x80C
     350#define AM335X_CONF_GPMC_AD4 0x810
     351#define AM335X_CONF_GPMC_AD5 0x814
     352#define AM335X_CONF_GPMC_AD6 0x818
     353#define AM335X_CONF_GPMC_AD7 0x81C
     354#define AM335X_CONF_GPMC_AD8 0x820
     355#define AM335X_CONF_GPMC_AD9 0x824
     356#define AM335X_CONF_GPMC_AD10 0x828
     357#define AM335X_CONF_GPMC_AD11 0x82C
     358#define AM335X_CONF_GPMC_AD12 0x830
     359#define AM335X_CONF_GPMC_AD13 0x834
     360#define AM335X_CONF_GPMC_AD14 0x838
     361#define AM335X_CONF_GPMC_AD15 0x83C
     362#define AM335X_CONF_GPMC_A0 0x840
     363#define AM335X_CONF_GPMC_A1 0x844
     364#define AM335X_CONF_GPMC_A2 0x848
     365#define AM335X_CONF_GPMC_A3 0x84C
     366#define AM335X_CONF_GPMC_A4 0x850
     367#define AM335X_CONF_GPMC_A5 0x854
     368#define AM335X_CONF_GPMC_A6 0x858
     369#define AM335X_CONF_GPMC_A7 0x85C
     370#define AM335X_CONF_GPMC_A8 0x860
     371#define AM335X_CONF_GPMC_A9 0x864
     372#define AM335X_CONF_GPMC_A10 0x868
     373#define AM335X_CONF_GPMC_A11 0x86C
     374#define AM335X_CONF_GPMC_WAIT0 0x870
     375#define AM335X_CONF_GPMC_WPN 0x874
     376#define AM335X_CONF_GPMC_BEN1 0x878
     377#define AM335X_CONF_GPMC_CSN0 0x87C
     378#define AM335X_CONF_GPMC_CSN1 0x880
     379#define AM335X_CONF_GPMC_CSN2 0x884
     380#define AM335X_CONF_GPMC_CSN3 0x888
     381#define AM335X_CONF_GPMC_CLK 0x88C
     382#define AM335X_CONF_GPMC_ADVN_ALE 0x890
     383#define AM335X_CONF_GPMC_OEN_REN 0x894
     384#define AM335X_CONF_GPMC_WEN 0x898
     385#define AM335X_CONF_GPMC_BEN0_CLE 0x89C
     386#define AM335X_CONF_LCD_DATA0 0x8A0
     387#define AM335X_CONF_LCD_DATA1 0x8A4
     388#define AM335X_CONF_LCD_DATA2 0x8A8
     389#define AM335X_CONF_LCD_DATA3 0x8AC
     390#define AM335X_CONF_LCD_DATA4 0x8B0
     391#define AM335X_CONF_LCD_DATA5 0x8B4
     392#define AM335X_CONF_LCD_DATA6 0x8B8
     393#define AM335X_CONF_LCD_DATA7 0x8BC
     394#define AM335X_CONF_LCD_DATA8 0x8C0
     395#define AM335X_CONF_LCD_DATA9 0x8C4
     396#define AM335X_CONF_LCD_DATA10 0x8C8
     397#define AM335X_CONF_LCD_DATA11 0x8CC
     398#define AM335X_CONF_LCD_DATA12 0x8D0
     399#define AM335X_CONF_LCD_DATA13 0x8D4
     400#define AM335X_CONF_LCD_DATA14 0x8D8
     401#define AM335X_CONF_LCD_DATA15 0x8DC
     402#define AM335X_CONF_LCD_VSYNC 0x8E0
     403#define AM335X_CONF_LCD_HSYNC 0x8E4
     404#define AM335X_CONF_LCD_PCLK 0x8E8
     405#define AM335X_CONF_LCD_AC_BIAS_EN 0x8EC
     406#define AM335X_CONF_MMC0_DAT3 0x8F0
     407#define AM335X_CONF_MMC0_DAT2 0x8F4
     408#define AM335X_CONF_MMC0_DAT1 0x8F8
     409#define AM335X_CONF_MMC0_DAT0 0x8FC
     410#define AM335X_CONF_MMC0_CLK 0x900
     411#define AM335X_CONF_MMC0_CMD 0x904
     412#define AM335X_CONF_MII1_COL 0x908
     413#define AM335X_CONF_MII1_CRS 0x90C
     414#define AM335X_CONF_MII1_RX_ER 0x910
     415#define AM335X_CONF_MII1_TX_EN 0x914
     416#define AM335X_CONF_MII1_RX_DV 0x918
     417#define AM335X_CONF_MII1_TXD3 0x91C
     418#define AM335X_CONF_MII1_TXD2 0x920
     419#define AM335X_CONF_MII1_TXD1 0x924
     420#define AM335X_CONF_MII1_TXD0 0x928
     421#define AM335X_CONF_MII1_TX_CLK 0x92C
     422#define AM335X_CONF_MII1_RX_CLK 0x930
     423#define AM335X_CONF_MII1_RXD3 0x934
     424#define AM335X_CONF_MII1_RXD2 0x938
     425#define AM335X_CONF_MII1_RXD1 0x93C
     426#define AM335X_CONF_MII1_RXD0 0x940
     427#define AM335X_CONF_RMII1_REF_CLK 0x944
     428#define AM335X_CONF_MDIO 0x948
     429#define AM335X_CONF_MDC 0x94C
     430#define AM335X_CONF_SPI0_SCLK 0x950
     431#define AM335X_CONF_SPI0_D0 0x954
     432#define AM335X_CONF_SPI0_D1 0x958
     433#define AM335X_CONF_SPI0_CS0 0x95C
     434#define AM335X_CONF_SPI0_CS1 0x960
     435#define AM335X_CONF_ECAP0_IN_PWM0_OUT 0x964
     436#define AM335X_CONF_UART0_CTSN 0x968
     437#define AM335X_CONF_UART0_RTSN 0x96C
     438#define AM335X_CONF_UART0_RXD 0x970
     439#define AM335X_CONF_UART0_TXD 0x974
     440#define AM335X_CONF_UART1_CTSN 0x978
     441#define AM335X_CONF_UART1_RTSN 0x97C
     442#define AM335X_CONF_UART1_RXD 0x980
     443#define AM335X_CONF_UART1_TXD 0x984
     444#define AM335X_CONF_I2C0_SDA 0x988
     445#define AM335X_CONF_I2C0_SCL 0x98C
     446#define AM335X_CONF_MCASP0_ACLKX 0x990
     447#define AM335X_CONF_MCASP0_FSX 0x994
     448#define AM335X_CONF_MCASP0_AXR0 0x998
     449#define AM335X_CONF_MCASP0_AHCLKR 0x99C
     450#define AM335X_CONF_MCASP0_ACLKR 0x9A0
     451#define AM335X_CONF_MCASP0_FSR 0x9A4
     452#define AM335X_CONF_MCASP0_AXR1 0x9A8
     453#define AM335X_CONF_MCASP0_AHCLKX 0x9AC
     454#define AM335X_CONF_XDMA_EVENT_INTR0 0x9B0
     455#define AM335X_CONF_XDMA_EVENT_INTR1 0x9B4
     456#define AM335X_CONF_WARMRSTN 0x9B8
     457#define AM335X_CONF_NNMI 0x9C0
     458#define AM335X_CONF_TMS 0x9D0
     459#define AM335X_CONF_TDI 0x9D4
     460#define AM335X_CONF_TDO 0x9D8
     461#define AM335X_CONF_TCK 0x9DC
     462#define AM335X_CONF_TRSTN 0x9E0
     463#define AM335X_CONF_EMU0 0x9E4
     464#define AM335X_CONF_EMU1 0x9E8
     465#define AM335X_CONF_RTC_PWRONRSTN 0x9F8
     466#define AM335X_CONF_PMIC_POWER_EN 0x9FC
     467#define AM335X_CONF_EXT_WAKEUP 0xA00
     468#define AM335X_CONF_RTC_KALDO_ENN 0xA04
     469#define AM335X_CONF_USB0_DRVVBUS 0xA1C
     470#define AM335X_CONF_USB1_DRVVBUS 0xA34
Note: See TracChangeset for help on using the changeset viewer.