#include <init.h> #include <gpio.h> #include <environment.h> #include <errno.h> #include <asm/armlinux.h> #include <io.h> #include <generated/mach-types.h> #include <mach/imx-regs.h> #include <mach/devices.h> #include <mach/iomux.h> #include <asm/mmu.h> /* setup the CPU card internal signals */ static const uint32_t tx28_pad_setup[] = { /* NAND interface */ GPMI_D0 | VE_3_3V | PULLUP(1), GPMI_D1 | VE_3_3V | PULLUP(1), GPMI_D2 | VE_3_3V | PULLUP(1), GPMI_D3 | VE_3_3V | PULLUP(1), GPMI_D4 | VE_3_3V | PULLUP(1), GPMI_D5 | VE_3_3V | PULLUP(1), GPMI_D6 | VE_3_3V | PULLUP(1), GPMI_D7 | VE_3_3V | PULLUP(1), GPMI_READY0 | VE_3_3V | PULLUP(0), /* external PU */ GPMI_CE0N | VE_3_3V | PULLUP(1), GPMI_RDN | VE_3_3V | PULLUP(1), GPMI_WRN | VE_3_3V | BITKEEPER(1), GPMI_ALE | VE_3_3V | PULLUP(1), GPMI_CLE | VE_3_3V | PULLUP(1), GPMI_RESETN | VE_3_3V | PULLUP(0), /* external PU */
LCD_D3 | STRENGTH(S12MA), LCD_D2 | STRENGTH(S12MA), /* PIN3/LCD_D02 - GPIO PIN 31*/ LCD_D1 | STRENGTH(S12MA), /* PIN2/LCD_D01 - GPIO PIN 33*/ LCD_D0 | STRENGTH(S12MA), /* PIN1/LCD_D00 - GPIO PIN 35*/ LCD_CS, /* PIN26/LCD_CS - GPIO PIN 20*/ LCD_RS, /* PIN25/LCD_RS - GPIO PIN 18*/ LCD_WR, /* PIN24/LCD_WR - GPIO PIN 16*/ LCD_RESET, /* PIN23/LCD_DISP - GPIO PIN 14*/ LCD_ENABE | STRENGTH(S12MA), /* PIN22/LCD_EN/I2C_SCL - GPIO PIN 12*/ LCD_VSYNC | STRENGTH(S12MA), /* PIN21/LCD_HSYNC/I2C_SDA- GPIO PIN 10*/ LCD_HSYNC | STRENGTH(S12MA), /* PIN20/LCD_VSYNC - GPIO PIN 8*/ LCD_DOTCLOCK | STRENGTH(S12MA), /* PIN19/LCD_DOTCLK - GPIO PIN 6*/ /* SD card interface */ SSP1_DATA0 | PULLUP(1), SSP1_DATA1 | PULLUP(1), SSP1_DATA2 | PULLUP(1), SSP1_DATA3 | PULLUP(1), SSP1_SCK, SSP1_CMD | PULLUP(1), SSP1_DETECT | PULLUP(1), /* led */ SSP1_DETECT_GPIO | GPIO_OUT | GPIO_VALUE(1), /* gpio - USB hub LAN9512-JZX*/ GPMI_ALE_GPIO | GPIO_OUT | GPIO_VALUE(1), }; static int imx23_olinuxino_mem_init(void)
#include <asm/armlinux.h> #include <asm/mmu.h> #include <generated/mach-types.h> #define MX28EVK_FEC_PHY_RESET_GPIO 141 /* setup the CPU card internal signals */ static const uint32_t mx28evk_pads[] = { /* duart */ PWM0_DUART_RX | VE_3_3V, PWM1_DUART_TX | VE_3_3V, /* fec0 */ ENET_CLK | VE_3_3V | BITKEEPER(0), ENET0_MDC | VE_3_3V | PULLUP(1), ENET0_MDIO | VE_3_3V | PULLUP(1), ENET0_TXD0 | VE_3_3V | PULLUP(1), ENET0_TXD1 | VE_3_3V | PULLUP(1), ENET0_TX_EN | VE_3_3V | PULLUP(1), ENET0_TX_CLK | VE_3_3V | BITKEEPER(0), ENET0_RXD0 | VE_3_3V | PULLUP(1), ENET0_RXD1 | VE_3_3V | PULLUP(1), ENET0_RX_EN | VE_3_3V | PULLUP(1), /* send a "good morning" to the ext. phy 0 = reset */ ENET0_RX_CLK_GPIO | VE_3_3V | PULLUP(0) | GPIO_OUT | GPIO_VALUE(0), /* phy power control 1 = on */ SSP1_D3_GPIO | VE_3_3V | PULLUP(0) | GPIO_OUT | GPIO_VALUE(0), /* mmc0 */ SSP0_D0 | VE_3_3V | PULLUP(1),
#include <asm/armlinux.h> #include <asm/mmu.h> #include <mach/fb.h> #include <generated/mach-types.h> /* setup the CPU card internal signals */ static const uint32_t cfa10036_pads[] = { /* duart */ FUNC(2) | PORTF(3, 2) | VE_3_3V, FUNC(2) | PORTF(3, 3) | VE_3_3V, /* mmc0 */ SSP0_D0 | VE_3_3V | PULLUP(1), SSP0_D1 | VE_3_3V | PULLUP(1), SSP0_D2 | VE_3_3V | PULLUP(1), SSP0_D3 | VE_3_3V | PULLUP(1), SSP0_D4 | VE_3_3V | PULLUP(1), SSP0_D5 | VE_3_3V | PULLUP(1), SSP0_D6 | VE_3_3V | PULLUP(1), SSP0_D7 | VE_3_3V | PULLUP(1), SSP0_CMD | VE_3_3V | PULLUP(1), SSP0_CD | VE_3_3V | PULLUP(1), SSP0_SCK | VE_3_3V | BITKEEPER(0), /* MCI slot power control 1 = off */ PWM3_GPIO | VE_3_3V | GPIO_OUT | GPIO_VALUE(0), }; static struct mxs_mci_platform_data mci_pdata = {
void limits_init() { ///////////////////########################## #if MotherBoard==3 && !defined(limit_int_style) ///*** MB==3 #if defined(X_MIN_PIN) && X_MIN_PIN>-1 //////############## SET_INPUT(X_MIN_PIN); #endif #if defined(Y_MIN_PIN) && Y_MIN_PIN>-1 //////############## SET_INPUT(Y_MIN_PIN); #endif #if defined(Z_MIN_PIN) && Z_MIN_PIN>-1 //////############## SET_INPUT(Z_MIN_PIN); #endif #if defined(X_MAX_PIN) && X_MAX_PIN>-1 //////############## SET_INPUT(X_MAX_PIN); #endif #if defined(Y_MAX_PIN) && Y_MAX_PIN>-1 //////############## SET_INPUT(Y_MAX_PIN); #endif #if defined(Z_MAX_PIN) && Z_MAX_PIN>-1 //////############## SET_INPUT(Z_MAX_PIN); #endif /* #if(ENDSTOP_X_MIN_INVERTING) #else #endif*/ if (bit_istrue(settings.flags,BITFLAG_INVERT_LIMIT_PINS)) { PULLUP(X_MIN_PIN,LOW); /////***** invert as machine SET LOW PULLUP(Y_MIN_PIN,LOW); PULLUP(Z_MIN_PIN,LOW); PULLUP(X_MAX_PIN,LOW); /////***** invert as machine SET LOW PULLUP(Y_MAX_PIN,LOW); PULLUP(Z_MAX_PIN,LOW); } else { PULLUP(X_MIN_PIN,HIGH); /////***** invert as machine SET HIGH PULLUP(Y_MIN_PIN,HIGH); PULLUP(Z_MIN_PIN,HIGH); PULLUP(X_MAX_PIN,HIGH); /////***** invert as machine SET HIGH PULLUP(Y_MAX_PIN,HIGH); PULLUP(Z_MAX_PIN,HIGH); } if (bit_istrue(settings.flags,BITFLAG_HARD_LIMIT_ENABLE)) { LIMIT_PCMSK |= LIMIT_MASK; // Enable specific pins of the Pin Change Interrupt ///****7=0x00000111 PCICR |= (1 << LIMIT_INT); // Enable Pin Change Interrupt } else { limits_disable(); } #else ///*** MB!=3 LIMIT_DDR &= ~(LIMIT_MASK); // Set as input pins if (bit_istrue(settings.flags,BITFLAG_INVERT_LIMIT_PINS)) { LIMIT_PORT &= ~(LIMIT_MASK); // Normal low operation. Requires external pull-down. } else { LIMIT_PORT |= (LIMIT_MASK); // Enable internal pull-up resistors. Normal high operation. } if (bit_istrue(settings.flags,BITFLAG_HARD_LIMIT_ENABLE)) { LIMIT_PCMSK |= LIMIT_MASK; // Enable specific pins of the Pin Change Interrupt PCICR |= (1 << LIMIT_INT); // Enable Pin Change Interrupt } else { limits_disable(); } #ifdef ENABLE_SOFTWARE_DEBOUNCE MCUSR &= ~(1<<WDRF); WDTCSR |= (1<<WDCE) | (1<<WDE); WDTCSR = (1<<WDP0); // Set time-out at ~32msec. #endif #endif ///*** MB==3 //////############################### }
#include <asm/mmu.h> #include <mach/fb.h> #include <generated/mach-types.h> #include "hwdetect.h" /* setup the CPU card internal signals */ static const uint32_t cfa10036_pads[] = { /* duart */ FUNC(2) | PORTF(3, 2) | VE_3_3V, FUNC(2) | PORTF(3, 3) | VE_3_3V, /* mmc0 */ SSP0_D0 | VE_3_3V | PULLUP(1), SSP0_D1 | VE_3_3V | PULLUP(1), SSP0_D2 | VE_3_3V | PULLUP(1), SSP0_D3 | VE_3_3V | PULLUP(1), SSP0_D4 | VE_3_3V | PULLUP(1), SSP0_D5 | VE_3_3V | PULLUP(1), SSP0_D6 | VE_3_3V | PULLUP(1), SSP0_D7 | VE_3_3V | PULLUP(1), SSP0_CMD | VE_3_3V | PULLUP(1), SSP0_CD | VE_3_3V | PULLUP(1), SSP0_SCK | VE_3_3V | BITKEEPER(0), /* MCI slot power control 1 = off */ PWM3_GPIO | VE_3_3V | GPIO_OUT | GPIO_VALUE(0), /* i2c0 */ AUART0_TX_GPIO | VE_3_3V | PULLUP(1),
/* * force the mod pins to a specific level * '111' means: "All capable. Auto-negotiation enabled". * For other values refer LAN8710's datasheet, * chapter "Mode Bus - MODE[2:0]" */ ENET0_RXD0_GPIO | VE_3_3V | GPIO_OUT | GPIO_VALUE(1), /* MOD0 */ ENET0_RXD1_GPIO | VE_3_3V | GPIO_OUT | GPIO_VALUE(1), /* MOD1 */ ENET0_RX_EN_GPIO | VE_3_3V | GPIO_OUT | GPIO_VALUE(1), /* MOD2 */ /* release the reset ('mod' pins get latched) */ ENET0_RX_CLK_GPIO | VE_3_3V | BITKEEPER(0) | GPIO_OUT | GPIO_VALUE(1), /* right now the 'mod' pins are in their native mode */ ENET0_RXD0 | VE_3_3V | PULLUP(0), ENET0_RXD1 | VE_3_3V | PULLUP(0), ENET0_RX_EN | VE_3_3V | PULLUP(0), /* Debug UART, available at card connector UART1 */ AUART0_CTS_DUART_RX | VE_3_3V | STRENGTH(S8MA), AUART0_RTS_DUART_TX | VE_3_3V | STRENGTH(S8MA), AUART0_RX_DUART_CTS | VE_3_3V | STRENGTH(S8MA), AUART0_TX_DUART_RTS | VE_3_3V | STRENGTH(S8MA), /* Application UART, available at connector UART2 */ AUART1_RX | VE_3_3V | BITKEEPER(0), AUART1_TX | VE_3_3V | BITKEEPER(0), AUART1_CTS | VE_3_3V | PULLUP(1), AUART1_RTS | VE_3_3V | PULLUP(1), /* Application UART, available at connector FIXME */ AUART2_RX | VE_3_3V | PULLUP(1),
/* Detecting if a display is connected (0 = display attached) (external pull up) */ AUART1_RTS_GPIO | GPIO_IN, /* disable the audio amplifier */ GPMI_D08_GPIO | GPIO_OUT | GPIO_VALUE(0), /* Head Phone detection (FIXME what level when plugged in) (external pull up) */ GPMI_D11_GPIO | GPIO_IN, #if 0 /* Enable the local 5V (FIXME what to do when the bootloader runs) */ GPMI_D12_GPIO | GPIO_OUT | GPIO_VALUE(1), #endif /* not used pins */ GPMI_D09_GPIO | GPIO_IN | PULLUP(1), GPMI_D10_GPIO | GPIO_IN | PULLUP(1), GPMI_D13_GPIO | GPIO_IN | PULLUP(1), /* unknown. Not connected to anything than test pin J113 */ GPMI_D14_GPIO | GPIO_IN | PULLUP(1), /* unknown. Not connected to anything than test pin J114 */ GPMI_D15_GPIO | GPIO_IN | PULLUP(1), /* NAND controller (Note: There is no NAND device on the board) */ GPMI_D00 | PULLUP(1), GPMI_D01 | PULLUP(1), GPMI_D02 | PULLUP(1), GPMI_D03 | PULLUP(1), GPMI_D04 | PULLUP(1),