static void __init cm_t35_init_mux(void) { int mux_mode = OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT; omap_mux_init_signal("dss_data0.dss_data0", mux_mode); omap_mux_init_signal("dss_data1.dss_data1", mux_mode); omap_mux_init_signal("dss_data2.dss_data2", mux_mode); omap_mux_init_signal("dss_data3.dss_data3", mux_mode); omap_mux_init_signal("dss_data4.dss_data4", mux_mode); omap_mux_init_signal("dss_data5.dss_data5", mux_mode); cm_t3x_common_dss_mux_init(mux_mode); }
static int __init omap4_i2c_init(void) { omap_i2c_hwspinlock_init(1, 0, &sdp4430_i2c_1_bus_pdata); omap_i2c_hwspinlock_init(2, 1, &sdp4430_i2c_2_bus_pdata); omap_i2c_hwspinlock_init(3, 2, &sdp4430_i2c_3_bus_pdata); omap_i2c_hwspinlock_init(4, 3, &sdp4430_i2c_4_bus_pdata); omap_register_i2c_bus_board_data(1, &sdp4430_i2c_1_bus_pdata); omap_register_i2c_bus_board_data(2, &sdp4430_i2c_2_bus_pdata); omap_register_i2c_bus_board_data(3, &sdp4430_i2c_3_bus_pdata); omap_register_i2c_bus_board_data(4, &sdp4430_i2c_4_bus_pdata); omap4_pmic_init("twl6030", &sdp4430_twldata); /*SW5, Jamestsai, 1213, enable cypress{*/ //omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, sdp4430_i2c_2_boardinfo, ARRAY_SIZE(sdp4430_i2c_2_boardinfo)); /*}SW5, Jamestsai, 1213, enable cypress*/ /* JossCheng, 20111221, change clock of i2c bus3 to be 400K Hz { */ omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); /* JossCheng, 20111221, change clock of i2c bus3 to be 400K Hz } */ omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo, ARRAY_SIZE(sdp4430_i2c_4_boardinfo)); #ifdef CONFIG_MACH_OMAP4_BOWSER_SUBTYPE_JEM omap2_i2c_pullup(3, I2C_PULLUP_STD_860_OM_FAST_500_OM); #endif /* * This will allow unused regulator to be shutdown. This flag * should be set in the board file. Before regulators are registered. */ regulator_has_full_constraints(); /* * Drive MSECURE high for TWL6030/6032 write access. */ omap_mux_init_signal("fref_clk3_req.gpio_wk30", OMAP_PIN_OUTPUT); gpio_request(30, "msecure"); gpio_direction_output(30, 1); return 0; }
static void __init omap4_ehci_ohci_init(void) { omap_mux_init_signal("usbb2_ulpitll_clk.gpio_157", \ OMAP_PIN_OUTPUT | \ OMAP_PIN_OFF_NONE); /* Power on the ULPI PHY */ if (gpio_is_valid(BLAZE_MDM_PWR_EN_GPIO)) { gpio_request(BLAZE_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3"); gpio_direction_output(BLAZE_MDM_PWR_EN_GPIO, 1); } usbhs_init(&usbhs_bdata); return; }
int __init archos_audio_twl6040_init(struct twl4030_codec_data * codec_data) { const struct archos_audio_twl6040_config *audio_cfg; int ret; pr_debug("Archos audio init (TWL6040)\n"); /* audio */ audio_cfg = omap_get_config( ARCHOS_TAG_AUDIO_TWL6040, struct archos_audio_twl6040_config ); if (audio_cfg == NULL) { printk(KERN_DEBUG "%s: no board configuration found\n", __FUNCTION__); return -ENODEV; } if ( system_rev >= audio_cfg->nrev ) { printk(KERN_DEBUG "%s: system_rev (%i) >= nrev (%i)\n", __FUNCTION__, system_rev, audio_cfg->nrev); return -ENODEV; } audio_gpio = audio_cfg->rev[system_rev]; /* Power ON GPIO mux */ omap_mux_init_gpio(audio_gpio.power_on, PIN_OUTPUT); codec_data->audpwron_gpio = audio_gpio.power_on; /* Master clock mux */ omap_mux_init_signal("fref_clk0_out.fref_clk0_out", OMAP_PIN_OUTPUT); /* Audio IRQ mux */ omap_mux_init_signal("sys_nirq2.sys_nirq2", OMAP_PIN_INPUT_PULLUP); /* McPDM mux */ omap_mux_init_signal("abe_clks.abe_clks", OMAP_PIN_INPUT); omap_mux_init_signal("abe_pdm_ul_data.abe_pdm_ul_data", OMAP_PIN_INPUT); omap_mux_init_signal("abe_pdm_dl_data.abe_pdm_dl_data", OMAP_PIN_OUTPUT); omap_mux_init_signal("abe_pdm_frame.abe_pdm_frame", OMAP_PIN_INPUT); omap_mux_init_signal("abe_pdm_lb_clk.abe_pdm_lb_clk", OMAP_PIN_INPUT); ret = platform_device_register(&audio_soc_device); if (ret) { printk(KERN_ERR "Unable to register audio soc platform device\n"); return -ENODEV; } return 0; }
static void __init display_init(void) { int i; /* disable hsync & vsync */ omap_mux_init_signal("dss_hsync.gpio_67", OMAP_PIN_INPUT); omap_mux_init_signal("dss_vsync.gpio_68", OMAP_PIN_INPUT); /* need for 3630 */ for (i = 0; i < 24; i++) { char mux_name[25]; sprintf(mux_name, "dss_data%i.dss_data%i", i, i); omap_mux_init_signal(mux_name, OMAP_PIN_OUTPUT); } omap_mux_init_signal("dss_acbias.dss_acbias", OMAP_PIN_OUTPUT); omap_mux_init_signal("dss_pclk.dss_pclk", OMAP_PIN_OUTPUT); omap_mux_init_gpio(GPIO_LCD_ONOFF, OMAP_PIN_INPUT); omap_mux_init_signal("mcspi2_cs1.gpt8_pwm_evt", OMAP_PIN_OUTPUT); /* * GPIO_LC_EN (109) * GPIO_LC_ONOFF (170) * *********************************************************************** * HW 7 * GPIO NOT USED * 1V8 LCD_1V8_nEN * * * * -> nEN_1V8_LS_LCD (RLS LCD) * *********************************************************************** * HW 8 * 1V8 HZL LCD_1V8_POWER * 1V8 LCD_1V8_nEN * * * -> EN_1V8_LS_POWER (RLS LCD) * -> nEN_1V8_LS_LCD (RLS LCD) * ***********************************************************************/ if (fidji_board_rev() == 8) { //Ugly Patch for Hardware /* On HW 8, GPIO_LCD_ONOFF is for touchscreen too */ parrot_gpio_out_init(GPIO_LCD_ONOFF, 0); mdelay(10); gpio_set_value(GPIO_LCD_ONOFF, 1); mdelay(10); gpio_set_value(GPIO_LCD_ONOFF, 0); } else parrot_gpio_out_init(GPIO_LCD_ONOFF, 1); if (fidji_board_rev() != 7) { parrot_gpio_out_init(GPIO_LCD_EN, 1); } fidji_lcd_device.panel.width_in_mm = fidji_lcd_device.panel.width_in_mm * (800 - sgx_reduce_pixels_left - sgx_reduce_pixels_right) / 800; fidji_lcd_device.panel.height_in_mm = fidji_lcd_device.panel.height_in_mm * (480 - sgx_reduce_pixels_down) / 480; omap_display_init(&fidji_dss_data); }
/* * Miscellaneous (board specific) * Generic GPIO 00/01/02 Outside the module */ static void __init omap_hsae_devwb_miscellaneous( void ) { /* PROTO HW02 and followings */ /* Init GPIO 0, 1, 2 of the WB (for test purpose) as output */ parrot_gpio_user_out_init(FC_GPIO_0_PWM, 0, NULL); parrot_gpio_user_out_init(FC_GPIO_1_PWM, 0, NULL); parrot_gpio_user_out_init(FC_GPIO_2_CLK, 0, NULL); /* Used by RaggaSpi Userspace driver */ parrot_gpio_user_in_init(TMS_IT_N,OMAP_PIN_OFF_WAKEUPENABLE,"TMS_IT_N"); /* Used by RaggaSpi to manage manually CS0 */ omap_mux_init_signal("mcspi1_cs0.gpio_174", OMAP_PIN_INPUT); parrot_gpio_user_out_init(174,1,"mcspi1_cs0"); }
void config_wlan_mux(void) { /* WLAN PW_EN and IRQ */ omap_mux_init_gpio(ZOOM2_WIFI_PMENA_GPIO, OMAP_PIN_OUTPUT); omap_mux_init_gpio(ZOOM2_WIFI_IRQ_GPIO, OMAP_PIN_INPUT); /* MMC3 */ omap_mux_init_signal("etk_clk.sdmmc3_clk", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("mcspi1_cs1.sdmmc3_cmd", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("etk_d4.sdmmc3_dat0", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("etk_d5.sdmmc3_dat1", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("etk_d6.sdmmc3_dat2", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("etk_d3.sdmmc3_dat3", OMAP_PIN_INPUT_PULLUP); }
static void remux_regulator_gpio(int gpio) { switch (gpio) { default: omap_mux_init_gpio(gpio, OMAP_PIN_INPUT|OMAP_PIN_OUTPUT); break; case 104: omap_mux_init_signal("gpmc_ncs7.gpio_104", OMAP_PIN_INPUT|OMAP_PIN_OUTPUT); break; case GPIO_VCC_PWRON: case GPIO_1V8_PWRON: /* These signals control voltages that are needed after warm reset, make sure, they are pulled high */ omap_mux_init_gpio(gpio, OMAP_PIN_INPUT_PULLUP|OMAP_PIN_OUTPUT); break; } }
static void __init spi_init(void) { // RF omap_mux_init_signal("mcspi1_clk", OMAP_PIN_INPUT); omap_mux_init_signal("mcspi1_simo", OMAP_PIN_OUTPUT); omap_mux_init_signal("mcspi1_somi", OMAP_PIN_INPUT); omap_mux_init_signal("mcspi1_cs0", OMAP_PIN_OUTPUT); // AK4117 omap_mux_init_signal("dss_data18.mcspi3_clk", OMAP_PIN_INPUT); omap_mux_init_signal("dss_data19.mcspi3_simo", OMAP_PIN_OUTPUT); omap_mux_init_signal("dss_data20.mcspi3_somi", OMAP_PIN_INPUT); omap_mux_init_signal("dss_data21.mcspi3_cs0", OMAP_PIN_OUTPUT); // enable lvl shifter omap_mux_init_gpio(LS_RF_nOE, OMAP_PIN_OUTPUT); gpio_init(LS_RF_nOE, 0); omap_mux_init_gpio(LS_AC3_nOE, OMAP_PIN_OUTPUT); gpio_init(LS_AC3_nOE, 0); /* * RF_SDN * RF shutdown pin (0-VDD V digital input) * 0 -> normal operation * 1 -> RG chip will be completely shutdown and the contents of the registers * will be lost */ omap_mux_init_gpio(RF_SDN, OMAP_PIN_OUTPUT); gpio_init(RF_SDN, 0); /* * The Si4330 is capable of generating an interrupt signal when certain events occur. * The chip notifies OMAP that an interrupt event has been detected by setting the nIRQ output pin LOW = 0. * This interrupt signal will be generated when any one (or more) of the interrupt events. */ omap_mux_init_gpio(RF_nIRQ, OMAP_PIN_INPUT); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); }
static void fidji_mmc_init(void) { u32 reg; /* MMC2 CD and CLKIN */ omap_mux_init_signal("sdmmc2_clkin", OMAP_PIN_INPUT); /* * MMC2 has been designed to be used with a level shifter * but we are NOT using anyone. */ reg = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1); reg |= OMAP2_MMCSDIO2ADPCLKISEL; omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1); /* MMC1 CD and WP */ omap_mux_init_gpio(GPIO_MMC1_CD, OMAP_PIN_INPUT); omap_mux_init_gpio(GPIO_MMC1_WP, OMAP_PIN_INPUT); omap2_hsmmc_init(mmc_rev2); }
static void board_wifi_mux_init(void) { omap_mux_init_signal("mcspi4_simo.sdmmc4_cmd", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("mcspi4_clk.sdmmc4_clk", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("mcspi4_somi.sdmmc4_dat0", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("uart4_tx.sdmmc4_dat1", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("uart4_rx.sdmmc4_dat2", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("mcspi4_cs0.sdmmc4_dat3", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); }
//--]] LGE_UBIQUIX_MODIFIED_END : [email protected] [2012.03.21]- When added to the board-ku5900-peripherals.c will be rollback.(TBD) static void hub_synaptics_dev_init(void) { int ret = -1; /* Set the ts_gpio pin mux */ //--[[ LGE_UBIQUIX_MODIFIED_START : [email protected] [2012.06.15] - DGMS - Touch not action in cpu-off mode status(OFF MDOE : Wakeup-enable / Input). ret = omap_mux_init_signal("gpio_35", OMAP_PIN_INPUT | OMAP_WAKEUP_EN | OMAP_OFFOUT_EN); // ret = omap_mux_init_signal("gpio_35", OMAP_PIN_INPUT); //--]] LGE_UBIQUIX_MODIFIED_END : [email protected] [2012.06.15]- DGMS - Touch not action in cpu-off mode status(OFF MDOE : Wakeup-enable / Input). if(ret < 0) printk("[%s] omap3_mux_init_signal error [ret = %d]!\n", __func__, ret); if (gpio_request(HUB_TS_I2C_INT_GPIO, "touch") < 0) { printk(KERN_ERR "can't get synaptics pen down GPIO\n"); return; } gpio_direction_input(HUB_TS_I2C_INT_GPIO); // [email protected] Fix the compilation error in 2.6.35 kernel [START] gpio_set_debounce(HUB_TS_I2C_INT_GPIO, 0xa); // [email protected] Fix the compilation error in 2.6.35 kernel [END] }
static void __init omap_hsae_init(void) { fc6100_gpio.dev.platform_data = hsae_devwb_pins; fc6100_mod_common_init(WB_HSAE_CONFIG); /* PWM for backligth (see LCD_BKL_PWM) */ omap_mux_init_signal("gpmc_ncs4.gpt9_pwm_evt", OMAP_PIN_OUTPUT); /* I2c */ omap_hsae_devwb_i2c_init(); /* Display */ omap_hsae_devwb_display_init(); /* Miscellaneaous */ omap_hsae_devwb_miscellaneous(); spi_register_board_info(hsae_spi_board_info, ARRAY_SIZE(hsae_spi_board_info)); platform_add_devices(hsae_devices, ARRAY_SIZE(hsae_devices)); }
static u32 __init omap2_usb0_init(unsigned nwires, unsigned is_device) { u32 syscon1 = 0; omap2_usb_devconf_clear(0, USB_BIDIR_TLL); if (nwires == 0) return 0; if (is_device) omap_mux_init_signal("usb0_puen", 0); omap_mux_init_signal("usb0_dat", 0); omap_mux_init_signal("usb0_txen", 0); omap_mux_init_signal("usb0_se0", 0); if (nwires != 3) omap_mux_init_signal("usb0_rcv", 0); switch (nwires) { case 3: syscon1 = 2; omap2_usb_devconf_set(0, USB_BIDIR); break; case 4: syscon1 = 1; omap2_usb_devconf_set(0, USB_BIDIR); break; case 6: syscon1 = 3; omap_mux_init_signal("usb0_vp", 0); omap_mux_init_signal("usb0_vm", 0); omap2_usb_devconf_set(0, USB_UNIDIR); break; default: printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", 0, nwires); } return syscon1 << 16; }
static void __init omap_2430sdp_init(void) { int ret; omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC); omap2430_i2c_init(); platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); omap_serial_init(); omap2_hsmmc_init(mmc); omap2_usbfs_init(&sdp2430_usb_config); omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP); usb_musb_init(&musb_board_data); board_smc91x_init(); /* Turn off secondary LCD backlight */ ret = gpio_request(SECONDARY_LCD_GPIO, "Secondary LCD backlight"); if (ret == 0) gpio_direction_output(SECONDARY_LCD_GPIO, 0); }
static void cosmo_dsi_phy_init(void) { u32 reg; /* Enable 3 lanes (0 ~ 2) in DSI2 */ /* Disable pull down */ reg = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); reg &= ~OMAP4_DSI2_LANEENABLE_MASK; reg |= 0x1F << OMAP4_DSI2_LANEENABLE_SHIFT; reg &= ~OMAP4_DSI2_PIPD_MASK; reg |= 0x1F << OMAP4_DSI2_PIPD_SHIFT; omap4_ctrl_pad_writel(reg, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); #ifdef CONFIG_MACH_LGE_COSMO //mo2sanghyun.lee gpio_request(HDMI_GPIO_60 , "hdmi_gpio_60"); gpio_request(HDMI_GPIO_41 , "hdmi_gpio_41"); gpio_direction_output(HDMI_GPIO_60, 1); gpio_direction_output(HDMI_GPIO_41, 0); #endif #if defined(CONFIG_DSI_CMD_MODE) omap_mux_init_signal("gpmc_ncs6.dsi2_te0", OMAP_PIN_INPUT); #endif }
static int twl6040_init(void) { u8 rev = 0; int ret; ret = twl_i2c_read_u8(TWL_MODULE_AUDIO_VOICE, &rev, TWL6040_REG_ASICREV); if (ret) return ret; /* * ERRATA: Reset value of PDM_UL buffer logic is 1 (VDDVIO) * when AUDPWRON = 0, which causes current drain on this pin's * pull-down on OMAP side. The workaround consists of disabling * pull-down resistor of ABE_PDM_UL_DATA pin * Impacted revisions: ES1.1 and ES1.2 (both share same ASICREV value) */ if (rev == TWL6040_REV_1_1) omap_mux_init_signal("abe_pdm_ul_data.abe_pdm_ul_data", OMAP_PIN_INPUT); return 0; }
static void __init omap_2430sdp_init(void) { omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC); omap2430_i2c_init(); platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); omap_serial_init(); omap_sdrc_init(NULL, NULL); omap_hsmmc_init(mmc); omap2_usbfs_init(&sdp2430_usb_config); omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP); usb_musb_init(NULL); board_smc91x_init(); /* Turn off secondary LCD backlight */ gpio_request_one(SECONDARY_LCD_GPIO, GPIOF_OUT_INIT_LOW, "Secondary LCD backlight"); sdp2430_display_init(); }
static void __init omap_mux_uart(void) { /* UART1 BT CSR8311 */ omap_mux_init_signal("uart1_tx.uart1_tx", OMAP_PIN_OUTPUT); omap_mux_init_signal("uart1_rx.uart1_rx", OMAP_PIN_INPUT); omap_mux_init_signal("uart1_cts.uart1_cts", OMAP_PIN_INPUT); omap_mux_init_signal("uart1_rts.uart1_rts", OMAP_PIN_OUTPUT); /* UART 3 from console trace */ omap_mux_init_signal("uart3_rx_irrx.uart3_rx_irrx", OMAP_PIN_INPUT); omap_mux_init_signal("uart3_tx_irtx.uart3_tx_irtx", OMAP_PIN_OUTPUT); }
static int __init omap4_i2c_init(void) { omap_i2c_hwspinlock_init(1, 0, &sdp4430_i2c_1_bus_pdata); omap_i2c_hwspinlock_init(2, 1, &sdp4430_i2c_2_bus_pdata); omap_i2c_hwspinlock_init(3, 2, &sdp4430_i2c_3_bus_pdata); omap_i2c_hwspinlock_init(4, 3, &sdp4430_i2c_4_bus_pdata); omap_register_i2c_bus_board_data(1, &sdp4430_i2c_1_bus_pdata); omap_register_i2c_bus_board_data(2, &sdp4430_i2c_2_bus_pdata); omap_register_i2c_bus_board_data(3, &sdp4430_i2c_3_bus_pdata); omap_register_i2c_bus_board_data(4, &sdp4430_i2c_4_bus_pdata); omap4_power_init(); i2c_register_board_info(1, sdp4430_i2c_boardinfo, ARRAY_SIZE(sdp4430_i2c_boardinfo)); omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo, ARRAY_SIZE(sdp4430_i2c_4_boardinfo)); /* * This will allow unused regulator to be shutdown. This flag * should be set in the board file. Before regulators are registered. */ regulator_has_full_constraints(); /* * Drive MSECURE high for TWL6030/6032 write access. */ omap_mux_init_signal("fref_clk0_out.gpio_wk6", OMAP_PIN_OUTPUT); gpio_request(6, "msecure"); gpio_direction_output(6, 1); return 0; }
static void __init bt_init(void) { /*To BT module GPIO PIO3 (weak PD from BT under reset) Used by host to wake up BT */ omap_mux_init_gpio(BT_WKUP_HOST, OMAP_PIN_OUTPUT); gpio_init(BT_WKUP_HOST, 1); /* From BT module GPIO PIO2 (weak PD from BT under reset) * USed by BT module as indicator for host processor */ omap_mux_init_signal("dss_data12.gpio_82", OMAP_PIN_INPUT); /* BT nRESET pin 0 -> BT under reset 1 -> normal operation */ omap_mux_init_gpio(BT_nRST, OMAP_PIN_OUTPUT); gpio_init(BT_nRST, 0); mdelay(30); gpio_set_value(BT_nRST, 1); }
static void omap4_tablet_wifi_mux_init(void) { omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT | OMAP_PIN_OFF_WAKEUPENABLE); omap_mux_init_gpio(GPIO_WIFI_PMENA, OMAP_PIN_OUTPUT); omap_mux_init_signal("sdmmc5_cmd.sdmmc5_cmd", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc5_clk.sdmmc5_clk", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc5_dat0.sdmmc5_dat0", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc5_dat1.sdmmc5_dat1", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc5_dat2.sdmmc5_dat2", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc5_dat3.sdmmc5_dat3", OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); }
static void omap4_tablet_wifi_mux_init(void) { omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT | OMAP_PIN_OFF_WAKEUPENABLE); omap_mux_init_gpio(GPIO_WIFI_PMENA, OMAP_PIN_OUTPUT); omap_mux_init_gpio(GPIO_WIFI_PWEN, OMAP_PIN_OUTPUT); omap_mux_init_signal("uart2_cts.sdmmc3_clk", OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("uart2_rts.sdmmc3_cmd", OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("uart2_rx.sdmmc3_dat0", OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("uart2_tx.sdmmc3_dat1", OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("abe_mcbsp1_dx.sdmmc3_dat2", OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("abe_mcbsp1_fsx.sdmmc3_dat3", OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP); }
static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, int controller_nr) { if (gpio_is_valid(mmc_controller->slots[0].switch_pin) && (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, OMAP_PIN_INPUT_PULLUP); if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) && (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, OMAP_PIN_INPUT_PULLUP); if (cpu_is_omap34xx()) { if (controller_nr == 0) { omap_mux_init_signal("sdmmc1_clk", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc1_cmd", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc1_dat0", OMAP_PIN_INPUT_PULLUP); if (mmc_controller->slots[0].caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) { omap_mux_init_signal("sdmmc1_dat1", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc1_dat2", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc1_dat3", OMAP_PIN_INPUT_PULLUP); } if (mmc_controller->slots[0].caps & MMC_CAP_8_BIT_DATA) { omap_mux_init_signal("sdmmc1_dat4", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc1_dat5", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc1_dat6", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc1_dat7", OMAP_PIN_INPUT_PULLUP); } } if (controller_nr == 1) { /* MMC2 */ omap_mux_init_signal("sdmmc2_clk", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc2_cmd", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc2_dat0", OMAP_PIN_INPUT_PULLUP); /* * For 8 wire configurations, Lines DAT4, 5, 6 and 7 * need to be muxed in the board-*.c files */ if (mmc_controller->slots[0].caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) { omap_mux_init_signal("sdmmc2_dat1", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc2_dat2", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc2_dat3", OMAP_PIN_INPUT_PULLUP); } if (mmc_controller->slots[0].caps & MMC_CAP_8_BIT_DATA) { omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6", OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7", OMAP_PIN_INPUT_PULLUP); } } /* * For MMC3 the pins need to be muxed in the board-*.c files */ } }
static inline void omap242x_mmc_mux(struct omap_mmc_platform_data *mmc_controller) { if ((mmc_controller->slots[0].switch_pin > 0) && \ (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, OMAP_PIN_INPUT_PULLUP); if ((mmc_controller->slots[0].gpio_wp > 0) && \ (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, OMAP_PIN_INPUT_PULLUP); omap_mux_init_signal("sdmmc_cmd", 0); omap_mux_init_signal("sdmmc_clki", 0); omap_mux_init_signal("sdmmc_clko", 0); omap_mux_init_signal("sdmmc_dat0", 0); omap_mux_init_signal("sdmmc_dat_dir0", 0); omap_mux_init_signal("sdmmc_cmd_dir", 0); if (mmc_controller->slots[0].caps & MMC_CAP_4_BIT_DATA) { omap_mux_init_signal("sdmmc_dat1", 0); omap_mux_init_signal("sdmmc_dat2", 0); omap_mux_init_signal("sdmmc_dat3", 0); omap_mux_init_signal("sdmmc_dat_dir1", 0); omap_mux_init_signal("sdmmc_dat_dir2", 0); omap_mux_init_signal("sdmmc_dat_dir3", 0); } if (mmc_controller->slots[0].internal_clock) { u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); v |= (1 << 24); omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); } }
void config_hdmi_gpio(void) { /* HDMI_RESET uses CAM_PCLK mode 4*/ omap_mux_init_signal("gpio_97", OMAP_PIN_INPUT_PULLUP); }
static void enable_board_wakeup_source(void) { /* T2 interrupt line (keypad) */ omap_mux_init_signal("sys_nirq", OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); }
static void __init omap3_beagle_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_beagle_i2c_init(); platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices)); omap_serial_init(); omap_mux_init_gpio(170, OMAP_PIN_INPUT); gpio_request(170, "DVI_nPD"); /* REVISIT leave DVI powered down until it's needed ... */ gpio_direction_output(170, true); //omap_mux_init_gpio(GPIO_IRQ, OMAP_PIN_INPUT); //W-Y-L GPIO 133 //omap_mux_init_gpio(GPIO_DIR, OMAP_PIN_INPUT_PULLDOWN); //W-Y-L GPIO 137 if(!strcmp(expansionboard_name, "zippy")) { printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n"); omap3beagle_enc28j60_init(); printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n"); mmc[1].gpio_wp = 141; mmc[1].gpio_cd = 162; } if(!strcmp(expansionboard_name, "zippy2")) { printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n"); omap3beagle_ks8851_init(); printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n"); mmc[1].gpio_wp = 141; mmc[1].gpio_cd = 162; } if(!strcmp(expansionboard_name, "trainer")) { printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n"); gpio_request(130, "sysfs"); gpio_export(130, 1); gpio_request(131, "sysfs"); gpio_export(131, 1); gpio_request(132, "sysfs"); gpio_export(132, 1); gpio_request(133, "sysfs"); gpio_export(133, 1); gpio_request(134, "sysfs"); gpio_export(134, 1); gpio_request(135, "sysfs"); gpio_export(135, 1); gpio_request(136, "sysfs"); gpio_export(136, 1); gpio_request(137, "sysfs"); gpio_export(137, 1); gpio_request(138, "sysfs"); gpio_export(138, 1); gpio_request(139, "sysfs"); gpio_export(139, 1); gpio_request(140, "sysfs"); gpio_export(140, 1); gpio_request(141, "sysfs"); gpio_export(141, 1); gpio_request(162, "sysfs"); gpio_export(162, 1); } usb_musb_init(); usb_ehci_init(&ehci_pdata); omap3beagle_flash_init(); /* Ensure SDRC pins are mux'd for self-refresh */ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); beagle_display_init(); #ifdef CONFIG_USB_ANDROID omap3evm_android_gadget_init(); #endif }
static void __init blaze_pmic_mux_init(void) { omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_WAKEUP_EN); }
static void omap4_audio_conf(void) { /* twl6040 naudint */ omap_mux_init_signal("sys_nirq2.sys_nirq2", \ OMAP_PIN_INPUT_PULLUP); }