This patch adds platform data for using S3C-HSOTG driver at Universal_C210 target. Signed-off-by: Lukasz Majewski <l.majewski@xxxxxxxxxxx> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> --- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/include/mach/map.h | 2 ++ arch/arm/mach-exynos/include/mach/regs-sys.h | 20 ++++++++++++++++++++ arch/arm/mach-exynos/mach-universal_c210.c | 14 ++++++++++++++ arch/arm/plat-samsung/devs.c | 2 +- 5 files changed, 38 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-exynos/include/mach/regs-sys.h diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 440d095..42bb710 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -246,6 +246,7 @@ config MACH_UNIVERSAL_C210 select S5P_DEV_MFC select S5P_DEV_ONENAND select S5P_DEV_TV + select S3C_DEV_USB_HSOTG select EXYNOS4_DEV_DMA select EXYNOS4_DEV_PD select EXYNOS4_SETUP_FIMD0 diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index a81c95b..be09588 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -34,6 +34,8 @@ #define EXYNOS4_PA_G2D 0x12800000 #define EXYNOS4_PA_USB_HSOTG 0x12480000 +#define EXYNOS4_PA_USB_HSPHY 0x125B0000 + #define EXYNOS4_PA_I2S0 0x03830000 #define EXYNOS4_PA_I2S1 0xE3100000 #define EXYNOS4_PA_I2S2 0xE2A00000 diff --git a/arch/arm/mach-exynos/include/mach/regs-sys.h b/arch/arm/mach-exynos/include/mach/regs-sys.h new file mode 100644 index 0000000..5682227 --- /dev/null +++ b/arch/arm/mach-exynos/include/mach/regs-sys.h @@ -0,0 +1,20 @@ +/* arch/arm/mach-s5pv210/include/mach/regs-sys.h + * + * Copyright 2010 Ben Dooks <ben-linux@xxxxxxxxx> + * + * S5PV210 - System registers definitions + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +/* Registers related to power management */ +#define S5P_PMREGx(x) (S5P_VA_PMU + (x)) + +#define S5P_USBOTG_PHY_CONTROL S5P_PMREGx(0x0704) +#define S5P_USBOTG_PHY_EN (1 << 0) + +/* compatibility for hsotg driver */ +#define S3C64XX_OTHERS S5P_USBOTG_PHY_CONTROL +#define S3C64XX_OTHERS_USBMASK S5P_USBOTG_PHY_EN diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 220de1c..2e43e98 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c @@ -28,6 +28,7 @@ #include <asm/mach-types.h> #include <plat/regs-serial.h> +#include <plat/clock.h> #include <plat/cpu.h> #include <plat/devs.h> #include <plat/iic.h> @@ -41,6 +42,7 @@ #include <plat/s5p-time.h> #include <plat/camport.h> #include <plat/mipi_csis.h> +#include <plat/udc-hs.h> #include <mach/map.h> @@ -200,6 +202,7 @@ static struct regulator_init_data lp3974_ldo2_data = { }; static struct regulator_consumer_supply lp3974_ldo3_consumer[] = { + REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), @@ -285,6 +288,7 @@ static struct regulator_init_data lp3974_ldo7_data = { }; static struct regulator_consumer_supply lp3974_ldo8_consumer[] = { + REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"), }; @@ -475,7 +479,10 @@ static struct regulator_init_data lp3974_vichg_data = { static struct regulator_init_data lp3974_esafeout1_data = { .constraints = { .name = "SAFEOUT1", + .min_uV = 4800000, + .max_uV = 4800000, .valid_ops_mask = REGULATOR_CHANGE_STATUS, + .always_on = 1, .state_mem = { .enabled = 1, }, @@ -928,6 +935,9 @@ static struct gpio universal_camera_gpios[] = { { GPIO_CAM_MEGA_nRST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" }, }; +/* USB OTG */ +static struct s3c_hsotg_plat universal_hsotg_pdata; + static void universal_camera_init(void) { s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata), @@ -981,6 +991,7 @@ static struct platform_device *universal_devices[] __initdata = { &universal_gpio_keys, &s5p_device_onenand, &s5p_device_fimd0, + &s3c_device_usb_hsotg, &s5p_device_mfc, &s5p_device_mfc_l, &s5p_device_mfc_r, @@ -1039,6 +1050,7 @@ static void __init universal_machine_init(void) i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs, ARRAY_SIZE(i2c_gpio12_devs)); + s3c_hsotg_set_platdata(&universal_hsotg_pdata); universal_camera_init(); /* Last */ @@ -1052,6 +1064,8 @@ static void __init universal_machine_init(void) s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM].dev; s5p_device_fimc3.dev.parent = &exynos4_device_pd[PD_CAM].dev; s5p_device_mipi_csis0.dev.parent = &exynos4_device_pd[PD_CAM].dev; + + clk_xusbxti.rate = 24000000; } MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 2d4d500..2e6558e 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -1439,7 +1439,7 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) #ifdef CONFIG_S3C_DEV_USB_HSOTG static struct resource s3c_usb_hsotg_resources[] = { [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_128K), - [1] = DEFINE_RES_IRQ(IRQ_OTG), + [1] = DEFINE_RES_IRQ(IRQ_USB_HSOTG), }; struct platform_device s3c_device_usb_hsotg = { -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html