Re: [PATCH] ARM: EXYNOS: Add HDMIPHY I2C adaptor
Hi Dongjin, A patch series to add HDMI platform data support is already under consideration. http://comments.gmane.org/gmane.linux.kernel.samsung-soc/11352 On 6 August 2012 19:27, Dongjin Kim wrote: > This patch assign the I2C channel for HDMIPHY for Exynos4x12 > in s5p_i2c_hdmiphy_set_platdata() and s5p_hdmi_set_platdata() > > Change-Id: I7e66c8f9327e2f7dce7440efb8583b506d65831a > Signed-off-by: Dongjin Kim > --- > arch/arm/plat-samsung/devs.c |4 > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c > index a199e55..54614d0 100644 > --- a/arch/arm/plat-samsung/devs.c > +++ b/arch/arm/plat-samsung/devs.c > @@ -752,6 +752,8 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct > s3c2410_platform_i2c *pd) > > if (soc_is_exynos4210()) > pd->bus_num = 8; > + else if (soc_is_exynos4212() || soc_is_exynos4412()) > + pd->bus_num = 8; > else if (soc_is_s5pv210()) > pd->bus_num = 3; > else > @@ -771,6 +773,8 @@ void __init s5p_hdmi_set_platdata(struct i2c_board_info > *hdmiphy_info, > > if (soc_is_exynos4210()) > pd->hdmiphy_bus = 8; > + else if (soc_is_exynos4212() || soc_is_exynos4412()) > + pd->hdmiphy_bus = 8; > else if (soc_is_s5pv210()) > pd->hdmiphy_bus = 3; > else > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- With warm regards, Sachin -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
On 8/7/12, Thomas Abraham wrote: > On 7 August 2012 07:58, Olof Johansson wrote: >> Hi, >> >> On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim >> wrote: >>> Hello, >>> >>> I am trying to understand what I have to do for device tree. >>> >>> In order to create dts file for ODROID-X hardware, it seems I may need >>> dts file of EXYNOS4412 SoC. >>> But maybe exynos4412.dtsi is not merged yet or not exist, like >>> exynos4210.dtsi or exynos5250.dtsi. >>> Obviously it seems not easy to create such a file without SoC datasheet, >>> and I do not have it. >>> >>> So do I wait for the file to be merged by Samsung or better to create >>> initial dts file cloned from exynos4210.dtsi and modify to have verified >>> nodes with the source/header files? >> >> Ideally they already have one waiting to be submitted, but that might >> not be the case. Given that the origenboard design with 4412 is not >> yet shipping, I'm guessing the Linaro Samsung engineers might not have >> done much work on 4412 yet. Kukjin? Thomas? >> >>> What's your suggestion? >> >> The alternative is to use the data you have available -- i.e. sources >> and patches, and craft the device tree from there. The design of 4412 >> is a derivative from 4210, so that's a good start. Next step would be >> to describe the board on top of the SoC, peripherals, etc. Take a look >> at how the origen board support was added, and so on. >> >> I ordered an odroid-x several weeks ago but I haven't have a confirmed >> shipping date yet. :( I'm not sure how long it'll be before I can help >> out, unfortunately. >> >> >> -Olof > > Most of the Exynos4210 device tree support can be reused for > Exynos4412 as well. Looking at the hardware differences between the > two, it might be better to create a new exynos4.dtsi file (kind of > creating it out of the existing exynos4210.dtsi) which will have all > the common bits across all SoC's in the Exynos4 family. > > Further, there can be exynos4210.dtsi and exynos4412.dtsi which would > specify SoC specific differences such as the GIC cpu-offset property > and the additional groups available in the interrupt combiner. > > There are differences in the gpio/pinmux controllers as well which > have to be described using device tree. The current gpio/pinmux device > tree support depends entirely on the gpio-samsung driver which handles > both gpio and pinmux but requires listing all the banks available in > Exynos4412. I would prefer not to do that since we are switching over > to using a pin controller driver and I am currently working on this > driver. > > The pin controller driver is important without which the > gpio/pinmux/pinconf setting for devices such as i2c and sdhci > controller cannot be setup. The basic pinctrl driver for Exynos4 has > already been posted and now I am working on adding gpio and wakeup > interrupt support into that driver (hoping to complete it this week). > > So the probable steps in getting started with using device tree for > Exynos4412 would be > > 1. Create a new exynos4.dtsi file with all the Exynos4 common > properties for all dt supported controllers. > 2. Update the exynos4210.dtsi file accordingly and add the new > exynos4412.dtsi file. > 3. With this, it will be possible to boot the kernel and test > peripherals that do not depend on gpio/pinmux (rtc, wdt, etc). > 4. When the Exynos4 pinctrl driver is available, start adding device > nodes for i2c and sdhci controllers. > 5. Incrementally add device tree coverage for the board and other > peripherals on Exynos4412. Nice! Good plan as I thnk. Thank you, Kyungmin Park -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: EXYNOS: Add USB HSIC device
Hi, Now another person try to use drivers/usb/phy for it. "usb: phy: samsung: Introducing usb phy driver for hsotg" Can you use it instead of previous one? Thank you, Kyungmin Park On 8/6/12, Dongjin Kim wrote: > This patch support to control USB HSIC of EXYNOS4, > edited based on Samsung's GT-i9100 ICS Opensource Update7. > > Change-Id: Ifba33c6a5166abf3644794eee6abe528bd71f521 > Signed-off-by: Dongjin Kim > --- > arch/arm/mach-exynos/common.c|5 + > arch/arm/mach-exynos/include/mach/regs-pmu.h | 12 + > arch/arm/mach-exynos/include/mach/regs-usb-phy.h | 97 + > arch/arm/mach-exynos/setup-usb-phy.c | 493 > -- > drivers/usb/host/Kconfig | 14 + > 5 files changed, 501 insertions(+), 120 deletions(-) > > diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c > index 4eb39cd..94d58af 100644 > --- a/arch/arm/mach-exynos/common.c > +++ b/arch/arm/mach-exynos/common.c > @@ -179,6 +179,11 @@ static struct map_desc exynos4_iodesc[] __initdata = { > .length = SZ_4K, > .type = MT_DEVICE, > }, { > + .virtual= (unsigned long)S5P_VA_GPIO2, > + .pfn= __phys_to_pfn(EXYNOS4_PA_GPIO2), > + .length = SZ_4K, > + .type = MT_DEVICE, > + }, { > .virtual= (unsigned long)S5P_VA_DMC0, > .pfn= __phys_to_pfn(EXYNOS4_PA_DMC0), > .length = SZ_64K, > diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h > b/arch/arm/mach-exynos/include/mach/regs-pmu.h > index 0bb21e2..d98c2fe 100644 > --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h > +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h > @@ -185,6 +185,15 @@ > #define S5P_PMU_LCD1_CONFS5P_PMUREG(0x3CA0) > > /* Only for EXYNOS4x12 */ > +#define S5P_USB_PHY_CONTROL S5P_PMUREG(0x0704) > +#define S5P_USB_PHY_ENABLE (0x1 << 0) > + > +#define S5P_HSIC_1_PHY_CONTROL S5P_PMUREG(0x0708) > +#define S5P_HSIC_1_PHY_ENABLE(0x1 << 0) > + > +#define S5P_HSIC_2_PHY_CONTROL S5P_PMUREG(0x070C) > +#define S5P_HSIC_2_PHY_ENABLE(0x1 << 0) > + > #define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050) > #define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054) > #define S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR S5P_PMUREG(0x1058) > @@ -242,6 +251,9 @@ > > #define EXYNOS5_SYS_WDTRESET (1 << 20) > > +#define EXYNOS5_USBDEV_PHY_CONTROL S5P_PMUREG(0x0704) > +#define EXYNOS5_USBHOST_PHY_CONTROL S5P_PMUREG(0x0708) > + > #define EXYNOS5_ARM_CORE0_SYS_PWR_REG > S5P_PMUREG(0x1000) > #define EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG > S5P_PMUREG(0x1004) > #define EXYNOS5_DIS_IRQ_ARM_CORE0_CENTRAL_SYS_PWR_REG > S5P_PMUREG(0x1008) > diff --git a/arch/arm/mach-exynos/include/mach/regs-usb-phy.h > b/arch/arm/mach-exynos/include/mach/regs-usb-phy.h > index 0727773..79021a0 100644 > --- a/arch/arm/mach-exynos/include/mach/regs-usb-phy.h > +++ b/arch/arm/mach-exynos/include/mach/regs-usb-phy.h > @@ -43,6 +43,43 @@ > #define EXYNOS4210_CLKSEL_12M(0x2 << 0) > #define EXYNOS4210_CLKSEL_24M(0x3 << 0) > > +#define EXYNOS4210_HSIC1_NORMAL_MASK(0x3 << 11) > +#define EXYNOS4210_HSIC1_SLEEP (1 << 12) > +#define EXYNOS4210_HSIC1_FORCE_SUSPEND (1 << 11) > +#define EXYNOS4210_HSIC0_NORMAL_MASK(0x3 << 9) > +#define EXYNOS4210_HSIC0_SLEEP (1 << 10) > +#define EXYNOS4210_HSIC0_FORCE_SUSPEND (1 << 9) > + > +#define EXYNOS4210_HOST_LINK_PORT_SWRST_MASK(0xf << 6) > +#define EXYNOS4210_HOST_LINK_PORT2_SWRST(1 << 9) > +#define EXYNOS4210_HOST_LINK_PORT1_SWRST(1 << 8) > +#define EXYNOS4210_HOST_LINK_PORT0_SWRST(1 << 7) > +#define EXYNOS4210_HOST_LINK_ALL_SWRST (1 << 6) > +#define EXYNOS4210_PHY1_SWRST_MASK (0x7 << 3) > +#define EXYNOS4210_PHY1_HSIC_SWRST (1 << 5) > +#define EXYNOS4210_PHY1_STD_SWRST (1 << 4) > +#define EXYNOS4210_PHY1_ALL_SWRST (1 << 3) > + > +#define EXYNOS4X12_HSIC1_NORMAL_MASK (0x7 << 12) > +#define EXYNOS4X12_HSIC1_SLEEP (1 << 14) > +#define EXYNOS4X12_HSIC1_ANALOG_POWERDOWN(1 << 13) > +#define EXYNOS4X12_HSIC1_FORCE_SUSPEND (1 << 12) > +#define EXYNOS4X12_HSIC0_NORMAL_MASK (0x7 << 9) > +#define EXYNOS4X12_HSIC0_SLEEP (1 << 11) > +#define EXYNOS4X12_HSIC0_ANALOG_POWERDOWN(1 << 10) > +#define EXYNOS4X12_HSIC0_FORCE_SUSPEND (1 << 9) > + > +#define EXYNOS4X12_HOST_LINK_PORT_SWRST_MASK (0xf << 7) > +#define EXYNOS4X12_HOST_LIN
Re: [PATCH 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg
On 8/7/12, Praveen Paneri wrote: > Hi, > > On Mon, Aug 6, 2012 at 3:21 PM, Praveen Paneri > wrote: >> Hi, >> >> On Mon, Aug 6, 2012 at 2:53 PM, Heiko Stübner wrote: >>> Am Montag, 6. August 2012, 10:23:52 schrieb Kyungmin Park: Hi Praveen, On 8/6/12, Praveen Paneri wrote: > Hi Heiko, > > On Mon, Aug 6, 2012 at 3:24 AM, Heiko Stübner > wrote: >> Hi Praveen, >> >> Am Mittwoch, 1. August 2012, 15:05:47 schrieb Praveen Paneri: >>> This driver uses usb_phy interface to interact with s3c-hsotg. >>> Supports >>> phy_init and phy_shutdown functions to enable/disable phy. Tested >>> with >>> smdk6410 and smdkv310. More SoCs can be brought under later. >> >> Looks cool. > > Thanks > >> From what I've seen the phy controllers on newer Samsung SoCs are >> still >> somewhat similar to the one on my s3c2416/2450 machines. So hopefully >> at >> some >> point after the driver has settled, I'll find the time to add >> support >> for these to the phy driver. > > Yes! that's great. > >> Out of curiosity, what does the "sec" in sec_usbphy for? > > Its Samsung Electronics Co. :) I'm also prefer to use 'samsung' or 'exynos'. Since I didn't see the 'sec' prefix for samsung drivers. >>> >>> I'd second that. All new generic samsung drivers look like this (i.e. >>> gpio- >>> samsung, pwm-samsung). > On the second thought I am thinking 'sec' is shorter and cooler. I > know that it has not I also think about it. but most of people think 'sec' is "Securities and Exchange Commission" or security instead of "Samsung Electronics". Ans TLA is avoid if possible. Thank you, Kyungmin Park > been used anywhere else but there is always a first time :-P The > shorter string helps in > writing the code; especially when we have 80 character restriction. If > you go through > this driver itself you will realize this. Also there was a suggestion > some time back to > use 'sec' instead of 'samsung'. > This is just my view about it. Please comment. > > Praveen > >>> >>> Just checked the datasheets again. This general phy type is used in some >>> form >>> down to the S3C2443, so I'd prefer something with samsung in the name >>> :-) >> Yes! That makes sense. I will change the name to samsung_usbphy >> >> Praveen >>> >>> >>> Heiko >>> Thank you, Kyungmin Park > Praveen > >>> Signed-off-by: Praveen Paneri >> >> Acked-by: Heiko Stuebner >> >> >> Heiko >> >>> --- >>> >>> .../devicetree/bindings/usb/samsung-usbphy.txt |9 + >>> drivers/usb/phy/Kconfig|8 + >>> drivers/usb/phy/Makefile |1 + >>> drivers/usb/phy/sec_usbphy.c | 354 >>> >>> drivers/usb/phy/sec_usbphy.h >>> >>> 48 +++ >>> include/linux/platform_data/s3c-hsotg.h|5 + >>> 6 files changed, 425 insertions(+), 0 deletions(-) >>> create mode 100644 >>> >>> Documentation/devicetree/bindings/usb/samsung-usbphy.txt create >>> mode >>> 100644 drivers/usb/phy/sec_usbphy.c >>> >>> create mode 100644 drivers/usb/phy/sec_usbphy.h >>> >>> diff --git >>> a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt >>> b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt new file >>> mode 100644 >>> index 000..fefd9c8 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt >>> @@ -0,0 +1,9 @@ >>> +* Samsung's usb phy transceiver >>> + >>> +The Samsung's phy transceiver is used for controlling usb otg phy >>> for >>> +s3c-hsotg usb device controller. >>> + >>> +Required properties: >>> +- compatible : should be "samsung,exynos4210-usbphy" >>> +- reg : base physical address of the phy registers and length of >>> memory mapped + region. >>> diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig >>> index e7cf84f..abbebe2 100644 >>> --- a/drivers/usb/phy/Kconfig >>> +++ b/drivers/usb/phy/Kconfig >>> @@ -15,3 +15,11 @@ config USB_ISP1301 >>> >>> To compile this driver as a module, choose M here: the >>> module will be called isp1301. >>> >>> + >>> +config SEC_USBPHY >>> + bool "Samsung USB PHY controller Driver" >>> + depends on USB_S3C_HSOTG >>> + select USB_OTG_UTILS >>> + help >>> + Enable this to support Samsung USB phy controller for >>> samsung >>> + SoCs. >>> diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile >>> index eca095b..6bb66f0 100644 >>> --- a/drivers/usb/phy/Makefile >>> +++ b/drivers/usb/phy/Makefile >
Re: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
On 7 August 2012 07:58, Olof Johansson wrote: > Hi, > > On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim > wrote: >> Hello, >> >> I am trying to understand what I have to do for device tree. >> >> In order to create dts file for ODROID-X hardware, it seems I may need dts >> file of EXYNOS4412 SoC. >> But maybe exynos4412.dtsi is not merged yet or not exist, like >> exynos4210.dtsi or exynos5250.dtsi. >> Obviously it seems not easy to create such a file without SoC datasheet, and >> I do not have it. >> >> So do I wait for the file to be merged by Samsung or better to create >> initial dts file cloned from exynos4210.dtsi and modify to have verified >> nodes with the source/header files? > > Ideally they already have one waiting to be submitted, but that might > not be the case. Given that the origenboard design with 4412 is not > yet shipping, I'm guessing the Linaro Samsung engineers might not have > done much work on 4412 yet. Kukjin? Thomas? > >> What's your suggestion? > > The alternative is to use the data you have available -- i.e. sources > and patches, and craft the device tree from there. The design of 4412 > is a derivative from 4210, so that's a good start. Next step would be > to describe the board on top of the SoC, peripherals, etc. Take a look > at how the origen board support was added, and so on. > > I ordered an odroid-x several weeks ago but I haven't have a confirmed > shipping date yet. :( I'm not sure how long it'll be before I can help > out, unfortunately. > > > -Olof Most of the Exynos4210 device tree support can be reused for Exynos4412 as well. Looking at the hardware differences between the two, it might be better to create a new exynos4.dtsi file (kind of creating it out of the existing exynos4210.dtsi) which will have all the common bits across all SoC's in the Exynos4 family. Further, there can be exynos4210.dtsi and exynos4412.dtsi which would specify SoC specific differences such as the GIC cpu-offset property and the additional groups available in the interrupt combiner. There are differences in the gpio/pinmux controllers as well which have to be described using device tree. The current gpio/pinmux device tree support depends entirely on the gpio-samsung driver which handles both gpio and pinmux but requires listing all the banks available in Exynos4412. I would prefer not to do that since we are switching over to using a pin controller driver and I am currently working on this driver. The pin controller driver is important without which the gpio/pinmux/pinconf setting for devices such as i2c and sdhci controller cannot be setup. The basic pinctrl driver for Exynos4 has already been posted and now I am working on adding gpio and wakeup interrupt support into that driver (hoping to complete it this week). So the probable steps in getting started with using device tree for Exynos4412 would be 1. Create a new exynos4.dtsi file with all the Exynos4 common properties for all dt supported controllers. 2. Update the exynos4210.dtsi file accordingly and add the new exynos4412.dtsi file. 3. With this, it will be possible to boot the kernel and test peripherals that do not depend on gpio/pinmux (rtc, wdt, etc). 4. When the Exynos4 pinctrl driver is available, start adding device nodes for i2c and sdhci controllers. 5. Incrementally add device tree coverage for the board and other peripherals on Exynos4412. Thanks, Thomas. -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg
Hi, On Mon, Aug 6, 2012 at 3:21 PM, Praveen Paneri wrote: > Hi, > > On Mon, Aug 6, 2012 at 2:53 PM, Heiko Stübner wrote: >> Am Montag, 6. August 2012, 10:23:52 schrieb Kyungmin Park: >>> Hi Praveen, >>> >>> On 8/6/12, Praveen Paneri wrote: >>> > Hi Heiko, >>> > >>> > On Mon, Aug 6, 2012 at 3:24 AM, Heiko Stübner wrote: >>> >> Hi Praveen, >>> >> >>> >> Am Mittwoch, 1. August 2012, 15:05:47 schrieb Praveen Paneri: >>> >>> This driver uses usb_phy interface to interact with s3c-hsotg. Supports >>> >>> phy_init and phy_shutdown functions to enable/disable phy. Tested with >>> >>> smdk6410 and smdkv310. More SoCs can be brought under later. >>> >> >>> >> Looks cool. >>> > >>> > Thanks >>> > >>> >> From what I've seen the phy controllers on newer Samsung SoCs are still >>> >> somewhat similar to the one on my s3c2416/2450 machines. So hopefully at >>> >> some >>> >> point after the driver has settled, I'll find the time to add support >>> >> for these to the phy driver. >>> > >>> > Yes! that's great. >>> > >>> >> Out of curiosity, what does the "sec" in sec_usbphy for? >>> > >>> > Its Samsung Electronics Co. :) >>> >>> I'm also prefer to use 'samsung' or 'exynos'. Since I didn't see the >>> 'sec' prefix for samsung drivers. >> >> I'd second that. All new generic samsung drivers look like this (i.e. gpio- >> samsung, pwm-samsung). On the second thought I am thinking 'sec' is shorter and cooler. I know that it has not been used anywhere else but there is always a first time :-P The shorter string helps in writing the code; especially when we have 80 character restriction. If you go through this driver itself you will realize this. Also there was a suggestion some time back to use 'sec' instead of 'samsung'. This is just my view about it. Please comment. Praveen >> >> Just checked the datasheets again. This general phy type is used in some form >> down to the S3C2443, so I'd prefer something with samsung in the name :-) > Yes! That makes sense. I will change the name to samsung_usbphy > > Praveen >> >> >> Heiko >> >>> >>> Thank you, >>> Kyungmin Park >>> >>> > Praveen >>> > >>> >>> Signed-off-by: Praveen Paneri >>> >> >>> >> Acked-by: Heiko Stuebner >>> >> >>> >> >>> >> Heiko >>> >> >>> >>> --- >>> >>> >>> >>> .../devicetree/bindings/usb/samsung-usbphy.txt |9 + >>> >>> drivers/usb/phy/Kconfig|8 + >>> >>> drivers/usb/phy/Makefile |1 + >>> >>> drivers/usb/phy/sec_usbphy.c | 354 >>> >>> >>> >>> drivers/usb/phy/sec_usbphy.h >>> >>> >>> >>> 48 +++ >>> >>> include/linux/platform_data/s3c-hsotg.h|5 + >>> >>> 6 files changed, 425 insertions(+), 0 deletions(-) >>> >>> create mode 100644 >>> >>> >>> >>> Documentation/devicetree/bindings/usb/samsung-usbphy.txt create mode >>> >>> 100644 drivers/usb/phy/sec_usbphy.c >>> >>> >>> >>> create mode 100644 drivers/usb/phy/sec_usbphy.h >>> >>> >>> >>> diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt >>> >>> b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt new file >>> >>> mode 100644 >>> >>> index 000..fefd9c8 >>> >>> --- /dev/null >>> >>> +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt >>> >>> @@ -0,0 +1,9 @@ >>> >>> +* Samsung's usb phy transceiver >>> >>> + >>> >>> +The Samsung's phy transceiver is used for controlling usb otg phy for >>> >>> +s3c-hsotg usb device controller. >>> >>> + >>> >>> +Required properties: >>> >>> +- compatible : should be "samsung,exynos4210-usbphy" >>> >>> +- reg : base physical address of the phy registers and length of >>> >>> memory mapped + region. >>> >>> diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig >>> >>> index e7cf84f..abbebe2 100644 >>> >>> --- a/drivers/usb/phy/Kconfig >>> >>> +++ b/drivers/usb/phy/Kconfig >>> >>> @@ -15,3 +15,11 @@ config USB_ISP1301 >>> >>> >>> >>> To compile this driver as a module, choose M here: the >>> >>> module will be called isp1301. >>> >>> >>> >>> + >>> >>> +config SEC_USBPHY >>> >>> + bool "Samsung USB PHY controller Driver" >>> >>> + depends on USB_S3C_HSOTG >>> >>> + select USB_OTG_UTILS >>> >>> + help >>> >>> + Enable this to support Samsung USB phy controller for samsung >>> >>> + SoCs. >>> >>> diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile >>> >>> index eca095b..6bb66f0 100644 >>> >>> --- a/drivers/usb/phy/Makefile >>> >>> +++ b/drivers/usb/phy/Makefile >>> >>> @@ -5,3 +5,4 @@ >>> >>> >>> >>> ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG >>> >>> >>> >>> obj-$(CONFIG_USB_ISP1301)+= isp1301.o >>> >>> >>> >>> +obj-$(CONFIG_SEC_USBPHY) += sec_usbphy.o >>> >>> diff --git a/drivers/usb/phy/sec_usbphy.c >>> >>> b/drivers/usb/phy/sec_usbphy.c new file mode 100644 >>> >>> index 000..33119eb >>> >>> --- /dev/null >>> >>> +++ b/drivers/usb/phy/sec_usbphy.c >>> >>> @@ -0,0 +1,354 @@ >>> >>> +/* linux/drivers/u
회신: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
Hi, Thank you for your advice. Fortunately I got ODROID-X hardware earlier and am able to boot with mainline kernel. I will try to do alternative way first with source code kernel 3.0.15, and hope you review the patch if ready. Regards, Dongjin. 보낸 사람: Olof Johansson [o...@lixom.net] 보낸 날짜: 2012년 8월 7일 화요일 오전 11:28 받는 사람: Dongjin Kim 참조: Thomas Abraham; Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-König; linux-arm-ker...@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-ker...@vger.kernel.org 제목: Re: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412 Hi, On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim wrote: > Hello, > > I am trying to understand what I have to do for device tree. > > In order to create dts file for ODROID-X hardware, it seems I may need dts > file of EXYNOS4412 SoC. > But maybe exynos4412.dtsi is not merged yet or not exist, like > exynos4210.dtsi or exynos5250.dtsi. > Obviously it seems not easy to create such a file without SoC datasheet, and > I do not have it. > > So do I wait for the file to be merged by Samsung or better to create initial > dts file cloned from exynos4210.dtsi and modify to have verified nodes with > the source/header files? Ideally they already have one waiting to be submitted, but that might not be the case. Given that the origenboard design with 4412 is not yet shipping, I'm guessing the Linaro Samsung engineers might not have done much work on 4412 yet. Kukjin? Thomas? > What's your suggestion? The alternative is to use the data you have available -- i.e. sources and patches, and craft the device tree from there. The design of 4412 is a derivative from 4210, so that's a good start. Next step would be to describe the board on top of the SoC, peripherals, etc. Take a look at how the origen board support was added, and so on. I ordered an odroid-x several weeks ago but I haven't have a confirmed shipping date yet. :( I'm not sure how long it'll be before I can help out, unfortunately. -Olof
Re: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
Hi, On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim wrote: > Hello, > > I am trying to understand what I have to do for device tree. > > In order to create dts file for ODROID-X hardware, it seems I may need dts > file of EXYNOS4412 SoC. > But maybe exynos4412.dtsi is not merged yet or not exist, like > exynos4210.dtsi or exynos5250.dtsi. > Obviously it seems not easy to create such a file without SoC datasheet, and > I do not have it. > > So do I wait for the file to be merged by Samsung or better to create initial > dts file cloned from exynos4210.dtsi and modify to have verified nodes with > the source/header files? Ideally they already have one waiting to be submitted, but that might not be the case. Given that the origenboard design with 4412 is not yet shipping, I'm guessing the Linaro Samsung engineers might not have done much work on 4412 yet. Kukjin? Thomas? > What's your suggestion? The alternative is to use the data you have available -- i.e. sources and patches, and craft the device tree from there. The design of 4412 is a derivative from 4210, so that's a good start. Next step would be to describe the board on top of the SoC, peripherals, etc. Take a look at how the origen board support was added, and so on. I ordered an odroid-x several weeks ago but I haven't have a confirmed shipping date yet. :( I'm not sure how long it'll be before I can help out, unfortunately. -Olof -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
Hello, I am trying to understand what I have to do for device tree. In order to create dts file for ODROID-X hardware, it seems I may need dts file of EXYNOS4412 SoC. But maybe exynos4412.dtsi is not merged yet or not exist, like exynos4210.dtsi or exynos5250.dtsi. Obviously it seems not easy to create such a file without SoC datasheet, and I do not have it. So do I wait for the file to be merged by Samsung or better to create initial dts file cloned from exynos4210.dtsi and modify to have verified nodes with the source/header files? What's your suggestion? Regards, Dongjin. 보낸 사람: Olof Johansson [o...@lixom.net] 보낸 날짜: 2012년 8월 7일 화요일 오전 3:33 받는 사람: Dongjin Kim 참조: Thomas Abraham; Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-König; linux-arm-ker...@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-ker...@vger.kernel.org 제목: Re: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412 Hi, On Mon, Aug 6, 2012 at 11:16 AM, Dongjin Kim wrote: > Hello Tomas, > > I am agree with you to look at using device tree and I have some plan for it. > But as of now I am focusing to bring up the hardware itself with mainline > kernel and merge into it. > I also need some time to look at the requirement of device tree, because I am > not familiar with it yet. > > Any advice will be welcomed. Basic rule (that has some flexibility for legacy platforms) is that the net movement of board support should move from board files to device-tree based. Introduction of a brand new board like this is a prime example of something that should be using device tree from day 1. -Olof
Re: [PATCH v3 2/2] ARM: EXYNOS: Add Gscaler device from DT
On 08/06/2012 08:27 AM, Shaik Ameer Basha wrote: > After all this discussion, I can see two possibilities here. > 1] If Kukjin Kim is sure about G-Scaler remains unchanged, across all > the exynos5 series SoCs, > It is fine to go with the compatible string "samsung,exynos5-gsc". > 2] Otherwise in case of any doubts about G-Scaler is going to change, > It is safe to go with the compatible string specific to > current SoC i.e., "samsung,exynos5250-gsc". > > If we all can agree on this, lets Kukjin Kim decide which string to > use as he has good knowledge about upcoming exynos5 series SoCs. I don't have strong opinion on this, but my vote goes for using more specific properties. Of course the final word belongs to Mr. Kim. -- Regards, Sylwester -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
Hi, On Mon, Aug 6, 2012 at 11:16 AM, Dongjin Kim wrote: > Hello Tomas, > > I am agree with you to look at using device tree and I have some plan for it. > But as of now I am focusing to bring up the hardware itself with mainline > kernel and merge into it. > I also need some time to look at the requirement of device tree, because I am > not familiar with it yet. > > Any advice will be welcomed. Basic rule (that has some flexibility for legacy platforms) is that the net movement of board support should move from board files to device-tree based. Introduction of a brand new board like this is a prime example of something that should be using device tree from day 1. -Olof -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
Hello Tomas, I am agree with you to look at using device tree and I have some plan for it. But as of now I am focusing to bring up the hardware itself with mainline kernel and merge into it. I also need some time to look at the requirement of device tree, because I am not familiar with it yet. Any advice will be welcomed. Thanks, Dongjin. 보낸 사람: Thomas Abraham [thomas.abra...@linaro.org] 보낸 날짜: 2012년 8월 7일 화요일 오전 2:37 받는 사람: Dongjin Kim 참조: Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-König; linux-arm-ker...@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-ker...@vger.kernel.org 제목: Re: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412 On 6 August 2012 19:40, Dongjin Kim wrote: > The HKDK4412 is the CPU module developed by Hardkernel which is based on > Exynos 4412. mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID > (4289) is registered. > > Change-Id: I3af02808c03b9acea916c310390a4904ad92d761 > Signed-off-by: Dongjin Kim > --- > arch/arm/mach-exynos/Kconfig | 23 + > arch/arm/mach-exynos/Makefile|1 + > arch/arm/mach-exynos/mach-hkdk4412.c | 979 > ++ > arch/arm/tools/mach-types|1 + > 4 files changed, 1004 insertions(+) > create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c How about looking at using device tree option for this board. That might require additional effort but would be helpful in the long run. Thanks, Thomas.
Re: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
On 6 August 2012 19:40, Dongjin Kim wrote: > The HKDK4412 is the CPU module developed by Hardkernel which is based on > Exynos 4412. mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID > (4289) is registered. > > Change-Id: I3af02808c03b9acea916c310390a4904ad92d761 > Signed-off-by: Dongjin Kim > --- > arch/arm/mach-exynos/Kconfig | 23 + > arch/arm/mach-exynos/Makefile|1 + > arch/arm/mach-exynos/mach-hkdk4412.c | 979 > ++ > arch/arm/tools/mach-types|1 + > 4 files changed, 1004 insertions(+) > create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c How about looking at using device tree option for this board. That might require additional effort but would be helpful in the long run. Thanks, Thomas. -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
On Mon, Aug 06, 2012 at 11:10:51PM +0900, Dongjin Kim wrote: > +static struct regulator_consumer_supply __initdata max77686_buck4_consumer[] > = { > + REGULATOR_SUPPLY("vdd_g3d", NULL), > +}; Not that it matters much since new board drivers won't get merged but all your regulator setup here is problematic. These look like names from the board schematic as opposed to mappings of the supplies onto the consumer devices. > +static struct regulator_init_data __initdata max77686_buck1_data = { > + .constraints = { > + .name = "vdd_mif range", This would normally just be the name of the supply for display purposes. -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
The HKDK4412 is the CPU module developed by Hardkernel which is based on Exynos 4412. mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID (4289) is registered. Change-Id: I3af02808c03b9acea916c310390a4904ad92d761 Signed-off-by: Dongjin Kim --- arch/arm/mach-exynos/Kconfig | 23 + arch/arm/mach-exynos/Makefile|1 + arch/arm/mach-exynos/mach-hkdk4412.c | 979 ++ arch/arm/tools/mach-types|1 + 4 files changed, 1004 insertions(+) create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index b5b4c8c..ae90773 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -54,6 +54,9 @@ config SOC_EXYNOS4412 default y depends on ARCH_EXYNOS4 select SAMSUNG_DMADEV + select S5P_PM if PM + select S5P_SLEEP if PM + select PM_GENERIC_DOMAINS help Enable EXYNOS4412 SoC support @@ -394,6 +397,26 @@ config MACH_SMDK4412 select MACH_SMDK4212 help Machine support for Samsung SMDK4412 + +config MACH_HKDK4412 + bool "HKDK4412" + select SOC_EXYNOS4412 + select MACH_SMDK4212 + select S3C_DEV_HSMMC + select S3C_DEV_HSMMC1 + select S3C_DEV_USB_HSOTG + select S5P_DEV_CSIS0 + select S5P_DEV_G2D + select S5P_DEV_JPEG + select S5P_DEV_USB_EHCI + select S5P_DEV_I2C_HDMIPHY + select S5P_DEV_TV + select S5P_GPIO_INT + select EXYNOS4_DEV_USB_OHCI + select SAMSUNG_DEV_ADC + help + Machine support for Odroid-X based on Samsung EXYNOS4412 + endif comment "Flattened Device Tree based board for EXYNOS SoCs" diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 9b58024..dccc381 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -41,6 +41,7 @@ obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o obj-$(CONFIG_MACH_SMDK4212)+= mach-smdk4x12.o obj-$(CONFIG_MACH_SMDK4412)+= mach-smdk4x12.o +obj-$(CONFIG_MACH_HKDK4412)+= mach-hkdk4412.o obj-$(CONFIG_MACH_EXYNOS4_DT) += mach-exynos4-dt.o obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o diff --git a/arch/arm/mach-exynos/mach-hkdk4412.c b/arch/arm/mach-exynos/mach-hkdk4412.c new file mode 100644 index 000..3b090ae --- /dev/null +++ b/arch/arm/mach-exynos/mach-hkdk4412.c @@ -0,0 +1,979 @@ +/* + * linux/arch/arm/mach-exynos4/mach-hkdk4412.c + * + * Copyright (c) 2012 AgreeYa Mobility Co., Ltd. + * http://www.agreeyamobility.net + * + * 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. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "common.h" + +/* Following are default values for UCON, ULCON and UFCON UART registers */ +#define HKDK4412_UCON_DEFAULT (S3C2410_UCON_TXILEVEL |\ +S3C2410_UCON_RXILEVEL |\ +S3C2410_UCON_TXIRQMODE | \ +S3C2410_UCON_RXIRQMODE | \ +S3C2410_UCON_RXFIFO_TOI | \ +S3C2443_UCON_RXERR_IRQEN) + +#define HKDK4412_ULCON_DEFAULT S3C2410_LCON_CS8 + +#define HKDK4412_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ +S5PV210_UFCON_TXTRIG4 |\ +S5PV210_UFCON_RXTRIG4) + +static struct s3c2410_uartcfg hkdk4412_uartcfgs[] __initdata = { + [0] = { + .hwport = 0, + .flags = 0, + .ucon = HKDK4412_UCON_DEFAULT, + .ulcon = HKDK4412_ULCON_DEFAULT, + .ufcon = HKDK4412_UFCON_DEFAULT, + }, + [1] = { + .hwport = 1, + .flags = 0, + .ucon = HKDK4412_UCON_DEFAULT, + .ulcon = HKDK4412_ULCON_DEFAULT, + .ufcon = HKDK4412_UFCON_DEFAULT, + }, + [2] = { + .hwport = 2, + .flags = 0, + .ucon = HKDK4412_UCON_DEFAULT, + .ulcon = HKDK4412_ULCON_DEFAULT, + .ufcon = HKDK4412_UFCON_DEFAULT, + }, + [3] = { + .hwport = 3, + .flags = 0, + .ucon = HKDK4412_UCON_DEFAULT, + .ulcon = HKDK4412_U
[PATCH] ARM: EXYNOS: Add USB HSIC device
This patch support to control USB HSIC of EXYNOS4, edited based on Samsung's GT-i9100 ICS Opensource Update7. Change-Id: Ifba33c6a5166abf3644794eee6abe528bd71f521 Signed-off-by: Dongjin Kim --- arch/arm/mach-exynos/common.c|5 + arch/arm/mach-exynos/include/mach/regs-pmu.h | 12 + arch/arm/mach-exynos/include/mach/regs-usb-phy.h | 97 + arch/arm/mach-exynos/setup-usb-phy.c | 493 -- drivers/usb/host/Kconfig | 14 + 5 files changed, 501 insertions(+), 120 deletions(-) diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 4eb39cd..94d58af 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -179,6 +179,11 @@ static struct map_desc exynos4_iodesc[] __initdata = { .length = SZ_4K, .type = MT_DEVICE, }, { + .virtual= (unsigned long)S5P_VA_GPIO2, + .pfn= __phys_to_pfn(EXYNOS4_PA_GPIO2), + .length = SZ_4K, + .type = MT_DEVICE, + }, { .virtual= (unsigned long)S5P_VA_DMC0, .pfn= __phys_to_pfn(EXYNOS4_PA_DMC0), .length = SZ_64K, diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h index 0bb21e2..d98c2fe 100644 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h @@ -185,6 +185,15 @@ #define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0) /* Only for EXYNOS4x12 */ +#define S5P_USB_PHY_CONTROLS5P_PMUREG(0x0704) +#define S5P_USB_PHY_ENABLE (0x1 << 0) + +#define S5P_HSIC_1_PHY_CONTROL S5P_PMUREG(0x0708) +#define S5P_HSIC_1_PHY_ENABLE (0x1 << 0) + +#define S5P_HSIC_2_PHY_CONTROL S5P_PMUREG(0x070C) +#define S5P_HSIC_2_PHY_ENABLE (0x1 << 0) + #define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050) #define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054) #define S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR S5P_PMUREG(0x1058) @@ -242,6 +251,9 @@ #define EXYNOS5_SYS_WDTRESET (1 << 20) +#define EXYNOS5_USBDEV_PHY_CONTROL S5P_PMUREG(0x0704) +#define EXYNOS5_USBHOST_PHY_CONTROLS5P_PMUREG(0x0708) + #define EXYNOS5_ARM_CORE0_SYS_PWR_REG S5P_PMUREG(0x1000) #define EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG S5P_PMUREG(0x1004) #define EXYNOS5_DIS_IRQ_ARM_CORE0_CENTRAL_SYS_PWR_REG S5P_PMUREG(0x1008) diff --git a/arch/arm/mach-exynos/include/mach/regs-usb-phy.h b/arch/arm/mach-exynos/include/mach/regs-usb-phy.h index 0727773..79021a0 100644 --- a/arch/arm/mach-exynos/include/mach/regs-usb-phy.h +++ b/arch/arm/mach-exynos/include/mach/regs-usb-phy.h @@ -43,6 +43,43 @@ #define EXYNOS4210_CLKSEL_12M (0x2 << 0) #define EXYNOS4210_CLKSEL_24M (0x3 << 0) +#define EXYNOS4210_HSIC1_NORMAL_MASK(0x3 << 11) +#define EXYNOS4210_HSIC1_SLEEP (1 << 12) +#define EXYNOS4210_HSIC1_FORCE_SUSPEND (1 << 11) +#define EXYNOS4210_HSIC0_NORMAL_MASK(0x3 << 9) +#define EXYNOS4210_HSIC0_SLEEP (1 << 10) +#define EXYNOS4210_HSIC0_FORCE_SUSPEND (1 << 9) + +#define EXYNOS4210_HOST_LINK_PORT_SWRST_MASK(0xf << 6) +#define EXYNOS4210_HOST_LINK_PORT2_SWRST(1 << 9) +#define EXYNOS4210_HOST_LINK_PORT1_SWRST(1 << 8) +#define EXYNOS4210_HOST_LINK_PORT0_SWRST(1 << 7) +#define EXYNOS4210_HOST_LINK_ALL_SWRST (1 << 6) +#define EXYNOS4210_PHY1_SWRST_MASK (0x7 << 3) +#define EXYNOS4210_PHY1_HSIC_SWRST (1 << 5) +#define EXYNOS4210_PHY1_STD_SWRST (1 << 4) +#define EXYNOS4210_PHY1_ALL_SWRST (1 << 3) + +#define EXYNOS4X12_HSIC1_NORMAL_MASK (0x7 << 12) +#define EXYNOS4X12_HSIC1_SLEEP (1 << 14) +#define EXYNOS4X12_HSIC1_ANALOG_POWERDOWN (1 << 13) +#define EXYNOS4X12_HSIC1_FORCE_SUSPEND (1 << 12) +#define EXYNOS4X12_HSIC0_NORMAL_MASK (0x7 << 9) +#define EXYNOS4X12_HSIC0_SLEEP (1 << 11) +#define EXYNOS4X12_HSIC0_ANALOG_POWERDOWN (1 << 10) +#define EXYNOS4X12_HSIC0_FORCE_SUSPEND (1 << 9) + +#define EXYNOS4X12_HOST_LINK_PORT_SWRST_MASK (0xf << 7) +#define EXYNOS4X12_HOST_LINK_PORT2_SWRST (1 << 10) +#define EXYNOS4X12_HOST_LINK_PORT1_SWRST (1 << 9) +#define EXYNOS4X12_HOST_LINK_PORT0_SWRST (1 << 8) +#define EXYNOS4X12_HOST_LINK_ALL_SWRST (1 << 7) +#define EXYNOS4X12_PHY1_SWRST_MASK (0xf << 3) +#define EXYNOS4X12_PHY1_HSIC1_SWRST(1 << 6) +#define EXYNOS4X12_PHY1_HSIC0_SWRST(1 << 5) +#define EXYNOS4X12_PHY1_SWRST (1
[PATCH] ARM: EXYNOS: Enable multiple cores on Exynos4
This patch enables CPU cores on Exynos4, on Exynos4412 secondary CPU cores are power-gated, therefore we must turn on the CPU cores on the system boot. Shows below log message on boot. [0.045000] CPU: Testing write buffer coherency: ok [0.045000] CPU0: thread -1, cpu 0, socket 10, mpidr 8a00 [0.045000] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters e [0.045000] Setting up static identity map for 0x40370790 - 0x403707e8 [0.045000] L310 cache controller enabled [0.045000] l2x0: 16 ways, CACHE_ID 0x4100c4c8, AUX_CTRL 0x7e470001, Cache sizeB [0.07] CPU1: Booted secondary processor [0.09] CPU1: thread -1, cpu 1, socket 10, mpidr 8a01 [0.09] CPU1: Unknown IPI message 0x1 [0.10] CPU2: Booted secondary processor [0.12] CPU2: thread -1, cpu 2, socket 10, mpidr 8a02 [0.12] CPU2: Unknown IPI message 0x1 [0.13] CPU3: Booted secondary processor [0.15] CPU3: thread -1, cpu 3, socket 10, mpidr 8a03 [0.15] CPU3: Unknown IPI message 0x1 [0.15] Brought up 4 CPUs [0.15] SMP: Total of 4 processors activated (7969.17 BogoMIPS). Change-Id: I61615c5b719d3646698f114fc3777eb304694099 Signed-off-by: Dongjin Kim --- arch/arm/mach-exynos/hotplug.c |4 +- arch/arm/mach-exynos/include/mach/regs-pmu.h | 11 ++- arch/arm/mach-exynos/platsmp.c | 100 +- 3 files changed, 76 insertions(+), 39 deletions(-) diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index 9c17a0a..cd53497 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c @@ -66,8 +66,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) for (;;) { /* make cpu1 to be turned off at next WFI command */ - if (cpu == 1) - __raw_writel(0, S5P_ARM_CORE1_CONFIGURATION); + if ((cpu >= 1) && (cpu < num_possible_cpus())) + __raw_writel(0, S5P_ARM_CORE_CONFIGURATION(cpu)); /* * here's the WFI diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h index d4e392b..0bb21e2 100644 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h @@ -123,10 +123,15 @@ #define S5P_GPS_ALIVE_LOWPWR S5P_PMUREG(0x13A0) #define S5P_ARM_CORE0_CONFIGURATIONS5P_PMUREG(0x2000) +#define S5P_ARM_CORE0_STATUS S5P_PMUREG(0x2004) #define S5P_ARM_CORE0_OPTION S5P_PMUREG(0x2008) -#define S5P_ARM_CORE1_CONFIGURATIONS5P_PMUREG(0x2080) -#define S5P_ARM_CORE1_STATUS S5P_PMUREG(0x2084) -#define S5P_ARM_CORE1_OPTION S5P_PMUREG(0x2088) + +#define S5P_ARM_CORE_OPTION(_nr) (S5P_ARM_CORE0_OPTION + ((_nr) * 0x80)) +#define S5P_ARM_CORE_STATUS(_nr) (S5P_ARM_CORE0_STATUS + ((_nr) * 0x80)) +#define S5P_ARM_CORE_CONFIGURATION(_nr)\ + (S5P_ARM_CORE0_CONFIGURATION + ((_nr) * 0x80)) + +#define S5P_CORE_OPTION_DIS (1 << 8) #define S5P_ARM_COMMON_OPTION S5P_PMUREG(0x2408) #define S5P_TOP_PWR_OPTION S5P_PMUREG(0x2C48) diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 36c3984..68ca26f 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -34,9 +34,6 @@ extern void exynos4_secondary_startup(void); -#define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ - S5P_INFORM5 : S5P_VA_SYSRAM) - /* * control for which core is the next to come out of the secondary * boot "holding pen" @@ -59,6 +56,9 @@ static void write_pen_release(int val) static void __iomem *scu_base_addr(void) { + if (soc_is_exynos5250()) + return 0; + return (void __iomem *)(S5P_VA_SCU); } @@ -86,9 +86,41 @@ void __cpuinit platform_secondary_init(unsigned int cpu) spin_unlock(&boot_lock); } +static int exynos_power_up_cpu(unsigned int cpu) +{ + unsigned long timeout; + unsigned int val; + void __iomem *power_base = S5P_ARM_CORE_CONFIGURATION(cpu); + + val = __raw_readl(power_base); + if (!(val & S5P_CORE_LOCAL_PWR_EN)) { + __raw_writel(S5P_CORE_LOCAL_PWR_EN, power_base); + + timeout = 10; + + /* wait max 10 ms until cpu is on */ + while ((__raw_readl(power_base + 0x4) + & S5P_CORE_LOCAL_PWR_EN) != S5P_CORE_LOCAL_PWR_EN) { + if (timeout-- == 0) + break; + + mdelay(1); + } + + if (timeout == 0) { + pr_err("cpu%d power enable failed", cpu); +
[PATCH] ARM: EXYNOS: Add HDMIPHY I2C adaptor
This patch assign the I2C channel for HDMIPHY for Exynos4x12 in s5p_i2c_hdmiphy_set_platdata() and s5p_hdmi_set_platdata() Change-Id: I7e66c8f9327e2f7dce7440efb8583b506d65831a Signed-off-by: Dongjin Kim --- arch/arm/plat-samsung/devs.c |4 1 file changed, 4 insertions(+) diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index a199e55..54614d0 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -752,6 +752,8 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd) if (soc_is_exynos4210()) pd->bus_num = 8; + else if (soc_is_exynos4212() || soc_is_exynos4412()) + pd->bus_num = 8; else if (soc_is_s5pv210()) pd->bus_num = 3; else @@ -771,6 +773,8 @@ void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info, if (soc_is_exynos4210()) pd->hdmiphy_bus = 8; + else if (soc_is_exynos4212() || soc_is_exynos4412()) + pd->hdmiphy_bus = 8; else if (soc_is_s5pv210()) pd->hdmiphy_bus = 3; else -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg
Hi, On Mon, Aug 6, 2012 at 2:53 PM, Heiko Stübner wrote: > Am Montag, 6. August 2012, 10:23:52 schrieb Kyungmin Park: >> Hi Praveen, >> >> On 8/6/12, Praveen Paneri wrote: >> > Hi Heiko, >> > >> > On Mon, Aug 6, 2012 at 3:24 AM, Heiko Stübner wrote: >> >> Hi Praveen, >> >> >> >> Am Mittwoch, 1. August 2012, 15:05:47 schrieb Praveen Paneri: >> >>> This driver uses usb_phy interface to interact with s3c-hsotg. Supports >> >>> phy_init and phy_shutdown functions to enable/disable phy. Tested with >> >>> smdk6410 and smdkv310. More SoCs can be brought under later. >> >> >> >> Looks cool. >> > >> > Thanks >> > >> >> From what I've seen the phy controllers on newer Samsung SoCs are still >> >> somewhat similar to the one on my s3c2416/2450 machines. So hopefully at >> >> some >> >> point after the driver has settled, I'll find the time to add support >> >> for these to the phy driver. >> > >> > Yes! that's great. >> > >> >> Out of curiosity, what does the "sec" in sec_usbphy for? >> > >> > Its Samsung Electronics Co. :) >> >> I'm also prefer to use 'samsung' or 'exynos'. Since I didn't see the >> 'sec' prefix for samsung drivers. > > I'd second that. All new generic samsung drivers look like this (i.e. gpio- > samsung, pwm-samsung). > > Just checked the datasheets again. This general phy type is used in some form > down to the S3C2443, so I'd prefer something with samsung in the name :-) Yes! That makes sense. I will change the name to samsung_usbphy Praveen > > > Heiko > >> >> Thank you, >> Kyungmin Park >> >> > Praveen >> > >> >>> Signed-off-by: Praveen Paneri >> >> >> >> Acked-by: Heiko Stuebner >> >> >> >> >> >> Heiko >> >> >> >>> --- >> >>> >> >>> .../devicetree/bindings/usb/samsung-usbphy.txt |9 + >> >>> drivers/usb/phy/Kconfig|8 + >> >>> drivers/usb/phy/Makefile |1 + >> >>> drivers/usb/phy/sec_usbphy.c | 354 >> >>> >> >>> drivers/usb/phy/sec_usbphy.h >> >>> >> >>> 48 +++ >> >>> include/linux/platform_data/s3c-hsotg.h|5 + >> >>> 6 files changed, 425 insertions(+), 0 deletions(-) >> >>> create mode 100644 >> >>> >> >>> Documentation/devicetree/bindings/usb/samsung-usbphy.txt create mode >> >>> 100644 drivers/usb/phy/sec_usbphy.c >> >>> >> >>> create mode 100644 drivers/usb/phy/sec_usbphy.h >> >>> >> >>> diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt >> >>> b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt new file >> >>> mode 100644 >> >>> index 000..fefd9c8 >> >>> --- /dev/null >> >>> +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt >> >>> @@ -0,0 +1,9 @@ >> >>> +* Samsung's usb phy transceiver >> >>> + >> >>> +The Samsung's phy transceiver is used for controlling usb otg phy for >> >>> +s3c-hsotg usb device controller. >> >>> + >> >>> +Required properties: >> >>> +- compatible : should be "samsung,exynos4210-usbphy" >> >>> +- reg : base physical address of the phy registers and length of >> >>> memory mapped + region. >> >>> diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig >> >>> index e7cf84f..abbebe2 100644 >> >>> --- a/drivers/usb/phy/Kconfig >> >>> +++ b/drivers/usb/phy/Kconfig >> >>> @@ -15,3 +15,11 @@ config USB_ISP1301 >> >>> >> >>> To compile this driver as a module, choose M here: the >> >>> module will be called isp1301. >> >>> >> >>> + >> >>> +config SEC_USBPHY >> >>> + bool "Samsung USB PHY controller Driver" >> >>> + depends on USB_S3C_HSOTG >> >>> + select USB_OTG_UTILS >> >>> + help >> >>> + Enable this to support Samsung USB phy controller for samsung >> >>> + SoCs. >> >>> diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile >> >>> index eca095b..6bb66f0 100644 >> >>> --- a/drivers/usb/phy/Makefile >> >>> +++ b/drivers/usb/phy/Makefile >> >>> @@ -5,3 +5,4 @@ >> >>> >> >>> ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG >> >>> >> >>> obj-$(CONFIG_USB_ISP1301)+= isp1301.o >> >>> >> >>> +obj-$(CONFIG_SEC_USBPHY) += sec_usbphy.o >> >>> diff --git a/drivers/usb/phy/sec_usbphy.c >> >>> b/drivers/usb/phy/sec_usbphy.c new file mode 100644 >> >>> index 000..33119eb >> >>> --- /dev/null >> >>> +++ b/drivers/usb/phy/sec_usbphy.c >> >>> @@ -0,0 +1,354 @@ >> >>> +/* linux/drivers/usb/phy/sec_usbphy.c >> >>> + * >> >>> + * Copyright (c) 2012 Samsung Electronics Co., Ltd. >> >>> + * http://www.samsung.com >> >>> + * >> >>> + * Author: Praveen Paneri >> >>> + * >> >>> + * Samsung USB2.0 High-speed OTG transceiver, talks to S3C HS OTG >> >>> controller + * >> >>> + * 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. >> >>> + * >> >>> + * This program is distributed in the hope that it will be useful, >> >>> + * but WITHOUT ANY WARRANTY; without ev
Re: [PATCH 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg
Am Montag, 6. August 2012, 10:23:52 schrieb Kyungmin Park: > Hi Praveen, > > On 8/6/12, Praveen Paneri wrote: > > Hi Heiko, > > > > On Mon, Aug 6, 2012 at 3:24 AM, Heiko Stübner wrote: > >> Hi Praveen, > >> > >> Am Mittwoch, 1. August 2012, 15:05:47 schrieb Praveen Paneri: > >>> This driver uses usb_phy interface to interact with s3c-hsotg. Supports > >>> phy_init and phy_shutdown functions to enable/disable phy. Tested with > >>> smdk6410 and smdkv310. More SoCs can be brought under later. > >> > >> Looks cool. > > > > Thanks > > > >> From what I've seen the phy controllers on newer Samsung SoCs are still > >> somewhat similar to the one on my s3c2416/2450 machines. So hopefully at > >> some > >> point after the driver has settled, I'll find the time to add support > >> for these to the phy driver. > > > > Yes! that's great. > > > >> Out of curiosity, what does the "sec" in sec_usbphy for? > > > > Its Samsung Electronics Co. :) > > I'm also prefer to use 'samsung' or 'exynos'. Since I didn't see the > 'sec' prefix for samsung drivers. I'd second that. All new generic samsung drivers look like this (i.e. gpio- samsung, pwm-samsung). Just checked the datasheets again. This general phy type is used in some form down to the S3C2443, so I'd prefer something with samsung in the name :-) Heiko > > Thank you, > Kyungmin Park > > > Praveen > > > >>> Signed-off-by: Praveen Paneri > >> > >> Acked-by: Heiko Stuebner > >> > >> > >> Heiko > >> > >>> --- > >>> > >>> .../devicetree/bindings/usb/samsung-usbphy.txt |9 + > >>> drivers/usb/phy/Kconfig|8 + > >>> drivers/usb/phy/Makefile |1 + > >>> drivers/usb/phy/sec_usbphy.c | 354 > >>> > >>> drivers/usb/phy/sec_usbphy.h > >>> > >>> 48 +++ > >>> include/linux/platform_data/s3c-hsotg.h|5 + > >>> 6 files changed, 425 insertions(+), 0 deletions(-) > >>> create mode 100644 > >>> > >>> Documentation/devicetree/bindings/usb/samsung-usbphy.txt create mode > >>> 100644 drivers/usb/phy/sec_usbphy.c > >>> > >>> create mode 100644 drivers/usb/phy/sec_usbphy.h > >>> > >>> diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt > >>> b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt new file > >>> mode 100644 > >>> index 000..fefd9c8 > >>> --- /dev/null > >>> +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt > >>> @@ -0,0 +1,9 @@ > >>> +* Samsung's usb phy transceiver > >>> + > >>> +The Samsung's phy transceiver is used for controlling usb otg phy for > >>> +s3c-hsotg usb device controller. > >>> + > >>> +Required properties: > >>> +- compatible : should be "samsung,exynos4210-usbphy" > >>> +- reg : base physical address of the phy registers and length of > >>> memory mapped + region. > >>> diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig > >>> index e7cf84f..abbebe2 100644 > >>> --- a/drivers/usb/phy/Kconfig > >>> +++ b/drivers/usb/phy/Kconfig > >>> @@ -15,3 +15,11 @@ config USB_ISP1301 > >>> > >>> To compile this driver as a module, choose M here: the > >>> module will be called isp1301. > >>> > >>> + > >>> +config SEC_USBPHY > >>> + bool "Samsung USB PHY controller Driver" > >>> + depends on USB_S3C_HSOTG > >>> + select USB_OTG_UTILS > >>> + help > >>> + Enable this to support Samsung USB phy controller for samsung > >>> + SoCs. > >>> diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile > >>> index eca095b..6bb66f0 100644 > >>> --- a/drivers/usb/phy/Makefile > >>> +++ b/drivers/usb/phy/Makefile > >>> @@ -5,3 +5,4 @@ > >>> > >>> ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG > >>> > >>> obj-$(CONFIG_USB_ISP1301)+= isp1301.o > >>> > >>> +obj-$(CONFIG_SEC_USBPHY) += sec_usbphy.o > >>> diff --git a/drivers/usb/phy/sec_usbphy.c > >>> b/drivers/usb/phy/sec_usbphy.c new file mode 100644 > >>> index 000..33119eb > >>> --- /dev/null > >>> +++ b/drivers/usb/phy/sec_usbphy.c > >>> @@ -0,0 +1,354 @@ > >>> +/* linux/drivers/usb/phy/sec_usbphy.c > >>> + * > >>> + * Copyright (c) 2012 Samsung Electronics Co., Ltd. > >>> + * http://www.samsung.com > >>> + * > >>> + * Author: Praveen Paneri > >>> + * > >>> + * Samsung USB2.0 High-speed OTG transceiver, talks to S3C HS OTG > >>> controller + * > >>> + * 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. > >>> + * > >>> + * This program is distributed in the hope that it will be useful, > >>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of > >>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > >>> + * GNU General Public License for more details. > >>> + * > >>> + * You should have received a copy of the GNU General Public License > >>> +
Re: [PATCH 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg
Hi Praveen, On 8/6/12, Praveen Paneri wrote: > Hi Heiko, > > On Mon, Aug 6, 2012 at 3:24 AM, Heiko Stübner wrote: >> Hi Praveen, >> >> Am Mittwoch, 1. August 2012, 15:05:47 schrieb Praveen Paneri: >>> This driver uses usb_phy interface to interact with s3c-hsotg. Supports >>> phy_init and phy_shutdown functions to enable/disable phy. Tested with >>> smdk6410 and smdkv310. More SoCs can be brought under later. >> >> Looks cool. > Thanks >> >> From what I've seen the phy controllers on newer Samsung SoCs are still >> somewhat similar to the one on my s3c2416/2450 machines. So hopefully at >> some >> point after the driver has settled, I'll find the time to add support for >> these to the phy driver. > Yes! that's great. >> >> Out of curiosity, what does the "sec" in sec_usbphy for? > Its Samsung Electronics Co. :) I'm also prefer to use 'samsung' or 'exynos'. Since I didn't see the 'sec' prefix for samsung drivers. Thank you, Kyungmin Park > > Praveen >> >> >> >>> Signed-off-by: Praveen Paneri >> >> Acked-by: Heiko Stuebner >> >> >> Heiko >> >> >>> --- >>> .../devicetree/bindings/usb/samsung-usbphy.txt |9 + >>> drivers/usb/phy/Kconfig|8 + >>> drivers/usb/phy/Makefile |1 + >>> drivers/usb/phy/sec_usbphy.c | 354 >>> drivers/usb/phy/sec_usbphy.h >>> | >>> 48 +++ >>> include/linux/platform_data/s3c-hsotg.h|5 + >>> 6 files changed, 425 insertions(+), 0 deletions(-) >>> create mode 100644 >>> Documentation/devicetree/bindings/usb/samsung-usbphy.txt create mode >>> 100644 drivers/usb/phy/sec_usbphy.c >>> create mode 100644 drivers/usb/phy/sec_usbphy.h >>> >>> diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt >>> b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt new file mode >>> 100644 >>> index 000..fefd9c8 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt >>> @@ -0,0 +1,9 @@ >>> +* Samsung's usb phy transceiver >>> + >>> +The Samsung's phy transceiver is used for controlling usb otg phy for >>> +s3c-hsotg usb device controller. >>> + >>> +Required properties: >>> +- compatible : should be "samsung,exynos4210-usbphy" >>> +- reg : base physical address of the phy registers and length of memory >>> mapped + region. >>> diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig >>> index e7cf84f..abbebe2 100644 >>> --- a/drivers/usb/phy/Kconfig >>> +++ b/drivers/usb/phy/Kconfig >>> @@ -15,3 +15,11 @@ config USB_ISP1301 >>> >>> To compile this driver as a module, choose M here: the >>> module will be called isp1301. >>> + >>> +config SEC_USBPHY >>> + bool "Samsung USB PHY controller Driver" >>> + depends on USB_S3C_HSOTG >>> + select USB_OTG_UTILS >>> + help >>> + Enable this to support Samsung USB phy controller for samsung >>> + SoCs. >>> diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile >>> index eca095b..6bb66f0 100644 >>> --- a/drivers/usb/phy/Makefile >>> +++ b/drivers/usb/phy/Makefile >>> @@ -5,3 +5,4 @@ >>> ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG >>> >>> obj-$(CONFIG_USB_ISP1301)+= isp1301.o >>> +obj-$(CONFIG_SEC_USBPHY) += sec_usbphy.o >>> diff --git a/drivers/usb/phy/sec_usbphy.c b/drivers/usb/phy/sec_usbphy.c >>> new file mode 100644 >>> index 000..33119eb >>> --- /dev/null >>> +++ b/drivers/usb/phy/sec_usbphy.c >>> @@ -0,0 +1,354 @@ >>> +/* linux/drivers/usb/phy/sec_usbphy.c >>> + * >>> + * Copyright (c) 2012 Samsung Electronics Co., Ltd. >>> + * http://www.samsung.com >>> + * >>> + * Author: Praveen Paneri >>> + * >>> + * Samsung USB2.0 High-speed OTG transceiver, talks to S3C HS OTG >>> controller + * >>> + * 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. >>> + * >>> + * This program is distributed in the hope that it will be useful, >>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >>> + * GNU General Public License for more details. >>> + * >>> + * You should have received a copy of the GNU General Public License >>> + * along with this program; if not, write to the Free Software >>> + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >>> +*/ >>> + >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> + >>> +#include "sec_usbphy.h" >>> + >>> +enum sec_cpu_type { >>> + TYPE_S3C64XX, >>> + TYPE_EXYNOS4210, >>> +}; >>> + >>> +/* >>> + * struct sec_usbphy - transceiver driver state >>> + * @phy: transceiver structure >>> + * @plat: platform data >>> + * @dev: The parent device supplied to the probe function >>> + * @clk: usb phy clock >>> + *
Re: [PATCH 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg
Hi Heiko, On Mon, Aug 6, 2012 at 3:24 AM, Heiko Stübner wrote: > Hi Praveen, > > Am Mittwoch, 1. August 2012, 15:05:47 schrieb Praveen Paneri: >> This driver uses usb_phy interface to interact with s3c-hsotg. Supports >> phy_init and phy_shutdown functions to enable/disable phy. Tested with >> smdk6410 and smdkv310. More SoCs can be brought under later. > > Looks cool. Thanks > > From what I've seen the phy controllers on newer Samsung SoCs are still > somewhat similar to the one on my s3c2416/2450 machines. So hopefully at some > point after the driver has settled, I'll find the time to add support for > these to the phy driver. Yes! that's great. > > Out of curiosity, what does the "sec" in sec_usbphy for? Its Samsung Electronics Co. :) Praveen > > > >> Signed-off-by: Praveen Paneri > > Acked-by: Heiko Stuebner > > > Heiko > > >> --- >> .../devicetree/bindings/usb/samsung-usbphy.txt |9 + >> drivers/usb/phy/Kconfig|8 + >> drivers/usb/phy/Makefile |1 + >> drivers/usb/phy/sec_usbphy.c | 354 >> drivers/usb/phy/sec_usbphy.h | >> 48 +++ >> include/linux/platform_data/s3c-hsotg.h|5 + >> 6 files changed, 425 insertions(+), 0 deletions(-) >> create mode 100644 >> Documentation/devicetree/bindings/usb/samsung-usbphy.txt create mode >> 100644 drivers/usb/phy/sec_usbphy.c >> create mode 100644 drivers/usb/phy/sec_usbphy.h >> >> diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt >> b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt new file mode >> 100644 >> index 000..fefd9c8 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt >> @@ -0,0 +1,9 @@ >> +* Samsung's usb phy transceiver >> + >> +The Samsung's phy transceiver is used for controlling usb otg phy for >> +s3c-hsotg usb device controller. >> + >> +Required properties: >> +- compatible : should be "samsung,exynos4210-usbphy" >> +- reg : base physical address of the phy registers and length of memory >> mapped + region. >> diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig >> index e7cf84f..abbebe2 100644 >> --- a/drivers/usb/phy/Kconfig >> +++ b/drivers/usb/phy/Kconfig >> @@ -15,3 +15,11 @@ config USB_ISP1301 >> >> To compile this driver as a module, choose M here: the >> module will be called isp1301. >> + >> +config SEC_USBPHY >> + bool "Samsung USB PHY controller Driver" >> + depends on USB_S3C_HSOTG >> + select USB_OTG_UTILS >> + help >> + Enable this to support Samsung USB phy controller for samsung >> + SoCs. >> diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile >> index eca095b..6bb66f0 100644 >> --- a/drivers/usb/phy/Makefile >> +++ b/drivers/usb/phy/Makefile >> @@ -5,3 +5,4 @@ >> ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG >> >> obj-$(CONFIG_USB_ISP1301)+= isp1301.o >> +obj-$(CONFIG_SEC_USBPHY) += sec_usbphy.o >> diff --git a/drivers/usb/phy/sec_usbphy.c b/drivers/usb/phy/sec_usbphy.c >> new file mode 100644 >> index 000..33119eb >> --- /dev/null >> +++ b/drivers/usb/phy/sec_usbphy.c >> @@ -0,0 +1,354 @@ >> +/* linux/drivers/usb/phy/sec_usbphy.c >> + * >> + * Copyright (c) 2012 Samsung Electronics Co., Ltd. >> + * http://www.samsung.com >> + * >> + * Author: Praveen Paneri >> + * >> + * Samsung USB2.0 High-speed OTG transceiver, talks to S3C HS OTG >> controller + * >> + * 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. >> + * >> + * This program is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + * >> + * You should have received a copy of the GNU General Public License >> + * along with this program; if not, write to the Free Software >> + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >> +*/ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include "sec_usbphy.h" >> + >> +enum sec_cpu_type { >> + TYPE_S3C64XX, >> + TYPE_EXYNOS4210, >> +}; >> + >> +/* >> + * struct sec_usbphy - transceiver driver state >> + * @phy: transceiver structure >> + * @plat: platform data >> + * @dev: The parent device supplied to the probe function >> + * @clk: usb phy clock >> + * @regs: usb phy register memory base >> + * @cpu_type: machine identifier >> + */ >> +struct sec_usbphy { >> + struct usb_phy phy; >> + struct s3c_usbphy_plat *plat; >> + struct device *dev; >> + struct clk *clk; >> + void __iomem*regs; >> + int cpu_type; >> +}