From patchwork Mon Nov 19 17:24:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyuho Choi X-Patchwork-Id: 1766321 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 156B43FCDE for ; Mon, 19 Nov 2012 17:26:08 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TaV4o-00039Z-1B; Mon, 19 Nov 2012 17:24:06 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TaV4k-000399-Ba for linux-arm-kernel@lists.infradead.org; Mon, 19 Nov 2012 17:24:03 +0000 Received: by mail-pa0-f49.google.com with SMTP id bi1so661711pad.36 for ; Mon, 19 Nov 2012 09:24:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=wm10b+9I41kag/39/jJSGJqUrI36vVQy1XwFogKD6eU=; b=gzqFXskTwHTa1zfU7JMg7KL5346XGUBL3h+/uCZrtADAPAfnZvqP8b6pD0iz1W7q+d X2fWS7i0RcqfYHWgZGkDwFJMvTSJrlcMzKYq+7lkFolAWuFaGC0xwESNjblpDfcVyKo1 YTr6duJhDiktQEZyIbD4jVusVKm8bOQ60MqXT8lC+nSBM/zL7BpTjVKTP5ADjkdbXMcH IOiHdz9Ky7imOLVqltR9aytWRtV6Tfotl2W9B8pac4Nukac/uvXO/vy+HSnNCS5Z9kEX m23iODiT2WHNgv5HwcKdLVYKSV5Sls97q7dvIyOjhWj3NHP23/EPpjDMcvFrRYXybKAl rPlg== Received: by 10.68.252.133 with SMTP id zs5mr34713957pbc.152.1353345840550; Mon, 19 Nov 2012 09:24:00 -0800 (PST) Received: from localhost6.localdomain6 ([114.200.239.210]) by mx.google.com with ESMTPS id qj6sm6500923pbb.69.2012.11.19.09.23.56 (version=SSLv3 cipher=OTHER); Mon, 19 Nov 2012 09:23:58 -0800 (PST) From: chlrbgh0@gmail.com To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] ARM: EXYNOS: Add support for ORIGEN4QUAD board Date: Tue, 20 Nov 2012 02:24:06 +0900 Message-Id: <1353345846-31355-1-git-send-email-kh.choi@insignal.co.kr> X-Mailer: git-send-email 1.7.5.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121119_122402_558160_FF988FCE X-CRM114-Status: GOOD ( 16.36 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (chlrbgh0[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (chlrbgh0[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Kyuho Choi , kgene.kim@samsung.com, jhkim@insignal.co.kr X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Kyuho Choi This patch add support for Insignal ORIGEN4QUAD board. ORIGEN4QUAD board based on Samsung Exynos4412 SoC. Signed-off-by: Kyuho Choi --- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-origen.c | 74 +++++++++++++++++++++++++++-------- 2 files changed, 58 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index bb3b09a..0b8ccd3 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -324,6 +324,7 @@ config MACH_NURI config MACH_ORIGEN bool "ORIGEN" select CPU_EXYNOS4210 + select SOC_EXYNOS4412 select EXYNOS4_DEV_USB_OHCI select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_SDHCI diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index e6f4191..2839724 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-exynos4/mach-origen.c * - * Copyright (c) 2011 Insignal Co., Ltd. + * Copyright (c) 2011-2012 Insignal Co., Ltd. * http://www.insignal.co.kr/ * * This program is free software; you can redistribute it and/or modify @@ -771,19 +771,36 @@ static void __init origen_reserve(void) s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); } -static void __init origen_machine_init(void) +static int __init origen4quad_i2c_init(void) { - origen_power_init(); + /* + * Origen4Quad has weaknees drive strength in i2c channel 3. + * thus here setup i2c3's drvstr for Origen4Quad. + */ + s5p_gpio_set_drvstr(EXYNOS4_GPA1(2), 3); + s5p_gpio_set_drvstr(EXYNOS4_GPA1(3), 3); + return 0; +} - s3c_i2c0_set_platdata(NULL); - i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs)); +static int __init origen4quad_usb_init(void) +{ + /* USB HUB controller's hub reset pin setup for Origen4Quad. */ + gpio_request(EXYNOS4_GPX3(5), "GPX3"); + gpio_direction_output(EXYNOS4_GPX3(5), 1); + gpio_set_value(EXYNOS4_GPX3(5), S3C_GPIO_PULL_UP); + gpio_free(EXYNOS4_GPX3(5)); + return 0; +} +static void __init origen_machine_init(void) +{ /* - * Since sdhci instance 2 can contain a bootable media, - * sdhci instance 0 is registered after instance 2. + * Common initialize code for ORIGEN and Origen4Quad. */ + s3c_i2c0_set_platdata(NULL); + i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs)); + s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata); - s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata); origen_ehci_init(); origen_ohci_init(); @@ -793,22 +810,45 @@ static void __init origen_machine_init(void) s5p_i2c_hdmiphy_set_platdata(NULL); s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0); -#ifdef CONFIG_DRM_EXYNOS - s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; - exynos4_fimd0_gpio_setup_24bpp(); -#else - s5p_fimd0_set_platdata(&origen_lcd_pdata); -#endif + pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup)); platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); - pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup)); - samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); + if (!soc_is_exynos4210()) { + /* + * In case of soc_is_4210(), + * Machine initialize for Origen. + */ - origen_bt_setup(); + origen_power_init(); + + /* + * Since sdhci instance 2 can contain a bootable media, + * sdhci instance 0 is registered after instance 2. + */ + s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata); + +#ifdef CONFIG_DRM_EXYNOS + s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; + exynos4_fimd0_gpio_setup_24bpp(); +#else + s5p_fimd0_set_platdata(&origen_lcd_pdata); +#endif + samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); + + origen_bt_setup(); + } else{ + /* + * In case of soc_is_4412(), + * Machine initialize for Origen4Quad. + */ + origen4quad_i2c_init(); + origen4quad_usb_init(); + } } MACHINE_START(ORIGEN, "ORIGEN") + /* Maintainer: Kyuho Choi */ /* Maintainer: JeongHyeon Kim */ .atag_offset = 0x100, .smp = smp_ops(exynos_smp_ops),