Re: [PATCH] ARM: EXYNOS5: Add bus clock and set parent clock for FIMD
Hi Jingoo han, On Wed, Sep 12, 2012 at 7:28 AM, Jingoo Han jg1@samsung.com wrote: On Tuesday, September 11, 2012 6:20 PM Leela Krishna Amudala wrote Hello Jingoo Han, On Tue, Sep 11, 2012 at 5:52 AM, Jingoo Han jg1@samsung.com wrote: On Tuesday, September 11, 2012 5:11 AM Leela Krishna Amudala wrote This patch adds the bus clock for FIMD and changes the device name for lcd clock also sets mout_mpll_user as parent clock to fimd Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com --- arch/arm/mach-exynos/clock-exynos5.c | 34 +++ arch/arm/plat-samsung/include/plat/clock.h |2 + 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index 774533c..f1281cf 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c @@ -891,6 +891,13 @@ static struct clk exynos5_clk_mdma1 = { .ctrlbit= (1 4), }; +static struct clk exynos5_clk_fimd = { + .name = fimd, + .devname= exynos5-fb, Replace 'exynos5-fb' with 'exynos5-fb.1', as exynos4 fimd uses exynos4-fb.0 as devname. Exynos5 can use fimd0 or fimd1. Also, Exynos5250 uses fimd1. Currently s3c-fb driver using exynos5-fb as device name, hence used the same name in the clock. This code is tested with both drm-fimd and s3c-fb fimd and it is working fine showing the display on LCD. If I change the device name in clock file then I have to change it in s3c-fb driver also. So I feel it is better to keep the name as exynos5-fb in clock file instead of changing in the driver. No, there is no need to change the device name in s3c-fb driver. Please refer to the patch that I sent 3 months ago. http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg11002.html Now, Exynos5250 has only 1 FIMD IP; however, other Exynos5 SoCs have 2 FIMD IPs. These SoCs have two different clock paths for 2 FIMD IPs. Therefore, we need to consider it. Okay agreed, will change the devname to exynos5-fb.1 in clock file. Tested with adding DT changes to s3c-fb and with devname exynos5-fb.1 in clock file. works fine for both drm-fimd and s3c-fb fimd. will post the next version patch soon. Thanks, Leela Krishna Amudala. + .enable = exynos5_clk_ip_disp1_ctrl, + .ctrlbit= (1 0), +}; + -- 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 -- 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 -- 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 V2] ARM: EXYNOS5: Add bus clock and set parent clock for FIMD
This patch adds the bus clock for FIMD and changes the device name for lcd clock also sets mout_mpll_user as parent clock to fimd Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com --- arch/arm/mach-exynos/clock-exynos5.c | 34 +++ arch/arm/plat-samsung/include/plat/clock.h |2 + 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index 774533c..205d19f 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c @@ -891,6 +891,13 @@ static struct clk exynos5_clk_mdma1 = { .ctrlbit= (1 4), }; +static struct clk exynos5_clk_fimd1 = { + .name = fimd, + .devname= exynos5-fb.1, + .enable = exynos5_clk_ip_disp1_ctrl, + .ctrlbit= (1 0), +}; + struct clk *exynos5_clkset_group_list[] = { [0] = clk_ext_xtal_mux, [1] = NULL, @@ -1120,6 +1127,18 @@ static struct clksrc_clk exynos5_clk_sclk_spi2 = { .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 }, }; +struct clksrc_clk exynos5_clk_sclk_fimd = { + .clk= { + .name = sclk_fimd, + .devname= exynos5-fb.1, + .enable = exynos5_clksrc_mask_disp1_0_ctrl, + .ctrlbit= (1 0), + }, + .sources = exynos5_clkset_group, + .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 }, + .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 }, +}; + static struct clksrc_clk exynos5_clksrcs[] = { { .clk= { @@ -1131,16 +1150,6 @@ static struct clksrc_clk exynos5_clksrcs[] = { .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS3, .shift = 8, .size = 8 }, }, { .clk= { - .name = sclk_fimd, - .devname= s3cfb.1, - .enable = exynos5_clksrc_mask_disp1_0_ctrl, - .ctrlbit= (1 0), - }, - .sources = exynos5_clkset_group, - .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 }, - .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 }, - }, { - .clk= { .name = aclk_266_gscl, }, .sources = clk_src_gscl_266, @@ -1240,12 +1249,14 @@ static struct clksrc_clk *exynos5_sysclks[] = { exynos5_clk_mdout_spi0, exynos5_clk_mdout_spi1, exynos5_clk_mdout_spi2, + exynos5_clk_sclk_fimd, }; static struct clk *exynos5_clk_cdev[] = { exynos5_clk_pdma0, exynos5_clk_pdma1, exynos5_clk_mdma1, + exynos5_clk_fimd1, }; static struct clksrc_clk *exynos5_clksrc_cdev[] = { @@ -1274,6 +1285,7 @@ static struct clk_lookup exynos5_clk_lookup[] = { CLKDEV_INIT(dma-pl330.0, apb_pclk, exynos5_clk_pdma0), CLKDEV_INIT(dma-pl330.1, apb_pclk, exynos5_clk_pdma1), CLKDEV_INIT(dma-pl330.2, apb_pclk, exynos5_clk_mdma1), + CLKDEV_INIT(exynos5-fb.1, lcd, exynos5_clk_fimd1), }; static unsigned long exynos5_epll_get_rate(struct clk *clk) @@ -1492,6 +1504,8 @@ void __init_or_cpufreq exynos5_setup_clocks(void) clk_set_rate(exynos5_clk_aclk_acp.clk, 26700); clk_set_rate(exynos5_clk_pclk_acp.clk, 13400); + clk_set_parent(exynos5_clk_sclk_fimd.clk, + exynos5_clk_mout_mpll_user.clk); for (ptr = 0; ptr ARRAY_SIZE(exynos5_clksrcs); ptr++) s3c_set_clksrc(exynos5_clksrcs[ptr], true); diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h index a62753d..3d27783 100644 --- a/arch/arm/plat-samsung/include/plat/clock.h +++ b/arch/arm/plat-samsung/include/plat/clock.h @@ -83,6 +83,8 @@ extern struct clk clk_ext; extern struct clksrc_clk clk_epllref; extern struct clksrc_clk clk_esysclk; +extern struct clksrc_clk exynos5_clk_sclk_fimd; + /* S3C64XX specific clocks */ extern struct clk clk_h2; extern struct clk clk_27m; -- 1.7.0.4 -- 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 v2] Add MFC device tree support
This patch adds the device tree entries for MFC on Exynos5. It incorporates the comment from Karol Lewandowski [1] to parse the dt file during machine init. This is rebased to the linux-samsung for-next branch. [1] http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/12430 Changelog v2 - Use fdt functions to parse dtsi file for mfc memory info Changelog v1 - Moved board specific DT information to different dtsi file - Changed compatible name for the device - Addressed other review comments Arun Kumar K (1): ARM: EXYNOS: Add MFC device tree support .../devicetree/bindings/media/s5p-mfc.txt | 27 + arch/arm/boot/dts/exynos5250-smdk5250.dts |7 +++ arch/arm/boot/dts/exynos5250.dtsi |6 ++ arch/arm/mach-exynos/Kconfig |1 + arch/arm/mach-exynos/clock-exynos5.c |2 +- arch/arm/mach-exynos/mach-exynos5-dt.c | 56 6 files changed, 98 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/s5p-mfc.txt -- 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 v2] ARM: EXYNOS: Add MFC device tree support
This patch adds device tree entry for MFC v6 in the Exynos5 SoC. Makes the required changes in the clock files and adds MFC to the DT device list. Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com Signed-off-by: Arun Kumar K arun...@samsung.com --- .../devicetree/bindings/media/s5p-mfc.txt | 27 + arch/arm/boot/dts/exynos5250-smdk5250.dts |7 +++ arch/arm/boot/dts/exynos5250.dtsi |6 ++ arch/arm/mach-exynos/Kconfig |1 + arch/arm/mach-exynos/clock-exynos5.c |2 +- arch/arm/mach-exynos/mach-exynos5-dt.c | 56 6 files changed, 98 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/s5p-mfc.txt diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt new file mode 100644 index 000..9a74d09 --- /dev/null +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt @@ -0,0 +1,27 @@ +* Samsung Multi Format Codec (MFC) + +Mult Format Codec (MFC) is the IP present in Samsung SoCs which +supports high resolution decoding and encoding functionalities. +The MFC device driver is a v4l2 driver which can encode/decode +video raw/elementary streams and has support for all popular +video codecs. + +Required properties: + - compatible : value should be either one among the following + (a) samsung,mfc-v5 for MFC v5 present in Exynos4 SoCs + (b) samsung,mfc-v6 for MFC v6 present in Exynos5 SoCs + + - reg : Physical base address of the IP registers and length of memory + mapped region. + + - interrupts : MFC interupt number to the CPU. + + - samsung,mfc-r : Base address of the first memory bank used by MFC + for DMA contiguous memory allocation. + + - samsung,mfc-r-size : Size of the first memory bank. + + - samsung,mfc-l : Base address of the second memory bank used by MFC + for DMA contiguous memory allocation. + + - samsung,mfc-l-size : Size of the second memory bank. diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 8a5e348..5824c97 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -109,4 +109,11 @@ spi_2: spi@12d4 { status = disabled; }; + + mfc { + samsung,mfc-r = 0x4300; + samsung,mfc-r-size = 8388608; + samsung,mfc-l = 0x5100; + samsung,mfc-l-size = 8388608; + }; }; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index b55794b..5df2f99 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -62,6 +62,12 @@ interrupts = 0 42 0; }; + mfc { + compatible = samsung,mfc-v6; + reg = 0x1100 0x1; + interrupts = 0 96 0; + }; + rtc { compatible = samsung,s3c6410-rtc; reg = 0x101E 0x100; diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 195b50e..8ddc26a 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -64,6 +64,7 @@ config SOC_EXYNOS5250 select SAMSUNG_DMADEV select S5P_PM if PM select S5P_SLEEP if PM + select S5P_DEV_MFC help Enable EXYNOS5250 SoC support diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index eb3f4fc..461a721 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c @@ -669,7 +669,7 @@ static struct clk exynos5_init_clocks_off[] = { .ctrlbit= (1 25), }, { .name = mfc, - .devname= s5p-mfc, + .devname= s5p-mfc-v6, .enable = exynos5_clk_ip_mfc_ctrl, .ctrlbit= (1 0), }, { diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index e707eb1..0f131da 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -11,6 +11,8 @@ #include linux/of_platform.h #include linux/serial_core.h +#include linux/memblock.h +#include linux/of_fdt.h #include asm/mach/arch.h #include asm/hardware/gic.h @@ -18,6 +20,7 @@ #include plat/cpu.h #include plat/regs-serial.h +#include plat/mfc.h #include common.h @@ -64,6 +67,7 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { exynos-gsc.2, NULL), OF_DEV_AUXDATA(samsung,exynos5-gsc, EXYNOS5_PA_GSC3, exynos-gsc.3, NULL), + OF_DEV_AUXDATA(samsung,mfc-v6, 0x1100, s5p-mfc-v6, NULL), {}, }; @@ -84,6 +88,57 @@ static
[PATCH v5 0/5] usb: phy: samsung: Introducing usb phy driver for samsung SoCs
Changes from v4: Moved header file contents to driver's source file Removed unnecessary print message from driver's probe function Dropped the Free Software Foundation address from the header Changed the platform data code to use __initdata Changes from v3: Replaced susbsys_initcall()/module_exit() by module_platform_driver(). Accordingly in the hsotg driver returned -EPROBE_DEFER until phy driver is registered Removed unnecessary devm_usb_put_phy() call from the hsotg driver remove. Changes from v2: Changed the driver filenames to samsung-usbphy Changed 's3c' to 'samsung' for platform device as well as platform data Moved platform data structure to a separate file Rectified coding style related errors Changes from v1: Rebased patches to latest usb-next branch Changed the name 'sec_usbphy' to 'samsung_usbphy' This patch set introduces a phy driver for samsung SoCs. It uses the existing transceiver infrastructure to provide phy control functions. Use of this driver can be extended for usb host phy as well. Over the period of time all the phy related code for most of the samsung SoCs can be integrated here. Removing the existing phy code from mach-s3c64xx. Same can be done for other SoCs when they start supporting this phy driver. This driver is tested with smdk6410 and Exynos4210(with DT). Praveen Paneri (5): usb: phy: samsung: Introducing usb phy driver for hsotg usb: s3c-hsotg: Adding phy driver support ARM: S3C64XX: Removing old phy setup code ARM: S3C64XX: Enabling samsung-usbphy driver ARM: Exynos4210: Enabling samsung-usbphy driver .../devicetree/bindings/usb/samsung-usbphy.txt |9 + arch/arm/boot/dts/exynos4210.dtsi |5 + arch/arm/mach-exynos/include/mach/map.h|1 + arch/arm/mach-exynos/mach-exynos4-dt.c |8 + arch/arm/mach-exynos/setup-usb-phy.c | 13 + arch/arm/mach-s3c64xx/include/mach/map.h |2 + arch/arm/mach-s3c64xx/mach-crag6410.c | 10 +- arch/arm/mach-s3c64xx/mach-smartq.c| 11 +- arch/arm/mach-s3c64xx/mach-smdk6410.c | 10 +- arch/arm/mach-s3c64xx/setup-usb-phy.c | 79 + arch/arm/plat-samsung/devs.c | 28 ++ arch/arm/plat-samsung/include/plat/devs.h |1 + arch/arm/plat-samsung/include/plat/usb-phy.h |1 + drivers/usb/gadget/s3c-hsotg.c | 37 ++- drivers/usb/phy/Kconfig|8 + drivers/usb/phy/Makefile |1 + drivers/usb/phy/samsung-usbphy.c | 371 include/linux/platform_data/samsung-usbphy.h | 27 ++ 18 files changed, 531 insertions(+), 91 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/samsung-usbphy.txt create mode 100644 drivers/usb/phy/samsung-usbphy.c create mode 100644 include/linux/platform_data/samsung-usbphy.h -- 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 v5 2/5] usb: s3c-hsotg: Adding phy driver support
Adding the transceiver to hsotg driver. Keeping the platform data for continuing the smooth operation for boards which still uses it Signed-off-by: Praveen Paneri p.pan...@samsung.com --- drivers/usb/gadget/s3c-hsotg.c | 37 +++-- 1 files changed, 27 insertions(+), 10 deletions(-) diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 6f696ee..29815b9 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -32,6 +32,7 @@ #include linux/usb/ch9.h #include linux/usb/gadget.h +#include linux/usb/otg.h #include linux/platform_data/s3c-hsotg.h #include mach/map.h @@ -133,7 +134,9 @@ struct s3c_hsotg_ep { * struct s3c_hsotg - driver state. * @dev: The parent device supplied to the probe function * @driver: USB gadget driver - * @plat: The platform specific configuration data. + * @phy: The otg phy transceiver structure for phy control. + * @plat: The platform specific configuration data. This can be removed once + * all SoCs support usb transceiver. * @regs: The memory area mapped for accessing registers. * @irq: The IRQ number we are using * @supplies: Definition of USB power supplies @@ -153,6 +156,7 @@ struct s3c_hsotg_ep { struct s3c_hsotg { struct device*dev; struct usb_gadget_driver *driver; + struct usb_phy *phy; struct s3c_hsotg_plat*plat; spinlock_t lock; @@ -2854,7 +2858,10 @@ static void s3c_hsotg_phy_enable(struct s3c_hsotg *hsotg) struct platform_device *pdev = to_platform_device(hsotg-dev); dev_dbg(hsotg-dev, pdev 0x%p\n, pdev); - if (hsotg-plat-phy_init) + + if (hsotg-phy) + usb_phy_init(hsotg-phy); + else if (hsotg-plat-phy_init) hsotg-plat-phy_init(pdev, hsotg-plat-phy_type); } @@ -2869,7 +2876,9 @@ static void s3c_hsotg_phy_disable(struct s3c_hsotg *hsotg) { struct platform_device *pdev = to_platform_device(hsotg-dev); - if (hsotg-plat-phy_exit) + if (hsotg-phy) + usb_phy_shutdown(hsotg-phy); + else if (hsotg-plat-phy_exit) hsotg-plat-phy_exit(pdev, hsotg-plat-phy_type); } @@ -3493,6 +3502,7 @@ static void s3c_hsotg_release(struct device *dev) static int __devinit s3c_hsotg_probe(struct platform_device *pdev) { struct s3c_hsotg_plat *plat = pdev-dev.platform_data; + struct usb_phy *phy; struct device *dev = pdev-dev; struct s3c_hsotg_ep *eps; struct s3c_hsotg *hsotg; @@ -3501,20 +3511,27 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev) int ret; int i; - plat = pdev-dev.platform_data; - if (!plat) { - dev_err(pdev-dev, no platform data defined\n); - return -EINVAL; - } - hsotg = devm_kzalloc(pdev-dev, sizeof(struct s3c_hsotg), GFP_KERNEL); if (!hsotg) { dev_err(dev, cannot get memory\n); return -ENOMEM; } + plat = pdev-dev.platform_data; + if (!plat) { + /* Fallback for transceiver */ + phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); + if (IS_ERR_OR_NULL(phy)) { + dev_err(pdev-dev, no platform data or transceiver defined\n); + return -EPROBE_DEFER; + } else { + hsotg-phy = phy; + } + } else { + hsotg-plat = plat; + } + hsotg-dev = dev; - hsotg-plat = plat; hsotg-clk = devm_clk_get(pdev-dev, otg); if (IS_ERR(hsotg-clk)) { -- 1.7.1 -- 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 v5 3/5] ARM: S3C64XX: Removing old phy setup code
This patch removes old phy code from platform side. 'setup-usb-phy.c' will be used for providing transceiver platform data in next patch. Not all of the platform data code is removed as there are others making use of platform_data defined for hsotg. That can be removed once all the SoCs start using the new transceiver for usb phy setup. Signed-off-by: Praveen Paneri p.pan...@samsung.com --- arch/arm/mach-s3c64xx/mach-crag6410.c |3 - arch/arm/mach-s3c64xx/mach-smartq.c |3 - arch/arm/mach-s3c64xx/mach-smdk6410.c |3 - arch/arm/mach-s3c64xx/setup-usb-phy.c | 79 - 4 files changed, 0 insertions(+), 88 deletions(-) diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 09cd812..b0f5baf 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -31,7 +31,6 @@ #include linux/spi/spi.h #include linux/i2c/pca953x.h -#include linux/platform_data/s3c-hsotg.h #include video/platform_lcd.h @@ -766,7 +765,6 @@ 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) { @@ -792,7 +790,6 @@ 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)); diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c index ceeb1de..7400da1 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq.c +++ b/arch/arm/mach-s3c64xx/mach-smartq.c @@ -18,7 +18,6 @@ #include linux/serial_core.h #include linux/spi/spi_gpio.h #include linux/usb/gpio_vbus.h -#include linux/platform_data/s3c-hsotg.h #include asm/mach-types.h #include asm/mach/map.h @@ -187,7 +186,6 @@ 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) { @@ -385,7 +383,6 @@ 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); diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 0fe4f15..cbdc91b 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c @@ -30,7 +30,6 @@ #include linux/regulator/fixed.h #include linux/regulator/machine.h #include linux/pwm_backlight.h -#include linux/platform_data/s3c-hsotg.h #ifdef CONFIG_SMDK6410_WM1190_EV1 #include linux/mfd/wm8350/core.h @@ -627,7 +626,6 @@ 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) { @@ -657,7 +655,6 @@ 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); diff --git a/arch/arm/mach-s3c64xx/setup-usb-phy.c b/arch/arm/mach-s3c64xx/setup-usb-phy.c index f6757e0..7a09553 100644 --- a/arch/arm/mach-s3c64xx/setup-usb-phy.c +++ b/arch/arm/mach-s3c64xx/setup-usb-phy.c @@ -9,82 +9,3 @@ * */ -#include linux/clk.h -#include linux/delay.h -#include linux/err.h -#include linux/io.h -#include linux/platform_device.h -#include mach/map.h -#include mach/regs-sys.h -#include plat/cpu.h -#include plat/regs-usb-hsotg-phy.h -#include plat/usb-phy.h - -static int s3c_usb_otgphy_init(struct platform_device *pdev) -{ - struct clk *xusbxti; - u32 phyclk; - - writel(readl(S3C64XX_OTHERS) | S3C64XX_OTHERS_USBMASK, S3C64XX_OTHERS); - - /* set clock frequency for PLL */ - phyclk = readl(S3C_PHYCLK) ~S3C_PHYCLK_CLKSEL_MASK; - - xusbxti = clk_get(pdev-dev, xusbxti); - if (xusbxti !IS_ERR(xusbxti)) { - switch (clk_get_rate(xusbxti)) { - case 12 * MHZ: - phyclk |= S3C_PHYCLK_CLKSEL_12M; - break; - case 24 * MHZ: - phyclk |= S3C_PHYCLK_CLKSEL_24M; - break; - default: - case 48 * MHZ: - /* default reference clock */ - break; - } - clk_put(xusbxti); - } - - /* TODO:
[PATCH v5 4/5] ARM: S3C64XX: Enabling samsung-usbphy driver
Adding platform device for samsung-usbphy driver. Enabling it for s3c64xx based machines using s3c-hsotg. Signed-off-by: Praveen Paneri p.pan...@samsung.com --- arch/arm/mach-s3c64xx/include/mach/map.h |2 + arch/arm/mach-s3c64xx/mach-crag6410.c|7 ++ arch/arm/mach-s3c64xx/mach-smartq.c |8 +++ arch/arm/mach-s3c64xx/mach-smdk6410.c|7 ++ arch/arm/mach-s3c64xx/setup-usb-phy.c| 14 + arch/arm/plat-samsung/devs.c | 28 ++ arch/arm/plat-samsung/include/plat/devs.h|1 + arch/arm/plat-samsung/include/plat/usb-phy.h |1 + 8 files changed, 68 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-s3c64xx/include/mach/map.h b/arch/arm/mach-s3c64xx/include/mach/map.h index 8e2097b..dc482bb 100644 --- a/arch/arm/mach-s3c64xx/include/mach/map.h +++ b/arch/arm/mach-s3c64xx/include/mach/map.h @@ -65,6 +65,7 @@ #define S3C64XX_PA_NAND(0x7020) #define S3C64XX_PA_FB (0x7710) +#define S3C64XX_PA_USB_HSPHY (0x7C10) #define S3C64XX_PA_USB_HSOTG (0x7C00) #define S3C64XX_PA_WATCHDOG(0x7E004000) #define S3C64XX_PA_RTC (0x7E005000) @@ -113,6 +114,7 @@ #define S3C_PA_FB S3C64XX_PA_FB #define S3C_PA_USBHOST S3C64XX_PA_USBHOST #define S3C_PA_USB_HSOTG S3C64XX_PA_USB_HSOTG +#define S3C_PA_USB_PHY S3C64XX_PA_USB_HSPHY #define S3C_PA_RTC S3C64XX_PA_RTC #define S3C_PA_WDT S3C64XX_PA_WATCHDOG #define S3C_PA_SPI0S3C64XX_PA_SPI0 diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index b0f5baf..adc2e15 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -31,6 +31,7 @@ #include linux/spi/spi.h #include linux/i2c/pca953x.h +#include linux/platform_data/samsung-usbphy.h #include video/platform_lcd.h @@ -69,6 +70,7 @@ #include plat/adc.h #include plat/iic.h #include plat/pm.h +#include plat/usb-phy.h #include common.h @@ -336,6 +338,7 @@ static struct platform_device wallvdd_device = { }; static struct platform_device *crag6410_devices[] __initdata = { + samsung_device_usbphy, s3c_device_hsmmc0, s3c_device_hsmmc2, s3c_device_i2c0, @@ -765,6 +768,9 @@ static const struct gpio_led_platform_data gpio_leds_pdata = { .num_leds = ARRAY_SIZE(gpio_leds), }; +static struct samsung_usbphy_data crag6410_usbphy_pdata __initdata = { + .pmu_isolation = s5p_usb_phy_pmu_isolation, +}; static void __init crag6410_machine_init(void) { @@ -790,6 +796,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); + samsung_usbphy_set_pdata(crag6410_usbphy_pdata); i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c index 7400da1..90dc821 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq.c +++ b/arch/arm/mach-s3c64xx/mach-smartq.c @@ -18,6 +18,7 @@ #include linux/serial_core.h #include linux/spi/spi_gpio.h #include linux/usb/gpio_vbus.h +#include linux/platform_data/samsung-usbphy.h #include asm/mach-types.h #include asm/mach/map.h @@ -36,6 +37,7 @@ #include plat/usb-control.h #include plat/sdhci.h #include plat/ts.h +#include plat/usb-phy.h #include video/platform_lcd.h @@ -234,6 +236,7 @@ static struct i2c_board_info smartq_i2c_devs[] __initdata = { }; static struct platform_device *smartq_devices[] __initdata = { + samsung_device_usbphy, s3c_device_hsmmc1, /* Init iNAND first, ... */ s3c_device_hsmmc0, /* ... then the external SD card */ s3c_device_hsmmc2, @@ -380,9 +383,14 @@ void __init smartq_map_io(void) smartq_lcd_mode_set(); } +static struct samsung_usbphy_data smartq_usbphy_pdata __initdata = { + .pmu_isolation = s5p_usb_phy_pmu_isolation, +}; + void __init smartq_machine_init(void) { s3c_i2c0_set_platdata(NULL); + samsung_usbphy_set_pdata(smartq_usbphy_pdata); s3c_hwmon_set_platdata(smartq_hwmon_pdata); s3c_sdhci1_set_platdata(smartq_internal_hsmmc_pdata); s3c_sdhci2_set_platdata(smartq_internal_hsmmc_pdata); diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index cbdc91b..4cf1252 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c @@ -30,6 +30,7 @@ #include linux/regulator/fixed.h #include linux/regulator/machine.h #include linux/pwm_backlight.h +#include linux/platform_data/samsung-usbphy.h #ifdef CONFIG_SMDK6410_WM1190_EV1 #include linux/mfd/wm8350/core.h @@ -72,6 +73,7 @@ #include plat/keypad.h #include
[PATCH v5 5/5] ARM: Exynos4210: Enabling samsung-usbphy driver
Adding usbphy node for Exynos4210 along with the platform data. Signed-off-by: Praveen Paneri p.pan...@samsung.com --- arch/arm/boot/dts/exynos4210.dtsi |5 + arch/arm/mach-exynos/include/mach/map.h |1 + arch/arm/mach-exynos/mach-exynos4-dt.c |8 arch/arm/mach-exynos/setup-usb-phy.c| 13 + 4 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 02891fe..e28cf10 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi @@ -62,6 +62,11 @@ interrupts = 0 44 0, 0 45 0; }; + usbphy@125B { + compatible = samsung,exynos4210-usbphy; + reg = 0x125B 0x100; + }; + keypad@100A { compatible = samsung,s5pv210-keypad; reg = 0x100A 0x100; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index c72b675..0625c0a 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -234,6 +234,7 @@ #define S3C_PA_SPI1EXYNOS4_PA_SPI1 #define S3C_PA_SPI2EXYNOS4_PA_SPI2 #define S3C_PA_USB_HSOTG EXYNOS4_PA_HSOTG +#define S3C_PA_USB_PHY EXYNOS4_PA_HSPHY #define S5P_PA_EHCIEXYNOS4_PA_EHCI #define S5P_PA_FIMC0 EXYNOS4_PA_FIMC0 diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index b2b5d5f..0739be8 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c @@ -13,6 +13,7 @@ #include linux/of_platform.h #include linux/serial_core.h +#include linux/platform_data/samsung-usbphy.h #include asm/mach/arch.h #include asm/hardware/gic.h @@ -20,9 +21,14 @@ #include plat/cpu.h #include plat/regs-serial.h +#include plat/usb-phy.h #include common.h +static struct samsung_usbphy_data exynos4_usbphy_pdata = { + .pmu_isolation = s5p_usb_phy_pmu_isolation, +}; + /* * The following lookup table is used to override device names when devices * are registered from device tree. This is temporarily added to enable @@ -63,6 +69,8 @@ static const struct of_dev_auxdata exynos4210_auxdata_lookup[] __initconst = { exynos4210-spi.2, NULL), OF_DEV_AUXDATA(arm,pl330, EXYNOS4_PA_PDMA0, dma-pl330.0, NULL), OF_DEV_AUXDATA(arm,pl330, EXYNOS4_PA_PDMA1, dma-pl330.1, NULL), + OF_DEV_AUXDATA(samsung,exynos4210-usbphy, EXYNOS4_PA_HSPHY, + s3c-usbphy, exynos4_usbphy_pdata), {}, }; diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c index b81cc56..1c62d20 100644 --- a/arch/arm/mach-exynos/setup-usb-phy.c +++ b/arch/arm/mach-exynos/setup-usb-phy.c @@ -221,3 +221,16 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) return -EINVAL; } + +void s5p_usb_phy_pmu_isolation(int on) +{ + if (on) { + writel(readl(S5P_USBDEVICE_PHY_CONTROL) +~S5P_USBDEVICE_PHY_ENABLE, + S5P_USBDEVICE_PHY_CONTROL); + } else { + writel(readl(S5P_USBDEVICE_PHY_CONTROL) + | S5P_USBDEVICE_PHY_ENABLE, + S5P_USBDEVICE_PHY_CONTROL); + } +} -- 1.7.1 -- 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 v5 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg
On 09/12/2012 12:45 PM, Praveen Paneri wrote: 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. Signed-off-by: Praveen Paneri p.pan...@samsung.com Acked-by: Heiko Stuebner he...@sntech.de --- .../devicetree/bindings/usb/samsung-usbphy.txt |9 + drivers/usb/phy/Kconfig|8 + drivers/usb/phy/Makefile |1 + drivers/usb/phy/samsung-usbphy.c | 371 include/linux/platform_data/samsung-usbphy.h | 27 ++ 5 files changed, 416 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/samsung-usbphy.txt create mode 100644 drivers/usb/phy/samsung-usbphy.c create mode 100644 include/linux/platform_data/samsung-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 63c339b..313685f 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig @@ -32,3 +32,11 @@ config MV_U3D_PHY help Enable this to support Marvell USB 3.0 phy controller for Marvell SoC. + +config SAMSUNG_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 b069f29..55dcfc1 100644 --- a/drivers/usb/phy/Makefile +++ b/drivers/usb/phy/Makefile @@ -8,3 +8,4 @@ obj-$(CONFIG_OMAP_USB2) += omap-usb2.o obj-$(CONFIG_USB_ISP1301)+= isp1301.o obj-$(CONFIG_MV_U3D_PHY) += mv_u3d_phy.o obj-$(CONFIG_USB_EHCI_TEGRA) += tegra_usb_phy.o +obj-$(CONFIG_SAMSUNG_USBPHY) += samsung-usbphy.o diff --git a/drivers/usb/phy/samsung-usbphy.c b/drivers/usb/phy/samsung-usbphy.c new file mode 100644 index 000..b00d01b --- /dev/null +++ b/drivers/usb/phy/samsung-usbphy.c @@ -0,0 +1,371 @@ +/* linux/drivers/usb/phy/samsung-usbphy.c + * + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Author: Praveen Paneri p.pan...@samsung.com + * + * 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. + */ + +#include linux/module.h +#include linux/platform_device.h +#include linux/clk.h +#include linux/delay.h +#include linux/err.h +#include linux/io.h +#include linux/of.h +#include linux/usb/otg.h +#include linux/platform_data/samsung-usbphy.h + +/* Register definitions */ + +#define S3C_PHYPWR (0x00) + +#define S3C_PHYPWR_NORMAL_MASK (0x19 0) +#define S3C_PHYPWR_OTG_DISABLE (1 4) +#define S3C_PHYPWR_ANALOG_POWERDOWN (1 3) +#define S3C_PHYPWR_FORCE_SUSPEND (1 1) +/* For Exynos4 */ +#define EXYNOS4_PHYPWR_NORMAL_MASK (0x39 0) +#define EXYNOS4_PHYPWR_SLEEP (1 5) + +#define S3C_PHYCLK (0x04) + +#define S3C_PHYCLK_MODE_SERIAL (1 6) +#define S3C_PHYCLK_EXT_OSC (1 5) +#define S3C_PHYCLK_COMMON_ON_N (1 4) +#define S3C_PHYCLK_ID_PULL (1 2) +#define S3C_PHYCLK_CLKSEL_MASK (0x3 0) +#define S3C_PHYCLK_CLKSEL_SHIFT (0) +#define S3C_PHYCLK_CLKSEL_48M(0x0 0) +#define S3C_PHYCLK_CLKSEL_12M(0x2 0) +#define S3C_PHYCLK_CLKSEL_24M(0x3 0) + +#define S3C_RSTCON (0x08) + +#define S3C_RSTCON_PHYCLK(1 2) +#define S3C_RSTCON_HCLK (1 1) +#define S3C_RSTCON_PHY
[PATCH 0/3] ARM: EXYNOS: Add generic PWM lookup support
This series adds support for generic PWM framework which requires that the board setup code register a static mapping that can be used to match PWM consumers to providers. This series is based on for-next branch of Kukjin's tree. Sachin Kamat (2): ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12 ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 Tushar Behera (1): ARM: EXYNOS: Use generic pwm driver in Origen board arch/arm/mach-exynos/Kconfig |3 +++ arch/arm/mach-exynos/mach-origen.c |6 ++ arch/arm/mach-exynos/mach-smdk4x12.c |6 ++ arch/arm/mach-exynos/mach-smdkv310.c |7 +++ 4 files changed, 22 insertions(+), 0 deletions(-) -- 1.7.4.1 -- 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 1/3] ARM: EXYNOS: Use generic pwm driver in Origen board
From: Tushar Behera tushar.beh...@linaro.org Signed-off-by: Tushar Behera tushar.beh...@linaro.org Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- arch/arm/mach-exynos/Kconfig |1 + arch/arm/mach-exynos/mach-origen.c |6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 195b50e..4b7d15d 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -348,6 +348,7 @@ config MACH_ORIGEN select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY + select S3C24XX_PWM help Machine support for ORIGEN based on Samsung EXYNOS4210 diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index 5ec563b..0a3c4ef 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c @@ -15,6 +15,7 @@ #include linux/platform_device.h #include linux/io.h #include linux/input.h +#include linux/pwm.h #include linux/pwm_backlight.h #include linux/gpio_keys.h #include linux/i2c.h @@ -614,6 +615,10 @@ static struct platform_device origen_lcd_hv070wsa = { .dev.platform_data = origen_lcd_hv070wsa_data, }; +static struct pwm_lookup origen_pwm_lookup[] = { + PWM_LOOKUP(s3c24xx-pwm.0, 0, pwm-backlight.0, NULL), +}; + #ifdef CONFIG_DRM_EXYNOS static struct exynos_drm_fimd_pdata drm_fimd_pdata = { .panel = { @@ -798,6 +803,7 @@ static void __init origen_machine_init(void) platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); + pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup)); samsung_bl_set(origen_bl_gpio_info, origen_bl_data); origen_bt_setup(); -- 1.7.4.1 -- 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 2/3] ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12
Generic PWM framework requires that the board setup code register a static mapping that can be used to match PWM consumers to providers. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- arch/arm/mach-exynos/Kconfig |1 + arch/arm/mach-exynos/mach-smdk4x12.c |6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 4b7d15d..798634d 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -384,6 +384,7 @@ config MACH_SMDK4212 select EXYNOS4_SETUP_KEYPAD select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY + select S3C24XX_PWM help Machine support for Samsung SMDK4212 diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index ee069b4..9c74e8f 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c @@ -17,6 +17,7 @@ #include linux/mfd/max8997.h #include linux/mmc/host.h #include linux/platform_device.h +#include linux/pwm.h #include linux/pwm_backlight.h #include linux/regulator/machine.h #include linux/serial_core.h @@ -222,6 +223,10 @@ static struct platform_pwm_backlight_data smdk4x12_bl_data = { .pwm_period_ns = 1000, }; +static struct pwm_lookup smdk4x12_pwm_lookup[] = { + PWM_LOOKUP(s3c24xx-pwm.1, 0, pwm-backlight.0, NULL), +}; + static uint32_t smdk4x12_keymap[] __initdata = { /* KEY(row, col, keycode) */ KEY(1, 3, KEY_1), KEY(1, 4, KEY_2), KEY(1, 5, KEY_3), @@ -349,6 +354,7 @@ static void __init smdk4x12_machine_init(void) ARRAY_SIZE(smdk4x12_i2c_devs7)); samsung_bl_set(smdk4x12_bl_gpio_info, smdk4x12_bl_data); + pwm_add_table(smdk4x12_pwm_lookup, ARRAY_SIZE(smdk4x12_pwm_lookup)); samsung_keypad_set_platdata(smdk4x12_keypad_data); -- 1.7.4.1 -- 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 3/3] ARM: EXYNOS: Add generic PWM lookup support for SMDKV310
Generic PWM framework requires that the board setup code register a static mapping that can be used to match PWM consumers to providers. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- arch/arm/mach-exynos/Kconfig |1 + arch/arm/mach-exynos/mach-smdkv310.c |7 +++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 798634d..9abdd57 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -221,6 +221,7 @@ config MACH_SMDKV310 select EXYNOS4_SETUP_KEYPAD select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY + select S3C24XX_PWM help Machine support for Samsung SMDKV310 diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index 208aa62..e53e66d 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c @@ -18,6 +18,7 @@ #include linux/io.h #include linux/i2c.h #include linux/input.h +#include linux/pwm.h #include linux/pwm_backlight.h #include linux/platform_data/s3c-hsotg.h @@ -355,6 +356,10 @@ static struct platform_pwm_backlight_data smdkv310_bl_data = { .pwm_period_ns = 1000, }; +static struct pwm_lookup smdkv310_pwm_lookup[] = { + PWM_LOOKUP(s3c24xx-pwm.1, 0, pwm-backlight.0, NULL), +}; + /* I2C module and id for HDMIPHY */ static struct i2c_board_info hdmiphy_info = { I2C_BOARD_INFO(hdmiphy-exynos4210, 0x38), @@ -399,6 +404,8 @@ static void __init smdkv310_machine_init(void) samsung_keypad_set_platdata(smdkv310_keypad_data); samsung_bl_set(smdkv310_bl_gpio_info, smdkv310_bl_data); + pwm_add_table(smdkv310_pwm_lookup, ARRAY_SIZE(smdkv310_pwm_lookup)); + #ifdef CONFIG_DRM_EXYNOS s5p_device_fimd0.dev.platform_data = drm_fimd_pdata; exynos4_fimd0_gpio_setup_24bpp(); -- 1.7.4.1 -- 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 0/3] ARM: EXYNOS: Add generic PWM lookup support
On Wed, Sep 12, 2012 at 05:03:29PM +0530, Sachin Kamat wrote: This series adds support for generic PWM framework which requires that the board setup code register a static mapping that can be used to match PWM consumers to providers. This series is based on for-next branch of Kukjin's tree. Sachin Kamat (2): ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12 ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 Tushar Behera (1): ARM: EXYNOS: Use generic pwm driver in Origen board arch/arm/mach-exynos/Kconfig |3 +++ arch/arm/mach-exynos/mach-origen.c |6 ++ arch/arm/mach-exynos/mach-smdk4x12.c |6 ++ arch/arm/mach-exynos/mach-smdkv310.c |7 +++ 4 files changed, 22 insertions(+), 0 deletions(-) These look great. I'm glad somebody's starting to convert boards to use the lookup tables. Eventually when every board has been converted we can transition to the new API by getting rid of pwm_request() and pwm_free() in the user drivers and using only the counterparts from the new API. All three patches: Reviewed-by: thierry.red...@avionic-design.de pgpVPFCDl13En.pgp Description: PGP signature
Re: [PATCH v5 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg
Hi Praveen, Marc, On Wednesday 12 of September 2012 13:08:26 Marc Kleine-Budde wrote: +static const struct of_device_id samsung_usbphy_dt_match[]; + +static inline int samsung_usbphy_get_driver_data(struct platform_device *pdev) +{ +#ifdef CONFIG_OF if (IS_ENABLED(CONFIG_OF) pdev-dev.of_node) Is this check needed at all? In case of CONFIG_OF disabled, of_node should always be NULL and there is a dummy macro provided for of_match_node, so it should compile and work just fine. -- Best regards, Tomasz Figa -- 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 9/15] arch/arm/mach-s3c24xx/mach-h1940.c: removes unnecessary semicolon
From: Peter Senna Tschudin peter.se...@gmail.com removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- arch/arm/mach-s3c24xx/mach-h1940.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c index bb8d008..02ef7d5 100644 --- a/arch/arm/mach-s3c24xx/mach-h1940.c +++ b/arch/arm/mach-s3c24xx/mach-h1940.c @@ -460,7 +460,7 @@ static void h1940_set_mmc_power(unsigned char power_mode, unsigned short vdd) break; default: break; - }; + } } static struct s3c24xx_mci_pdata h1940_mmc_cfg __initdata = { -- 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
Exynos 4xxx Camera Image Filtering
Hello, I am looking for someone with knowledge of the camera image processing path on Exynos 4xxx chips. On the devices available to us (Exynos 4412 and 4212 in the Galaxy Note 10.1 and Galaxy S3) there appears to be noise reduction/filtering occurring in the camera image acquisition processing path. This is problematic for us as our embedded watermarks are being filtered out of preview frames along with the noise. In the past we found TI doing similar filtering on the omap4xxx chip, these chips exposed image post-processing parameters to disable the noise suppression filter. These parameters are defined in: hardware/ti/omap4xxx/camera/TICameraParameters.cpp I am looking for similar functionality on Exynos chips. I have looked through the kernel source for the galaxy tab (GT-N8013_ICS_Opensource) but cannot find evidence of post-processing parameters exposed in the camera driver. Can anyone answer the question - Can I disable noise filtering on Exynos? Regards, Zachary -- 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] arch/arm/mach-s3c24xx/mach-h1940.c: delete double assignment
From: Julia Lawall julia.law...@lip6.fr Delete successive assignments to the same location. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @@ expression i; @@ *i = ...; i = ...; // /smpl Signed-off-by: Julia Lawall julia.law...@lip6.fr --- Not compiled, and this may change the behavior of the code. Without this change, check_gpio2 could possibly be used uninitialized later. arch/arm/mach-s3c24xx/mach-h1940.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c index bb8d008..48c 100644 --- a/arch/arm/mach-s3c24xx/mach-h1940.c +++ b/arch/arm/mach-s3c24xx/mach-h1940.c @@ -380,7 +380,7 @@ int h1940_led_blink_set(unsigned gpio, int state, default: blink_gpio = S3C2410_GPA(3); check_gpio1 = S3C2410_GPA(1); - check_gpio1 = S3C2410_GPA(7); + check_gpio2 = S3C2410_GPA(7); break; } -- 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 v2] ARM: EXYNOS: Add MFC device tree support
Just a few small comments... On 09/12/2012 03:34 PM, Arun Kumar K wrote: This patch adds device tree entry for MFC v6 in the Exynos5 SoC. Makes the required changes in the clock files and adds MFC to the DT device list. Signed-off-by: Naveen Krishna Chatradhich.nav...@samsung.com Signed-off-by: Arun Kumar Karun...@samsung.com --- ... diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt new file mode 100644 index 000..9a74d09 --- /dev/null +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt @@ -0,0 +1,27 @@ +* Samsung Multi Format Codec (MFC) + +Mult Format Codec (MFC) is the IP present in Samsung SoCs which Mult - Multi +supports high resolution decoding and encoding functionalities. +The MFC device driver is a v4l2 driver which can encode/decode +video raw/elementary streams and has support for all popular +video codecs. + +Required properties: + - compatible : value should be either one among the following + (a) samsung,mfc-v5 for MFC v5 present in Exynos4 SoCs + (b) samsung,mfc-v6 for MFC v6 present in Exynos5 SoCs + + - reg : Physical base address of the IP registers and length of memory + mapped region. + + - interrupts : MFC interupt number to the CPU. interupt - interrupt + + - samsung,mfc-r : Base address of the first memory bank used by MFC + for DMA contiguous memory allocation. + + - samsung,mfc-r-size : Size of the first memory bank. + + - samsung,mfc-l : Base address of the second memory bank used by MFC + for DMA contiguous memory allocation. + ... +struct mfc_dt_meminfo { + unsigned long loff; + unsigned long lsize; + unsigned long roff; + unsigned long rsize; +}; + +int fdt_find_mfc_mem(unsigned long node, const char *uname, int depth, + void *data) +{ + __be32 *prop; + unsigned long len; + struct mfc_dt_meminfo *mfc_mem = (struct mfc_dt_meminfo *)data; No need for explicit cast from void *. + if (of_flat_dt_is_compatible(node, samsung,mfc-v6)) { Might be worth to change it to if (!of_flat_dt_is_compatible(node, samsung,mfc-v6)) return 0; and avoid indentation. + prop = of_get_flat_dt_prop(node, samsung,mfc-l,len); + if (!prop) + return 0; + mfc_mem-loff = of_read_ulong(prop, len/4); + + prop = of_get_flat_dt_prop(node, samsung,mfc-l-size,len); + if (!prop) + return 0; + mfc_mem-lsize = of_read_ulong(prop, len/4); + + prop = of_get_flat_dt_prop(node, samsung,mfc-r,len); + if (!prop) + return 0; + mfc_mem-roff = of_read_ulong(prop, len/4); + + prop = of_get_flat_dt_prop(node, samsung,mfc-r-size,len); + if (!prop) + return 0; + mfc_mem-rsize = of_read_ulong(prop, len/4); + + return 1; + } + return 0; +} -- 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 v2] ARM: EXYNOS: Add MFC device tree support
Hi Sylwester, Thank you for the comments. Will make the necessary changes. Regards Arun On Thu, Sep 13, 2012 at 1:54 AM, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: Just a few small comments... On 09/12/2012 03:34 PM, Arun Kumar K wrote: This patch adds device tree entry for MFC v6 in the Exynos5 SoC. Makes the required changes in the clock files and adds MFC to the DT device list. Signed-off-by: Naveen Krishna Chatradhich.nav...@samsung.com Signed-off-by: Arun Kumar Karun...@samsung.com --- ... diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt new file mode 100644 index 000..9a74d09 --- /dev/null +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt @@ -0,0 +1,27 @@ +* Samsung Multi Format Codec (MFC) + +Mult Format Codec (MFC) is the IP present in Samsung SoCs which Mult - Multi +supports high resolution decoding and encoding functionalities. +The MFC device driver is a v4l2 driver which can encode/decode +video raw/elementary streams and has support for all popular +video codecs. + +Required properties: + - compatible : value should be either one among the following + (a) samsung,mfc-v5 for MFC v5 present in Exynos4 SoCs + (b) samsung,mfc-v6 for MFC v6 present in Exynos5 SoCs + + - reg : Physical base address of the IP registers and length of memory + mapped region. + + - interrupts : MFC interupt number to the CPU. interupt - interrupt + + - samsung,mfc-r : Base address of the first memory bank used by MFC + for DMA contiguous memory allocation. + + - samsung,mfc-r-size : Size of the first memory bank. + + - samsung,mfc-l : Base address of the second memory bank used by MFC + for DMA contiguous memory allocation. + ... +struct mfc_dt_meminfo { + unsigned long loff; + unsigned long lsize; + unsigned long roff; + unsigned long rsize; +}; + +int fdt_find_mfc_mem(unsigned long node, const char *uname, int depth, + void *data) +{ + __be32 *prop; + unsigned long len; + struct mfc_dt_meminfo *mfc_mem = (struct mfc_dt_meminfo *)data; No need for explicit cast from void *. + if (of_flat_dt_is_compatible(node, samsung,mfc-v6)) { Might be worth to change it to if (!of_flat_dt_is_compatible(node, samsung,mfc-v6)) return 0; and avoid indentation. + prop = of_get_flat_dt_prop(node, samsung,mfc-l,len); + if (!prop) + return 0; + mfc_mem-loff = of_read_ulong(prop, len/4); + + prop = of_get_flat_dt_prop(node, samsung,mfc-l-size,len); + if (!prop) + return 0; + mfc_mem-lsize = of_read_ulong(prop, len/4); + + prop = of_get_flat_dt_prop(node, samsung,mfc-r,len); + if (!prop) + return 0; + mfc_mem-roff = of_read_ulong(prop, len/4); + + prop = of_get_flat_dt_prop(node, samsung,mfc-r-size,len); + if (!prop) + return 0; + mfc_mem-rsize = of_read_ulong(prop, len/4); + + return 1; + } + return 0; +} -- 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.htmlN‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±±©¬ºx,¡È§¶›¡Ü¨}©ž²Æ zÚj:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~††Ûiÿûàz¹®w¥¢¸?™¨èÚ¢)ߢf