ARM: EXYNOS: Add support for ORIGEN4QUAD board
Subsystems (3)
PATCH 1/1 ARM: EXYNOS: Add support for ORIGEN4QUAD board
From: Kyuho Choi <[email protected]>
This patch add support for Insignal ORIGEN4QUAD board. ORIGEN4QUAD board based on Samsung Exynos4412 SoC.
--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-origen.c | 74 +++++++++++++++++++++++++++-------- 2 files changed, 58 insertions(+), 17 deletions(-)
arch/arm/mach-exynos/Kconfig +1 -0
@@ -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
arch/arm/mach-exynos/mach-origen.c +57 -17
104 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH 1/1 ARM: EXYNOS: Add support for ORIGEN4QUAD board
Quoted 11 lines · On 11/19/2012 10:54 PM, [email protected] wrote:
From: Kyuho Choi <[email protected]>
This patch add support for Insignal ORIGEN4QUAD board. ORIGEN4QUAD board based on Samsung Exynos4412 SoC.
Signed-off-by Kyuho Choi <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-origen.c | 74 +++++++++++++++++++++++++++-------- 2 files changed, 58 insertions(+), 17 deletions(-)
Since Origen and Origen4Quad boards have different peripherals (different pmic chip, touch/audio on different I2C bus etc.), how do you plan to add them to mach-origen.c?
Quoted 124 lines
arch/arm/mach-exynos/Kconfig +1
-0@@ -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_SDHCIarch/arm/mach-exynos/mach-origen.c +57
-17@@ -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 <[email protected]> */ /* Maintainer: JeongHyeon Kim <[email protected]> */ .atag_offset = 0x100, .smp = smp_ops(exynos_smp_ops),
Signature · 1 line
Tushar Behera
PATCH 1/1 ARM: EXYNOS: Add support for ORIGEN4QUAD board
Thanks for your interest. :)
2012/11/20 Tushar Behera <[email protected]>
Quoted 11 lines · On 11/19/2012 10:54 PM, chlrbgh0 at gmail.com wrote:
Quoted 9 lines
From: Kyuho Choi <[email protected]>
This patch add support for Insignal ORIGEN4QUAD board. ORIGEN4QUAD board based on Samsung Exynos4412 SoC.
Signed-off-by Kyuho Choi <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-origen.c | 74+++++++++++++++++++++++++++--------
Quoted 8 lines
Quoted 2 lines
2 files changed, 58 insertions(+), 17 deletions(-)Since Origen and Origen4Quad boards have different peripherals (different pmic chip, touch/audio on different I2C bus etc.), how do you plan to add them to
mach-origen.c?As your mentioned, PMIC setup code will be added for Origen4Quad board.
IMHO, Origen and Origen4Quad board has differential form SoC type. Thus I modified machine initial code from "mach-origen.c" source. It separate Origenboard and Origen4Quad board from SoC type.
- Common initialize features(Origen and Origen4Quad shared features)
- Origenboard dependant features
- Origen4Quad board dependant features
So, code to initialize the peripherals will be added to each area.
Quoted 120 lines
Review
Quoted 14 lines
arch/arm/mach-exynos/Kconfig +1
-0@@ -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(quoted diff) +0
-0
b/arch/arm/mach-exynos/mach-origen.cQuoted 105 lines
index e6f4191..2839724 100644
arch/arm/mach-exynos/mach-origen.c +56
-17@@ -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 (); + } }
Quoted 11 lines
arch/arm/mach-exynos/mach-origen.c static void __init origen_machine_init(void) · line 854
Quoted 6 lines
arch/arm/mach-exynos/mach-origen.c +1
-0MACHINE_START (ORIGEN ,"ORIGEN" ) +/* Maintainer: Kyuho Choi <[email protected]> */ /* Maintainer: JeongHyeon Kim <[email protected]> */ .atag_offset = 0x100, .smp = smp_ops(exynos_smp_ops),--
Tushar Behera
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121120/bc359c4c/attachment-0001.html>
PATCH 1/1 ARM: EXYNOS: Add support for ORIGEN4QUAD board
In reply to chlrbgh0 at gmail.comQuoted 10 lines · chlrbgh0 at gmail.com wrote:
From: Kyuho Choi <[email protected]>
This patch add support for Insignal ORIGEN4QUAD board. ORIGEN4QUAD board based on Samsung Exynos4412 SoC.
Signed-off-by Kyuho Choi <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-origen.c | 74
+++++++++++++++++++++++++++-----
Quoted 3 lines
---
2 files changed, 58 insertions(+), 17 deletions(-)
Hmm...at this moment, I don't want to update non-DT stuff for exynos, because I have a plan to move on supporting only DT for all of exynos next time.
Please submit DT patches for the ORIGEN4QUAD board.
Thanks.
K-Gene <[email protected]>
PATCH 1/1 ARM: EXYNOS: Add support for ORIGEN4QUAD board
2012/11/20 Kukjin Kim <[email protected]>
Quoted 15 lines
Quoted 10 lines · chlrbgh0 at gmail.com wrote:
From: Kyuho Choi <[email protected]>
This patch add support for Insignal ORIGEN4QUAD board. ORIGEN4QUAD board based on Samsung Exynos4412 SoC.
Signed-off-by Kyuho Choi <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-origen.c | 74+++++++++++++++++++++++++++-----
Quoted 3 lines
---
2 files changed, 58 insertions(+), 17 deletions(-)
Quoted 8 lines
Hmm...at this moment, I don't want to update non-DT stuff for exynos, because I have a plan to move on supporting only DT for all of exynos next time.
Please submit DT patches for the ORIGEN4QUAD board.
Thanks.
Okay. I'll prepare and submit DT patches for ORIGEN4QUAD board. :)
Quoted 4 lines
K-Gene <[email protected]>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121120/4be4cd2e/attachment-0001.html>