From 5dfb1aa53ec182ceb9a729ffe239a07db7866481 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Mon, 10 Oct 2011 19:54:53 +0900 Subject: ARM: EXYNOS4: Enable regulator support for HDMI on ORIGEN Since the DC5V line is connected directly to the HDMI connector, "hdmi-en" regulator would become a dummy regulator on origen board (by defining REGULATOR_DUMMY in the kernel config file). Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c index 71db848..973cc19 100644 --- a/arch/arm/mach-exynos4/mach-origen.c +++ b/arch/arm/mach-exynos4/mach-origen.c @@ -89,6 +89,8 @@ static struct s3c2410_uartcfg origen_uartcfgs[] __initdata = { static struct regulator_consumer_supply __initdata ldo3_consumer[] = { REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */ + REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */ + REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */ }; static struct regulator_consumer_supply __initdata ldo6_consumer[] = { REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */ @@ -98,6 +100,7 @@ static struct regulator_consumer_supply __initdata ldo7_consumer[] = { }; static struct regulator_consumer_supply __initdata ldo8_consumer[] = { REGULATOR_SUPPLY("vdd", "s5p-adc"), /* ADC */ + REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"), /* HDMI */ }; static struct regulator_consumer_supply __initdata ldo9_consumer[] = { REGULATOR_SUPPLY("dvdd", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */ -- cgit v0.10.2 From f0e38e3354fa150984400a55955f3b03867b14f3 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Mon, 10 Oct 2011 19:54:59 +0900 Subject: ARM: EXYNOS4: Register power domains on ORIGEN This patch registers all the available power domains on ORIGEN board. Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c index 973cc19..311e9db 100644 --- a/arch/arm/mach-exynos4/mach-origen.c +++ b/arch/arm/mach-exynos4/mach-origen.c @@ -604,6 +604,10 @@ static struct platform_device *origen_devices[] __initdata = { &s5p_device_mixer, &exynos4_device_pd[PD_LCD0], &exynos4_device_pd[PD_TV], + &exynos4_device_pd[PD_G3D], + &exynos4_device_pd[PD_LCD1], + &exynos4_device_pd[PD_CAM], + &exynos4_device_pd[PD_GPS], &origen_device_gpiokeys, &origen_lcd_hv070wsa, }; -- cgit v0.10.2 From ad98aaed750bf1a9a2318690055d056572339974 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Mon, 10 Oct 2011 19:55:30 +0900 Subject: ARM: EXYNOS4: Remove useless codes on NURI board The 'nuri_cm_devices' is defined but not used. Cc: Kyungmin Park Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c index bbd13f4..20932ec 100644 --- a/arch/arm/mach-exynos4/mach-nuri.c +++ b/arch/arm/mach-exynos4/mach-nuri.c @@ -1066,13 +1066,6 @@ static struct platform_device nuri_max8903_device = { }, }; -static struct device *nuri_cm_devices[] = { - &s3c_device_i2c5.dev, - &s3c_device_adc.dev, - NULL, /* Reserved for UART */ - NULL, -}; - static void __init nuri_power_init(void) { int gpio; -- cgit v0.10.2 From ce19de02937772286e5d1f065d3143ec3abce200 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 10 Oct 2011 19:55:58 +0900 Subject: ARM: S3C2410: fix S3C_GPIO_SPACE #error message to match reality S3C_GPIO_SPACE cannont be NON-zero, not zero. Signed-off-by: Peter Korsgaard Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h b/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h index 4f7bf32..019ea86 100644 --- a/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h +++ b/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h @@ -53,7 +53,7 @@ #define S3C2410_GPIO_M_NR (32) /* technically 2. */ #if CONFIG_S3C_GPIO_SPACE != 0 -#error CONFIG_S3C_GPIO_SPACE cannot be zero at the moment +#error CONFIG_S3C_GPIO_SPACE cannot be nonzero at the moment #endif #define S3C2410_GPIO_NEXT(__gpio) \ -- cgit v0.10.2 From 8a8ab2e64e09b56dc1324fd2f7da12346166cad1 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 10 Oct 2011 19:55:58 +0900 Subject: gpio/samsung: only register available gpio banks Only register gpio banks provided by SoC instead of the maximum possible to lessen confusion, get rid of a warning from gpiolib and stop it from eating into the extra gpios for configs with S3C24XX_GPIO_EXTRA != 0. Signed-off-by: Peter Korsgaard Signed-off-by: Kukjin Kim diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index b6be77a..c87b65a 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c @@ -914,6 +914,10 @@ static void __init s3c24xx_gpiolib_add_chips(struct samsung_gpio_chip *chip, struct gpio_chip *gc = &chip->chip; for (i = 0 ; i < nr_chips; i++, chip++) { + /* skip banks not present on SoC */ + if (chip->chip.base >= S3C_GPIO_END) + continue; + if (!chip->config) chip->config = &s3c24xx_gpiocfg_default; if (!chip->pm) -- cgit v0.10.2 From 6700397a8164f58a6637fa26d9fd752aa8cf2fd1 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 11 Oct 2011 08:57:11 +0900 Subject: ARM: S3C64XX: Enable TCM support The S3C64xx CPUs have TCMs so enable the kernel support for it on these systems. Signed-off-by: Mark Brown Acked-by: Linus Walleij Signed-off-by: Kukjin Kim diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 52f1027..28413d2 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -715,6 +715,7 @@ config ARCH_S3C64XX select CPU_V6 select ARM_VIC select HAVE_CLK + select HAVE_TCM select CLKDEV_LOOKUP select NO_IOPORT select ARCH_USES_GETTIMEOFFSET -- cgit v0.10.2 From b82cee243633fbb734de704e38f57c771d7afd73 Mon Sep 17 00:00:00 2001 From: Thomas Abraham Date: Wed, 12 Oct 2011 20:11:17 +0900 Subject: gpio/samsung: Fix incorrect gpio pull up/down callback for EXYNOS4 Some of the gpio chips of exynos4 are assigned a default gpio config without the exynos4 specific pull up/down callbacks which resulted in incorrect setting of pull up/down configuration. Fix this by adding two new exynos4 specific entries in the array of default configs with set_pull and get_pull callbacks set to exynos4 specific callbacks The new default gpio configs can then be used for exynos4 gpio chips. Signed-off-by: Thomas Abraham Signed-off-by: Kukjin Kim diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index c87b65a..de8788d 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c @@ -482,7 +482,14 @@ static struct samsung_gpio_cfg samsung_gpio_cfgs[] = { }, { .set_config = samsung_gpio_setcfg_2bit, .get_config = samsung_gpio_getcfg_2bit, - }, + }, { + .set_pull = exynos4_gpio_setpull, + .get_pull = exynos4_gpio_getpull, + }, { + .cfg_eint = 0x3, + .set_pull = exynos4_gpio_setpull, + .get_pull = exynos4_gpio_getpull, + } }; /* @@ -2253,49 +2260,49 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = { .label = "GPL2", }, }, { - .config = &samsung_gpio_cfgs[0], + .config = &samsung_gpio_cfgs[8], .chip = { .base = EXYNOS4_GPY0(0), .ngpio = EXYNOS4_GPIO_Y0_NR, .label = "GPY0", }, }, { - .config = &samsung_gpio_cfgs[0], + .config = &samsung_gpio_cfgs[8], .chip = { .base = EXYNOS4_GPY1(0), .ngpio = EXYNOS4_GPIO_Y1_NR, .label = "GPY1", }, }, { - .config = &samsung_gpio_cfgs[0], + .config = &samsung_gpio_cfgs[8], .chip = { .base = EXYNOS4_GPY2(0), .ngpio = EXYNOS4_GPIO_Y2_NR, .label = "GPY2", }, }, { - .config = &samsung_gpio_cfgs[0], + .config = &samsung_gpio_cfgs[8], .chip = { .base = EXYNOS4_GPY3(0), .ngpio = EXYNOS4_GPIO_Y3_NR, .label = "GPY3", }, }, { - .config = &samsung_gpio_cfgs[0], + .config = &samsung_gpio_cfgs[8], .chip = { .base = EXYNOS4_GPY4(0), .ngpio = EXYNOS4_GPIO_Y4_NR, .label = "GPY4", }, }, { - .config = &samsung_gpio_cfgs[0], + .config = &samsung_gpio_cfgs[8], .chip = { .base = EXYNOS4_GPY5(0), .ngpio = EXYNOS4_GPIO_Y5_NR, .label = "GPY5", }, }, { - .config = &samsung_gpio_cfgs[0], + .config = &samsung_gpio_cfgs[8], .chip = { .base = EXYNOS4_GPY6(0), .ngpio = EXYNOS4_GPIO_Y6_NR, @@ -2303,7 +2310,7 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = { }, }, { .base = (S5P_VA_GPIO2 + 0xC00), - .config = &samsung_gpio_cfgs[3], + .config = &samsung_gpio_cfgs[9], .irq_base = IRQ_EINT(0), .chip = { .base = EXYNOS4_GPX0(0), @@ -2313,7 +2320,7 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = { }, }, { .base = (S5P_VA_GPIO2 + 0xC20), - .config = &samsung_gpio_cfgs[3], + .config = &samsung_gpio_cfgs[9], .irq_base = IRQ_EINT(8), .chip = { .base = EXYNOS4_GPX1(0), @@ -2323,7 +2330,7 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = { }, }, { .base = (S5P_VA_GPIO2 + 0xC40), - .config = &samsung_gpio_cfgs[3], + .config = &samsung_gpio_cfgs[9], .irq_base = IRQ_EINT(16), .chip = { .base = EXYNOS4_GPX2(0), @@ -2333,7 +2340,7 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = { }, }, { .base = (S5P_VA_GPIO2 + 0xC60), - .config = &samsung_gpio_cfgs[3], + .config = &samsung_gpio_cfgs[9], .irq_base = IRQ_EINT(24), .chip = { .base = EXYNOS4_GPX3(0), -- cgit v0.10.2 From c034b184597d93ad7749aca3e8bd1c2105104f07 Mon Sep 17 00:00:00 2001 From: Tushar Behera Date: Wed, 5 Oct 2011 08:55:49 +0900 Subject: gpio/samsung: Move SoC specific codes within macro In drivers/gpio/gpio-samsung.c, there are certain structures and functions which are not getting used if the particular CPU is not selected. These code segments are moved under CPU specific macros to remove compilation warnings. Signed-off-by: Tushar Behera Acked-by: Grant Likely Signed-off-by: Kukjin Kim diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index de8788d..479edc3 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c @@ -318,6 +318,7 @@ static unsigned samsung_gpio_getcfg_4bit(struct samsung_gpio_chip *chip, return S3C_GPIO_SPECIAL(con); } +#ifdef CONFIG_PLAT_S3C24XX /* * s3c24xx_gpio_setcfg_abank - S3C24XX style GPIO configuration (Bank A) * @chip: The gpio chip that is being configured. @@ -379,7 +380,9 @@ static unsigned s3c24xx_gpio_getcfg_abank(struct samsung_gpio_chip *chip, return S3C_GPIO_SFN(con); } +#endif +#if defined(CONFIG_CPU_S5P6440) || defined(CONFIG_CPU_S5P6450) static int s5p64x0_gpio_setcfg_rbank(struct samsung_gpio_chip *chip, unsigned int off, unsigned int cfg) { @@ -417,6 +420,7 @@ static int s5p64x0_gpio_setcfg_rbank(struct samsung_gpio_chip *chip, return 0; } +#endif static void __init samsung_gpiolib_set_cfg(struct samsung_gpio_cfg *chipcfg, int nr_chips) @@ -438,10 +442,12 @@ struct samsung_gpio_cfg s3c24xx_gpiocfg_default = { .get_config = samsung_gpio_getcfg_2bit, }; +#ifdef CONFIG_PLAT_S3C24XX static struct samsung_gpio_cfg s3c24xx_gpiocfg_banka = { .set_config = s3c24xx_gpio_setcfg_abank, .get_config = s3c24xx_gpio_getcfg_abank, }; +#endif static struct samsung_gpio_cfg exynos4_gpio_cfg = { .set_pull = exynos4_gpio_setpull, @@ -450,6 +456,7 @@ static struct samsung_gpio_cfg exynos4_gpio_cfg = { .get_config = samsung_gpio_getcfg_4bit, }; +#if defined(CONFIG_CPU_S5P6440) || defined(CONFIG_CPU_S5P6450) static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = { .cfg_eint = 0x3, .set_config = s5p64x0_gpio_setcfg_rbank, @@ -457,6 +464,7 @@ static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = { .set_pull = samsung_gpio_setpull_updown, .get_pull = samsung_gpio_getpull_updown, }; +#endif static struct samsung_gpio_cfg samsung_gpio_cfgs[] = { { @@ -689,6 +697,7 @@ static int samsung_gpiolib_4bit2_output(struct gpio_chip *chip, return 0; } +#ifdef CONFIG_PLAT_S3C24XX /* The next set of routines are for the case of s3c24xx bank a */ static int s3c24xx_gpiolib_banka_input(struct gpio_chip *chip, unsigned offset) @@ -724,6 +733,7 @@ static int s3c24xx_gpiolib_banka_output(struct gpio_chip *chip, local_irq_restore(flags); return 0; } +#endif /* The next set of routines are for the case of s5p64x0 bank r */ -- cgit v0.10.2 From 18c55cd466c12ede49638822d3a71eb1f24e0d25 Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Wed, 12 Oct 2011 21:34:11 +0900 Subject: ARM: SAMSUNG: Add adc registers for S3C2443/S3C2416 The adc blocks of the S3C2443 and S3C2416 define some additional registers and bits. Signed-off-by: Heiko Stuebner Signed-off-by: Kukjin Kim diff --git a/arch/arm/plat-samsung/include/plat/regs-adc.h b/arch/arm/plat-samsung/include/plat/regs-adc.h index 035e8c3..7061210 100644 --- a/arch/arm/plat-samsung/include/plat/regs-adc.h +++ b/arch/arm/plat-samsung/include/plat/regs-adc.h @@ -20,6 +20,7 @@ #define S3C2410_ADCDAT0 S3C2410_ADCREG(0x0C) #define S3C2410_ADCDAT1 S3C2410_ADCREG(0x10) #define S3C64XX_ADCUPDN S3C2410_ADCREG(0x14) +#define S3C2443_ADCMUX S3C2410_ADCREG(0x18) #define S3C64XX_ADCCLRINT S3C2410_ADCREG(0x18) #define S5P_ADCMUX S3C2410_ADCREG(0x1C) #define S3C64XX_ADCCLRINTPNDNUP S3C2410_ADCREG(0x20) @@ -33,6 +34,7 @@ #define S3C2410_ADCCON_PRSCVLMASK (0xFF<<6) #define S3C2410_ADCCON_SELMUX(x) (((x)&0x7)<<3) #define S3C2410_ADCCON_MUXMASK (0x7<<3) +#define S3C2416_ADCCON_RESSEL (1 << 3) #define S3C2410_ADCCON_STDBM (1<<2) #define S3C2410_ADCCON_READ_START (1<<1) #define S3C2410_ADCCON_ENABLE_START (1<<0) @@ -40,6 +42,7 @@ /* ADCTSC Register Bits */ +#define S3C2443_ADCTSC_UD_SEN (1 << 8) #define S3C2410_ADCTSC_YM_SEN (1<<7) #define S3C2410_ADCTSC_YP_SEN (1<<6) #define S3C2410_ADCTSC_XM_SEN (1<<5) -- cgit v0.10.2 From df303e0236417ca006e04116f18641dbe4bd704a Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Wed, 12 Oct 2011 21:34:11 +0900 Subject: ARM: SAMSUNG: Fix mux bit modification in s3c_adc_select The mux bits in the adccon register should be cleared only if muxing is really done in ADCCON and not another register. This patch introduces a conditional for this. Signed-off-by: Heiko Stuebner Signed-off-by: Kukjin Kim diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index ee8deef..7821055a 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -98,7 +98,8 @@ static inline void s3c_adc_select(struct adc_device *adc, client->select_cb(client, 1); - con &= ~S3C2410_ADCCON_MUXMASK; + if (cpu == TYPE_ADCV1 || cpu == TYPE_ADCV2) + con &= ~S3C2410_ADCCON_MUXMASK; con &= ~S3C2410_ADCCON_STDBM; con &= ~S3C2410_ADCCON_STARTMASK; -- cgit v0.10.2 From f8c414b516e17328bb1ab359b273c76a2e665b68 Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Wed, 12 Oct 2011 21:34:12 +0900 Subject: ARM: SAMSUNG: Allow overriding of adc device name for S3C24XX The adc blocks of S3C2443 and S3C2416 contain quirks not present in the stock S3C24xx adc. Therefore allow them to alter the device name via s3c_adc_setname. Signed-off-by: Heiko Stuebner Signed-off-by: Kukjin Kim diff --git a/arch/arm/plat-samsung/include/plat/adc-core.h b/arch/arm/plat-samsung/include/plat/adc-core.h index a281568..a927bee 100644 --- a/arch/arm/plat-samsung/include/plat/adc-core.h +++ b/arch/arm/plat-samsung/include/plat/adc-core.h @@ -20,7 +20,7 @@ /* re-define device name depending on support. */ static inline void s3c_adc_setname(char *name) { -#ifdef CONFIG_SAMSUNG_DEV_ADC +#if defined(CONFIG_SAMSUNG_DEV_ADC) || defined(CONFIG_PLAT_S3C24XX) s3c_device_adc.name = name; #endif } -- cgit v0.10.2 From 6247cea2b9c193a845a01381c36e18f11676fdfb Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Wed, 12 Oct 2011 21:34:12 +0900 Subject: ARM: SAMSUNG: Add support s3c2443-adc for S3C2443 The S3C2443-adc is 10 bit wide and has its mux-select in an extra register at base+0x18 Signed-off-by: Heiko Stuebner Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c index 5df6458..a22b771 100644 --- a/arch/arm/mach-s3c2443/s3c2443.c +++ b/arch/arm/mach-s3c2443/s3c2443.c @@ -41,6 +41,7 @@ #include #include #include +#include static struct map_desc s3c2443_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), @@ -70,6 +71,8 @@ int __init s3c2443_init(void) s3c_nand_setname("s3c2412-nand"); s3c_fb_setname("s3c2443-fb"); + s3c_adc_setname("s3c2443-adc"); + /* change WDT IRQ number */ s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT; s3c_device_wdt.resource[1].end = IRQ_S3C2443_WDT; diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 7821055a..8d8c4cc 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -41,6 +41,7 @@ enum s3c_cpu_type { TYPE_ADCV1, /* S3C24XX */ + TYPE_ADCV11, /* S3C2443 */ TYPE_ADCV2, /* S3C64XX, S5P64X0, S5PC100 */ TYPE_ADCV3, /* S5PV210, S5PC110, EXYNOS4210 */ }; @@ -106,6 +107,9 @@ static inline void s3c_adc_select(struct adc_device *adc, if (!client->is_ts) { if (cpu == TYPE_ADCV3) writel(client->channel & 0xf, adc->regs + S5P_ADCMUX); + else if (cpu == TYPE_ADCV11) + writel(client->channel & 0xf, + adc->regs + S3C2443_ADCMUX); else con |= S3C2410_ADCCON_SELMUX(client->channel); } @@ -294,13 +298,13 @@ static irqreturn_t s3c_adc_irq(int irq, void *pw) client->nr_samples--; - if (cpu != TYPE_ADCV1) { + if (cpu == TYPE_ADCV1 || cpu == TYPE_ADCV11) { + data0 &= 0x3ff; + data1 &= 0x3ff; + } else { /* S3C64XX/S5P ADC resolution is 12-bit */ data0 &= 0xfff; data1 &= 0xfff; - } else { - data0 &= 0x3ff; - data1 &= 0x3ff; } if (client->convert_cb) @@ -321,7 +325,7 @@ static irqreturn_t s3c_adc_irq(int irq, void *pw) } exit: - if (cpu != TYPE_ADCV1) { + if (cpu == TYPE_ADCV2 || cpu == TYPE_ADCV3) { /* Clear ADC interrupt */ writel(0, adc->regs + S3C64XX_ADCCLRINT); } @@ -493,6 +497,9 @@ static struct platform_device_id s3c_adc_driver_ids[] = { .name = "s3c24xx-adc", .driver_data = TYPE_ADCV1, }, { + .name = "s3c2443-adc", + .driver_data = TYPE_ADCV11, + }, { .name = "s3c64xx-adc", .driver_data = TYPE_ADCV2, }, { -- cgit v0.10.2 From 35cc3cea2c2adb825dbe987000165005d28acaec Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Wed, 12 Oct 2011 21:34:12 +0900 Subject: ARM: SAMSUNG: Add support s3c2416-adc for S3C2416/S3C2450 The ADC of the S3C2416/2450 SoC is 10 or 12 bit wide, has its source selection in the register base+0x18 and its width selection in bit 03 of the ADCCON register. Signed-off-by: Heiko Stuebner Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c index 3156b7a..081ef4c 100644 --- a/arch/arm/mach-s3c2416/s3c2416.c +++ b/arch/arm/mach-s3c2416/s3c2416.c @@ -60,6 +60,7 @@ #include #include #include +#include static struct map_desc s3c2416_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), @@ -97,6 +98,8 @@ int __init s3c2416_init(void) s3c_fb_setname("s3c2443-fb"); + s3c_adc_setname("s3c2416-adc"); + register_syscore_ops(&s3c2416_pm_syscore_ops); register_syscore_ops(&s3c24xx_irq_syscore_ops); diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 8d8c4cc..33ecd0c 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -42,6 +42,7 @@ enum s3c_cpu_type { TYPE_ADCV1, /* S3C24XX */ TYPE_ADCV11, /* S3C2443 */ + TYPE_ADCV12, /* S3C2416, S3C2450 */ TYPE_ADCV2, /* S3C64XX, S5P64X0, S5PC100 */ TYPE_ADCV3, /* S5PV210, S5PC110, EXYNOS4210 */ }; @@ -107,7 +108,7 @@ static inline void s3c_adc_select(struct adc_device *adc, if (!client->is_ts) { if (cpu == TYPE_ADCV3) writel(client->channel & 0xf, adc->regs + S5P_ADCMUX); - else if (cpu == TYPE_ADCV11) + else if (cpu == TYPE_ADCV11 || cpu == TYPE_ADCV12) writel(client->channel & 0xf, adc->regs + S3C2443_ADCMUX); else @@ -302,7 +303,7 @@ static irqreturn_t s3c_adc_irq(int irq, void *pw) data0 &= 0x3ff; data1 &= 0x3ff; } else { - /* S3C64XX/S5P ADC resolution is 12-bit */ + /* S3C2416/S3C64XX/S5P ADC resolution is 12-bit */ data0 &= 0xfff; data1 &= 0xfff; } @@ -337,6 +338,7 @@ static int s3c_adc_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct adc_device *adc; struct resource *regs; + enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data; int ret; unsigned tmp; @@ -399,10 +401,13 @@ static int s3c_adc_probe(struct platform_device *pdev) clk_enable(adc->clk); tmp = adc->prescale | S3C2410_ADCCON_PRSCEN; - if (platform_get_device_id(pdev)->driver_data != TYPE_ADCV1) { - /* Enable 12-bit ADC resolution */ + + /* Enable 12-bit ADC resolution */ + if (cpu == TYPE_ADCV12) + tmp |= S3C2416_ADCCON_RESSEL; + if (cpu == TYPE_ADCV2 || cpu == TYPE_ADCV3) tmp |= S3C64XX_ADCCON_RESSEL; - } + writel(tmp, adc->regs + S3C2410_ADCCON); dev_info(dev, "attached adc driver\n"); @@ -469,6 +474,7 @@ static int s3c_adc_resume(struct device *dev) struct platform_device *pdev = container_of(dev, struct platform_device, dev); struct adc_device *adc = platform_get_drvdata(pdev); + enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data; int ret; unsigned long tmp; @@ -479,9 +485,13 @@ static int s3c_adc_resume(struct device *dev) enable_irq(adc->irq); tmp = adc->prescale | S3C2410_ADCCON_PRSCEN; + /* Enable 12-bit ADC resolution */ - if (platform_get_device_id(pdev)->driver_data != TYPE_ADCV1) + if (cpu == TYPE_ADCV12) + tmp |= S3C2416_ADCCON_RESSEL; + if (cpu == TYPE_ADCV2 || cpu == TYPE_ADCV3) tmp |= S3C64XX_ADCCON_RESSEL; + writel(tmp, adc->regs + S3C2410_ADCCON); return 0; @@ -500,6 +510,9 @@ static struct platform_device_id s3c_adc_driver_ids[] = { .name = "s3c2443-adc", .driver_data = TYPE_ADCV11, }, { + .name = "s3c2416-adc", + .driver_data = TYPE_ADCV12, + }, { .name = "s3c64xx-adc", .driver_data = TYPE_ADCV2, }, { -- cgit v0.10.2 From df74a28c7a2e50135a960403025a8934e8c471e4 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Thu, 13 Oct 2011 15:38:21 +0900 Subject: ARM: EXYNOS4: Enable MFC on ORIGEN This patch enables multi-format codec (MFC) support on ORIGEN board. Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index dd660eb..d7491e1 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig @@ -251,11 +251,12 @@ config MACH_ORIGEN select S5P_DEV_FIMC3 select S5P_DEV_FIMD0 select S5P_DEV_I2C_HDMIPHY + select S5P_DEV_MFC select S5P_DEV_TV select S5P_DEV_USB_EHCI - select EXYNOS4_DEV_PD select SAMSUNG_DEV_BACKLIGHT select SAMSUNG_DEV_PWM + select EXYNOS4_DEV_PD select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c index 311e9db..f80b563 100644 --- a/arch/arm/mach-exynos4/mach-origen.c +++ b/arch/arm/mach-exynos4/mach-origen.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -601,6 +602,9 @@ static struct platform_device *origen_devices[] __initdata = { &s5p_device_fimd0, &s5p_device_hdmi, &s5p_device_i2c_hdmiphy, + &s5p_device_mfc, + &s5p_device_mfc_l, + &s5p_device_mfc_r, &s5p_device_mixer, &exynos4_device_pd[PD_LCD0], &exynos4_device_pd[PD_TV], @@ -608,6 +612,7 @@ static struct platform_device *origen_devices[] __initdata = { &exynos4_device_pd[PD_LCD1], &exynos4_device_pd[PD_CAM], &exynos4_device_pd[PD_GPS], + &exynos4_device_pd[PD_MFC], &origen_device_gpiokeys, &origen_lcd_hv070wsa, }; @@ -645,6 +650,11 @@ static void __init origen_power_init(void) s3c_gpio_setpull(EXYNOS4_GPX0(4), S3C_GPIO_PULL_NONE); } +static void __init origen_reserve(void) +{ + s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); +} + static void __init origen_machine_init(void) { origen_power_init(); @@ -668,11 +678,14 @@ static void __init origen_machine_init(void) s5p_fimd0_set_platdata(&origen_lcd_pdata); platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); + s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev; s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev; s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev; + s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; + samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); } @@ -683,4 +696,5 @@ MACHINE_START(ORIGEN, "ORIGEN") .map_io = origen_map_io, .init_machine = origen_machine_init, .timer = &exynos4_timer, + .reserve = &origen_reserve, MACHINE_END -- cgit v0.10.2 From 716e84d139b2e209d8d17d21f09f3a5dc0026537 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Thu, 13 Oct 2011 15:41:00 +0900 Subject: ARM: EXYNOS4: Add support for M-5MOLS camera on Nuri board Add voltage regulator and platform data definition for M-5MOLS sensor and MIPI-CSI receiver drivers. Add CAM power domain dependencies for FIMC device and set up camera port A GPIO. Configure I2C0 bus timings. Signed-off-by: Sylwester Nawrocki Signed-off-by: HeungJun Kim Signed-off-by: Kyungmin Park Signed-off-by: Kukjin Kim diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index d7491e1..4924838 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig @@ -215,6 +215,7 @@ config MACH_UNIVERSAL_C210 config MACH_NURI bool "Mobile NURI Board" select CPU_EXYNOS4210 + select S5P_GPIO_INT select S3C_DEV_WDT select S3C_DEV_RTC select S5P_DEV_FIMD0 @@ -224,15 +225,23 @@ config MACH_NURI select S3C_DEV_I2C1 select S3C_DEV_I2C3 select S3C_DEV_I2C5 + select S5P_DEV_CSIS0 + select S5P_DEV_FIMC0 + select S5P_DEV_FIMC1 + select S5P_DEV_FIMC2 + select S5P_DEV_FIMC3 select S5P_DEV_MFC select S5P_DEV_USB_EHCI + select S5P_SETUP_MIPIPHY select EXYNOS4_DEV_PD + select EXYNOS4_SETUP_FIMC select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C3 select EXYNOS4_SETUP_I2C5 select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY + select S5P_SETUP_MIPIPHY select SAMSUNG_DEV_PWM select SAMSUNG_DEV_ADC help diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c index 20932ec..816a502 100644 --- a/arch/arm/mach-exynos4/mach-nuri.c +++ b/arch/arm/mach-exynos4/mach-nuri.c @@ -27,6 +27,9 @@ #include #include