ARM: EXYNOS: Add s3c-hsotg support for Exynos4210 and S5PV210 boards
Subsystems (3)
cover ARM: EXYNOS: Add s3c-hsotg support for Exynos4210 and S5PV210 boards
This patch series adds support for Exynos4210 and S5PV210 based targets; namely Universal_C210, Nuri and GONI.
Tested HW:
- Exynos4210 NURI target rev.1
- Exynos4210 Universal_C210 target rev.0
- S5PV210 GONI target
Dependencies:
- usb:hsotg:samsung USB S3C-HSOTG driver fixes and code cleanup patches, which have been already pulled to usb for-next branch.
http://permalink.gmane.org/gmane.linux.usb.general/62101
Those patches are enabling this UDC driver on GONI, NURI and Universal_C210 targets
Joonyoung Shim (1):
ARM: EXYNOS: Add s3c-hsotg device support for NURI board
Lukasz Majewski (3):
ARM: EXYNOS: Add usb otg phy control for EXYNOS4210
ARM: EXYNOS: Add s3c-hsotg device support for GONI board
ARM: EXYNOS: Add s3c-hsotg device support for Universal C210 board
arch/arm/mach-exynos/Kconfig | 3 + arch/arm/mach-exynos/include/mach/irqs.h | 1 + arch/arm/mach-exynos/include/mach/map.h | 3 + arch/arm/mach-exynos/include/mach/regs-pmu.h | 3 + arch/arm/mach-exynos/mach-nuri.c | 8 ++- arch/arm/mach-exynos/mach-universal_c210.c | 12 +++ arch/arm/mach-exynos/setup-usb-phy.c | 95 +++++++++++++++++++------- arch/arm/mach-s5pv210/Kconfig | 1 + arch/arm/mach-s5pv210/mach-goni.c | 5 ++ 9 files changed, 105 insertions(+), 26 deletions(-)
Signature · 1 line
1.7.2.3
PATCH 1/4 ARM: EXYNOS: Add usb otg phy control for EXYNOS4210
This patch supports to control usb otg phy of EXYNOS4210.
--- arch/arm/mach-exynos/include/mach/irqs.h | 1 + arch/arm/mach-exynos/include/mach/map.h | 3 + arch/arm/mach-exynos/include/mach/regs-pmu.h | 3 + arch/arm/mach-exynos/setup-usb-phy.c | 95 +++++++++++++++++++------- 4 files changed, 77 insertions(+), 25 deletions(-)
arch/arm/mach-exynos/include/mach/irqs.h +1 -0
@@ -196,6 +196,7 @@#define IRQ_IIC7 EXYNOS4_IRQ_IIC7#define IRQ_USB_HOST EXYNOS4_IRQ_USB_HOST +#define IRQ_OTG EXYNOS4_IRQ_USB_HSOTG#define IRQ_HSMMC0 EXYNOS4_IRQ_HSMMC0#define IRQ_HSMMC1 EXYNOS4_IRQ_HSMMC1
arch/arm/mach-exynos/include/mach/map.h +3 -0
@@ -36,6 +36,8 @@#define EXYNOS4_PA_G2D 0x12800000 +#define EXYNOS4_PA_USB_HSOTG 0x12480000 +#define EXYNOS4_PA_I2S0 0x03830000#define EXYNOS4_PA_I2S1 0xE3100000#define EXYNOS4_PA_I2S2 0xE2A00000
@@ -220,6 +222,7 @@#define S3C_PA_IIC6 EXYNOS4_PA_IIC(6)#define S3C_PA_IIC7 EXYNOS4_PA_IIC(7)#define S3C_PA_RTC EXYNOS4_PA_RTC +#define S3C_PA_USB_HSOTG EXYNOS4_PA_USB_HSOTG#define S3C_PA_WDT EXYNOS4_PA_WATCHDOG#define S3C_PA_SPI0 EXYNOS4_PA_SPI0#define S3C_PA_SPI1 EXYNOS4_PA_SPI1
arch/arm/mach-exynos/include/mach/regs-pmu.h +3 -0
@@ -163,6 +163,9 @@#define S5P_CHECK_SLEEP 0x00000BAD/* Only for EXYNOS4210 */ +#define S5P_USBDEVICE_PHY_CONTROL S5P_PMUREG(0x0704) +#define S5P_USBDEVICE_PHY_ENABLE (1 << 0) +#define S5P_USBHOST_PHY_CONTROL S5P_PMUREG(0x0708)#define S5P_USBHOST_PHY_ENABLE (1 << 0)
arch/arm/mach-exynos/setup-usb-phy.c +70 -25
122 lines not on this page · raw message
Signature · 1 line
1.7.2.3
PATCH 2/4 ARM: EXYNOS: Add s3c-hsotg device support for GONI board
In reply to Lukasz MajewskiThis patch adds hsotg device to the GONI board.
--- arch/arm/mach-s5pv210/Kconfig | 1 + arch/arm/mach-s5pv210/mach-goni.c | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/Kconfig +1 -0
@@ -85,6 +85,7 @@ config MACH_AQUILA select S5P_DEV_ONENAND select S5PV210_SETUP_FB_24BPP select S5PV210_SETUP_SDHCI + select S5PV210_SETUP_USB_PHY help Machine support for the Samsung Aquila target based on S5PC110 SoC
arch/arm/mach-s5pv210/mach-goni.c +5 -0
@@ -279,6 +279,9 @@ static void __init goni_tsp_init(void) i2c2_devs[0 ].irq =gpio_to_irq (gpio); } +/* USB OTG */ +static struct s3c_hsotg_plat goni_hsotg_pdata; +static void goni_camera_init (void ) {s5pv210_fimc_setup_gpio (S5P_CAMPORT_A );
@@ -942,6 +945,8 @@ static void __init goni_machine_init(void)s3c_set_platdata (&goni_fimc_md_platdata,sizeof (goni_fimc_md_platdata), &s5p_device_fimc_md); +s3c_hsotg_set_platdata (&goni_hsotg_pdata); +goni_camera_init ();/* SPI */
Signature · 1 line
1.7.2.3
PATCH 3/4 ARM: EXYNOS: Add s3c-hsotg device support for NURI board
In reply to Lukasz MajewskiFrom: Joonyoung Shim <[email protected]>
This patch adds hsotg device to the NURI board.
--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-nuri.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletions(-)
arch/arm/mach-exynos/Kconfig +1 -0
@@ -287,6 +287,7 @@ config MACH_NURI select S5P_DEV_MFC select S5P_DEV_USB_EHCI select S5P_SETUP_MIPIPHY + select S3C_DEV_USB_HSOTG select EXYNOS4_DEV_DMA select EXYNOS4_SETUP_FIMC select EXYNOS4_SETUP_FIMD0
arch/arm/mach-exynos/mach-nuri.c +7 -1
@@ -349,6 +349,7 @@ static struct regulator_consumer_supply __initdata max8997_ldo1_[] = { REGULATOR_SUPPLY("vdd", "s5p-adc"), /* Used by CPU's ADC drv */ };static struct regulator_consumer_supply __initdata max8997_ldo3_[] = { +REGULATOR_SUPPLY ("vusb_d" ,"s3c-hsotg" ),/* USB */ REGULATOR_SUPPLY ("vdd11" ,"s5p-mipi-csis.0" ),/* MIPI */ };static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
@@ -364,7 +365,7 @@ static struct regulator_consumer_supply __initdata max8997_ldo7_[] = { REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */ };static struct regulator_consumer_supply __initdata max8997_ldo8_[] = { -REGULATOR_SUPPLY ("vusb_d" ,NULL ),/* Used by CPU */ +REGULATOR_SUPPLY ("vusb_a" ,"s3c-hsotg" ),/* USB */ REGULATOR_SUPPLY ("vdac" ,NULL ),/* Used by CPU */ };static struct regulator_consumer_supply __initdata max8997_ldo11_[] = {
@@ -1077,6 +1078,9 @@ static void __init nuri_ehci_init(void)s5p_ehci_set_platdata (pdata); } +/* USB OTG */ +static struct s3c_hsotg_plat nuri_hsotg_pdata; +/* CAMERA */ static struct regulator_consumer_supply cam_vt_cam15_supply =REGULATOR_SUPPLY ("vdd_core" ,"6-003c" );
@@ -1289,6 +1293,7 @@ static struct platform_device *nuri_devices[] __initdata = { &s5p_device_mfc_l, &s5p_device_mfc_r, &s5p_device_fimc_md, + &s3c_device_usb_hsotg,/* NURI Devices */ &nuri_gpio_keys,
@@ -1337,6 +1342,7 @@ static void __init nuri_machine_init(void)nuri_camera_init ();nuri_ehci_init (); +s3c_hsotg_set_platdata (&nuri_hsotg_pdata);/* Last */ platform_add_devices (nuri_devices,ARRAY_SIZE (nuri_devices));
Signature · 1 line
1.7.2.3
PATCH 4/4 ARM: EXYNOS: Add s3c-hsotg device support for Universal C210 board
In reply to Lukasz MajewskiThis patch adds platform data for using S3C-HSOTG driver at Universal_C210 target.
--- arch/arm/mach-exynos/Kconfig | 2 ++ arch/arm/mach-exynos/mach-universal_c210.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/Kconfig +2 -0
@@ -250,6 +250,7 @@ config MACH_UNIVERSAL_C210 select S5P_DEV_MFC select S5P_DEV_ONENAND select S5P_DEV_TV + select S3C_DEV_USB_HSOTG select EXYNOS_DEV_SYSMMU select EXYNOS4_DEV_DMA select EXYNOS4_SETUP_FIMD0
@@ -259,6 +260,7 @@ config MACH_UNIVERSAL_C210 select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_FIMC select S5P_SETUP_MIPIPHY + select EXYNOS4_SETUP_USB_PHY help Machine support for Samsung Mobile Universal S5PC210 Reference Board.
arch/arm/mach-exynos/mach-universal_c210.c +12 -0
@@ -205,6 +205,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" ),
@@ -290,6 +291,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" ), };
@@ -486,7 +488,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 , },
@@ -992,6 +997,9 @@ static struct gpio universal_camera_gpios[] = { { GPIO_CAM_VGA_NSTBY, GPIOF_OUT_INIT_LOW, "CAM_VGA_NSTBY" }, }; +/* USB OTG */ +static struct s3c_hsotg_plat universal_hsotg_pdata; +static void __init universal_camera_init (void ) { s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
@@ -1047,6 +1055,7 @@ static struct platform_device *universal_devices[] __initdata = { &s5p_device_onenand, &s5p_device_fimd0, &s5p_device_jpeg, + &s3c_device_usb_hsotg, &s5p_device_mfc, &s5p_device_mfc_l, &s5p_device_mfc_r,
@@ -1099,10 +1108,13 @@ 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 */ platform_add_devices (universal_devices,ARRAY_SIZE (universal_devices)); + + clk_xusbxti.rate =24000000 ; }MACHINE_START (UNIVERSAL_C210 ,"UNIVERSAL_C210" )
Signature · 1 line
1.7.2.3