RE: [PATCH v3 2/2] ARM: EXYNOS: Add Gscaler device from DT
Kukjin Kim wrote: Sylwester Nawrocki wrote: On 08/06/2012 08:27 AM, Shaik Ameer Basha wrote: After all this discussion, I can see two possibilities here. 1] If Kukjin Kim is sure about G-Scaler remains unchanged, across all the exynos5 series SoCs, It is fine to go with the compatible string samsung,exynos5- gsc. 2] Otherwise in case of any doubts about G-Scaler is going to change, It is safe to go with the compatible string specific to current SoC i.e., samsung,exynos5250-gsc. If we all can agree on this, lets Kukjin Kim decide which string to use as he has good knowledge about upcoming exynos5 series SoCs. I don't have strong opinion on this, but my vote goes for using more specific properties. Of course the final word belongs to Mr. Kim. Thanks, and I will discuss with exynos hardware chip designers about that, then let you know. 'exynos5-gsc' should be ok on EXYNOS5250 and upcoming EXYNOS5 SoCs. If any updates, I'll let you know. Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v3 2/2] ARM: EXYNOS: Add Gscaler device from DT
Sylwester Nawrocki wrote: On 08/06/2012 08:27 AM, Shaik Ameer Basha wrote: After all this discussion, I can see two possibilities here. 1] If Kukjin Kim is sure about G-Scaler remains unchanged, across all the exynos5 series SoCs, It is fine to go with the compatible string samsung,exynos5-gsc. 2] Otherwise in case of any doubts about G-Scaler is going to change, It is safe to go with the compatible string specific to current SoC i.e., samsung,exynos5250-gsc. If we all can agree on this, lets Kukjin Kim decide which string to use as he has good knowledge about upcoming exynos5 series SoCs. I don't have strong opinion on this, but my vote goes for using more specific properties. Of course the final word belongs to Mr. Kim. Thanks, and I will discuss with exynos hardware chip designers about that, then let you know. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v3 2/2] ARM: EXYNOS: Add Gscaler device from DT
Shaik Ameer Basha wrote: This patch adds, - 4 Gscaler devices to the DT device list - Gscaler specific entries to the machine file - binding documentation for Gscaler entries Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com Signed-off-by: Shaik Ameer Basha shaik.am...@samsung.com --- .../devicetree/bindings/media/exynos5-gsc.txt | 32 arch/arm/boot/dts/exynos5250.dtsi | 28 + arch/arm/mach-exynos/include/mach/map.h|3 ++ arch/arm/mach-exynos/mach-exynos5-dt.c |8 + 4 files changed, 71 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/exynos5- gsc.txt diff --git a/Documentation/devicetree/bindings/media/exynos5-gsc.txt b/Documentation/devicetree/bindings/media/exynos5-gsc.txt new file mode 100644 index 000..1cb4ea0 --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos5-gsc.txt @@ -0,0 +1,32 @@ +* Samsung Exynos5 Gscaler device + +Gscaler is used for scaling and color space conversion on EXYNOS5 SoCs. + +Required properties: +- compatible: should be samsung,exynos5250-gsc IMO, should be samsung,exynos5-gsc because upcoming EXYNOS5 SoCs can use same gscaler driver. +- reg: should contain Gscaler physical address location and length. +- interrupts: should contain Gscaler interrupt number + +Example: + +gsc_0: gsc@0x13e0 { + compatible = samsung,exynos5250-gsc; + compatible = samsung,exynos5-gsc; + reg = 0x13e0 0x1000; + interrupts = 0 85 0; +}; + [...] diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach- exynos/include/mach/map.h index c72b675..217e470 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -121,6 +121,9 @@ #define EXYNOS4_PA_SYSMMU_MFC_L 0x1362 #define EXYNOS4_PA_SYSMMU_MFC_R 0x1363 +/* x = 0...3 */ +#define EXYNOS5_PA_GSC(x)(0x13e0 + ((x) * 0x1)) I think, separated definitions would be nice because the number of channel can be changed on other upcoming EXYNOS5 SoCs. +#define EXYNOS5_PA_GSC00x13E0 +#define EXYNOS5_PA_GSC10x13E1 +#define EXYNOS5_PA_GSC20x13E2 +#define EXYNOS5_PA_GSC30x13E3 [...] Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 2/2] ARM: EXYNOS: Add Gscaler device from DT
Hi Kukjin Kim, On Wed, Aug 1, 2012 at 12:10 PM, Kukjin Kim kgene@samsung.com wrote: Shaik Ameer Basha wrote: This patch adds, - 4 Gscaler devices to the DT device list - Gscaler specific entries to the machine file - binding documentation for Gscaler entries Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com Signed-off-by: Shaik Ameer Basha shaik.am...@samsung.com --- .../devicetree/bindings/media/exynos5-gsc.txt | 32 arch/arm/boot/dts/exynos5250.dtsi | 28 + arch/arm/mach-exynos/include/mach/map.h|3 ++ arch/arm/mach-exynos/mach-exynos5-dt.c |8 + 4 files changed, 71 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/exynos5- gsc.txt diff --git a/Documentation/devicetree/bindings/media/exynos5-gsc.txt b/Documentation/devicetree/bindings/media/exynos5-gsc.txt new file mode 100644 index 000..1cb4ea0 --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos5-gsc.txt @@ -0,0 +1,32 @@ +* Samsung Exynos5 Gscaler device + +Gscaler is used for scaling and color space conversion on EXYNOS5 SoCs. + +Required properties: +- compatible: should be samsung,exynos5250-gsc IMO, should be samsung,exynos5-gsc because upcoming EXYNOS5 SoCs can use same gscaler driver. yes. thats true. i will change that. +- reg: should contain Gscaler physical address location and length. +- interrupts: should contain Gscaler interrupt number + +Example: + +gsc_0: gsc@0x13e0 { + compatible = samsung,exynos5250-gsc; + compatible = samsung,exynos5-gsc; ok. will update this accordingly. + reg = 0x13e0 0x1000; + interrupts = 0 85 0; +}; + [...] diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach- exynos/include/mach/map.h index c72b675..217e470 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -121,6 +121,9 @@ #define EXYNOS4_PA_SYSMMU_MFC_L 0x1362 #define EXYNOS4_PA_SYSMMU_MFC_R 0x1363 +/* x = 0...3 */ +#define EXYNOS5_PA_GSC(x)(0x13e0 + ((x) * 0x1)) I think, separated definitions would be nice because the number of channel can be changed on other upcoming EXYNOS5 SoCs. +#define EXYNOS5_PA_GSC00x13E0 +#define EXYNOS5_PA_GSC10x13E1 +#define EXYNOS5_PA_GSC20x13E2 +#define EXYNOS5_PA_GSC30x13E3 Ok. I will update as per your suggestion. [...] Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. Thanks, Shaik Ameer Basha -- 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 v3 2/2] ARM: EXYNOS: Add Gscaler device from DT
Thomas Abraham wrote: On 1 August 2012 12:10, Kukjin Kim kgene@samsung.com wrote: Shaik Ameer Basha wrote: [...] +* Samsung Exynos5 Gscaler device + +Gscaler is used for scaling and color space conversion on EXYNOS5 SoCs. + +Required properties: +- compatible: should be samsung,exynos5250-gsc IMO, should be samsung,exynos5-gsc because upcoming EXYNOS5 SoCs can use same gscaler driver. The compatible string should always be specific and it should clearly identify the type of the controller. If there are other variants of the GSC controller in previous of upcoming SoC's, then those controllers will have a different compatible value. As I commented, there will be no differences for gscaler between EXYNOS5 SoCs. So IMO, the 'exynos5-gsc' is clear enough for compatible string of EXYNOS5 Gscaler. This allows device drivers to know the type of the controller and handle the differences among them. And, the node in the dts/dtsi file should always claim compatibility to the base version of the controller that the platform supports. So the compatible value samsung,exynos5250-gsc is right one. If a new SoC in the Exynos5 family has the same GSC controller as that in Exynos5250 (no difference at all), then GSC device node in its dts file can continue to claim compatibility to Exynos5250 type. The I don't think so... samsung,s3c2410-wdt is an example of this case which has been used on all Samsung SoC's . I think, the case of 's3c2410-wdt' is different because you know, the name has been used for a long time in addition, the name of driver is s3c2410_wdt.c. But in this case, gscaler should be same on EXYNOS5 SoCs which is including upcoming, so I don't see why we should use 'exynos5250-gsc' for all of EXYNOS5 series. Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 2/2] ARM: EXYNOS: Add Gscaler device from DT
On 08/01/2012 09:48 AM, Thomas Abraham wrote: On 1 August 2012 12:10, Kukjin Kim kgene@samsung.com wrote: Shaik Ameer Basha wrote: [...] +* Samsung Exynos5 Gscaler device + +Gscaler is used for scaling and color space conversion on EXYNOS5 SoCs. + +Required properties: +- compatible: should be samsung,exynos5250-gsc IMO, should be samsung,exynos5-gsc because upcoming EXYNOS5 SoCs can use same gscaler driver. In addition to the below explanation, perhaps it's obvious, but the driver can claim compatibility with multiple devices, i.e. match with multiple 'compatible' properties. Regards, Sylwester The compatible string should always be specific and it should clearly identify the type of the controller. If there are other variants of the GSC controller in previous of upcoming SoC's, then those controllers will have a different compatible value. This allows device drivers to know the type of the controller and handle the differences among them. And, the node in the dts/dtsi file should always claim compatibility to the base version of the controller that the platform supports. So the compatible value samsung,exynos5250-gsc is right one. If a new SoC in the Exynos5 family has the same GSC controller as that in Exynos5250 (no difference at all), then GSC device node in its dts file can continue to claim compatibility to Exynos5250 type. The samsung,s3c2410-wdt is an example of this case which has been used on all Samsung SoC's . Thanks, Thomas. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v3 2/2] ARM: EXYNOS: Add Gscaler device from DT
Sylwester Nawrocki wrote: On 08/01/2012 09:48 AM, Thomas Abraham wrote: On 1 August 2012 12:10, Kukjin Kim kgene@samsung.com wrote: Shaik Ameer Basha wrote: [...] +* Samsung Exynos5 Gscaler device + +Gscaler is used for scaling and color space conversion on EXYNOS5 SoCs. + +Required properties: +- compatible: should be samsung,exynos5250-gsc IMO, should be samsung,exynos5-gsc because upcoming EXYNOS5 SoCs can use same gscaler driver. In addition to the below explanation, perhaps it's obvious, but the driver can claim compatibility with multiple devices, i.e. match with multiple 'compatible' properties. The name of exact model is 'gscaler' for EXYNOS5 SoCs not only for EXYNOS5250. So the driver which has been submitted is also 'exynos-gsc' not 'exynos5250-gsc'. Note that there is no gscaler on EXYNOS4 SoCs now, it can be either 'exynos5-gsc' or 'exynos-gsc'. In addition, since some peripherals/drivers can be used for multiple SoCs and actually it does, I'm still thinking the compatible should be represent its usage. I don't know why restricted name is much clearer. And if multiple 'compatible' is required, we can add it later. Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. The compatible string should always be specific and it should clearly identify the type of the controller. If there are other variants of the GSC controller in previous of upcoming SoC's, then those controllers will have a different compatible value. This allows device drivers to know the type of the controller and handle the differences among them. And, the node in the dts/dtsi file should always claim compatibility to the base version of the controller that the platform supports. So the compatible value samsung,exynos5250-gsc is right one. If a new SoC in the Exynos5 family has the same GSC controller as that in Exynos5250 (no difference at all), then GSC device node in its dts file can continue to claim compatibility to Exynos5250 type. The samsung,s3c2410-wdt is an example of this case which has been used on all Samsung SoC's . -- 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 v3 2/2] ARM: EXYNOS: Add Gscaler device from DT
Hi Kgene, Cc: Rob Herring On 08/01/2012 11:00 AM, Kukjin Kim wrote: +* Samsung Exynos5 Gscaler device + +Gscaler is used for scaling and color space conversion on EXYNOS5 SoCs. + +Required properties: +- compatible: should be samsung,exynos5250-gsc IMO, should be samsung,exynos5-gsc because upcoming EXYNOS5 SoCs can use same gscaler driver. In addition to the below explanation, perhaps it's obvious, but the driver can claim compatibility with multiple devices, i.e. match with multiple 'compatible' properties. The name of exact model is 'gscaler' for EXYNOS5 SoCs not only for EXYNOS5250. So the driver which has been submitted is also 'exynos-gsc' not 'exynos5250-gsc'. Note that there is no gscaler on EXYNOS4 SoCs now, it can be either 'exynos5-gsc' or 'exynos-gsc'. In addition, since some peripherals/drivers can be used for multiple SoCs and actually it does, I'm still thinking the compatible should be represent its usage. I don't know why restricted name is much clearer. And if multiple 'compatible' is required, we can add it later. Sorry, but I cannot agree with that. :) There is no exynos5 SoC, it's just a common name for the whole series that includes: exynos5250, exynos5450 ones and more. We shouldn't use such common name for just a subset of exynos5 chips, in case different GScaler versions get deployed in future SoCs. It wouldn't be clear what specific SoCs the samsung,exynos5-gsc compatible string applies to, would it ? I believe there are already minor differences in GScaler parameters on currently available exynos5 SoC. The variant data structures are used to handle this and the compatible string determines which variant data structure is selected during driver's initialization. If you use a wildcard 'compatible' string this won't be possible any more. Also it would look odd IMO to have two compatible strings like: compatible = samsung,exynos5-gsc, samsung,exynos5400-gsc; Please also see: http://devicetree.org/Device_Tree_Usage#Understanding_the_compatible_Property -- 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
[PATCH v3 2/2] ARM: EXYNOS: Add Gscaler device from DT
This patch adds, - 4 Gscaler devices to the DT device list - Gscaler specific entries to the machine file - binding documentation for Gscaler entries Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com Signed-off-by: Shaik Ameer Basha shaik.am...@samsung.com --- .../devicetree/bindings/media/exynos5-gsc.txt | 32 arch/arm/boot/dts/exynos5250.dtsi | 28 + arch/arm/mach-exynos/include/mach/map.h|3 ++ arch/arm/mach-exynos/mach-exynos5-dt.c |8 + 4 files changed, 71 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/exynos5-gsc.txt diff --git a/Documentation/devicetree/bindings/media/exynos5-gsc.txt b/Documentation/devicetree/bindings/media/exynos5-gsc.txt new file mode 100644 index 000..1cb4ea0 --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos5-gsc.txt @@ -0,0 +1,32 @@ +* Samsung Exynos5 Gscaler device + +Gscaler is used for scaling and color space conversion on EXYNOS5 SoCs. + +Required properties: +- compatible: should be samsung,exynos5250-gsc +- reg: should contain Gscaler physical address location and length. +- interrupts: should contain Gscaler interrupt number + +Example: + +gsc_0: gsc@0x13e0 { + compatible = samsung,exynos5250-gsc; + reg = 0x13e0 0x1000; + interrupts = 0 85 0; +}; + +Aliases: +Each Gscaler node should have a numbered alias in the aliases node, +in the form of gscN, N = 0...3. Gscaler driver uses these aliases +to retrieve the device IDs using of_alias_get_id() call. + +Example: + +aliases { + gsc0 =gsc_0; + gsc1 =gsc_1; + gsc2 =gsc_2; + gsc3 =gsc_3; +}; + + diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index a3a2eb2..ad6c3c5 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -27,6 +27,10 @@ spi0 = spi_0; spi1 = spi_1; spi2 = spi_2; + gsc0 = gsc_0; + gsc1 = gsc_1; + gsc2 = gsc_2; + gsc3 = gsc_3; }; gic:interrupt-controller@10481000 { @@ -460,4 +464,28 @@ #gpio-cells = 4; }; }; + + gsc_0: gsc@0x13e0 { + compatible = samsung,exynos5250-gsc; + reg = 0x13e0 0x1000; + interrupts = 0 85 0; + }; + + gsc_1: gsc@0x13e1 { + compatible = samsung,exynos5250-gsc; + reg = 0x13e1 0x1000; + interrupts = 0 86 0; + }; + + gsc_2: gsc@0x13e2 { + compatible = samsung,exynos5250-gsc; + reg = 0x13e2 0x1000; + interrupts = 0 87 0; + }; + + gsc_3: gsc@0x13e3 { + compatible = samsung,exynos5250-gsc; + reg = 0x13e3 0x1000; + interrupts = 0 88 0; + }; }; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index c72b675..217e470 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -121,6 +121,9 @@ #define EXYNOS4_PA_SYSMMU_MFC_L0x1362 #define EXYNOS4_PA_SYSMMU_MFC_R0x1363 +/* x = 0...3 */ +#define EXYNOS5_PA_GSC(x) (0x13e0 + ((x) * 0x1)) + #define EXYNOS5_PA_SYSMMU_MDMA10x10A4 #define EXYNOS5_PA_SYSMMU_SSS 0x10A5 #define EXYNOS5_PA_SYSMMU_2D 0x10A6 diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index ef770bc..fd8f1ca 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -56,6 +56,14 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_PDMA0, dma-pl330.0, NULL), OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_PDMA1, dma-pl330.1, NULL), OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_MDMA1, dma-pl330.2, NULL), + OF_DEV_AUXDATA(samsung,exynos5250-gsc, EXYNOS5_PA_GSC(0), + exynos-gsc.0, NULL), + OF_DEV_AUXDATA(samsung,exynos5250-gsc, EXYNOS5_PA_GSC(1), + exynos-gsc.1, NULL), + OF_DEV_AUXDATA(samsung,exynos5250-gsc, EXYNOS5_PA_GSC(2), + exynos-gsc.2, NULL), + OF_DEV_AUXDATA(samsung,exynos5250-gsc, EXYNOS5_PA_GSC(3), + exynos-gsc.3, NULL), {}, }; -- 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