void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) { #if defined (CONFIG_TARGET_LOCALE_EUR) || defined(CONFIG_TARGET_LOCALE_HKTW) || defined (CONFIG_TARGET_LOCALE_HKTW_FET) || defined(CONFIG_TARGET_LOCALE_VZW) || defined(CONFIG_TARGET_LOCALE_USAGSM) if(HWREV < 12) #elif CONFIG_TARGET_LOCALE_KOR if (HWREV < 10 || HWREV == 17) #endif /* CONFIG_TARGET_LOCALE */ { unsigned int gpio; switch (width) { /* Channel 1 supports 4-bit bus width */ case 0: case 1: case 4: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG1(0); gpio <= S5PV210_GPG1(6); gpio++) { if (gpio != S5PV210_GPG1(2)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } } gpio = readl(S5PV210_GPG1DRV); writel(gpio | 0x2aaa, S5PV210_GPG1DRV); break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } } //end of if(HWREV < 12) }
void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; switch (width) { /* Channel 1 supports 4-bit bus width */ case 0: case 1: case 4: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG1(0); gpio <= S5PV210_GPG1(6); gpio++) { if (gpio != S5PV210_GPG1(2)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } s3c_gpio_set_drvstrength(gpio, S3C_GPIO_DRVSTR_2X); } /* Chip detect pin Pull up -> none*/ s3c_gpio_setpull(S5PV210_GPG1(2), S3C_GPIO_PULL_NONE); break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } }
void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; switch (width) { /* Channel 0 supports 4 and 8-bit bus width */ case 8: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG1(3); gpio <= S5PV210_GPG1(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } gpio = readl(S5PV210_GPG1DRV); writel(gpio | 0x2a80, S5PV210_GPG1DRV); case 0: case 1: case 4: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG0(0); gpio <= S5PV210_GPG0(6); gpio++) { if(gpio != S5PV210_GPG0(2)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } } gpio = readl(S5PV210_GPG0DRV); writel(gpio | 0x2aaa, S5PV210_GPG0DRV); break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } }
void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; switch (width) { /* Channel 1 supports 4-bit bus width */ case 0: case 1: case 4: /* * steven cai: Ch1 is not used as MMC channel, so comment here to prevent from GPIO setting confliction * * T34 V210 Solution has four MMC channel * Ch0£ºMovieNand * Ch1£ºother * Ch2£ºSD card * Ch3£ºSDIO wifi card */ /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG1(0); gpio <= S5PV210_GPG1(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); } gpio = readl(S5PV210_GPG1DRV); writel(gpio | 0x3fcf, S5PV210_GPG1DRV); break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } }
void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; switch (width) { /* Channel 0 supports 4 and 8-bit bus width */ case 8: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG1(3); gpio <= S5PV210_GPG1(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); s3c_gpio_set_drvstrength(gpio, S3C_GPIO_DRVSTR_3X); } case 0: case 1: case 4: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG0(0); gpio <= S5PV210_GPG0(6); gpio++) { if (gpio != S5PV210_GPG0(2)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } s3c_gpio_set_drvstrength(gpio, S3C_GPIO_DRVSTR_3X); } break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } s3c_gpio_cfgpin(S5PV210_GPJ2(7), S3C_GPIO_OUTPUT); s3c_gpio_setpull(S5PV210_GPJ2(7), S3C_GPIO_PULL_NONE); gpio_set_value(S5PV210_GPJ2(7), 1); }
void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; /* Set all the necessary GPG0/GPG1 pins to special-function 2 */ for (gpio = S5PV210_GPG0(0); gpio < S5PV210_GPG0(2); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } switch (width) { case 8: /* GPG1[3:6] special-funtion 3 */ for (gpio = S5PV210_GPG1(3); gpio <= S5PV210_GPG1(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } case 4: /* GPG0[3:6] special-funtion 2 */ for (gpio = S5PV210_GPG0(3); gpio <= S5PV210_GPG0(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } default: break; } s3c_gpio_setpull(S5PV210_GPG0(2), S3C_GPIO_PULL_UP); s3c_gpio_cfgpin(S5PV210_GPG0(2), S3C_GPIO_SFN(2)); }
void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) { struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; /* Set all the necessary GPG1[0:1] pins to special-function 2 */ s3c_gpio_cfgrange_nopull(S5PV210_GPG1(0), 2, S3C_GPIO_SFN(2)); /* Data pin GPG1[3:6] to special-function 2 */ s3c_gpio_cfgrange_nopull(S5PV210_GPG1(3), 4, S3C_GPIO_SFN(2)); if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { s3c_gpio_setpull(S5PV210_GPG1(2), S3C_GPIO_PULL_UP); s3c_gpio_cfgpin(S5PV210_GPG1(2), S3C_GPIO_SFN(2)); } }
void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) { struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; /* Set all the necessary GPG0/GPG1 pins to special-function 2 */ s3c_gpio_cfgrange_nopull(S5PV210_GPG0(0), 2, S3C_GPIO_SFN(2)); switch (width) { case 8: /* GPG1[3:6] special-function 3 */ s3c_gpio_cfgrange_nopull(S5PV210_GPG1(3), 4, S3C_GPIO_SFN(3)); case 4: /* GPG0[3:6] special-function 2 */ s3c_gpio_cfgrange_nopull(S5PV210_GPG0(3), 4, S3C_GPIO_SFN(2)); default: break; } #if 0 if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { s3c_gpio_setpull(S5PV210_GPG0(2), S3C_GPIO_PULL_UP); s3c_gpio_cfgpin(S5PV210_GPG0(2), S3C_GPIO_SFN(2)); } #endif }
void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; switch (width) { /* Channel 0 supports 4 and 8-bit bus width */ case 8: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG1(3); gpio <= S5PV210_GPG1(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } gpio = readl(S5PV210_GPG1DRV); writel(gpio | 0x2a80, S5PV210_GPG1DRV); case 0: case 1: case 4: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG0(0); gpio <= S5PV210_GPG0(6); gpio++) { if(gpio != S5PV210_GPG0(2)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } } // gpio = readl(S5PV210_GPG0DRV); writel(0x2aaa, S5PV210_GPG0DRV); /* Chip detect pin Pull up -> none*/ s3c_gpio_setpull(S5PV210_GPG0(2), S3C_GPIO_PULL_NONE); break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } #if defined (CONFIG_MACH_S5PC110_ARIES) s3c_gpio_cfgpin(S5PV210_GPJ2(7), S3C_GPIO_OUTPUT); s3c_gpio_setpull(S5PV210_GPJ2(7), S3C_GPIO_PULL_NONE); gpio_set_value(S5PV210_GPJ2(7), 1); #endif }
void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; /* Set all the necessary GPG1[0:1] pins to special-function 2 */ for (gpio = S5PV210_GPG1(0); gpio < S5PV210_GPG1(2); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } /* Data pin GPG1[3:6] to special-function 2 */ for (gpio = S5PV210_GPG1(3); gpio <= S5PV210_GPG1(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } s3c_gpio_setpull(S5PV210_GPG1(2), S3C_GPIO_PULL_UP); s3c_gpio_cfgpin(S5PV210_GPG1(2), S3C_GPIO_SFN(2)); }
static struct gpio_regulator v210_gpio_regulators [] = { [0] = { /*"VDD_GPS",*/ .gpio = S5PV210_GPA0(7), .name = "LDO_GPA0(7)", .type = GPIO_REGULATOR_VOLTAGE, .initdata = &gpio_reg_gpa07, }, [1] = { /*"VDD_CAM",*/ .gpio = S5PV210_GPB(3), .name = "LDO_GPB(3)", .type = GPIO_REGULATOR_VOLTAGE, .initdata = &gpio_reg_gpb3, }, [2] = { /*"VDD_5V",*/ .gpio = S5PV210_GPG1(6), .name = "LDO_GPG1(6)", .type = GPIO_REGULATOR_VOLTAGE, .initdata = &gpio_reg_gpg16, }, [3] = { /*"VDD_BT/VDD_WLAN",*/ .gpio = S5PV210_GPH2(6), .pull = GPIO_PULL_DOWN, .name = "LDO_GPH2(6)", .type = GPIO_REGULATOR_VOLTAGE, .initdata = &gpio_reg_gph26, }, }; struct gpio_regulator_platform_data v210_gpio_regs_platform_data = { .num_regulators = ARRAY_SIZE(v210_gpio_regulators),
.ngpio = S5PV210_GPIO_F3_NR, .label = "GPF3", }, }, { .base = S5PV210_GPG0_BASE, .config = &gpio_cfg, .chip = { .base = S5PV210_GPG0(0), .ngpio = S5PV210_GPIO_G0_NR, .label = "GPG0", }, }, { .base = S5PV210_GPG1_BASE, .config = &gpio_cfg, .chip = { .base = S5PV210_GPG1(0), .ngpio = S5PV210_GPIO_G1_NR, .label = "GPG1", }, }, { .base = S5PV210_GPG2_BASE, .config = &gpio_cfg, .chip = { .base = S5PV210_GPG2(0), .ngpio = S5PV210_GPIO_G2_NR, .label = "GPG2", }, }, { .base = S5PV210_GPG3_BASE, .config = &gpio_cfg, .chip = {