linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support
@ 2011-02-11 17:27 Sylwester Nawrocki
  2011-02-11 17:27 ` [PATCH v2 1/3] ARM: S5PV210: Enable I2C0 bus on GONI board Sylwester Nawrocki
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2011-02-11 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

the following patch series introduces changes in GONI board setup file
required for the CIF camera sensor driver.
The first patch adds the I2C0 bus driver, the second one adds the regulator
supply definitions and the third one just increases virtual size
of the framebuffer window 0 to enable double-buffering.
The added regulator supplies are also a subset of the supplies of the high
resolution camera which that reference board is equipped with.

Changes since v1:
 - removed unnecessary "select CONFIG_S3C_DEV_I2C0"


The patch series contains:

[PATCH 1/3] ARM: S5PV210: Enable I2C0 bus on GONI board
[PATCH 2/3] ARM: S5PV210: Add supplies for CIF camera on GONI board
[PATCH 3/3] ARM: S5PV210: Change framebuffer window 0 size on GONI

Created against for-next branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git 


Regards,
--
Sylwester Nawrocki
Samsung Poland R&D Center

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/3] ARM: S5PV210: Enable I2C0 bus on GONI board
  2011-02-11 17:27 [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support Sylwester Nawrocki
@ 2011-02-11 17:27 ` Sylwester Nawrocki
  2011-02-11 17:27 ` [PATCH v2 2/3] ARM: S5PV210: Add supplies for CIF camera " Sylwester Nawrocki
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2011-02-11 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

Add I2C0 bus platform device for camera sensors.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <@samsung.com>
---
 arch/arm/mach-s5pv210/mach-goni.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index db16d72..7a7cf6a 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -773,6 +773,7 @@ static struct platform_device *goni_devices[] __initdata = {
 	&goni_i2c_gpio5,
 	&mmc2_fixed_voltage,
 	&goni_device_gpiokeys,
+	&s3c_device_i2c0,
 	&s5p_device_fimc0,
 	&s5p_device_fimc1,
 	&s5p_device_fimc2,
@@ -809,6 +810,9 @@ static void __init goni_machine_init(void)
 	/* Radio: call before I2C 1 registeration */
 	goni_radio_init();
 
+	/* I2C0 */
+	s3c_i2c0_set_platdata(NULL);
+
 	/* I2C1 */
 	s3c_i2c1_set_platdata(NULL);
 	i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
-- 
1.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/3] ARM: S5PV210: Add supplies for CIF camera on GONI board
  2011-02-11 17:27 [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support Sylwester Nawrocki
  2011-02-11 17:27 ` [PATCH v2 1/3] ARM: S5PV210: Enable I2C0 bus on GONI board Sylwester Nawrocki
