Skip to contentSkip to conversation

ARM: S5PV210: Add GONI board setup for CIF camera support

PATCH Superseded Sylwester Nawrocki 2 participants 8 messages Feb 11, 2011 – Feb 15, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: S5PV210: Add GONI board setup for CIF camera support

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

#1 lore raw

PATCH v2 1/3 ARM: S5PV210: Enable I2C0 bus on GONI board

Add I2C0 bus platform device for camera sensors.

---
 arch/arm/mach-s5pv210/mach-goni.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/mach-goni.c +4 -0
index db16d72..7a7cf6a 100644
@@ -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));
Signature · 1 line
1.7.4
#2 lore raw

PATCH v2 2/3 ARM: S5PV210: Add supplies for CIF camera on GONI board

In reply to Sylwester Nawrocki

Add regulator supplies required for NOON010PC30 CIF sensor.

---
 arch/arm/mach-s5pv210/mach-goni.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)
arch/arm/mach-s5pv210/mach-goni.c +21 -3
index 7a7cf6a..53b3b96 100644
@@ -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 = {
Signature · 1 line
1.7.4
#3 lore raw

PATCH v2 3/3 ARM: S5PV210: Change framebuffer window 0 size on GONI

In reply to Sylwester Nawrocki

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

---
 arch/arm/mach-s5pv210/mach-goni.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/mach-goni.c +2 -0
index 53b3b96..6432189 100644
@@ -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 = {
Signature · 1 line
1.7.4
#4 lore raw

PATCH v2 1/1 ARM: S5PV210: Add GONI board setup for CIF camera support

In reply to Sylwester Nawrocki
Quoted 3 lines · Sylwester Nawrocki

Hello,

Hi,

Quoted 3 lines

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

Quoted 9 lines

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"

Quoted 9 lines

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 <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#5 lore raw

PATCH v2 1/1 ARM: S5PV210: Add GONI board setup for CIF camera support

Hi Kukjin,

Quoted 21 lines · Kukjin Kim
Quoted 3 lines · Sylwester Nawrocki

Hello,

Hi,

Quoted 3 lines

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

Quoted 11 lines

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:

Quoted 8 lines
Quoted 7 lines

[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.

Quoted 7 lines

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,

Signature · 2 lines
Sylwester Nawrocki
Samsung Poland R&D Center
#6 lore raw

PATCH v2 1/1 ARM: S5PV210: Add GONI board setup for CIF camera support

Quoted 3 lines · Sylwester Nawrocki

Hi Kukjin,

Hi :)

Quoted 6 lines
Quoted 1 line

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

Quoted 5 lines

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.

Quoted 4 lines

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 :)

Quoted 3 lines
Quoted 3 lines

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

be

Quoted 7 lines
Quoted 4 lines

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

Quoted 2 lines

things ;)

Hehehe, ok and don't worry ;)

Quoted 2 lines

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

Quoted 2 lines

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 <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#7 lore raw

PATCH v2 1/1 ARM: S5PV210: Add GONI board setup for CIF camera support

Hi Kukjin,

Quoted 2 lines · Kukjin Kim
Quoted 1 line · Sylwester Nawrocki

...

Quoted 4 lines

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,

Signature · 2 lines
Sylwester Nawrocki
Samsung Poland R&D Center