Re: [PATCH v10] i2c: exynos5: add High Speed I2C controller driver
Once, we fix this problem. i planned to rebase and submit. Is it okey with you? Perfectly fine. Thanks for the heads up. signature.asc Description: Digital signature
[PATCH V2 0/4] clk: Samsung: audss: Add support for Exynos5420
This patch set adds support for audio subsystem clks on Exynos5420. Exynos5420 audio subsystem has a gate bit for ADMA controller and the some of the parent clks for mout_i2s and sclk_pcm are different from Exynos5250. So this patch adds provision for supporting both the platforms by determining the parent clk names based on compatible string. Changes since V1: - parent clocks are determined by using the compatible string and not passed via device tree as done in V1 because the probing order of the clock providers can't be guaranteed. Andrew Bresticker (3): clk: exynos-audss: add support for Exynos 5420 clk: exynos-audss: set correct parent clocks ARM: dts: exynos5420: add audio clock controller Padmavathi Venna (1): ARM: dts: Correct the /include entry on exynos5420 dtsi file .../devicetree/bindings/clock/clk-exynos-audss.txt |7 +-- arch/arm/boot/dts/exynos5420.dtsi | 11 ++- drivers/clk/samsung/clk-exynos-audss.c | 20 +++- include/dt-bindings/clk/exynos-audss-clk.h |3 ++- 4 files changed, 36 insertions(+), 5 deletions(-) -- 1.7.4.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 2/4] clk: exynos-audss: set correct parent clocks
From: Andrew Bresticker abres...@chromium.org Different Exynos SoCs have different names for certain input clocks to the AudioSS block. Since the order in which clock providers are probed is not guaranteed, we can't use the device-tree to pass the correct input clocks. Instead, use the compatibility string to determine what the correct parent clocks should be. Signed-off-by: Andrew Bresticker abres...@chromium.org --- drivers/clk/samsung/clk-exynos-audss.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c index 86d2606..d81c5f8 100644 --- a/drivers/clk/samsung/clk-exynos-audss.c +++ b/drivers/clk/samsung/clk-exynos-audss.c @@ -35,6 +35,7 @@ static unsigned long reg_save[][2] = { /* list of all parent clock list */ static const char *mout_audss_p[] = { fin_pll, fout_epll }; static const char *mout_i2s_p[] = { mout_audss, cdclk0, sclk_audio0 }; +static const char *sclk_pcm_p = sclk_pcm0; #ifdef CONFIG_PM_SLEEP static int exynos_audss_clk_suspend(void) @@ -77,6 +78,15 @@ void __init exynos_audss_clk_init(struct device_node *np) return; } + /* fix up clock parent names based on SoC */ + if (of_device_is_compatible(np, samsung,exynos5420-audss-clock)) { + mout_i2s_p[2] = sclk_maudio0; + sclk_pcm_p = sclk_maupcm0; + } else if (of_device_is_compatible(np, + samsung,exynos5250-audss-clock)) { + sclk_pcm_p = div_pcm0; + } + clk_data.clks = clk_table; clk_data.clk_num = EXYNOS_AUDSS_MAX_CLKS; of_clk_add_provider(np, of_clk_src_onecell_get, clk_data); @@ -118,7 +128,7 @@ void __init exynos_audss_clk_init(struct device_node *np) reg_base + ASS_CLK_GATE, 4, 0, lock); clk_table[EXYNOS_SCLK_PCM] = clk_register_gate(NULL, sclk_pcm, - div_pcm0, CLK_SET_RATE_PARENT, + sclk_pcm_p, CLK_SET_RATE_PARENT, reg_base + ASS_CLK_GATE, 5, 0, lock); if (of_device_is_compatible(np, samsung,exynos5420-audss-clock)) { -- 1.7.4.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
Re: [PATCH V5] ARM: dts: Change i2s compatible string on exynos5250
Hi Olof, On Thursday 15 of August 2013 21:48:32 Olof Johansson wrote: On Thu, Aug 15, 2013 at 9:26 PM, Padmavathi Venna padm...@samsung.com wrote: This patch removes quirks from i2s node and change the i2s compatible names. Signed-off-by: Padmavathi Venna padm...@samsung.com --- Changes since V4: - Mark Brown reverted the below two patches due to below build failure with exynos_defconfig. ARM: dts: exynos5250: move common i2s properties to exynos5 dtsi ARM: dts: Change i2s compatible string on exynos5250 build error: DTC arch/arm/boot/dts/exynos5420-smdk5420.dtb ERROR (phandle_references): Reference to non-existent node or label pdma1 ERROR (phandle_references): Reference to non-existent node or label pdma1 ERROR (phandle_references): Reference to non-existent node or label pdma0 ERROR (phandle_references): Reference to non-existent node or label pdma0 But with out ARM: dts: Change i2s compatible string on exynos5250 will break the i2s driver. So posting this patch now and will take care of posting other patch later after dependent patches got merged. arch/arm/boot/dts/exynos5250.dtsi |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index ef57277..376090f 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -405,7 +405,7 @@ }; i2s0: i2s@0383 { - compatible = samsung,i2s-v5; + compatible = samsung,s5pv210-i2s; Device tree reviewers, this is something to look out for in the future. Some samsung platforms/drivers use samsung,chip-ip, others samsung,ip-chip. I don't personally care much one way or another, but it really should be consistent. Hmm, I just did a quick git grep over arch/arm/boot/dts and could not really find the samsung,ip-chip pattern. Except MFC (and without Padma's patch also I2S), which used samsung,ip- ip version, all the compatible values I can see are based on samsung,chip-ip pattern. I believe we discussed this issue several times already and finally agreed to use samsung,chip-ip for any new compatible values. Best regards, Tomasz signature.asc Description: This is a digitally signed message part.
[PATCH V2 3/4] ARM: dts: Correct the /include entry on exynos5420 dtsi file
This patch corrects the /include to #include on exynos5420 Signed-off-by: Padmavathi Venna padm...@samsung.com --- arch/arm/boot/dts/exynos5420.dtsi |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 9e90d1e..334f7b7 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -14,7 +14,7 @@ */ #include exynos5.dtsi -/include/ exynos5420-pinctrl.dtsi +#include exynos5420-pinctrl.dtsi / { compatible = samsung,exynos5420; -- 1.7.4.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 V1 1/4] clk: exynos-audss: add support for Exynos 5420
From: Andrew Bresticker abres...@chromium.org The AudioSS block on Exynos 5420 has an additional clock gate for the ADMA bus clock. Signed-off-by: Andrew Bresticker abres...@chromium.org seviewed-on: https://gerrit.chromium.org/gerrit/57711 Reviewed-by: Simon Glass s...@chromium.org --- .../devicetree/bindings/clock/clk-exynos-audss.txt |7 +-- drivers/clk/samsung/clk-exynos-audss.c |8 include/dt-bindings/clk/exynos-audss-clk.h |3 ++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt b/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt index a120180..3115930 100644 --- a/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt +++ b/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt @@ -8,8 +8,10 @@ Required Properties: - compatible: should be one of the following: - samsung,exynos4210-audss-clock - controller compatible with all Exynos4 SoCs. - - samsung,exynos5250-audss-clock - controller compatible with all Exynos5 SoCs. - + - samsung,exynos5250-audss-clock - controller compatible with Exynos5250 +SoCs. + - samsung,exynos5420-audss-clock - controller compatible with Exynos5420 +SoCs. - reg: physical base address and length of the controller's register set. - #clock-cells: should be 1. @@ -34,6 +36,7 @@ i2s_bus 6 sclk_i2s7 pcm_bus 8 sclk_pcm9 +adma10 Exynos5420 Example 1: An example of a clock controller node is listed below. diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c index 9b1bbd5..86d2606 100644 --- a/drivers/clk/samsung/clk-exynos-audss.c +++ b/drivers/clk/samsung/clk-exynos-audss.c @@ -121,6 +121,12 @@ void __init exynos_audss_clk_init(struct device_node *np) div_pcm0, CLK_SET_RATE_PARENT, reg_base + ASS_CLK_GATE, 5, 0, lock); + if (of_device_is_compatible(np, samsung,exynos5420-audss-clock)) { + clk_table[EXYNOS_ADMA] = clk_register_gate(NULL, adma, + dout_srp, CLK_SET_RATE_PARENT, + reg_base + ASS_CLK_GATE, 9, 0, lock); + } + #ifdef CONFIG_PM_SLEEP register_syscore_ops(exynos_audss_clk_syscore_ops); #endif @@ -131,3 +137,5 @@ CLK_OF_DECLARE(exynos4210_audss_clk, samsung,exynos4210-audss-clock, exynos_audss_clk_init); CLK_OF_DECLARE(exynos5250_audss_clk, samsung,exynos5250-audss-clock, exynos_audss_clk_init); +CLK_OF_DECLARE(exynos5420_audss_clk, samsung,exynos5420-audss-clock, + exynos_audss_clk_init); diff --git a/include/dt-bindings/clk/exynos-audss-clk.h b/include/dt-bindings/clk/exynos-audss-clk.h index 8279f42..0ae6f5a 100644 --- a/include/dt-bindings/clk/exynos-audss-clk.h +++ b/include/dt-bindings/clk/exynos-audss-clk.h @@ -19,7 +19,8 @@ #define EXYNOS_SCLK_I2S7 #define EXYNOS_PCM_BUS 8 #define EXYNOS_SCLK_PCM9 +#define EXYNOS_ADMA10 -#define EXYNOS_AUDSS_MAX_CLKS 10 +#define EXYNOS_AUDSS_MAX_CLKS 11 #endif -- 1.7.4.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 4/4] ARM: dts: exynos5420: add audio clock controller
From: Andrew Bresticker abres...@chromium.org This adds device-tree bindings for the audio subsystem clock controller on Exynos 5420. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org Signed-off-by: Padmavathi Venna padm...@samsung.com --- arch/arm/boot/dts/exynos5420.dtsi |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 334f7b7..dde4cc2 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -15,6 +15,9 @@ #include exynos5.dtsi #include exynos5420-pinctrl.dtsi + +#include dt-bindings/clk/exynos-audss-clk.h + / { compatible = samsung,exynos5420; @@ -65,6 +68,12 @@ #clock-cells = 1; }; + clock_audss: audss-clock-controller@381 { + compatible = samsung,exynos5420-audss-clock; + reg = 0x0381 0x0C; + #clock-cells = 1; + }; + mct@101C { compatible = samsung,exynos4210-mct; reg = 0x101C 0x800; -- 1.7.4.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
Re: [PATCH V5] ARM: dts: Change i2s compatible string on exynos5250
Hi Kukjin, On Friday 16 of August 2013 14:43:17 Kukjin Kim wrote: Olof Johansson wrote: On Thu, Aug 15, 2013 at 9:26 PM, Padmavathi Venna padm...@samsung.com wrote: This patch removes quirks from i2s node and change the i2s compatible names. Signed-off-by: Padmavathi Venna padm...@samsung.com --- Changes since V4: - Mark Brown reverted the below two patches due to below build failure with exynos_defconfig. ARM: dts: exynos5250: move common i2s properties to exynos5 dtsi ARM: dts: Change i2s compatible string on exynos5250 build error: DTC arch/arm/boot/dts/exynos5420-smdk5420.dtb ERROR (phandle_references): Reference to non-existent node or label pdma1 ERROR (phandle_references): Reference to non-existent node or label pdma1 ERROR (phandle_references): Reference to non-existent node or label pdma0 ERROR (phandle_references): Reference to non-existent node or label pdma0 But with out ARM: dts: Change i2s compatible string on exynos5250 will break the i2s driver. So posting this patch now and will take care of posting other patch later after dependent patches got merged. arch/arm/boot/dts/exynos5250.dtsi |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index ef57277..376090f 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -405,7 +405,7 @@ }; i2s0: i2s@0383 { - compatible = samsung,i2s-v5; + compatible = samsung,s5pv210-i2s; Device tree reviewers, this is something to look out for in the future. Some samsung platforms/drivers use samsung,chip-ip, others samsung,ip-chip. I don't personally care much one way or another, but it really should be consistent. Hmm...I think, if samsung,ip name-ip version is possible, it would be nice. I remember there are no versions in datasheet for some IPs but something have like i2s and mfc. So samsung,ip-version is used for only i2s and mfc. But actually there are versions for Samsung IPs, no comments for that in datasheet. So I think, if Samsung can provide the specific version of Samsung IPs, we can use that like other platforms. I will prepare some table for that after meeting with Samsung hardware IP team so that samsung platform use one format samsung,ip-version. Sorry, I don't think this is a good idea, unless you can force the IP team to release a version table containing version of _every_ IP for _every_ released SoC, including those historical ones, like S3C24xx and S3C64xx. Of course such tables should be available publicly. In addition, there might be other funny things going on with IPs and their surroundings, that could make a need to create several separate compatible values for the same IP revision, but on different SoCs, because it was integrated in a slightly different way. I believe we have choses the samsung,chip-ip scheme to avoid being dependent upon data that is not always publicly available, which is more future- (and past-) proof and also solves the integration problem. Best regards, Tomasz signature.asc Description: This is a digitally signed message part.
Re: [PATCH v5 02/13] [media] exynos5-fimc-is: Add Exynos5 FIMC-IS device tree bindings documentation
Hi Sylwester, On Thu, Aug 15, 2013 at 8:39 PM, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: W dniu 2013-08-14 06:46, Arun Kumar K pisze: The patch adds the DT binding documentation for Samsung Exynos5 SoC series imaging subsystem (FIMC-IS). Signed-off-by: Arun Kumar K arun...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- .../devicetree/bindings/media/exynos5-fimc-is.txt | 47 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/exynos5-fimc-is.txt diff --git a/Documentation/devicetree/bindings/media/exynos5-fimc-is.txt b/Documentation/devicetree/bindings/media/exynos5-fimc-is.txt new file mode 100644 index 000..bfd36df --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos5-fimc-is.txt @@ -0,0 +1,47 @@ +Samsung EXYNOS5 SoC series Imaging Subsystem (FIMC-IS) +-- + +The camera subsystem on Samsung Exynos5 SoC has some changes relative +to previous SoC versions. Exynos5 has almost similar MIPI-CSIS and +FIMC-LITE IPs but has a much improved version of FIMC-IS which can +handle sensor controls and camera post-processing operations. The +Exynos5 FIMC-IS has a dedicated ARM Cortex A5 processor, many +post-processing blocks (ISP, DRC, FD, ODC, DIS, 3DNR) and two +dedicated scalers (SCC and SCP). + +fimc-is node + + +Required properties: + +- compatible: must be samsung,exynos5250-fimc-is +- reg : physical base address and size of the memory mapped + registers +- interrupt-parent : parent interrupt controller +- interrupts: fimc-is interrupt to the parent combiner Is it really only one interrupt or two as in case of Exynos4x12 ? Also it's probably more appropriate to say interrupt controller instead of combiner, not including details of the the FIMC-IS external interrupt controller in this binding. It needs only one interrupt and that is the one from A5 to main ARM processor. Will change it to controller. +- clocks: list of clock specifiers, corresponding to entries in + clock-names property; +- clock-names : must contain isp, mcu_isp, isp_div0, isp_div1, + isp_divmpwm, mcu_isp_div0, mcu_isp_div1 entries, + matching entries in the clocks property. +- pmu : phandle to the fimc-is pmu node describing the register + base and size for FIMC-IS PMU. This property needs to be prefixed with samsung,. Ok Regards Arun -- 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 01/13] [media] exynos5-is: Adding media device driver for exynos5
Hi Sylwester On Thu, Aug 15, 2013 at 5:02 PM, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: Hi, Thanks for the update. I'd like to possibly queue it for 3.12 once the review comments are addressed and the DT maintainers are OK with that. Thanks. Will post updated patchset today addressing all review comments. Regards Arun -- 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 v6 00/13] Exynos5 IS driver
The patch series add support for Exynos5 camera subsystem. It re-uses mipi-csis and fimc-lite from exynos4-is and adds a new media device and fimc-is device drivers for exynos5. The media device supports asynchronos subdev registration for the fimc-is sensors and is tested on top of the patch series from Sylwester for exynos4-is [1]. [1] http://www.mail-archive.com/linux-media@vger.kernel.org/msg64653.html Changes from v5 --- - Addressed review comments from Sylwester http://www.mail-archive.com/linux-media@vger.kernel.org/msg65578.html http://www.mail-archive.com/linux-media@vger.kernel.org/msg65605.html Changes from v4 --- - Addressed all review comments from Sylwester - Added separate PMU node as suggested by Stephen Warren - Added phandle based discovery of subdevs instead of node name Changes from v3 --- - Dropped the RFC tag - Addressed all review comments from Sylwester and Sachin - Removed clock provider for media dev - Added s5k4e5 sensor devicetree binding doc Changes from v2 --- - Added exynos5 media device driver from Shaik to this series - Added ISP pipeline support in media device driver - Based on Sylwester's latest exynos4-is development - Asynchronos registration of sensor subdevs - Made independent IS-sensor support - Add s5k4e5 sensor driver - Addressed review comments from Sylwester, Hans, Andrzej, Sachin Changes from v1 --- - Addressed all review comments from Sylwester - Made sensor subdevs as independent i2c devices - Lots of cleanup - Debugfs support added - Removed PMU global register access Arun Kumar K (12): [media] exynos5-fimc-is: Add Exynos5 FIMC-IS device tree bindings documentation [media] exynos5-fimc-is: Add driver core files [media] exynos5-fimc-is: Add common driver header files [media] exynos5-fimc-is: Add register definition and context header [media] exynos5-fimc-is: Add isp subdev [media] exynos5-fimc-is: Add scaler subdev [media] exynos5-fimc-is: Add sensor interface [media] exynos5-fimc-is: Add the hardware pipeline control [media] exynos5-fimc-is: Add the hardware interface module [media] exynos5-is: Add Kconfig and Makefile V4L: s5k6a3: Change sensor min/max resolutions V4L: Add driver for s5k4e5 image sensor Shaik Ameer Basha (1): [media] exynos5-is: Adding media device driver for exynos5 .../devicetree/bindings/media/exynos5-fimc-is.txt | 47 + .../devicetree/bindings/media/exynos5-mdev.txt | 126 ++ .../devicetree/bindings/media/i2c/s5k4e5.txt | 43 + drivers/media/i2c/Kconfig |8 + drivers/media/i2c/Makefile |1 + drivers/media/i2c/s5k4e5.c | 361 + drivers/media/i2c/s5k6a3.c | 19 +- drivers/media/platform/Kconfig |1 + drivers/media/platform/Makefile|1 + drivers/media/platform/exynos5-is/Kconfig | 20 + drivers/media/platform/exynos5-is/Makefile |7 + drivers/media/platform/exynos5-is/exynos5-mdev.c | 1210 ++ drivers/media/platform/exynos5-is/exynos5-mdev.h | 126 ++ drivers/media/platform/exynos5-is/fimc-is-cmd.h| 187 +++ drivers/media/platform/exynos5-is/fimc-is-core.c | 413 + drivers/media/platform/exynos5-is/fimc-is-core.h | 132 ++ drivers/media/platform/exynos5-is/fimc-is-err.h| 257 +++ .../media/platform/exynos5-is/fimc-is-interface.c | 810 ++ .../media/platform/exynos5-is/fimc-is-interface.h | 125 ++ drivers/media/platform/exynos5-is/fimc-is-isp.c| 534 ++ drivers/media/platform/exynos5-is/fimc-is-isp.h| 90 ++ .../media/platform/exynos5-is/fimc-is-metadata.h | 767 + drivers/media/platform/exynos5-is/fimc-is-param.h | 1159 ++ .../media/platform/exynos5-is/fimc-is-pipeline.c | 1692 .../media/platform/exynos5-is/fimc-is-pipeline.h | 128 ++ drivers/media/platform/exynos5-is/fimc-is-regs.h | 105 ++ drivers/media/platform/exynos5-is/fimc-is-scaler.c | 472 ++ drivers/media/platform/exynos5-is/fimc-is-scaler.h | 106 ++ drivers/media/platform/exynos5-is/fimc-is-sensor.c | 45 + drivers/media/platform/exynos5-is/fimc-is-sensor.h | 65 + drivers/media/platform/exynos5-is/fimc-is.h| 160 ++ 31 files changed, 9209 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/exynos5-fimc-is.txt create mode 100644 Documentation/devicetree/bindings/media/exynos5-mdev.txt create mode 100644 Documentation/devicetree/bindings/media/i2c/s5k4e5.txt create mode 100644 drivers/media/i2c/s5k4e5.c create mode 100644 drivers/media/platform/exynos5-is/Kconfig create mode 100644 drivers/media/platform/exynos5-is/Makefile create mode 100644 drivers/media/platform/exynos5-is/exynos5-mdev.c create mode 100644 drivers/media/platform/exynos5-is/exynos5-mdev.h create mode 100644
[PATCH v6 05/13] [media] exynos5-fimc-is: Add register definition and context header
This patch adds the register definition file for the fimc-is driver and also the header file containing the main context for the driver. Signed-off-by: Arun Kumar K arun...@samsung.com Signed-off-by: Kilyeon Im kilyeon...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- drivers/media/platform/exynos5-is/fimc-is-regs.h | 105 ++ drivers/media/platform/exynos5-is/fimc-is.h | 160 ++ 2 files changed, 265 insertions(+) create mode 100644 drivers/media/platform/exynos5-is/fimc-is-regs.h create mode 100644 drivers/media/platform/exynos5-is/fimc-is.h diff --git a/drivers/media/platform/exynos5-is/fimc-is-regs.h b/drivers/media/platform/exynos5-is/fimc-is-regs.h new file mode 100644 index 000..06aa466 --- /dev/null +++ b/drivers/media/platform/exynos5-is/fimc-is-regs.h @@ -0,0 +1,105 @@ +/* + * Samsung Exynos5 SoC series FIMC-IS driver + * + * Copyright (c) 2013 Samsung Electronics Co., Ltd + * Arun Kumar K arun...@samsung.com + * Kil-yeon Lim kilyeon...@samsung.com + * + * 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. + */ + +#ifndef FIMC_IS_REGS_H +#define FIMC_IS_REGS_H + +/* WDT_ISP register */ +#define WDT0x0017 +/* MCUCTL register */ +#define MCUCTL 0x0018 +/* MCU Controller Register */ +#define MCUCTLR(MCUCTL+0x00) +#define MCUCTLR_AXI_ISPX_AWCACHE(x)((x) 16) +#define MCUCTLR_AXI_ISPX_ARCACHE(x)((x) 12) +#define MCUCTLR_MSWRST (1 0) +/* Boot Base OFfset Address Register */ +#define BBOAR (MCUCTL+0x04) +#define BBOAR_BBOA(x) ((x) 0) + +/* Interrupt Generation Register 0 from Host CPU to VIC */ +#define INTGR0 (MCUCTL+0x08) +#define INTGR0_INTGC(n)(1 ((n) + 16)) +#define INTGR0_INTGD(n)(1 (n)) + +/* Interrupt Clear Register 0 from Host CPU to VIC */ +#define INTCR0 (MCUCTL+0x0c) +#define INTCR0_INTCC(n)(1 ((n) + 16)) +#define INTCR0_INTCD(n)(1 (n)) + +/* Interrupt Mask Register 0 from Host CPU to VIC */ +#define INTMR0 (MCUCTL+0x10) +#define INTMR0_INTMC(n)(1 ((n) + 16)) +#define INTMR0_INTMD(n)(1 (n)) + +/* Interrupt Status Register 0 from Host CPU to VIC */ +#define INTSR0 (MCUCTL+0x14) +#define INTSR0_GET_INTSD(n, x) (((x) (n)) 0x1) +#define INTSR0_GET_INTSC(n, x) (((x) ((n) + 16)) 0x1) + +/* Interrupt Mask Status Register 0 from Host CPU to VIC */ +#define INTMSR0(MCUCTL+0x18) +#define INTMSR0_GET_INTMSD(n, x) (((x) (n)) 0x1) +#define INTMSR0_GET_INTMSC(n, x) (((x) ((n) + 16)) 0x1) + +/* Interrupt Generation Register 1 from ISP CPU to Host IC */ +#define INTGR1 (MCUCTL+0x1c) +#define INTGR1_INTGC(n)(1 (n)) + +/* Interrupt Clear Register 1 from ISP CPU to Host IC */ +#define INTCR1 (MCUCTL+0x20) +#define INTCR1_INTCC(n)(1 (n)) + +/* Interrupt Mask Register 1 from ISP CPU to Host IC */ +#define INTMR1 (MCUCTL+0x24) +#define INTMR1_INTMC(n)(1 (n)) + +/* Interrupt Status Register 1 from ISP CPU to Host IC */ +#define INTSR1 (MCUCTL+0x28) +/* Interrupt Mask Status Register 1 from ISP CPU to Host IC */ +#define INTMSR1(MCUCTL+0x2c) +/* Interrupt Clear Register 2 from ISP BLK's interrupts to Host IC */ +#define INTCR2 (MCUCTL+0x30) +#define INTCR2_INTCC(n)(1 (n)) + +/* Interrupt Mask Register 2 from ISP BLK's interrupts to Host IC */ +#define INTMR2 (MCUCTL+0x34) +#define INTMR2_INTMCIS(n) (1 (n)) + +/* Interrupt Status Register 2 from ISP BLK's interrupts to Host IC */ +#define INTSR2 (MCUCTL+0x38) +/* Interrupt Mask Status Register 2 from ISP BLK's interrupts to Host IC */ +#define INTMSR2(MCUCTL+0x3c) +/* General Purpose Output Control Register (0~17) */ +#define GPOCTLR(MCUCTL+0x40) +#define GPOCTLR_GPOG(n, x) ((x) (n)) + +/* General Purpose Pad Output Enable Register (0~17) */ +#define GPOENCTLR (MCUCTL+0x44) +#define GPOENCTLR_GPOEN0(n, x) ((x) (n)) + +/* General Purpose Input Control Register (0~17) */ +#define GPICTLR(MCUCTL+0x48) + +/* IS Shared Registers between ISP CPU and HOST CPU */ +#define ISSR(n)(MCUCTL + 0x80 + (n)) + +/* PMU for FIMC-IS*/ +#define
[PATCH v6 03/13] [media] exynos5-fimc-is: Add driver core files
This driver is for the FIMC-IS IP available in Samsung Exynos5 SoC onwards. This patch adds the core files for the new driver. Signed-off-by: Arun Kumar K arun...@samsung.com Signed-off-by: Kilyeon Im kilyeon...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- drivers/media/platform/exynos5-is/fimc-is-core.c | 413 ++ drivers/media/platform/exynos5-is/fimc-is-core.h | 132 +++ 2 files changed, 545 insertions(+) create mode 100644 drivers/media/platform/exynos5-is/fimc-is-core.c create mode 100644 drivers/media/platform/exynos5-is/fimc-is-core.h diff --git a/drivers/media/platform/exynos5-is/fimc-is-core.c b/drivers/media/platform/exynos5-is/fimc-is-core.c new file mode 100644 index 000..6910581 --- /dev/null +++ b/drivers/media/platform/exynos5-is/fimc-is-core.c @@ -0,0 +1,413 @@ +/* + * Samsung EXYNOS5 FIMC-IS (Imaging Subsystem) driver +* + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * Arun Kumar K arun...@samsung.com + * + * 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 linux/bug.h +#include linux/ctype.h +#include linux/device.h +#include linux/debugfs.h +#include linux/delay.h +#include linux/errno.h +#include linux/err.h +#include linux/firmware.h +#include linux/fs.h +#include linux/gpio.h +#include linux/interrupt.h +#include linux/kernel.h +#include linux/list.h +#include linux/module.h +#include linux/of.h +#include linux/of_gpio.h +#include linux/of_address.h +#include linux/of_platform.h +#include linux/of_irq.h +#include linux/pinctrl/consumer.h +#include linux/platform_device.h +#include linux/pm_runtime.h +#include linux/slab.h +#include linux/types.h +#include linux/videodev2.h + +#include media/v4l2-device.h +#include media/v4l2-ioctl.h +#include media/v4l2-mem2mem.h +#include media/v4l2-of.h +#include media/videobuf2-core.h +#include media/videobuf2-dma-contig.h + +#include fimc-is.h +#include fimc-is-i2c.h + +#define CLK_MCU_ISP_DIV0_FREQ (200 * 100) +#define CLK_MCU_ISP_DIV1_FREQ (100 * 100) +#define CLK_ISP_DIV0_FREQ (134 * 100) +#define CLK_ISP_DIV1_FREQ (68 * 100) +#define CLK_ISP_DIVMPWM_FREQ (34 * 100) + +static const char * const fimc_is_clock_name[] = { + [IS_CLK_ISP]= isp, + [IS_CLK_MCU_ISP]= mcu_isp, + [IS_CLK_ISP_DIV0] = isp_div0, + [IS_CLK_ISP_DIV1] = isp_div1, + [IS_CLK_ISP_DIVMPWM]= isp_divmpwm, + [IS_CLK_MCU_ISP_DIV0] = mcu_isp_div0, + [IS_CLK_MCU_ISP_DIV1] = mcu_isp_div1, +}; + +static void fimc_is_put_clocks(struct fimc_is *is) +{ + int i; + + for (i = 0; i IS_CLK_MAX_NUM; i++) { + if (IS_ERR(is-clock[i])) + continue; + clk_unprepare(is-clock[i]); + clk_put(is-clock[i]); + is-clock[i] = ERR_PTR(-EINVAL); + } +} + +static int fimc_is_get_clocks(struct fimc_is *is) +{ + struct device *dev = is-pdev-dev; + int i, ret; + + for (i = 0; i IS_CLK_MAX_NUM; i++) { + is-clock[i] = clk_get(dev, fimc_is_clock_name[i]); + if (IS_ERR(is-clock[i])) + goto err; + ret = clk_prepare(is-clock[i]); + if (ret 0) { + clk_put(is-clock[i]); + is-clock[i] = ERR_PTR(-EINVAL); + goto err; + } + } + return 0; +err: + fimc_is_put_clocks(is); + pr_err(Failed to get clock: %s\n, fimc_is_clock_name[i]); + return -ENXIO; +} + +static int fimc_is_configure_clocks(struct fimc_is *is) +{ + int i, ret; + + for (i = 0; i IS_CLK_MAX_NUM; i++) + is-clock[i] = ERR_PTR(-EINVAL); + + ret = fimc_is_get_clocks(is); + if (ret) + return ret; + + /* Set rates */ + ret = clk_set_rate(is-clock[IS_CLK_MCU_ISP_DIV0], + CLK_MCU_ISP_DIV0_FREQ); + if (ret) + return ret; + ret = clk_set_rate(is-clock[IS_CLK_MCU_ISP_DIV1], + CLK_MCU_ISP_DIV1_FREQ); + if (ret) + return ret; + ret = clk_set_rate(is-clock[IS_CLK_ISP_DIV0], CLK_ISP_DIV0_FREQ); + if (ret) + return ret; + ret = clk_set_rate(is-clock[IS_CLK_ISP_DIV1], CLK_ISP_DIV1_FREQ); + if (ret) + return ret; + ret = clk_set_rate(is-clock[IS_CLK_ISP_DIVMPWM], + CLK_ISP_DIVMPWM_FREQ); + return ret; +} + +static void fimc_is_pipelines_destroy(struct fimc_is *is) +{ + int i; + + for (i = 0; i is-drvdata-num_instances; i++) + fimc_is_pipeline_destroy(is-pipeline[i]); +} + +static int fimc_is_parse_sensor_config(struct fimc_is *is, unsigned int index, +
[PATCH v6 06/13] [media] exynos5-fimc-is: Add isp subdev
fimc-is driver takes video data input from the ISP video node which is added in this patch. This node accepts Bayer input buffers which is given from the IS sensors. Signed-off-by: Arun Kumar K arun...@samsung.com Signed-off-by: Kilyeon Im kilyeon...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- drivers/media/platform/exynos5-is/fimc-is-isp.c | 534 +++ drivers/media/platform/exynos5-is/fimc-is-isp.h | 90 2 files changed, 624 insertions(+) create mode 100644 drivers/media/platform/exynos5-is/fimc-is-isp.c create mode 100644 drivers/media/platform/exynos5-is/fimc-is-isp.h diff --git a/drivers/media/platform/exynos5-is/fimc-is-isp.c b/drivers/media/platform/exynos5-is/fimc-is-isp.c new file mode 100644 index 000..882c291 --- /dev/null +++ b/drivers/media/platform/exynos5-is/fimc-is-isp.c @@ -0,0 +1,534 @@ +/* + * Samsung EXYNOS5250 FIMC-IS (Imaging Subsystem) driver + * + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * Arun Kumar K arun...@samsung.com + * + * 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 media/v4l2-ioctl.h +#include media/videobuf2-dma-contig.h + +#include fimc-is.h + +#define ISP_DRV_NAME fimc-is-isp + +static const struct fimc_is_fmt formats[] = { + { + .name = Bayer GR-BG 8bits, + .fourcc = V4L2_PIX_FMT_SGRBG8, + .depth = { 8 }, + .num_planes = 1, + }, + { + .name = Bayer GR-BG 10bits, + .fourcc = V4L2_PIX_FMT_SGRBG10, + .depth = { 16 }, + .num_planes = 1, + }, + { + .name = Bayer GR-BG 12bits, + .fourcc = V4L2_PIX_FMT_SGRBG12, + .depth = { 16 }, + .num_planes = 1, + }, +}; +#define NUM_FORMATS ARRAY_SIZE(formats) + +static const struct fimc_is_fmt *find_format(struct v4l2_format *f) +{ + unsigned int i; + + for (i = 0; i NUM_FORMATS; i++) + if (formats[i].fourcc == f-fmt.pix_mp.pixelformat) + return formats[i]; + return NULL; +} + +static int isp_video_output_start_streaming(struct vb2_queue *vq, + unsigned int count) +{ + struct fimc_is_isp *isp = vb2_get_drv_priv(vq); + + set_bit(STATE_RUNNING, isp-output_state); + return 0; +} + +static int isp_video_output_stop_streaming(struct vb2_queue *vq) +{ + struct fimc_is_isp *isp = vb2_get_drv_priv(vq); + struct fimc_is_buf *buf; + + /* Release unused buffers */ + while (!list_empty(isp-wait_queue)) { + buf = fimc_is_isp_wait_queue_get(isp); + vb2_buffer_done(buf-vb, VB2_BUF_STATE_ERROR); + } + while (!list_empty(isp-run_queue)) { + buf = fimc_is_isp_run_queue_get(isp); + vb2_buffer_done(buf-vb, VB2_BUF_STATE_ERROR); + } + + clear_bit(STATE_RUNNING, isp-output_state); + return 0; +} + +static int isp_video_output_queue_setup(struct vb2_queue *vq, + const struct v4l2_format *pfmt, + unsigned int *num_buffers, unsigned int *num_planes, + unsigned int sizes[], void *allocators[]) +{ + struct fimc_is_isp *isp = vb2_get_drv_priv(vq); + const struct fimc_is_fmt *fmt = isp-fmt; + unsigned int wh, i; + + if (!fmt) + return -EINVAL; + + *num_planes = fmt-num_planes; + wh = isp-width * isp-height; + + for (i = 0; i *num_planes; i++) { + allocators[i] = isp-alloc_ctx; + sizes[i] = (wh * fmt-depth[i]) / 8; + } + return 0; +} + +static int isp_video_output_buffer_init(struct vb2_buffer *vb) +{ + struct fimc_is_buf *buf = container_of(vb, struct fimc_is_buf, vb); + + buf-paddr[0] = vb2_dma_contig_plane_dma_addr(vb, 0); + return 0; +} + +static int isp_video_output_buffer_prepare(struct vb2_buffer *vb) +{ + struct vb2_queue *vq = vb-vb2_queue; + struct fimc_is_isp *isp = vb2_get_drv_priv(vq); + unsigned long size; + + size = (isp-width * isp-height * isp-fmt-depth[0]) / 8; + if (vb2_plane_size(vb, 0) size) { + v4l2_err(isp-subdev, User buffer too small (%ld %ld)\n, +vb2_plane_size(vb, 0), size); + return -EINVAL; + } + vb2_set_plane_payload(vb, 0, size); + + return 0; +} + +static void isp_video_output_buffer_queue(struct vb2_buffer *vb) +{ + struct vb2_queue *vq = vb-vb2_queue; + struct fimc_is_isp *isp = vb2_get_drv_priv(vq); + struct fimc_is_buf *buf = container_of(vb, struct fimc_is_buf, vb); + +
[PATCH v6 07/13] [media] exynos5-fimc-is: Add scaler subdev
FIMC-IS has two hardware scalers named as scaler-codec and scaler-preview. This patch adds the common code handling the video nodes and subdevs of both the scalers. Signed-off-by: Arun Kumar K arun...@samsung.com Signed-off-by: Kilyeon Im kilyeon...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- drivers/media/platform/exynos5-is/fimc-is-scaler.c | 472 drivers/media/platform/exynos5-is/fimc-is-scaler.h | 106 + 2 files changed, 578 insertions(+) create mode 100644 drivers/media/platform/exynos5-is/fimc-is-scaler.c create mode 100644 drivers/media/platform/exynos5-is/fimc-is-scaler.h diff --git a/drivers/media/platform/exynos5-is/fimc-is-scaler.c b/drivers/media/platform/exynos5-is/fimc-is-scaler.c new file mode 100644 index 000..82ba867 --- /dev/null +++ b/drivers/media/platform/exynos5-is/fimc-is-scaler.c @@ -0,0 +1,472 @@ +/* + * Samsung EXYNOS5250 FIMC-IS (Imaging Subsystem) driver + * + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * Arun Kumar K arun...@samsung.com + * + * 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 media/v4l2-ioctl.h +#include media/videobuf2-dma-contig.h + +#include fimc-is.h + +#define IS_SCALER_DRV_NAME fimc-is-scaler + +static const struct fimc_is_fmt formats[] = { + { + .name = YUV 4:2:0 3p MultiPlanar, + .fourcc = V4L2_PIX_FMT_YUV420M, + .depth = {8, 2, 2}, + .num_planes = 3, + }, + { + .name = YUV 4:2:0 2p MultiPlanar, + .fourcc = V4L2_PIX_FMT_NV12M, + .depth = {8, 4}, + .num_planes = 2, + }, + { + .name = YUV 4:2:2 1p MultiPlanar, + .fourcc = V4L2_PIX_FMT_NV16, + .depth = {16}, + .num_planes = 1, + }, +}; +#define NUM_FORMATS ARRAY_SIZE(formats) + +static const struct fimc_is_fmt *find_format(struct v4l2_format *f) +{ + unsigned int i; + + for (i = 0; i NUM_FORMATS; i++) { + if (formats[i].fourcc == f-fmt.pix_mp.pixelformat) + return formats[i]; + } + return NULL; +} + +static int scaler_video_capture_start_streaming(struct vb2_queue *vq, + unsigned int count) +{ + struct fimc_is_scaler *ctx = vb2_get_drv_priv(vq); + int ret; + + ret = fimc_is_pipeline_scaler_start(ctx-pipeline, + ctx-scaler_id, + vq-num_buffers, + ctx-fmt-num_planes); + if (ret) { + v4l2_err(ctx-subdev, Scaler start failed.\n); + return -EINVAL; + } + + set_bit(STATE_RUNNING, ctx-capture_state); + return 0; +} + +static int scaler_video_capture_stop_streaming(struct vb2_queue *vq) +{ + struct fimc_is_scaler *ctx = vb2_get_drv_priv(vq); + struct fimc_is_buf *buf; + int ret; + + ret = fimc_is_pipeline_scaler_stop(ctx-pipeline, ctx-scaler_id); + if (ret) + v4l2_info(ctx-subdev, Scaler already stopped.\n); + + /* Release un-used buffers */ + while (!list_empty(ctx-wait_queue)) { + buf = fimc_is_scaler_wait_queue_get(ctx); + vb2_buffer_done(buf-vb, VB2_BUF_STATE_ERROR); + } + while (!list_empty(ctx-run_queue)) { + buf = fimc_is_scaler_run_queue_get(ctx); + vb2_buffer_done(buf-vb, VB2_BUF_STATE_ERROR); + } + + clear_bit(STATE_RUNNING, ctx-capture_state); + return 0; +} + +static int scaler_video_capture_queue_setup(struct vb2_queue *vq, + const struct v4l2_format *pfmt, + unsigned int *num_buffers, unsigned int *num_planes, + unsigned int sizes[], void *allocators[]) +{ + struct fimc_is_scaler *ctx = vb2_get_drv_priv(vq); + const struct fimc_is_fmt *fmt = ctx-fmt; + unsigned int wh; + int i; + + if (!fmt) + return -EINVAL; + + *num_planes = fmt-num_planes; + wh = ctx-width * ctx-height; + + for (i = 0; i *num_planes; i++) { + allocators[i] = ctx-alloc_ctx; + sizes[i] = (wh * fmt-depth[i]) / 8; + } + return 0; +} + +static int scaler_video_capture_buffer_init(struct vb2_buffer *vb) +{ + struct vb2_queue *vq = vb-vb2_queue; + struct fimc_is_scaler *ctx = vb2_get_drv_priv(vq); + struct fimc_is_buf *buf = container_of(vb, struct fimc_is_buf, vb); + const struct fimc_is_fmt *fmt; + int i; + + fmt = ctx-fmt; + for (i = 0; i fmt-num_planes; i++) + buf-paddr[i] = vb2_dma_contig_plane_dma_addr(vb, i); + +
[PATCH v6 02/13] [media] exynos5-fimc-is: Add Exynos5 FIMC-IS device tree bindings documentation
The patch adds the DT binding documentation for Samsung Exynos5 SoC series imaging subsystem (FIMC-IS). Signed-off-by: Arun Kumar K arun...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- .../devicetree/bindings/media/exynos5-fimc-is.txt | 47 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/exynos5-fimc-is.txt diff --git a/Documentation/devicetree/bindings/media/exynos5-fimc-is.txt b/Documentation/devicetree/bindings/media/exynos5-fimc-is.txt new file mode 100644 index 000..bc279b4 --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos5-fimc-is.txt @@ -0,0 +1,47 @@ +Samsung EXYNOS5 SoC series Imaging Subsystem (FIMC-IS) +-- + +The camera subsystem on Samsung Exynos5 SoC has some changes relative +to previous SoC versions. Exynos5 has almost similar MIPI-CSIS and +FIMC-LITE IPs but has a much improved version of FIMC-IS which can +handle sensor controls and camera post-processing operations. The +Exynos5 FIMC-IS has a dedicated ARM Cortex A5 processor, many +post-processing blocks (ISP, DRC, FD, ODC, DIS, 3DNR) and two +dedicated scalers (SCC and SCP). + +fimc-is node + + +Required properties: + +- compatible: must be samsung,exynos5250-fimc-is +- reg : physical base address and size of the memory mapped + registers +- interrupt-parent : parent interrupt controller +- interrupts: fimc-is interrupt to the parent interrupt controller +- clocks: list of clock specifiers, corresponding to entries in + clock-names property; +- clock-names : must contain isp, mcu_isp, isp_div0, isp_div1, + isp_divmpwm, mcu_isp_div0, mcu_isp_div1 entries, + matching entries in the clocks property. +- samsung,pmu : phandle to the fimc-is pmu node describing the register + base and size for FIMC-IS PMU. + +i2c-isp (ISP I2C bus controller) nodes +-- + +Required properties: + +- compatible : should be samsung,exynos4212-i2c-isp for Exynos4212, + Exynos4412 and Exynos5250 SoCs; +- reg : physical base address and length of the registers set; +- clocks : must contain gate clock specifier for this controller; +- clock-names : must contain i2c_isp entry. + +For the i2c-isp node, it is required to specify a pinctrl state named default, +according to the pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt. + +Device tree nodes of the image sensors controlled directly by the FIMC-IS +firmware must be child nodes of their corresponding ISP I2C bus controller node. +The data link of these image sensors must be specified using the common video +interfaces bindings, defined in video-interfaces.txt. -- 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
[PATCH v6 01/13] [media] exynos5-is: Adding media device driver for exynos5
From: Shaik Ameer Basha shaik.am...@samsung.com This patch adds support for media device for EXYNOS5 SoCs. The current media device supports the following ips to connect through the media controller framework. * MIPI-CSIS Support interconnection(subdev interface) between devices * FIMC-LITE Support capture interface from device(Sensor, MIPI-CSIS) to memory Support interconnection(subdev interface) between devices * FIMC-IS Camera post-processing IP having multiple sub-nodes. G-Scaler will be added later to the current media device. The media device creates two kinds of pipelines for connecting the above mentioned IPs. The pipeline0 is uses Sensor, MIPI-CSIS and FIMC-LITE which captures image data and dumps to memory. Pipeline1 uses FIMC-IS components for doing post-processing operations on the captured image and give scaled YUV output. Pipeline0 ++ +---+ +---+ ++ | Sensor | -- | MIPI-CSIS | -- | FIMC-LITE | -- | Memory | ++ +---+ +---+ ++ Pipeline1 ++ ++ +---+ +---+ | Memory | -- | ISP | -- |SCC| -- |SCP| ++ ++ +---+ +---+ Signed-off-by: Shaik Ameer Basha shaik.am...@samsung.com Signed-off-by: Arun Kumar K arun...@samsung.com --- .../devicetree/bindings/media/exynos5-mdev.txt | 126 ++ drivers/media/platform/exynos5-is/exynos5-mdev.c | 1210 drivers/media/platform/exynos5-is/exynos5-mdev.h | 126 ++ 3 files changed, 1462 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/exynos5-mdev.txt create mode 100644 drivers/media/platform/exynos5-is/exynos5-mdev.c create mode 100644 drivers/media/platform/exynos5-is/exynos5-mdev.h diff --git a/Documentation/devicetree/bindings/media/exynos5-mdev.txt b/Documentation/devicetree/bindings/media/exynos5-mdev.txt new file mode 100644 index 000..b1299e2 --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos5-mdev.txt @@ -0,0 +1,126 @@ +Samsung EXYNOS5 SoC Camera Subsystem + + +The Exynos5 SoC Camera subsystem comprises of multiple sub-devices +represented by separate device tree nodes. Currently this includes: FIMC-LITE, +MIPI CSIS and FIMC-IS. + +The sub-device nodes are referenced using phandles in the common 'camera' node +which also includes common properties of the whole subsystem not really +specific to any single sub-device, like common camera port pins or the common +camera bus clocks. + +Common 'camera' node + + +Required properties: + +- compatible : must be samsung,exynos5250-fimc +- clocks : list of clock specifiers, corresponding to entries in + the clock-names property; +- clock-names : must contain sclk_bayer entry +- samsung,csis : list of phandles to the mipi-csis device nodes +- samsung,fimc-lite: list of phandles to the fimc-lite device nodes +- samsung,fimc-is : phandle to the fimc-is device node + +The pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt must be used +to define a required pinctrl state named default. + +'parallel-ports' node +- + +This node should contain child 'port' nodes specifying active parallel video +input ports. It includes camera A, camera B and RGB bay inputs. +'reg' property in the port nodes specifies the input type: + 1 - parallel camport A + 2 - parallel camport B + 5 - RGB camera bay + +3, 4 are for MIPI CSI-2 bus and are already described in samsung-mipi-csis.txt + +Image sensor nodes +-- + +The sensor device nodes should be added to their control bus controller (e.g. +I2C0) nodes and linked to a port node in the csis or the parallel-ports node, +using the common video interfaces bindings, defined in video-interfaces.txt. + +Example: + + aliases { + fimc-lite0 = fimc_lite_0 + }; + + /* Parallel bus IF sensor */ + i2c_0: i2c@1386 { + s5k6aa: sensor@3c { + compatible = samsung,s5k6aafx; + reg = 0x3c; + vddio-supply = ...; + + clock-frequency = 2400; + clocks = ...; + clock-names = mclk; + + port { + s5k6aa_ep: endpoint { + remote-endpoint = fimc0_ep; + bus-width = 8; + hsync-active = 0; + vsync-active = 1; + pclk-sample = 1; + }; + }; + }; + }; + + /* MIPI CSI-2 bus IF sensor */ + s5c73m3: sensor@1a { + compatible = samsung,s5c73m3; +
[PATCH v6 12/13] V4L: s5k6a3: Change sensor min/max resolutions
s5k6a3 sensor has actual pixel resolution of 1408x1402 against the active resolution 1392x1392. The real resolution is needed when raw sensor SRGB data is dumped to memory by fimc-lite. Signed-off-by: Arun Kumar K arun...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- drivers/media/i2c/s5k6a3.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c index ccbb4fc..34c3165 100644 --- a/drivers/media/i2c/s5k6a3.c +++ b/drivers/media/i2c/s5k6a3.c @@ -25,10 +25,12 @@ #include media/v4l2-async.h #include media/v4l2-subdev.h -#define S5K6A3_SENSOR_MAX_WIDTH1392 -#define S5K6A3_SENSOR_MAX_HEIGHT 1392 -#define S5K6A3_SENSOR_MIN_WIDTH32 -#define S5K6A3_SENSOR_MIN_HEIGHT 32 +#define S5K6A3_SENSOR_MAX_WIDTH1408 +#define S5K6A3_SENSOR_MAX_HEIGHT 1402 +#define S5K6A3_SENSOR_ACTIVE_WIDTH 1392 +#define S5K6A3_SENSOR_ACTIVE_HEIGHT1392 +#define S5K6A3_SENSOR_MIN_WIDTH(32 + 16) +#define S5K6A3_SENSOR_MIN_HEIGHT (32 + 10) #define S5K6A3_DEF_PIX_WIDTH 1296 #define S5K6A3_DEF_PIX_HEIGHT 732 @@ -107,10 +109,11 @@ static void s5k6a3_try_format(struct v4l2_mbus_framefmt *mf) fmt = find_sensor_format(mf); mf-code = fmt-code; - v4l_bound_align_image(mf-width, S5K6A3_SENSOR_MIN_WIDTH, - S5K6A3_SENSOR_MAX_WIDTH, 0, - mf-height, S5K6A3_SENSOR_MIN_HEIGHT, - S5K6A3_SENSOR_MAX_HEIGHT, 0, 0); + v4l_bound_align_image(mf-width, + S5K6A3_SENSOR_MIN_WIDTH, S5K6A3_SENSOR_MAX_WIDTH, 0, + mf-height, + S5K6A3_SENSOR_MIN_HEIGHT, S5K6A3_SENSOR_MAX_HEIGHT, 0, + 0); } static struct v4l2_mbus_framefmt *__s5k6a3_get_format( -- 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
[PATCH v6 11/13] [media] exynos5-is: Add Kconfig and Makefile
Adds Kconfig and Makefile for exynos5-is driver files. Signed-off-by: Shaik Ameer Basha shaik.am...@samsung.com Signed-off-by: Arun Kumar K arun...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- drivers/media/platform/Kconfig |1 + drivers/media/platform/Makefile|1 + drivers/media/platform/exynos5-is/Kconfig | 20 drivers/media/platform/exynos5-is/Makefile |7 +++ 4 files changed, 29 insertions(+) create mode 100644 drivers/media/platform/exynos5-is/Kconfig create mode 100644 drivers/media/platform/exynos5-is/Makefile diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 08de865..4b0475e 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -123,6 +123,7 @@ config VIDEO_S3C_CAMIF source drivers/media/platform/soc_camera/Kconfig source drivers/media/platform/exynos4-is/Kconfig +source drivers/media/platform/exynos5-is/Kconfig source drivers/media/platform/s5p-tv/Kconfig endif # V4L_PLATFORM_DRIVERS diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile index eee28dd..40bf09f 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile @@ -37,6 +37,7 @@ obj-$(CONFIG_VIDEO_SAMSUNG_S5P_TV)+= s5p-tv/ obj-$(CONFIG_VIDEO_SAMSUNG_S5P_G2D)+= s5p-g2d/ obj-$(CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC) += exynos-gsc/ +obj-$(CONFIG_VIDEO_SAMSUNG_EXYNOS5_CAMERA) += exynos5-is/ obj-$(CONFIG_BLACKFIN) += blackfin/ diff --git a/drivers/media/platform/exynos5-is/Kconfig b/drivers/media/platform/exynos5-is/Kconfig new file mode 100644 index 000..b67d11a --- /dev/null +++ b/drivers/media/platform/exynos5-is/Kconfig @@ -0,0 +1,20 @@ +config VIDEO_SAMSUNG_EXYNOS5_CAMERA + bool Samsung Exynos5 SoC Camera Media Device driver + depends on VIDEO_V4L2 VIDEO_V4L2_SUBDEV_API PM_RUNTIME + depends on VIDEO_SAMSUNG_EXYNOS4_IS + help + This is a V4L2 media device driver for Exynos5 SoC series + camera subsystem. + +if VIDEO_SAMSUNG_EXYNOS5_CAMERA + +config VIDEO_SAMSUNG_EXYNOS5_FIMC_IS + tristate Samsung Exynos5 SoC FIMC-IS driver + depends on I2C OF + depends on VIDEO_EXYNOS4_FIMC_IS + select VIDEOBUF2_DMA_CONTIG + help + This is a V4L2 driver for Samsung Exynos5 SoC series Imaging + Subsystem known as FIMC-IS. + +endif #VIDEO_SAMSUNG_EXYNOS5_MDEV diff --git a/drivers/media/platform/exynos5-is/Makefile b/drivers/media/platform/exynos5-is/Makefile new file mode 100644 index 000..6cdb037 --- /dev/null +++ b/drivers/media/platform/exynos5-is/Makefile @@ -0,0 +1,7 @@ +ccflags-y += -Idrivers/media/platform/exynos4-is +exynos5-fimc-is-objs := fimc-is-core.o fimc-is-isp.o fimc-is-scaler.o +exynos5-fimc-is-objs += fimc-is-pipeline.o fimc-is-interface.o fimc-is-sensor.o +exynos-mdevice-objs := exynos5-mdev.o + +obj-$(CONFIG_VIDEO_SAMSUNG_EXYNOS5_FIMC_IS) += exynos5-fimc-is.o +obj-$(CONFIG_VIDEO_SAMSUNG_EXYNOS5_CAMERA) += exynos-mdevice.o -- 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
[PATCH v6 08/13] [media] exynos5-fimc-is: Add sensor interface
Some sensors to be used with fimc-is are exclusively controlled by the fimc-is firmware. This minimal sensor driver provides the required info for the firmware to configure the sensors sitting on I2C bus. Signed-off-by: Arun Kumar K arun...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- drivers/media/platform/exynos5-is/fimc-is-sensor.c | 45 ++ drivers/media/platform/exynos5-is/fimc-is-sensor.h | 65 2 files changed, 110 insertions(+) create mode 100644 drivers/media/platform/exynos5-is/fimc-is-sensor.c create mode 100644 drivers/media/platform/exynos5-is/fimc-is-sensor.h diff --git a/drivers/media/platform/exynos5-is/fimc-is-sensor.c b/drivers/media/platform/exynos5-is/fimc-is-sensor.c new file mode 100644 index 000..475f1c3 --- /dev/null +++ b/drivers/media/platform/exynos5-is/fimc-is-sensor.c @@ -0,0 +1,45 @@ +/* + * Samsung EXYNOS5250 FIMC-IS (Imaging Subsystem) driver + * + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * Author: Arun Kumar K arun...@samsung.com + * + * 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 fimc-is-sensor.h + +static const struct sensor_drv_data s5k6a3_drvdata = { + .id = FIMC_IS_SENSOR_ID_S5K6A3, + .open_timeout = S5K6A3_OPEN_TIMEOUT, + .setfile_name = exynos5_s5k6a3_setfile.bin, +}; + +static const struct sensor_drv_data s5k4e5_drvdata = { + .id = FIMC_IS_SENSOR_ID_S5K4E5, + .open_timeout = S5K4E5_OPEN_TIMEOUT, + .setfile_name = exynos5_s5k4e5_setfile.bin, +}; + +static const struct of_device_id fimc_is_sensor_of_ids[] = { + { + .compatible = samsung,s5k6a3, + .data = s5k6a3_drvdata, + }, + { + .compatible = samsung,s5k4e5, + .data = s5k4e5_drvdata, + }, + { } +}; + +const struct sensor_drv_data *exynos5_is_sensor_get_drvdata( + struct device_node *node) +{ + const struct of_device_id *of_id; + + of_id = of_match_node(fimc_is_sensor_of_ids, node); + return of_id ? of_id-data : NULL; +} diff --git a/drivers/media/platform/exynos5-is/fimc-is-sensor.h b/drivers/media/platform/exynos5-is/fimc-is-sensor.h new file mode 100644 index 000..0ba5733 --- /dev/null +++ b/drivers/media/platform/exynos5-is/fimc-is-sensor.h @@ -0,0 +1,65 @@ +/* + * Samsung EXYNOS4x12 FIMC-IS (Imaging Subsystem) driver + * + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * Author: Arun Kumar K arun...@samsung.com + * + * 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. + */ +#ifndef FIMC_IS_SENSOR_H_ +#define FIMC_IS_SENSOR_H_ + +#include linux/of.h +#include linux/types.h + +#define S5K6A3_OPEN_TIMEOUT2000 /* ms */ +#define S5K6A3_SENSOR_WIDTH1392 +#define S5K6A3_SENSOR_HEIGHT 1392 + +#define S5K4E5_OPEN_TIMEOUT2000 /* ms */ +#define S5K4E5_SENSOR_WIDTH2560 +#define S5K4E5_SENSOR_HEIGHT 1920 + +#define SENSOR_WIDTH_PADDING 16 +#define SENSOR_HEIGHT_PADDING 10 + +enum fimc_is_sensor_id { + FIMC_IS_SENSOR_ID_S5K3H2 = 1, + FIMC_IS_SENSOR_ID_S5K6A3, + FIMC_IS_SENSOR_ID_S5K4E5, + FIMC_IS_SENSOR_ID_S5K3H7, + FIMC_IS_SENSOR_ID_CUSTOM, + FIMC_IS_SENSOR_ID_END +}; + +struct sensor_drv_data { + enum fimc_is_sensor_id id; + /* sensor open timeout in ms */ + unsigned short open_timeout; + char *setfile_name; +}; + +/** + * struct fimc_is_sensor - fimc-is sensor data structure + * @drvdata: a pointer to the sensor's parameters data structure + * @i2c_bus: ISP I2C bus index (0...1) + * @width: sensor active width + * @height: sensor active height + * @pixel_width: sensor effective pixel width (width + padding) + * @pixel_height: sensor effective pixel height (height + padding) + */ +struct fimc_is_sensor { + const struct sensor_drv_data *drvdata; + unsigned int i2c_bus; + unsigned int width; + unsigned int height; + unsigned int pixel_width; + unsigned int pixel_height; +}; + +const struct sensor_drv_data *exynos5_is_sensor_get_drvdata( + struct device_node *node); + +#endif /* FIMC_IS_SENSOR_H_ */ -- 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
[PATCH v6 13/13] V4L: Add driver for s5k4e5 image sensor
This patch adds subdev driver for Samsung S5K4E5 raw image sensor. Like s5k6a3, it is also another fimc-is firmware controlled sensor. This minimal sensor driver doesn't do any I2C communications as its done by ISP firmware. It can be updated if needed to a regular sensor driver by adding the I2C communication. Signed-off-by: Arun Kumar K arun...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- .../devicetree/bindings/media/i2c/s5k4e5.txt | 43 +++ drivers/media/i2c/Kconfig |8 + drivers/media/i2c/Makefile |1 + drivers/media/i2c/s5k4e5.c | 361 4 files changed, 413 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/s5k4e5.txt create mode 100644 drivers/media/i2c/s5k4e5.c diff --git a/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt b/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt new file mode 100644 index 000..5af462c --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt @@ -0,0 +1,43 @@ +* Samsung S5K4E5 Raw Image Sensor + +S5K4E5 is a raw image sensor with maximum resolution of 2560x1920 +pixels. Data transfer is carried out via MIPI CSI-2 port and controls +via I2C bus. + +Required Properties: +- compatible : must be samsung,s5k4e5 +- reg : I2C device address +- gpios: reset gpio pin +- clocks : clock specifier for the clock-names property +- clock-names : must contain mclk entry +- svdda-supply : core voltage supply +- svddio-supply: I/O voltage supply + +Optional Properties: +- clock-frequency : operating frequency for the sensor +default value will be taken if not provided. + +The device node should be added to respective control bus controller +(e.g. I2C0) nodes and linked to the csis port node, using the common +video interfaces bindings, defined in video-interfaces.txt. + +Example: + + i2c-isp@1313 { + s5k4e5@20 { + compatible = samsung,s5k4e5; + reg = 0x20; + gpios = gpx1 2 1; + clock-frequency = 2400; + clocks = clock 129; + clock-names = mclk; + svdda-supply = ...; + svddio-supply = ...; + port { + is_s5k4e5_ep: endpoint { + data-lanes = 1 2 3 4; + remote-endpoint = csis0_ep; + }; + }; + }; + }; diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index f7e9147..271028b 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -572,6 +572,14 @@ config VIDEO_S5K6A3 This is a V4L2 sensor-level driver for Samsung S5K6A3 raw camera sensor. +config VIDEO_S5K4E5 + tristate Samsung S5K4E5 sensor support + depends on MEDIA_CAMERA_SUPPORT + depends on I2C VIDEO_V4L2 VIDEO_V4L2_SUBDEV_API OF + ---help--- + This is a V4L2 sensor-level driver for Samsung S5K4E5 raw + camera sensor. + config VIDEO_S5K4ECGX tristate Samsung S5K4ECGX sensor support depends on I2C VIDEO_V4L2 VIDEO_V4L2_SUBDEV_API diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index cf3cf03..0aeed8e 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -65,6 +65,7 @@ obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o obj-$(CONFIG_VIDEO_NOON010PC30)+= noon010pc30.o obj-$(CONFIG_VIDEO_S5K6AA) += s5k6aa.o obj-$(CONFIG_VIDEO_S5K6A3) += s5k6a3.o +obj-$(CONFIG_VIDEO_S5K4E5) += s5k4e5.o obj-$(CONFIG_VIDEO_S5K4ECGX) += s5k4ecgx.o obj-$(CONFIG_VIDEO_S5C73M3)+= s5c73m3/ obj-$(CONFIG_VIDEO_ADP1653)+= adp1653.o diff --git a/drivers/media/i2c/s5k4e5.c b/drivers/media/i2c/s5k4e5.c new file mode 100644 index 000..0a6ece6 --- /dev/null +++ b/drivers/media/i2c/s5k4e5.c @@ -0,0 +1,361 @@ +/* + * Samsung S5K4E5 image sensor driver + * + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * Author: Arun Kumar K arun...@samsung.com + * + * 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 linux/clk.h +#include linux/delay.h +#include linux/device.h +#include linux/errno.h +#include linux/gpio.h +#include linux/i2c.h +#include linux/kernel.h +#include linux/module.h +#include linux/of_gpio.h +#include linux/pm_runtime.h +#include linux/regulator/consumer.h +#include linux/slab.h +#include linux/videodev2.h +#include media/v4l2-async.h +#include media/v4l2-subdev.h + +#define S5K4E5_SENSOR_MAX_WIDTH2576 +#define S5K4E5_SENSOR_MAX_HEIGHT 1930 +
[PATCH v6 09/13] [media] exynos5-fimc-is: Add the hardware pipeline control
This patch adds the crucial hardware pipeline control for the fimc-is driver. All the subdev nodes will call this pipeline interfaces to reach the hardware. Responsibilities of this module involves configuring and maintaining the hardware pipeline involving multiple sub-ips like ISP, DRC, Scalers, ODC, 3DNR, FD etc. Signed-off-by: Arun Kumar K arun...@samsung.com Signed-off-by: Kilyeon Im kilyeon...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- .../media/platform/exynos5-is/fimc-is-pipeline.c | 1692 .../media/platform/exynos5-is/fimc-is-pipeline.h | 128 ++ 2 files changed, 1820 insertions(+) create mode 100644 drivers/media/platform/exynos5-is/fimc-is-pipeline.c create mode 100644 drivers/media/platform/exynos5-is/fimc-is-pipeline.h diff --git a/drivers/media/platform/exynos5-is/fimc-is-pipeline.c b/drivers/media/platform/exynos5-is/fimc-is-pipeline.c new file mode 100644 index 000..7d91469 --- /dev/null +++ b/drivers/media/platform/exynos5-is/fimc-is-pipeline.c @@ -0,0 +1,1692 @@ +/* + * Samsung EXYNOS5 FIMC-IS (Imaging Subsystem) driver +* + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * Arun Kumar K arun...@samsung.com + * Kil-yeon Lim kilyeon...@samsung.com + * + * 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 fimc-is.h +#include fimc-is-pipeline.h +#include fimc-is-metadata.h +#include fimc-is-regs.h +#include fimc-is-cmd.h +#include media/videobuf2-dma-contig.h +#include linux/delay.h + +/* Default setting values */ +#define DEFAULT_PREVIEW_STILL_WIDTH1280 +#define DEFAULT_PREVIEW_STILL_HEIGHT 720 +#define DEFAULT_CAPTURE_VIDEO_WIDTH1920 +#define DEFAULT_CAPTURE_VIDEO_HEIGHT 1080 +#define DEFAULT_CAPTURE_STILL_WIDTH2560 +#define DEFAULT_CAPTURE_STILL_HEIGHT 1920 +#define DEFAULT_CAPTURE_STILL_CROP_WIDTH 2560 +#define DEFAULT_CAPTURE_STILL_CROP_HEIGHT 1440 +#define DEFAULT_PREVIEW_VIDEO_WIDTH640 +#define DEFAULT_PREVIEW_VIDEO_HEIGHT 480 + +/* Init params for pipeline devices */ +static const struct sensor_param init_sensor_param = { + .frame_rate = { + .frame_rate = 30, + }, +}; + +static const struct isp_param init_isp_param = { + .control = { + .cmd = CONTROL_COMMAND_START, + .bypass = CONTROL_BYPASS_DISABLE, + }, + .otf_input = { + .cmd = OTF_INPUT_COMMAND_DISABLE, + .width = DEFAULT_CAPTURE_STILL_WIDTH, + .height = DEFAULT_CAPTURE_STILL_HEIGHT, + .format = OTF_INPUT_FORMAT_BAYER, + .bitwidth = OTF_INPUT_BIT_WIDTH_10BIT, + .order = OTF_INPUT_ORDER_BAYER_GR_BG, + .frametime_max = 3, + }, + .dma1_input = { + .cmd = DMA_INPUT_COMMAND_DISABLE, + }, + .dma2_input = { + .cmd = DMA_INPUT_COMMAND_DISABLE, + }, + .aa = { + .cmd = ISP_AA_COMMAND_START, + .target = ISP_AA_TARGET_AF | ISP_AA_TARGET_AE | + ISP_AA_TARGET_AWB, + .mode = ISP_AF_CONTINUOUS, + }, + .flash = { + .cmd = ISP_FLASH_COMMAND_DISABLE, + .redeye = ISP_FLASH_REDEYE_DISABLE, + }, + .awb = { + .cmd = ISP_AWB_COMMAND_AUTO, + }, + .effect = { + .cmd = ISP_IMAGE_EFFECT_DISABLE, + }, + .iso = { + .cmd = ISP_ISO_COMMAND_AUTO, + }, + .adjust = { + .cmd = ISP_ADJUST_COMMAND_AUTO, + }, + .metering = { + .cmd = ISP_METERING_COMMAND_CENTER, + .win_width = DEFAULT_CAPTURE_STILL_WIDTH, + .win_height = DEFAULT_CAPTURE_STILL_HEIGHT, + }, + .afc = { + .cmd = ISP_AFC_COMMAND_AUTO, + }, + .otf_output = { + .cmd = OTF_OUTPUT_COMMAND_ENABLE, + .width = DEFAULT_CAPTURE_STILL_WIDTH, + .height = DEFAULT_CAPTURE_STILL_HEIGHT, + .format = OTF_OUTPUT_FORMAT_YUV444, + .bitwidth = OTF_OUTPUT_BIT_WIDTH_12BIT, + .order = OTF_OUTPUT_ORDER_BAYER_GR_BG, + }, + .dma1_output = { + .cmd = DMA_OUTPUT_COMMAND_DISABLE, + .width = DEFAULT_CAPTURE_STILL_WIDTH, + .height = DEFAULT_CAPTURE_STILL_HEIGHT, + .format = DMA_INPUT_FORMAT_YUV444, + .bitwidth = DMA_INPUT_BIT_WIDTH_8BIT, + .plane = 1, + .order = DMA_INPUT_ORDER_YCBCR, + }, + .dma2_output = { + .cmd = DMA_OUTPUT_COMMAND_DISABLE, + .width = DEFAULT_CAPTURE_STILL_WIDTH, + .height = DEFAULT_CAPTURE_STILL_HEIGHT, +
[PATCH v6 10/13] [media] exynos5-fimc-is: Add the hardware interface module
The hardware interface module finally sends the commands to the FIMC-IS firmware and runs the interrupt handler for getting the responses. Signed-off-by: Arun Kumar K arun...@samsung.com Signed-off-by: Kilyeon Im kilyeon...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- .../media/platform/exynos5-is/fimc-is-interface.c | 810 .../media/platform/exynos5-is/fimc-is-interface.h | 125 +++ 2 files changed, 935 insertions(+) create mode 100644 drivers/media/platform/exynos5-is/fimc-is-interface.c create mode 100644 drivers/media/platform/exynos5-is/fimc-is-interface.h diff --git a/drivers/media/platform/exynos5-is/fimc-is-interface.c b/drivers/media/platform/exynos5-is/fimc-is-interface.c new file mode 100644 index 000..c5da6ff --- /dev/null +++ b/drivers/media/platform/exynos5-is/fimc-is-interface.c @@ -0,0 +1,810 @@ +/* + * Samsung EXYNOS5 FIMC-IS (Imaging Subsystem) driver +* + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * Kil-yeon Lim kilyeon...@samsung.com + * + * 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 linux/debugfs.h +#include linux/seq_file.h +#include fimc-is.h +#include fimc-is-cmd.h +#include fimc-is-regs.h + +#define init_request_barrier(itf) mutex_init(itf-request_barrier) +#define enter_request_barrier(itf) mutex_lock(itf-request_barrier) +#define exit_request_barrier(itf) mutex_unlock(itf-request_barrier) + +static inline void itf_get_cmd(struct fimc_is_interface *itf, + struct fimc_is_msg *msg, unsigned int index) +{ + struct is_common_reg __iomem *com_regs = itf-com_regs; + + memset(msg, 0, sizeof(*msg)); + + switch (index) { + case INTR_GENERAL: + msg-command = com_regs-ihcmd; + msg-instance = com_regs-ihc_sensorid; + memcpy(msg-param, com_regs-ihc_param, + 4 * sizeof(msg-param[0])); + break; + case INTR_SCC_FDONE: + msg-command = IHC_FRAME_DONE; + msg-instance = com_regs-scc_sensor_id; + memcpy(msg-param, com_regs-scc_param, + 3 * sizeof(msg-param[0])); + break; + case INTR_SCP_FDONE: + msg-command = IHC_FRAME_DONE; + msg-instance = com_regs-scp_sensor_id; + memcpy(msg-param, com_regs-scp_param, + 3 * sizeof(msg-param[0])); + break; + case INTR_META_DONE: + msg-command = IHC_FRAME_DONE; + msg-instance = com_regs-meta_sensor_id; + msg-param[0] = com_regs-meta_param1; + break; + case INTR_SHOT_DONE: + msg-command = IHC_FRAME_DONE; + msg-instance = com_regs-shot_sensor_id; + memcpy(msg-param, com_regs-shot_param, + 2 * sizeof(msg-param[0])); + break; + default: + dev_err(itf-dev, %s Unknown command\n, __func__); + break; + } +} + +static inline unsigned int itf_get_intr(struct fimc_is_interface *itf) +{ + unsigned int status; + struct is_common_reg __iomem *com_regs = itf-com_regs; + + status = readl(itf-regs + INTMSR1) | com_regs-ihcmd_iflag | + com_regs-scc_iflag | + com_regs-scp_iflag | + com_regs-meta_iflag | + com_regs-shot_iflag; + + return status; +} + +static void itf_set_state(struct fimc_is_interface *itf, + unsigned long state) +{ + unsigned long flags; + spin_lock_irqsave(itf-slock_state, flags); + __set_bit(state, itf-state); + spin_unlock_irqrestore(itf-slock_state, flags); +} + +static void itf_clr_state(struct fimc_is_interface *itf, + unsigned long state) +{ + unsigned long flags; + spin_lock_irqsave(itf-slock_state, flags); + __clear_bit(state, itf-state); + spin_unlock_irqrestore(itf-slock_state, flags); +} + +static int itf_get_state(struct fimc_is_interface *itf, + unsigned long state) +{ + int ret = 0; + unsigned long flags; + + spin_lock_irqsave(itf-slock_state, flags); + ret = test_bit(state, itf-state); + spin_unlock_irqrestore(itf-slock_state, flags); + return ret; +} + +static void itf_init_wakeup(struct fimc_is_interface *itf) +{ + itf_set_state(itf, IS_IF_STATE_INIT); + wake_up(itf-irq_queue); +} + +void itf_busy_wakeup(struct fimc_is_interface *itf) +{ + itf_clr_state(itf, IS_IF_STATE_BUSY); + wake_up(itf-irq_queue); +} + +static int itf_wait_hw_ready(struct fimc_is_interface *itf) +{ + int t; + for (t = TRY_RECV_AWARE_COUNT; t = 0; t--) { + unsigned int cfg = readl(itf-regs + INTMSR0); +
Re: [PATCH V5] ARM: dts: Change i2s compatible string on exynos5250
On Fri, Aug 16, 2013 at 09:53:23AM +0200, Tomasz Figa wrote: Sorry, I don't think this is a good idea, unless you can force the IP team to release a version table containing version of _every_ IP for _every_ released SoC, including those historical ones, like S3C24xx and S3C64xx. Of course such tables should be available publicly. I don't think public availability is much of an issue here, the datasheets are all NDAed anyway. signature.asc Description: Digital signature
Re: [PATCH V5] ARM: dts: Change i2s compatible string on exynos5250
On Fri, Aug 16, 2013 at 09:56:18AM +0530, Padmavathi Venna wrote: This patch removes quirks from i2s node and change the i2s compatible names. Applied, thanks. signature.asc Description: Digital signature
Re: [PATCH v2 0/8] Common Clock Framework support for Samsung S3C64xx
Hi Mike, On Monday 05 of August 2013 11:06:25 Mike Turquette wrote: Quoting Kukjin Kim (2013-08-05 10:01:36) On 07/23/13 08:49, Tomasz Figa wrote: This series is an attempt to move clock support on Samsung S3C64xx SoCs to Common Clock Framework. First, support for PLL types present on S3C64xx SoCs is added to Samsung Common Clock Framework driver. Then the main clock driver for mentioned SoCs is introduced. Further patches contain fixes for drivers to make them compliant with CCF semantics, migration of platform code to use the new clock driver and removal of old clock management code. Depends on: - [PATCH v4 00/20] Samsung PWM support cleanup http://thread.gmane.org/gmane.linux.kernel.samsung-soc/20856 On S3C6410-based Tiny6410 board (Mini6410-compatible): Tested-by: Tomasz Figatomasz.f...@gmail.com For v1: Acked-by: Mike Turquettemturque...@linaro.org Changes since v1: - added patch for read-only muxes, - exported configurable muxes and dividers, - defined mout_syncmux as read-only mux, - in DT-enabled case fixed-clock binding is used to define external clocks. Tomasz Figa (8): clk: mux: Add support for read-only muxes. clk: samsung: pll: Add support for PLL6552 and PLL6553 clk: samsung: Add clock driver for S3C64xx SoCs ARM: SAMSUNG: Add soc_is_s3c6400/s3c6410 macros ARM: s3c64xx: dma: Use clk_prepare_enable/clk_disable_unprepare usb: host: ohci-s3c2410 Use clk_prepare_enable/clk_disable_unprepare ARM: s3c64xx: Migrate clock handling to Common Clock Framework ARM: s3c64xx: Remove old clock management code .../bindings/clock/samsung,s3c64xx-clock.txt | 77 ++ arch/arm/Kconfig |2 +- arch/arm/mach-s3c64xx/Makefile |2 +- arch/arm/mach-s3c64xx/clock.c | 1007 arch/arm/mach-s3c64xx/common.c | 21 +- arch/arm/mach-s3c64xx/common.h | 12 +- arch/arm/mach-s3c64xx/dma.c|4 +- arch/arm/mach-s3c64xx/include/mach/regs-clock.h| 132 +-- arch/arm/mach-s3c64xx/mach-anw6410.c |2 +- arch/arm/mach-s3c64xx/mach-crag6410.c |2 +- arch/arm/mach-s3c64xx/mach-hmt.c |2 +- arch/arm/mach-s3c64xx/mach-mini6410.c |2 +- arch/arm/mach-s3c64xx/mach-ncp.c |2 +- arch/arm/mach-s3c64xx/mach-smartq.c| 11 +- arch/arm/mach-s3c64xx/mach-smdk6400.c |2 +- arch/arm/mach-s3c64xx/mach-smdk6410.c |2 +- arch/arm/mach-s3c64xx/pm.c | 21 - arch/arm/mach-s3c64xx/s3c6400.c|6 - arch/arm/mach-s3c64xx/s3c6410.c|7 - arch/arm/plat-samsung/include/plat/cpu.h |4 + drivers/clk/clk-mux.c | 10 +- drivers/clk/samsung/Makefile |1 + drivers/clk/samsung/clk-pll.c | 160 drivers/clk/samsung/clk-pll.h |4 + drivers/clk/samsung/clk-s3c64xx.c | 465 + drivers/usb/host/ohci-s3c2410.c|8 +- include/dt-bindings/clock/samsung,s3c64xx-clock.h | 178 include/linux/clk-provider.h |2 + 28 files changed, 943 insertions(+), 1205 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/samsung,s3c64xx-clock.txt delete mode 100644 arch/arm/mach-s3c64xx/clock.c create mode 100644 drivers/clk/samsung/clk-s3c64xx.c create mode 100644 include/dt-bindings/clock/samsung,s3c64xx-clock.h Basically, this series looks good to me, but I'm not sure how this should be handled because of dependency with PWM cleanup and clk stuff in clk tree now... Patches 1-3 can go into the clk tree. 4-6 should go through their respective trees. It looks like version 2 of patch 2/8 has been applied by mistake, breaking compilation (and operation) of the clock driver added in patch 3/8. Could you please fix this up? Thanks in advance. Best regards, Tomasz If you want I can take 7 8 through the clk tree. Alternatively I can provide patches 1-3 in a separate stable topic branch for you to pull in as a dependency. We'll both merge that stable topic branch into our trees and you can make a note of it for the arm-soc folks. Regards, Mike - Kukjin -- 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 signature.asc Description: This is a digitally signed message
Re: [PATCH v9 04/16] iommu/exynos: allocate lv2 page table from own slab
On Wed, 14 Aug 2013 12:56:16 +0200, 'Joerg Roedel' wrote: On Fri, Aug 09, 2013 at 09:55:30AM +0200, Tomasz Figa wrote: Oh, this is a valid point, but it was more a nitpick about the coding style. Single path error handling (with goto) is widely used in the kernel in cases when more than one thing has to be undone and so I suggested this method of error handling here as well. I agree with that review from Tomasz, the error-handling should look similar to all the other places in the kernel and use goto. Ok. Thanks. KyongHo. Joerg -- 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 v9 03/16] iommu/exynos: fix page table maintenance
On Wed, 14 Aug 2013 13:54:53 -0700, Grant Grundler wrote: On Wed, Aug 14, 2013 at 3:49 AM, Joerg Roedel j...@8bytes.org wrote: On Thu, Aug 08, 2013 at 11:28:44AM -0700, Grant Grundler wrote: I can't speak to the previous BUG_ON(). I believe the EADDRESSINUSE failures could be either WARN_ON or BUG_ON. This condition is clearly a bug in the generic IOMMU allocator and I think that's why KyongHo Cho used BUG_ON. Handing out duplicate addresses will generally lead to some sort of data corruption or other fault depending on how robust the underlying device drivers are written. So my preference is a BUG_ON to immediately flag this condition instead of hoping a device driver will correctly handling the dma mapping failure (Some do, most currently don't). WARN_ON() + return -EADDRESSINUSE would be a good alternative. Even if it is a real BUG condition, I don't think it is worth to stop execution at this point. It makes debugging harder and the system less reliable. I prefer to go with the WARN_ON and an error return value. I'm ok with WARN_ON and an error return value. This is valid behavior. I expect this bug to never happen but if and when it does, I want a clear symptom (e.g. WARN_ON) that it happened. Ok. Finally, everyone thinks that WARN_ON() is OK. It will be helpful for the kernel code that uses iommu api. My concern is that historically, drivers did not get an error return value on failure: ftp://193.166.3.4/pub/linux/kernel/v2.3/patch-html/patch-2.3.47/linux_Documentation_DMA-mapping.txt.html or later: https://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/DMA-mapping.txt And thus, some drivers don't check or attempt to handle mapping failures based on this existing code. Here is a recent example: http://comments.gmane.org/gmane.linux.network/272969 I hope very few or none of those exist since Neil Horman demonstrated dma debugging can flag this behavior. Just for fun, I'll include this link : (apperently 2003 was a good year for DMA talks :) http://ols.fedoraproject.org/OLS/Reprints-2003/LinuxSymposium2003-2side.pdf (three talks on DMA issues) Thank you for the resources :) Those will be helpful for the guys with me. thanks grant -- 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 2/2] iommu/exynos: Follow kernel coding style for __sysmmu_enable return type
On Wed, 14 Aug 2013 15:15:49 +0200, 'Joerg Roedel' wrote: KyongHo, On Fri, Jul 26, 2013 at 07:46:01PM +0900, Cho KyongHo wrote: __sysmmu_enable() must return 1 if it is called with the same page table. I have fixed it exynos_iommu_attach_device() to always return zero on success in the next patchset which I will post today. Thank you. When you are fine with these patches please put them on-top of your patch-set when you re-submit. I will take them from there then. Ok. Antonios, Would you mind if I submit your 2 patches on top of my patches with your signed-off? KyongHo. Joerg -- 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 4/8] ARM: dts: Add dwmmc DT nodes for exynos5420 SOC
This patch adds the device tree node entries for exynos5420 SOC. Exynos5420 has a different version of DWMMC controller,so a new compatible string is used to distinguish it from the prior SOC's. Signed-off-by: Yuvaraj Kumar C D yuvaraj...@samsung.com --- .../devicetree/bindings/mmc/exynos-dw-mshc.txt |2 + arch/arm/boot/dts/exynos5420-smdk5420.dts | 41 arch/arm/boot/dts/exynos5420.dtsi | 33 3 files changed, 76 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index 6d1c098..84cd56f 100644 --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt @@ -16,6 +16,8 @@ Required Properties: specific extensions. - samsung,exynos5250-dw-mshc: for controllers with Samsung Exynos5250 specific extensions. + - samsung,exynos5420-dw-mshc: for controllers with Samsung Exynos5420 + specific extensions. * samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface unit (ciu) clock. This property is applicable only for Exynos5 SoC's and diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts b/arch/arm/boot/dts/exynos5420-smdk5420.dts index 08607df..4530700 100644 --- a/arch/arm/boot/dts/exynos5420-smdk5420.dts +++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts @@ -30,4 +30,45 @@ clock-frequency = 2400; }; }; + + dwmmc0@1220 { + num-slots = 1; + broken-cd; + bypass-smu; + supports-highspeed; + fifo-depth = 0x80; + card-detect-delay = 200; + samsung,dw-mshc-ciu-div = 3; + samsung,dw-mshc-sdr-timing = 0 4; + samsung,dw-mshc-ddr-timing = 0 2; + pinctrl-names = default; + pinctrl-0 = sd0_clk sd0_cmd sd0_bus4 sd0_bus8; + + slot@0 { + reg = 0; + bus-width = 8; + }; + }; + + dwmmc1@1221 { + status = disabled; + }; + + dwmmc2@1222 { + num-slots = 1; + supports-highspeed; + fifo-depth = 0x80; + card-detect-delay = 200; + samsung,dw-mshc-ciu-div = 3; + samsung,dw-mshc-sdr-timing = 2 3; + samsung,dw-mshc-ddr-timing = 1 2; + pinctrl-names = default; + pinctrl-0 = sd2_clk sd2_cmd sd2_cd sd2_bus4; + + slot@0 { + reg = 0; + bus-width = 4; + }; + }; + }; diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 9e90d1e..8559aa8 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -19,6 +19,9 @@ compatible = samsung,exynos5420; aliases { + mshc0 = dwmmc_0; + mshc1 = dwmmc_1; + mshc2 = dwmmc_2; pinctrl0 = pinctrl_0; pinctrl1 = pinctrl_1; pinctrl2 = pinctrl_2; @@ -65,6 +68,36 @@ #clock-cells = 1; }; + dwmmc_0: dwmmc0@1220 { + compatible = samsung,exynos5420-dw-mshc; + interrupts = 0 75 0; + #address-cells = 1; + #size-cells = 0; + reg = 0x1220 0x2000; + clocks = clock 351, clock 132; + clock-names = biu, ciu; + }; + + dwmmc_1: dwmmc1@1221 { + compatible = samsung,exynos5420-dw-mshc; + interrupts = 0 76 0; + #address-cells = 1; + #size-cells = 0; + reg = 0x1221 0x2000; + clocks = clock 352, clock 133; + clock-names = biu, ciu; + }; + + dwmmc_2: dwmmc2@1222 { + compatible = samsung,exynos5420-dw-mshc; + interrupts = 0 77 0; + #address-cells = 1; + #size-cells = 0; + reg = 0x1222 0x2000; + clocks = clock 353, clock 134; + clock-names = biu, ciu; + }; + mct@101C { compatible = samsung,exynos4210-mct; reg = 0x101C 0x800; -- 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
It is Private
It is Private I am George Daniels, a Banker and credit system programmer (HSBC bank). I saw your email address while browsing through the bank D.T.C Screen in my office yesterday so I decided to use this very chance to know you. I believe we should use every opportunity to know each other better. However, I am contacting you for obvious reason which you will understand. I am sending this mail just to know if this email address is OK, reply me back so that I will send more details to you. I have a very important thing to discuss with you, I look forward to receiving your response at georgedani...@postino.netmailto:georgedani...@postino.net. Have a pleasant day. George Daniels -- 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] ARM: dts: Add dwmmc DT nodes for exynos5420 SOC
This patch adds the device tree node entries for exynos5420 SOC. Exynos5420 has a different version of DWMMC controller,so a new compatible string is used to distinguish it from the prior SOC's. Signed-off-by: Yuvaraj Kumar C D yuvaraj...@samsung.com --- .../devicetree/bindings/mmc/exynos-dw-mshc.txt |2 + arch/arm/boot/dts/exynos5420-smdk5420.dts | 41 arch/arm/boot/dts/exynos5420.dtsi | 33 3 files changed, 76 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index 6d1c098..84cd56f 100644 --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt @@ -16,6 +16,8 @@ Required Properties: specific extensions. - samsung,exynos5250-dw-mshc: for controllers with Samsung Exynos5250 specific extensions. + - samsung,exynos5420-dw-mshc: for controllers with Samsung Exynos5420 + specific extensions. * samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface unit (ciu) clock. This property is applicable only for Exynos5 SoC's and diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts b/arch/arm/boot/dts/exynos5420-smdk5420.dts index 08607df..4530700 100644 --- a/arch/arm/boot/dts/exynos5420-smdk5420.dts +++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts @@ -30,4 +30,45 @@ clock-frequency = 2400; }; }; + + dwmmc0@1220 { + num-slots = 1; + broken-cd; + bypass-smu; + supports-highspeed; + fifo-depth = 0x80; + card-detect-delay = 200; + samsung,dw-mshc-ciu-div = 3; + samsung,dw-mshc-sdr-timing = 0 4; + samsung,dw-mshc-ddr-timing = 0 2; + pinctrl-names = default; + pinctrl-0 = sd0_clk sd0_cmd sd0_bus4 sd0_bus8; + + slot@0 { + reg = 0; + bus-width = 8; + }; + }; + + dwmmc1@1221 { + status = disabled; + }; + + dwmmc2@1222 { + num-slots = 1; + supports-highspeed; + fifo-depth = 0x80; + card-detect-delay = 200; + samsung,dw-mshc-ciu-div = 3; + samsung,dw-mshc-sdr-timing = 2 3; + samsung,dw-mshc-ddr-timing = 1 2; + pinctrl-names = default; + pinctrl-0 = sd2_clk sd2_cmd sd2_cd sd2_bus4; + + slot@0 { + reg = 0; + bus-width = 4; + }; + }; + }; diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 9e90d1e..8559aa8 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -19,6 +19,9 @@ compatible = samsung,exynos5420; aliases { + mshc0 = dwmmc_0; + mshc1 = dwmmc_1; + mshc2 = dwmmc_2; pinctrl0 = pinctrl_0; pinctrl1 = pinctrl_1; pinctrl2 = pinctrl_2; @@ -65,6 +68,36 @@ #clock-cells = 1; }; + dwmmc_0: dwmmc0@1220 { + compatible = samsung,exynos5420-dw-mshc; + interrupts = 0 75 0; + #address-cells = 1; + #size-cells = 0; + reg = 0x1220 0x2000; + clocks = clock 351, clock 132; + clock-names = biu, ciu; + }; + + dwmmc_1: dwmmc1@1221 { + compatible = samsung,exynos5420-dw-mshc; + interrupts = 0 76 0; + #address-cells = 1; + #size-cells = 0; + reg = 0x1221 0x2000; + clocks = clock 352, clock 133; + clock-names = biu, ciu; + }; + + dwmmc_2: dwmmc2@1222 { + compatible = samsung,exynos5420-dw-mshc; + interrupts = 0 77 0; + #address-cells = 1; + #size-cells = 0; + reg = 0x1222 0x2000; + clocks = clock 353, clock 134; + clock-names = biu, ciu; + }; + mct@101C { compatible = samsung,exynos4210-mct; reg = 0x101C 0x800; -- 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: Broken device trees for exynos in linux-next
On Thu, Aug 15, 2013 at 5:04 PM, Kukjin Kim kg...@kernel.org wrote: I think, maybe we discussed about that? :) current exynos_defconfig cannot support exynos5440 because of LPAE and I remember we decided LPAE and non-LPAE should be separated. So as I commented before, exynos5440_defconfig is needed. If you have any concerns, please let me know. Having a SoC-specific defconfig makes no sense. You can run with LPAE enabled on A15 and A7-based systems even if they don't have enough memory to need it. Really, what we want is to just turn on the LPAE functionality and keep everything else common. Forking into two defconfigs seems like the wrong idea, even if we did discuss it before. Having something like a config fragment to include would make more sense, since that could be shared across all platforms (and apply with multi_v7_defconfig for those who want to run that on LPAE as well). Or, you know, just have your build script enable it without having an in-tree config fragment. That'd work too. The main case where this isn't sufficient is on platforms where _all_ memory sits above 4G, since you can't boot a non-LPAE kernel on those at all. It seems like 5440 has memory starting at 2GB so it's not one of those. -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
Re: Broken device trees for exynos in linux-next
On Fri, Aug 16, 2013 at 09:04:41AM -0700, Olof Johansson wrote: Really, what we want is to just turn on the LPAE functionality and keep everything else common. Forking into two defconfigs seems like There's issues with that at the minute due to the DMA mask fun breaking stuff, though Russell's work has resolved that it should work fine. signature.asc Description: Digital signature
Re: [PATCH v2 0/8] Common Clock Framework support for Samsung S3C64xx
On Friday 16 of August 2013 14:02:03 Mike Turquette wrote: Quoting Tomasz Figa (2013-08-16 03:44:44) Hi Mike, On Monday 05 of August 2013 11:06:25 Mike Turquette wrote: Quoting Kukjin Kim (2013-08-05 10:01:36) On 07/23/13 08:49, Tomasz Figa wrote: This series is an attempt to move clock support on Samsung S3C64xx SoCs to Common Clock Framework. First, support for PLL types present on S3C64xx SoCs is added to Samsung Common Clock Framework driver. Then the main clock driver for mentioned SoCs is introduced. Further patches contain fixes for drivers to make them compliant with CCF semantics, migration of platform code to use the new clock driver and removal of old clock management code. Depends on: - [PATCH v4 00/20] Samsung PWM support cleanup http://thread.gmane.org/gmane.linux.kernel.samsung-soc/20856 On S3C6410-based Tiny6410 board (Mini6410-compatible): Tested-by: Tomasz Figatomasz.f...@gmail.com For v1: Acked-by: Mike Turquettemturque...@linaro.org Changes since v1: - added patch for read-only muxes, - exported configurable muxes and dividers, - defined mout_syncmux as read-only mux, - in DT-enabled case fixed-clock binding is used to define external clocks. Tomasz Figa (8): clk: mux: Add support for read-only muxes. clk: samsung: pll: Add support for PLL6552 and PLL6553 clk: samsung: Add clock driver for S3C64xx SoCs ARM: SAMSUNG: Add soc_is_s3c6400/s3c6410 macros ARM: s3c64xx: dma: Use clk_prepare_enable/clk_disable_unprepare usb: host: ohci-s3c2410 Use clk_prepare_enable/clk_disable_unprepare ARM: s3c64xx: Migrate clock handling to Common Clock Framework ARM: s3c64xx: Remove old clock management code .../bindings/clock/samsung,s3c64xx-clock.txt | 77 ++ arch/arm/Kconfig |2 +- arch/arm/mach-s3c64xx/Makefile |2 +- arch/arm/mach-s3c64xx/clock.c | 1007 arch/arm/mach-s3c64xx/common.c | 21 +- arch/arm/mach-s3c64xx/common.h | 12 +- arch/arm/mach-s3c64xx/dma.c|4 +- arch/arm/mach-s3c64xx/include/mach/regs-clock.h| 132 +-- arch/arm/mach-s3c64xx/mach-anw6410.c |2 +- arch/arm/mach-s3c64xx/mach-crag6410.c |2 +- arch/arm/mach-s3c64xx/mach-hmt.c |2 +- arch/arm/mach-s3c64xx/mach-mini6410.c |2 +- arch/arm/mach-s3c64xx/mach-ncp.c |2 +- arch/arm/mach-s3c64xx/mach-smartq.c| 11 +- arch/arm/mach-s3c64xx/mach-smdk6400.c |2 +- arch/arm/mach-s3c64xx/mach-smdk6410.c |2 +- arch/arm/mach-s3c64xx/pm.c | 21 - arch/arm/mach-s3c64xx/s3c6400.c|6 - arch/arm/mach-s3c64xx/s3c6410.c|7 - arch/arm/plat-samsung/include/plat/cpu.h |4 + drivers/clk/clk-mux.c | 10 +- drivers/clk/samsung/Makefile |1 + drivers/clk/samsung/clk-pll.c | 160 drivers/clk/samsung/clk-pll.h |4 + drivers/clk/samsung/clk-s3c64xx.c | 465 + drivers/usb/host/ohci-s3c2410.c|8 +- include/dt-bindings/clock/samsung,s3c64xx-clock.h | 178 include/linux/clk-provider.h |2 + 28 files changed, 943 insertions(+), 1205 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/samsung,s3c64xx-clock. txt delete mode 100644 arch/arm/mach-s3c64xx/clock.c create mode 100644 drivers/clk/samsung/clk-s3c64xx.c create mode 100644 include/dt-bindings/clock/samsung,s3c64xx-clock.h Basically, this series looks good to me, but I'm not sure how this should be handled because of dependency with PWM cleanup and clk stuff in clk tree now... Patches 1-3 can go into the clk tree. 4-6 should go through their respective trees. It looks like version 2 of patch 2/8 has been applied by mistake, breaking compilation (and operation) of the clock driver added in patch 3/8. Ugh. My mistake. Happens. Thanks for fast response. Could you please fix this up? Thanks in advance. This is a little tricky since I published the clk-next-s3c64xx branch as a stable branch for Samsung which I think has been merged to the Samsung tree already. Right, this somewhat