@ 2011-02-11 17:27 ` Sylwester Nawrocki
  2011-02-11 17:27 ` [PATCH v2 3/3] ARM: S5PV210: Change framebuffer window 0 size on GONI Sylwester Nawrocki
  2011-02-15  5:50 ` [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support Kukjin Kim
  3 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2011-02-11 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

Add regulator supplies required for NOON010PC30 CIF sensor.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 arch/arm/mach-s5pv210/mach-goni.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 7a7cf6a..53b3b96 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -273,6 +273,18 @@ static struct regulator_consumer_supply goni_ldo5_consumers[] = {
 	REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
 };
 
+static struct regulator_consumer_supply goni_ldo11_consumers[] = {
+	REGULATOR_SUPPLY("vddio", "0-0030"), /* "CAM_IO_2.8V" */
+};
+
+static struct regulator_consumer_supply goni_ldo13_consumers[] = {
+	REGULATOR_SUPPLY("vdda", "0-0030"), /* "CAM_A_2.8V" */
+};
+
+static struct regulator_consumer_supply goni_ldo14_consumers[] = {
+	REGULATOR_SUPPLY("vdd_core", "0-0030"), /* "CAM_CIF_1.8V" */
+};
+
 static struct regulator_init_data goni_ldo2_data = {
 	.constraints	= {
 		.name		= "VALIVE_1.1V",
@@ -371,8 +383,10 @@ static struct regulator_init_data goni_ldo11_data = {
 		.min_uV		= 2800000,
 		.max_uV		= 2800000,
 		.apply_uV	= 1,
-		.always_on	= 1,
+		.valid_ops_mask	= REGULATOR_CHANGE_STATUS,
 	},
+	.num_consumer_supplies	= ARRAY_SIZE(goni_ldo11_consumers),
+	.consumer_supplies	= goni_ldo11_consumers,
 };
 
 static struct regulator_init_data goni_ldo12_data = {
@@ -391,8 +405,10 @@ static struct regulator_init_data goni_ldo13_data = {
 		.min_uV		= 2800000,
 		.max_uV		= 2800000,
 		.apply_uV	= 1,
-		.always_on	= 1,
+		.valid_ops_mask	= REGULATOR_CHANGE_STATUS,
 	},
+	.num_consumer_supplies	= ARRAY_SIZE(goni_ldo13_consumers),
+	.consumer_supplies	= goni_ldo13_consumers,
 };
 
 static struct regulator_init_data goni_ldo14_data = {
@@ -401,8 +417,10 @@ static struct regulator_init_data goni_ldo14_data = {
 		.min_uV		= 1800000,
 		.max_uV		= 1800000,
 		.apply_uV	= 1,
-		.always_on	= 1,
+		.valid_ops_mask	= REGULATOR_CHANGE_STATUS,
 	},
+	.num_consumer_supplies	= ARRAY_SIZE(goni_ldo14_consumers),
+	.consumer_supplies	= goni_ldo14_consumers,
 };
 
 static struct regulator_init_data goni_ldo15_data = {
-- 
1.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 3/3] ARM: S5PV210: Change framebuffer window 0 size on GONI
  2011-02-11 17:27 [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support Sylwester Nawrocki
  2011-02-11 17:27 ` [PATCH v2 1/3] ARM: S5PV210: Enable I2C0 bus on GONI board Sylwester Nawrocki
  2011-02-11 17:27 ` [PATCH v2 2/3] ARM: S5PV210: Add supplies for CIF camera " Sylwester Nawrocki
@ 2011-02-11 17:27 ` Sylwester Nawrocki
  2011-02-15  5:50 ` [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support Kukjin Kim
  3 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2011-02-11 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

Increase virtual size of the frambuffer window 0
for display panning support.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 arch/arm/mach-s5pv210/mach-goni.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 53b3b96..6432189 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -108,6 +108,8 @@ static struct s3c_fb_pd_win goni_fb_win0 = {
 	},
 	.max_bpp	= 32,
 	.default_bpp	= 16,
+	.virtual_x	= 480,
+	.virtual_y	= 2 * 800,
 };
 
 static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
-- 
1.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support
  2011-02-11 17:27 [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support Sylwester Nawrocki
                   ` (2 preceding siblings ...)
  2011-02-11 17:27 ` [PATCH v2 3/3] ARM: S5PV210: Change framebuffer window 0 size on GONI Sylwester Nawrocki
@ 2011-02-15  5:50 ` Kukjin Kim
  2011-02-15  8:54   ` Sylwester Nawrocki
  3 siblings, 1 reply; 8+ messages in thread
From: Kukjin Kim @ 2011-02-15  5:50 UTC (permalink / raw)
  To: linux-arm-kernel

Sylwester Nawrocki wrote:
> 
> Hello,
> 
Hi,

> the following patch series introduces changes in GONI board setup file
> required for the CIF camera sensor driver.
> The first patch adds the I2C0 bus driver, the second one adds the
regulator
> supply definitions and the third one just increases virtual size
> of the framebuffer window 0 to enable double-buffering.
> The added regulator supplies are also a subset of the supplies of the high
> resolution camera which that reference board is equipped with.
> 
> Changes since v1:
>  - removed unnecessary "select CONFIG_S3C_DEV_I2C0"
> 
> 
> The patch series contains:
> 
> [PATCH 1/3] ARM: S5PV210: Enable I2C0 bus on GONI board
> [PATCH 2/3] ARM: S5PV210: Add supplies for CIF camera on GONI board
> [PATCH 3/3] ARM: S5PV210: Change framebuffer window 0 size on GONI
> 
> Created against for-next branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
> 
Hmm...looks you don't want to follow my suggestion on 2nd patch.

I'm still wondering why array is needed for just one member in
regulator_consumer_supply structure now even though other something will be
added later.

Nevertheless will apply your 3 patches but if not required array will be
removed later.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support
  2011-02-15  5:50 ` [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support Kukjin Kim
@ 2011-02-15  8:54   ` Sylwester Nawrocki
  2011-02-15 10:26     ` Kukjin Kim
  0 siblings, 1 reply; 8+ messages in thread
From: Sylwester Nawrocki @ 2011-02-15  8:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Kukjin,

On 02/15/2011 06:50 AM, Kukjin Kim wrote:
> Sylwester Nawrocki wrote:
>>
>> Hello,
>>
> Hi,
> 
>> the following patch series introduces changes in GONI board setup file
>> required for the CIF camera sensor driver.
>> The first patch adds the I2C0 bus driver, the second one adds the
> regulator
>> supply definitions and the third one just increases virtual size
>> of the framebuffer window 0 to enable double-buffering.
>> The added regulator supplies are also a subset of the supplies of the high
>> resolution camera which that reference board is equipped with.
>>
>> Changes since v1:
>>  - removed unnecessary "select CONFIG_S3C_DEV_I2C0"
>>
>>
>> The patch series contains:
>>
>> [PATCH 1/3] ARM: S5PV210: Enable I2C0 bus on GONI board
>> [PATCH 2/3] ARM: S5PV210: Add supplies for CIF camera on GONI board
>> [PATCH 3/3] ARM: S5PV210: Change framebuffer window 0 size on GONI
>>
>> Created against for-next branch at:
>> git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
>>
> Hmm...looks you don't want to follow my suggestion on 2nd patch.

I've attempted to make a change as you suggested but it turned out
that all regulators I'm adding supplies for in the second patch are
also used by the other, high resolution camera. It's not about I don't
want to follow you suggestions. The argument is that I's like to add shortly
support for the other camera and then the patch would be just one line
per a power supply rather than 4. I really don't mind to adhere to your
preferred style. But in this case it would be just more work to revert
things back and forth.

I've boot tested your patch:
ARM: S5PV210: Use REGULATOR_SUPPLY macro for regulator consumers
on Aquila and GONI board altogether with my changeset.

> 
> I'm still wondering why array is needed for just one member in
> regulator_consumer_supply structure now even though other something will be
> added later.
> 
> Nevertheless will apply your 3 patches but if not required array will be
> removed later.

Thanks! I am going to post further patches for this board soon so there
should be no need to change anything. Please use you time for more important
things ;)

