ARM: EXYNOS: USB OTG support for Universal C210
Subsystems (3)
cover ARM: EXYNOS: USB OTG support for Universal C210
Those patches add support for S3C-HSOTG driver for Universal C210 on the platform part.
Patches done by Joonyoung Shim have been included to this patch series, since those patches are necessary for further fixes. Unfortunately they haven't been included to mainline yet.
Joonyoung Shim (4):
ARM: S3C64XX: Add usb otg phy control
ARM: SAMSUNG: Fix memory size for hsotg
ARM: EXYNOS: Add usb otg phy control for EXYNOS4210
ARM: EXYNOS: Add hsotg device for NURI board
Lukasz Majewski (2):
ARM: EXYNOS: select EXYNOS4_SETUP_USB_PHY at Universal_C210
ARM: EXYNOS: USB OTG support for Universal C210
arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/include/mach/map.h | 2 + arch/arm/mach-exynos/include/mach/regs-pmu.h | 3 + arch/arm/mach-exynos/mach-nuri.c | 9 ++- arch/arm/mach-exynos/mach-universal_c210.c | 5 + arch/arm/mach-exynos/setup-usb-phy.c | 95 ++++++++++++++----- arch/arm/mach-s3c64xx/Kconfig | 8 ++ arch/arm/mach-s3c64xx/Makefile | 1 + arch/arm/mach-s3c64xx/mach-crag6410.c | 4 + arch/arm/mach-s3c64xx/mach-smartq.c | 3 + arch/arm/mach-s3c64xx/mach-smdk6410.c | 4 + arch/arm/mach-s3c64xx/setup-usb-phy.c | 90 ++++++++++++++++++ arch/arm/plat-samsung/devs.c | 16 +++- .../plat-samsung/include/plat/regs-usb-hsotg-phy.h | 7 +- arch/arm/plat-samsung/include/plat/udc-hs.h | 5 + 15 files changed, 223 insertions(+), 30 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/setup-usb-phy.c
---
Dependences:
- (original Joonyoung Shim patches - before rebase):
http://comments.gmane.org/gmane.linux.usb.general/56341
Signature · 1 line
1.7.2.3
PATCH 1/6 ARM: S3C64XX: Add usb otg phy control
From: Joonyoung Shim <[email protected]>
This patch supports to control usb otg phy of S3C64XX. Currently, the driver for usb otg controls usb otg phy but it can be removed by this patch.
--- arch/arm/mach-s3c64xx/Kconfig | 8 ++ arch/arm/mach-s3c64xx/Makefile | 1 + arch/arm/mach-s3c64xx/mach-crag6410.c | 4 + arch/arm/mach-s3c64xx/mach-smartq.c | 3 + arch/arm/mach-s3c64xx/mach-smdk6410.c | 4 + arch/arm/mach-s3c64xx/setup-usb-phy.c | 90 ++++++++++++++++++++ arch/arm/plat-samsung/devs.c | 14 +++ .../plat-samsung/include/plat/regs-usb-hsotg-phy.h | 7 +- arch/arm/plat-samsung/include/plat/udc-hs.h | 5 + 9 files changed, 133 insertions(+), 3 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/setup-usb-phy.c
arch/arm/mach-s3c64xx/Kconfig +8 -0
@@ -83,6 +83,11 @@ config S3C64XX_SETUP_SPI help Common setup code for SPI GPIO configurations +config S3C64XX_SETUP_USB_PHY + bool + help + Common setup code for USB PHY controller + # S36400 Macchine support config MACH_SMDK6400
@@ -157,6 +162,7 @@ config MACH_SMDK6410 select S3C64XX_SETUP_IDE select S3C64XX_SETUP_FB_24BPP select S3C64XX_SETUP_KEYPAD + select S3C64XX_SETUP_USB_PHY help Machine support for the Samsung SMDK6410
@@ -256,6 +262,7 @@ config MACH_SMARTQ select S3C_DEV_USB_HOST select S3C64XX_SETUP_SDHCI select S3C64XX_SETUP_FB_24BPP + select S3C64XX_SETUP_USB_PHY select SAMSUNG_DEV_ADC select SAMSUNG_DEV_PWM select SAMSUNG_DEV_TS
@@ -283,6 +290,7 @@ config MACH_WLF_CRAGG_6410 select S3C64XX_SETUP_FB_24BPP select S3C64XX_SETUP_KEYPAD select S3C64XX_SETUP_SPI + select S3C64XX_SETUP_USB_PHY select SAMSUNG_DEV_ADC select SAMSUNG_DEV_KEYPAD select S3C_DEV_USB_HOST
arch/arm/mach-s3c64xx/Makefile +1 -0
@@ -43,6 +43,7 @@ obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide.o obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad.o obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o obj-$(CONFIG_S3C64XX_SETUP_SPI) += setup-spi.o +obj-$(CONFIG_S3C64XX_SETUP_USB_PHY) += setup-usb-phy.o # Machine support
arch/arm/mach-s3c64xx/mach-crag6410.c +4 -0
@@ -61,6 +61,7 @@#include <plat/sdhci.h> #include <plat/gpio-cfg.h> #include <plat/s3c64xx-spi.h> +#include <plat/udc-hs.h> #include <plat/keypad.h> #include <plat/clock.h>
@@ -759,6 +760,8 @@ static const struct gpio_led_platform_data gpio_leds_pdata = { .num_leds = ARRAY_SIZE(gpio_leds), }; +static struct s3c_hsotg_plat crag6410_hsotg_pdata; +static void __init crag6410_machine_init (void ) {/* Open drain IRQs need pullups */
@@ -783,6 +786,7 @@ static void __init crag6410_machine_init(void)s3c_i2c0_set_platdata (&i2c0_pdata);s3c_i2c1_set_platdata (&i2c1_pdata);s3c_fb_set_platdata (&crag6410_lcd_pdata); +s3c_hsotg_set_platdata (&crag6410_hsotg_pdata);i2c_register_board_info (0 , i2c_devs0,ARRAY_SIZE (i2c_devs0));i2c_register_board_info (1 , i2c_devs1,ARRAY_SIZE (i2c_devs1));
arch/arm/mach-s3c64xx/mach-smartq.c +3 -0
@@ -187,6 +187,8 @@ static struct s3c_hwmon_pdata smartq_hwmon_pdata __initdata = { }, }; +static struct s3c_hsotg_plat smartq_hsotg_pdata; +static int __init smartq_lcd_setup_gpio (void ) {int ret;
@@ -383,6 +385,7 @@ void __init smartq_map_io(void)void __init smartq_machine_init (void ) {s3c_i2c0_set_platdata (NULL ); +s3c_hsotg_set_platdata (&smartq_hsotg_pdata);s3c_hwmon_set_platdata (&smartq_hwmon_pdata);s3c_sdhci1_set_platdata (&smartq_internal_hsmmc_pdata);s3c_sdhci2_set_platdata (&smartq_internal_hsmmc_pdata);
arch/arm/mach-s3c64xx/mach-smdk6410.c +4 -0
@@ -72,6 +72,7 @@#include <plat/keypad.h> #include <plat/backlight.h> #include <plat/regs-fb-v4.h> +#include <plat/udc-hs.h> #include "common.h"
@@ -631,6 +632,8 @@ static struct platform_pwm_backlight_data smdk6410_bl_data = { .pwm_id = 1, }; +static struct s3c_hsotg_plat smdk6410_hsotg_pdata; +static void __init smdk6410_map_io (void ) {u32 tmp;
@@ -659,6 +662,7 @@ static void __init smdk6410_machine_init(void)s3c_i2c0_set_platdata (NULL );s3c_i2c1_set_platdata (NULL );s3c_fb_set_platdata (&smdk6410_lcd_pdata); +s3c_hsotg_set_platdata (&smdk6410_hsotg_pdata);samsung_keypad_set_platdata (&smdk6410_keypad_data);
arch/arm/mach-s3c64xx/setup-usb-phy.c new file +90 -0
90 lines not on this page · raw message
arch/arm/plat-samsung/devs.c +14 -0
@@ -57,6 +57,7 @@#include <plat/sdhci.h> #include <plat/ts.h> #include <plat/udc.h> +#include <plat/udc-hs.h> #include <plat/usb-control.h> #include <plat/usb-phy.h> #include <plat/regs-iic.h>
@@ -1449,6 +1450,19 @@ struct platform_device s3c_device_usb_hsotg = { .coherent_dma_mask = DMA_BIT_MASK(32), }, }; + +void __init s3c_hsotg_set_platdata (struct s3c_hsotg_plat *pd) +{ +struct s3c_hsotg_plat *npd; + + npd =s3c_set_platdata (pd,sizeof (struct s3c_hsotg_plat ), + &s3c_device_usb_hsotg); + +if (!npd->phy_init) + npd->phy_init = s5p_usb_phy_init; +if (!npd->phy_exit) + npd->phy_exit = s5p_usb_phy_exit; +}#endif /* CONFIG_S3C_DEV_USB_HSOTG */ /* USB High Spped 2.0 Device (Gadget) */
arch/arm/plat-samsung/include/plat/regs-usb-hsotg-phy.h +4 -3
@@ -25,8 +25,9 @@#define S3C_HSOTG_PHYREG (x) ((x) + S3C_VA_USB_HSPHY)#define S3C_PHYPWR S3C_HSOTG_PHYREG(0x00) -#define SRC_PHYPWR_OTG_DISABLE (1 << 4) -#define SRC_PHYPWR_ANALOG_POWERDOWN (1 << 3) +#define S3C_PHYPWR_NORMAL_MASK (0x19 << 0) +#define S3C_PHYPWR_OTG_DISABLE (1 << 4) +#define S3C_PHYPWR_ANALOG_POWERDOWN (1 << 3)#define SRC_PHYPWR_FORCE_SUSPEND (1 << 1)#define S3C_PHYCLK S3C_HSOTG_PHYREG(0x04)
@@ -42,7 +43,7 @@#define S3C_RSTCON S3C_HSOTG_PHYREG(0x08)#define S3C_RSTCON_PHYCLK (1 << 2) -#define S3C_RSTCON_HCLK (1 << 2) +#define S3C_RSTCON_HCLK (1 << 1)#define S3C_RSTCON_PHY (1 << 0)#define S3C_PHYTUNE S3C_HSOTG_PHYREG(0x20)
arch/arm/plat-samsung/include/plat/udc-hs.h +5 -0
@@ -26,4 +26,9 @@ enum s3c_hsotg_dmamode {struct s3c_hsotg_plat {enum s3c_hsotg_dmamode dma;unsigned int is_osc :1 ; + +int (*phy_init)(struct platform_device *pdev,int type); +int (*phy_exit)(struct platform_device *pdev,int type); }; + +extern void s3c_hsotg_set_platdata (struct s3c_hsotg_plat *pd);
Signature · 1 line
1.7.2.3
Re: [PATCH 1/6] ARM: S3C64XX: Add usb otg phy control
Quoted 5 lines · Lukasz Majewski
From: Joonyoung Shim <[email protected]>
This patch supports to control usb otg phy of S3C64XX. Currently, the driver for usb otg controls usb otg phy but it can be removed by this patch.
Kukjin Kim
AppliedRe: [PATCH 1/6] ARM: S3C64XX: Add usb otg phy control
Quoted 8 lines · Mark Brown
Quoted 5 lines · Lukasz Majewski
From: Joonyoung Shim<[email protected]>
This patch supports to control usb otg phy of S3C64XX. Currently, the driver for usb otg controls usb otg phy but it can be removed by this patch.
Acked-by Mark Brown<[email protected]>
Applied, thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Re: [PATCH 1/6] ARM: S3C64XX: Add usb otg phy control
Quoted 4 lines · Kukjin Kim
Quoted 3 lines · Mark Brown
Quoted 2 lines · Lukasz Majewski
From: Joonyoung Shim<[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This patch supports to control usb otg phy of S3C64XX. Currently, the driver for usb otg controls usb otg phy but it can be removed by this patch.
Acked-by Mark Brown<[email protected]>Applied, thanks.
Oops, following error happened with s5pv210_defconfig after applying this.
arch/arm/plat-samsung/built-in.o: In function `s3c_hsotg_set_platdata':arch/arm/plat-samsung/devs.c:1449: undefined reference to s5p_usb_phy_init' arch/arm/plat-samsung/devs.c:1449: undefined reference to s5p_usb_phy_init' arch/arm/plat-samsung/devs.c:1451: undefined reference to s5p_usb_phy_exit' arch/arm/plat-samsung/devs.c:1451: undefined reference to s5p_usb_phy_exit'
make: *** [.tmp_vmlinux1] Error 1
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Re: [PATCH 1/6] ARM: S3C64XX: Add usb otg phy control
Quoted 14 lines · Kukjin Kim
Quoted 4 lines · Kukjin Kim
Quoted 3 lines · Mark Brown
Quoted 2 lines · Lukasz Majewski
From: Joonyoung Shim<[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This patch supports to control usb otg phy of S3C64XX. Currently, the driver for usb otg controls usb otg phy but it can be removed by this patch.
Acked-by Mark Brown<[email protected]>Applied, thanks.
Quoted 9 lines
Oops, following error happened with
s5pv210_defconfigafter applying this.
arch/arm/plat-samsung/built-in.o: In function `s3c_hsotg_set_platdata':arch/arm/plat-samsung/devs.c:1449: undefined reference tos5p_usb_phy_init' arch/arm/plat-samsung/devs.c:1449: undefined reference tos5p_usb_phy_init'arch/arm/plat-samsung/devs.c:1451: undefined reference tos5p_usb_phy_exit' arch/arm/plat-samsung/devs.c:1451: undefined reference tos5p_usb_phy_exit'
make: *** [.tmp_vmlinux1] Error 1
Also the s5pv210 needs setup-usb-phy.c file. I think the attached patch will solve this errors. This patch was tested only compile.
Thanks.
Quoted 1 line
From
9ae6ac166743391a6037d7e7a4d178f68a96f047Mon Sep 17 00:00:00 2001
From: Joonyoung Shim <[email protected]>
Date: Thu, 8 Mar 2012 19:52:25 +0900
Subject: [PATCH] ARM: S5PV210: Add usb otg phy control
This patch supports to control usb otg phy of S5PV210. Based on setup-usb-phy.c of S3C64XX.
--- arch/arm/mach-s5pv210/Kconfig | 6 ++ arch/arm/mach-s5pv210/Makefile | 1 + arch/arm/mach-s5pv210/include/mach/regs-sys.h | 4 - arch/arm/mach-s5pv210/setup-usb-phy.c | 90 +++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-s5pv210/setup-usb-phy.c
arch/arm/mach-s5pv210/Kconfig +6 -0
@@ -65,6 +65,11 @@ config S5PV210_SETUP_SPI help Common setup code for SPI GPIO configurations. +config S5PV210_SETUP_USB_PHY + bool + help + Common setup code for USB PHY controller + menu "S5PC110 Machines" config MACH_AQUILA
@@ -107,6 +112,7 @@ config MACH_GONI select S5PV210_SETUP_KEYPAD select S5PV210_SETUP_SDHCI select S5PV210_SETUP_FIMC + select S5PV210_SETUP_USB_PHY help Machine support for Samsung GONI board S5PC110(MCP) is one of package option of S5PV210
arch/arm/mach-s5pv210/Makefile +1 -0
@@ -39,3 +39,4 @@ obj-$(CONFIG_S5PV210_SETUP_IDE) += setup-ide.o obj-$(CONFIG_S5PV210_SETUP_KEYPAD) += setup-keypad.o obj-$(CONFIG_S5PV210_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o obj-$(CONFIG_S5PV210_SETUP_SPI) += setup-spi.o +obj-$(CONFIG_S5PV210_SETUP_USB_PHY) += setup-usb-phy.o
arch/arm/mach-s5pv210/include/mach/regs-sys.h +0 -4
@@ -13,7 +13,3 @@#define S5PV210_USB_PHY_CON (S3C_VA_SYS + 0xE80C)#define S5PV210_USB_PHY0_EN (1 << 0)#define S5PV210_USB_PHY1_EN (1 << 1) - -/* compatibility defines for s3c-hsotg driver */ -#define S3C64XX_OTHERS S5PV210_USB_PHY_CON -#define S3C64XX_OTHERS_USBMASK S5PV210_USB_PHY0_EN
arch/arm/mach-s5pv210/setup-usb-phy.c new file +90 -0
90 lines not on this page · raw message
Signature · 1 line
1.7.5.4
Lukasz Majewski
Tested-byRe: [PATCH 1/6] ARM: S3C64XX: Add usb otg phy control
Hi Joonyoung,
Quoted 30 lines · On Thu, 8 Mar 2012 12:27:30 +0100 Joonyoung Shim <[email protected]>…
Quoted 17 lines · Kukjin Kim
Quoted 4 lines · Kukjin Kim
Quoted 3 lines · Mark Brown
Quoted 2 lines · Lukasz Majewski
From: Joonyoung Shim<[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This patch supports to control usb otg phy of S3C64XX. Currently, the driver for usb otg controls usb otg phy but it can be removed by this patch.
Acked-by Mark Brown<[email protected]>Applied, thanks.
Oops, following error happened with
s5pv210_defconfigafter applying this.Quoted 11 lines
arch/arm/plat-samsung/built-in.o: In function `s3c_hsotg_set_platdata':arch/arm/plat-samsung/devs.c:1449:
undefined reference tos5p_usb_phy_init' arch/arm/plat-samsung/devs.c:1449: undefined reference tos5p_usb_phy_init'arch/arm/plat-samsung/devs.c:1451: undefined reference tos5p_usb_phy_exit' arch/arm/plat-samsung/devs.c:1451: undefined reference tos5p_usb_phy_exit'
make: *** [.tmp_vmlinux1] Error 1
Quoted 4 lines
Also the s5pv210 needs
setup-usb-phy.cfile. I think the attached patch will solve this errors. This patch was tested only compile.Thanks.
Thank you for the patch.
I've extended your's patch by adding GONI dependent platform code.
It has been tested and works with s3c-hsotg driver.
Test HW:
GONI S5PC110
Signature · 6 lines
Best regards, Lukasz Majewski Samsung Poland R&D Center Platform Group
Quoted 1 line
From
a18166a6e87df8ade29f1d4e37b96f932d2a8909Mon Sep 17 00:00:00 2001
From: Joonyoung Shim <[email protected]>
Date: Thu, 8 Mar 2012 19:52:25 +0900
Subject: [PATCH] ARM: S5PV210: Add usb otg phy control
This patch supports to control usb otg phy of S5PV210. Based on setup-usb-phy.c of S3C64XX.
--- arch/arm/mach-s5pv210/Kconfig | 7 ++ arch/arm/mach-s5pv210/Makefile | 1 + arch/arm/mach-s5pv210/include/mach/regs-sys.h | 4 - arch/arm/mach-s5pv210/mach-goni.c | 6 ++ arch/arm/mach-s5pv210/setup-usb-phy.c | 90 +++++++++++++++++++++++++ 5 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-s5pv210/setup-usb-phy.c
arch/arm/mach-s5pv210/Kconfig +7 -0
@@ -65,6 +65,11 @@ config S5PV210_SETUP_SPI help Common setup code for SPI GPIO configurations. +config S5PV210_SETUP_USB_PHY + bool + help + Common setup code for USB PHY controller + menu "S5PC110 Machines" config MACH_AQUILA
@@ -81,6 +86,7 @@ config MACH_AQUILA select S3C_DEV_USB_HSOTG 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
@@ -108,6 +114,7 @@ config MACH_GONI select S5PV210_SETUP_KEYPAD select S5PV210_SETUP_SDHCI select S5PV210_SETUP_FIMC + select S5PV210_SETUP_USB_PHY help Machine support for Samsung GONI board S5PC110(MCP) is one of package option of S5PV210
arch/arm/mach-s5pv210/Makefile +1 -0
@@ -39,3 +39,4 @@ obj-$(CONFIG_S5PV210_SETUP_IDE) += setup-ide.o obj-$(CONFIG_S5PV210_SETUP_KEYPAD) += setup-keypad.o obj-$(CONFIG_S5PV210_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o obj-$(CONFIG_S5PV210_SETUP_SPI) += setup-spi.o +obj-$(CONFIG_S5PV210_SETUP_USB_PHY) += setup-usb-phy.o
arch/arm/mach-s5pv210/include/mach/regs-sys.h +0 -4
@@ -13,7 +13,3 @@#define S5PV210_USB_PHY_CON (S3C_VA_SYS + 0xE80C)#define S5PV210_USB_PHY0_EN (1 << 0)#define S5PV210_USB_PHY1_EN (1 << 1) - -/* compatibility defines for s3c-hsotg driver */ -#define S3C64XX_OTHERS S5PV210_USB_PHY_CON -#define S3C64XX_OTHERS_USBMASK S5PV210_USB_PHY0_EN
arch/arm/mach-s5pv210/mach-goni.c +6 -0
@@ -49,6 +49,7 @@#include <plat/mfc.h> #include <plat/regs-fb-v4.h> #include <plat/camport.h> +#include <plat/udc-hs.h> #include <media/v4l2-mediabus.h> #include <media/s5p_fimc.h>
@@ -277,6 +278,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 );
@@ -939,6 +943,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 */
arch/arm/mach-s5pv210/setup-usb-phy.c new file +90 -0
90 lines not on this page · raw message
Signature · 1 line
1.7.2.3
Re: [PATCH 1/6] ARM: S3C64XX: Add usb otg phy control
Quoted 42 lines · Lukasz Majewski
Hi Joonyoung,
Quoted 30 lines · On Thu, 8 Mar 2012 12:27:30 +0100 Joonyoung Shim<[email protected]>…
Quoted 17 lines · Kukjin Kim
Quoted 4 lines · Kukjin Kim
Quoted 3 lines · Mark Brown
Quoted 2 lines · Lukasz Majewski
From: Joonyoung Shim<[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This patch supports to control usb otg phy of S3C64XX. Currently, the driver for usb otg controls usb otg phy but it can be removed by this patch.
Acked-by Mark Brown<[email protected]>Applied, thanks.
Oops, following error happened with
s5pv210_defconfigafter applying this.Quoted 11 lines
arch/arm/plat-samsung/built-in.o: In function `s3c_hsotg_set_platdata':arch/arm/plat-samsung/devs.c:1449:
undefined reference tos5p_usb_phy_init' arch/arm/plat-samsung/devs.c:1449: undefined reference tos5p_usb_phy_init'arch/arm/plat-samsung/devs.c:1451: undefined reference tos5p_usb_phy_exit' arch/arm/plat-samsung/devs.c:1451: undefined reference tos5p_usb_phy_exit'
make: *** [.tmp_vmlinux1] Error 1Quoted 4 lines
Also the s5pv210 needs
setup-usb-phy.cfile. I think the attached patch will solve this errors. This patch was tested only compile.Thanks.
Thank you for the patch.
Quoted 9 lines
I've extended your's patch by adding GONI dependent platform code.
It has been tested and works with s3c-hsotg driver.
Test HW:
GONI S5PC110Tested-by Lukasz Majewski<[email protected]>
Looks good to me.
Applied, Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 2/6 ARM: SAMSUNG: Fix memory size for hsotg
In reply to Lukasz MajewskiFrom: Joonyoung Shim <[email protected]>
The device link core registers for hsotg is base + 0000h ~ base + 11000h.
--- arch/arm/plat-samsung/devs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-samsung/devs.c +1 -1
@@ -1436,7 +1436,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_16K ), + [0 ] =DEFINE_RES_MEM (S3C_PA_USB_HSOTG ,SZ_128K ), [1 ] =DEFINE_RES_IRQ (IRQ_OTG ), };
Signature · 1 line
1.7.2.3
RE: [PATCH 2/6] ARM: SAMSUNG: Fix memory size for hsotg
Quoted 29 lines · Lukasz Majewski
From: Joonyoung Shim <[email protected]>
The device link core registers for hsotg is base + 0000h ~ base + 11000h.
Signed-off-by Joonyoung Shim <[email protected]>Signed-off-by Kyungmin Park <[email protected]>[Rebased on the newest git/kgene/linux-samsung #for-next]Signed-off-by Lukasz Majewski <[email protected]>--- arch/arm/plat-samsung/devs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/plat-samsung/devs.c +1
-2@@ -1436,7 +1436,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_16K ), + [0 ] =DEFINE_RES_MEM (S3C_PA_USB_HSOTG ,SZ_128K ), [1 ] =DEFINE_RES_IRQ (IRQ_OTG ), }; --
Quoted 1 line
1.7.2.3
OK, will apply.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Re: [PATCH 2/6] ARM: SAMSUNG: Fix memory size for hsotg
Quoted 22 lines · Kukjin Kim
Quoted 21 lines · Lukasz Majewski
From: Joonyoung Shim <[email protected]>
The device link core registers for hsotg is base + 0000h ~ base + 11000h.
Signed-off-by Joonyoung Shim <[email protected]>Signed-off-by Kyungmin Park <[email protected]>[Rebased on the newest git/kgene/linux-samsung #for-next]Signed-off-by Lukasz Majewski <[email protected]>--- arch/arm/plat-samsung/devs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/plat-samsung/devs.c +0
-0@@ -1436,7 +1436,7 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd)
Quoted 5 lines
arch/arm/plat-samsung/devs.c void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) · line 1440
Quoted 5 lines
arch/arm/plat-samsung/devs.c +1
-1#ifdef CONFIG_S3C_DEV_USB_HSOTG static struct resource s3c_usb_hsotg_resources[] = { - [0 ] =DEFINE_RES_MEM (S3C_PA_USB_HSOTG ,SZ_16K ), + [0 ] =DEFINE_RES_MEM (S3C_PA_USB_HSOTG ,SZ_128K ), [1] = DEFINE_RES_IRQ(IRQ_OTG),
As defined in arch/arm/mach-exynos/include/mach/irqs.h, should the IRQ resource be DEFINE_RES_IRQ(IRQ_USB_HSOTG)?
Quoted 18 lines
Quoted 4 lines
arch/arm/plat-samsung/devs.c +0
-1}; --1.7.2.3
OK, will apply.
Thanks.Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Tushar Behera
PATCH 3/6 ARM: EXYNOS: Add usb otg phy control for EXYNOS4210
In reply to Lukasz MajewskiFrom: Joonyoung Shim <[email protected]>
This patch supports to control usb otg phy of EXYNOS4210.
--- arch/arm/mach-exynos/include/mach/map.h | 2 + arch/arm/mach-exynos/include/mach/regs-pmu.h | 3 + arch/arm/mach-exynos/setup-usb-phy.c | 95 +++++++++++++++++++------- 3 files changed, 75 insertions(+), 25 deletions(-)
arch/arm/mach-exynos/include/mach/map.h +2 -0
@@ -33,6 +33,7 @@#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
@@ -153,6 +154,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_UART EXYNOS4_PA_UART#define S3C_PA_SPI0 EXYNOS4_PA_SPI0
arch/arm/mach-exynos/include/mach/regs-pmu.h +3 -0
@@ -162,6 +162,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 4/6 ARM: EXYNOS: Add hsotg device 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/mach-nuri.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
arch/arm/mach-exynos/mach-nuri.c +8 -1
@@ -43,6 +43,7 @@#include <plat/fb.h> #include <plat/sdhci.h> #include <plat/ehci.h> +#include <plat/udc-hs.h> #include <plat/clock.h> #include <plat/gpio-cfg.h> #include <plat/iic.h>
@@ -391,6 +392,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_[] = {
@@ -403,7 +405,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_[] = {
@@ -1115,6 +1117,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_vdda_supply[] = {REGULATOR_SUPPLY ("a_sensor" ,"0-001f" ),
@@ -1268,6 +1273,7 @@ static struct platform_device *nuri_devices[] __initdata = { &exynos4_device_pd[PD_LCD0 ], &exynos4_device_pd[PD_CAM ], &s5p_device_fimc_md, + &s3c_device_usb_hsotg,/* NURI Devices */ &nuri_gpio_keys,
@@ -1312,6 +1318,7 @@ static void __init nuri_machine_init(void)nuri_camera_init ();nuri_ehci_init (); +s3c_hsotg_set_platdata (&nuri_hsotg_pdata); clk_xusbxti.rate =24000000 ;/* Last */
Signature · 1 line
1.7.2.3
Re: [PATCH 4/6] ARM: EXYNOS: Add hsotg device for NURI board
Quoted 60 lines · Lukasz Majewski
From: Joonyoung Shim <[email protected]>
This patch adds hsotg device to the NURI board.
Signed-off-by Joonyoung Shim <[email protected]>Signed-off-by Kyungmin Park <[email protected]>[Rebased on the newest git/kgene/linux-samsung #for-next]Signed-off-by Lukasz Majewski <[email protected]>--- arch/arm/mach-exynos/mach-nuri.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)arch/arm/mach-exynos/mach-nuri.c +7
-1@@ -43,6 +43,7 @@#include <plat/fb.h> #include <plat/sdhci.h> #include <plat/ehci.h> +#include <plat/udc-hs.h> #include <plat/clock.h> #include <plat/gpio-cfg.h> #include <plat/iic.h> @@ -391,6 +392,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_[] = {@@ -403,7 +405,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_[] = {@@ -1115,6 +1117,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_vdda_supply[] = {REGULATOR_SUPPLY ("a_sensor" ,"0-001f" ),@@ -1268,6 +1273,7 @@ static struct platform_device *nuri_devices[] __initdata = { &exynos4_device_pd[PD_LCD0 ], &exynos4_device_pd[PD_CAM ], &s5p_device_fimc_md, + &s3c_device_usb_hsotg,/* NURI Devices */ &nuri_gpio_keys,
arch/arm/mach-exynos/mach-nuri.c static void __init nuri_machine_init(void) · line 1324
Quoted 7 lines
arch/arm/mach-exynos/mach-nuri.c +1
-0@@ -1312,6 +1318,7 @@ static void __init nuri_machine_init(void)nuri_camera_init ();nuri_ehci_init (); +s3c_hsotg_set_platdata (&nuri_hsotg_pdata); clk_xusbxti.rate =24000000 ;/* Last */
It is missing S3C_DEV_USB_HSOTG entry in Kconfig file for individual boards.
Additionally, after adding the same, the build fails with following error message.
arch/arm/plat-samsung/devs.c:1442:8: error: ‘IRQ_OTG’ undeclared here (not in a function)drivers/usb/gadget/s3c-hsotg.c:38:27: fatal error: mach/regs-sys.h: No such file or directory
compilation terminated.
I had applied the patches at kgene's for-next branch while doing this build-test.
Signature · 1 line
Tushar Behera
PATCH 5/6 ARM: EXYNOS: select EXYNOS4_SETUP_USB_PHY at Universal_C210
In reply to Lukasz MajewskiThis patch adds EXYNOS4_SETUP_USB_PHY to Kconfig for C210 Universal.
--- arch/arm/mach-exynos/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/Kconfig +1 -0
@@ -252,6 +252,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.
Signature · 1 line
1.7.2.3
PATCH 6/6 ARM: EXYNOS: USB OTG support for Universal C210
In reply to Lukasz MajewskiThis patch adds platform data for using S3C-HSOTG driver at Universal_C210 target.
--- arch/arm/mach-exynos/mach-universal_c210.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/mach-universal_c210.c +5 -0
@@ -40,6 +40,7 @@#include <plat/fimc-core.h> #include <plat/camport.h> #include <plat/mipi_csis.h> +#include <plat/udc-hs.h> #include <mach/map.h>
@@ -927,6 +928,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),
@@ -1037,6 +1041,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 */
Signature · 1 line
1.7.2.3
Quoted 32 lines · Lukasz Majewski
This patch adds platform data for using S3C-HSOTG driver at
Universal_C210target.Signed-off-by Lukasz Majewski <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- arch/arm/mach-exynos/mach-universal_c210.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)arch/arm/mach-exynos/mach-universal_c210.c +4
-0@@ -40,6 +40,7 @@#include <plat/fimc-core.h> #include <plat/camport.h> #include <plat/mipi_csis.h> +#include <plat/udc-hs.h> #include <mach/map.h> @@ -927,6 +928,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),
arch/arm/mach-exynos/mach-universal_c210.c static void __init universal_machine_init(void) · line 1047
Quoted 7 lines
arch/arm/mach-exynos/mach-universal_c210.c +1
-0@@ -1037,6 +1041,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 */
Are you not missing the device entry for &s3c_device_usb_hsotg?
Signature · 1 line
Tushar Behera
Quoted 39 lines · On Mon, 13 Feb 2012 12:27:01 +0530 Tushar Behera <[email protected]>…
Quoted 38 lines · Lukasz Majewski
This patch adds platform data for using S3C-HSOTG driver at
Universal_C210target.Signed-off-by Lukasz Majewski <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- arch/arm/mach-exynos/mach-universal_c210.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/arch/arm/mach-exynos/mach-universal_c210.cindex dd75101..3aaac61 100644 ---a/arch/arm/mach-exynos/mach-universal_c210.c+++b/arch/arm/mach-exynos/mach-universal_c210.carch/arm/mach-exynos/mach-universal_c210.c +4
-0@@ -40,6 +40,7 @@#include <plat/fimc-core.h> #include <plat/camport.h> #include <plat/mipi_csis.h> +#include <plat/udc-hs.h> #include <mach/map.h> @@ -927,6 +928,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), @@ -1037,6 +1041,7 @@ static void__inituniversal_machine_init(void)i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs, ARRAY_SIZE(i2c_gpio12_devs));arch/arm/mach-exynos/mach-universal_c210.c +1
-0+s3c_hsotg_set_platdata (&universal_hsotg_pdata);universal_camera_init ();
Quoted 5 lines
Quoted 1 line
/* Last */
Are you not missing the device entry for
&s3c_device_usb_hsotg?
Hi,
Yes, rebase error.
Thank you for spotting.
Correct patch under development.
Signature · 6 lines
Best regards, Lukasz Majewski Samsung Poland R&D Center Platform Group
PATCH RESEND 6/6 ARM: EXYNOS: USB OTG support for Universal C210
In reply to Lukasz MajewskiThis patch adds platform data for using S3C-HSOTG driver at Universal_C210 target.
--- 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
arch/arm/mach-exynos/Kconfig +1 -0
@@ -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
arch/arm/mach-exynos/include/mach/map.h +2 -0
@@ -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
arch/arm/mach-exynos/include/mach/regs-sys.h new file +20 -0
@@ -0,0 +1,20 @@ +/* arch/arm/mach-s5pv210/include/mach/regs-sys.h +* +* Copyright 2010 Ben Dooks <[email protected]> +* +* 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
arch/arm/mach-exynos/mach-universal_c210.c +14 -0
@@ -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" )
arch/arm/plat-samsung/devs.c +1 -1
@@ -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 = {
Signature · 1 line
1.7.2.3
Quoted 11 lines · Lukasz Majewski
This patch adds platform data for using S3C-HSOTG driver at
Universal_C210target.Signed-off-by Lukasz Majewski <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- 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 +-
You must split these changes to platform-code and board-specific code ... and the changes to fix build-error w.r.t. S3C_DEV_USB_HSOTG should come before OTG support is added to any of the EXYNOS based boards.
arch/arm/mach-exynos/Kconfig config MACH_UNIVERSAL_C210 · line 249
Quoted 12 lines
5 files changed, 38 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-exynos/include/mach/regs-sys.harch/arm/mach-exynos/Kconfig +1
-0@@ -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
The same needs to be updated for nuri-board also ...
arch/arm/mach-exynos/include/mach/map.h line 37
Quoted 12 lines
arch/arm/mach-exynos/Kconfig +0
-0select EXYNOS4_DEV_DMA select EXYNOS4_DEV_PD select EXYNOS4_SETUP_FIMD0arch/arm/mach-exynos/include/mach/map.h +1
-0@@ -34,6 +34,8 @@#define EXYNOS4_PA_G2D 0x12800000#define EXYNOS4_PA_USB_HSOTG 0x12480000 +#define EXYNOS4_PA_USB_HSPHY 0x125B0000
This macro is not used anywhere in the patch. I suppose it is not required.
arch/arm/mach-exynos/include/mach/regs-sys.h line 1
Quoted 11 lines
arch/arm/mach-exynos/include/mach/map.h +1
-0+#define EXYNOS4_PA_I2S0 0x03830000#define EXYNOS4_PA_I2S1 0xE3100000#define EXYNOS4_PA_I2S2 0xE2A00000arch/arm/mach-exynos/include/mach/regs-sys.h new file +1
-0@@ -0,0 +1,20 @@ +/* arch/arm/mach-s5pv210/include/mach/regs-sys.h
Change the file name, or still better, don't use the filename at all.
arch/arm/mach-exynos/include/mach/regs-sys.h line 5
Quoted 4 lines
arch/arm/mach-exynos/include/mach/regs-sys.h new file +4
-0+* +* Copyright 2010 Ben Dooks <[email protected]> +* +* S5PV210 - System registers definitions
EXYNOS?
Quoted 5 lines
arch/arm/mach-exynos/include/mach/regs-sys.h new file +5
-0+* +* 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. +*/
arch/arm/mach-exynos/include/mach/regs-sys.h line 20
Quoted 10 lines
arch/arm/mach-exynos/include/mach/regs-sys.h new file +10
-0+ +/* 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
I don't think we need these definitions.
Quoted 95 lines
arch/arm/mach-exynos/mach-universal_c210.c +14
-0@@ -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" )arch/arm/plat-samsung/devs.c +1
-1@@ -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 = {
Signature · 1 line
Tushar Behera