I've noticed one issue with the first patch, i.e. Kyungmin's email address
is broken. Should I resend the patch or could you please correct this on your side?

Thanks,
-- 
Sylwester Nawrocki
Samsung Poland R&D Center

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support
  2011-02-15  8:54   ` Sylwester Nawrocki
@ 2011-02-15 10:26     ` Kukjin Kim
  2011-02-15 15:31       ` Sylwester Nawrocki
  0 siblings, 1 reply; 8+ messages in thread
From: Kukjin Kim @ 2011-02-15 10:26 UTC (permalink / raw)
  To: linux-arm-kernel

Sylwester Nawrocki wrote:
> 
> Hi Kukjin,
> 
Hi :)

> > Hmm...looks you don't want to follow my suggestion on 2nd patch.
> 
> I've attempted to make a change as you suggested but it turned out
> that all regulators I'm adding supplies for in the second patch are
> also used by the other, high resolution camera. It's not about I don't
> want to follow you suggestions. The argument is that I's like to add
shortly
> support for the other camera and then the patch would be just one line
> per a power supply rather than 4. I really don't mind to adhere to your
> preferred style. But in this case it would be just more work to revert
> things back and forth.
> 
Ok, I see, no problem.

> I've boot tested your patch:
> ARM: S5PV210: Use REGULATOR_SUPPLY macro for regulator consumers
> on Aquila and GONI board altogether with my changeset.
> 
Thanks :)

> >
> > I'm still wondering why array is needed for just one member in
> > regulator_consumer_supply structure now even though other something will
be
> > added later.
> >
> > Nevertheless will apply your 3 patches but if not required array will be
> > removed later.
> 
> Thanks! I am going to post further patches for this board soon so there
> should be no need to change anything. Please use you time for more
important
> things ;)
> 
Hehehe, ok and don't worry ;)

> I've noticed one issue with the first patch, i.e. Kyungmin's email address
> is broken. Should I resend the patch or could you please correct this on
your
> side?
> 
Oops, ok. I fixed it.

As a note, I received request about common phy control from Marek. So I will
re-think with your mini phy patches, then let you know about that soon.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support
  2011-02-15 10:26     ` Kukjin Kim
@ 2011-02-15 15:31       ` Sylwester Nawrocki
  0 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2011-02-15 15:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Kukjin,

On 02/15/2011 11:26 AM, Kukjin Kim wrote:
> Sylwester Nawrocki wrote:
>>
...
> 
> As a note, I received request about common phy control from Marek. So I will
> re-think with your mipi phy patches, then let you know about that soon.
> 

OK, thanks. It looks like treating PHYs as clocks would cause least trouble.
Some of PHYs are really not much different than clocks, they generate a carrier
of some frequency, like for example HDMI PHY. Some even have their own divider.

We thought about creating an API for PHYs, similar to clock API. There is
quite many PHYs in S5P SoCs - SATA, USB, MIPI, HDMI devices have them.
Such a PHY API would be mostly doubling the clock API functionality though.

We also cannot easily create common helpers in plat-s5p for mipi because
of the different headers issue. 

So we have 3 options if it comes to mipi:
1. create helper functions in relevant mach-s5p* directories 
2. register special clocks with own enable/disable functions
3. create separate API to manage all PHY's in the SoC series

MIPI PHY issue is a blocking point for a mipi-csi driver inclusion.
It has been ready for quite some time yet and I would appreciate
if we could take time to finally work out compromise.


Regards,
-- 
Sylwester Nawrocki
Samsung Poland R&D Center

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-02-15 15:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-11 17:27 [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support Sylwester Nawrocki
2011-02-11 17:27 ` [PATCH v2 1/3] ARM: S5PV210: Enable I2C0 bus on GONI board Sylwester Nawrocki
2011-02-11 17:27 ` [PATCH v2 2/3] ARM: S5PV210: Add supplies for CIF camera " Sylwester Nawrocki
2011-02-11 17:27 ` [PATCH v2 3/3] ARM: S5PV210: Change framebuffer window 0 size on GONI Sylwester Nawrocki
2011-02-15  5:50 ` [PATCH v2] ARM: S5PV210: Add GONI board setup for CIF camera support Kukjin Kim
2011-02-15  8:54   ` Sylwester Nawrocki
2011-02-15 10:26     ` Kukjin Kim
2011-02-15 15:31       ` Sylwester Nawrocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).