ARM: SAMSUNG: Board updates and minor fixes
Subsystems (3)
cover ARM: SAMSUNG: Board updates and minor fixes
The following patch series adds S5K6AAFX sensor support on Nuri and UNIVERSAL_C210 boards. It also includes minor correction for the I2C controller setup and the M-5MOLS sensor.
Sylwester Nawrocki (6):
ARM: SAMSUNG: Increase virtual framebuffer size on Universal C210 board
ARM: SAMSUNG: Add support for S5K6AAFX image sensor on Universal C210 board
ARM: SAMSUNG: Add support for S5K6AAFX camera on Nuri board
ARM: SAMSUNG: Correct framebuffer window size on Nuri board
ARM: SAMSUNG: Correct M-5MOLS sensor clock frequency on Nuri board
ARM: SAMSUNG: Fix platform data setup for I2C adapter 0
arch/arm/mach-exynos/Kconfig | 2 + arch/arm/mach-exynos/mach-nuri.c | 73 ++++++++++++++++++++++++-- arch/arm/mach-exynos/mach-universal_c210.c | 78 ++++++++++++++++++++++++++-- arch/arm/plat-samsung/devs.c | 4 +- 4 files changed, 147 insertions(+), 10 deletions(-)
Signature · 1 line
1.7.8.3
PATCH 1/6 ARM: SAMSUNG: Increase virtual framebuffer size on Universal C210 board
Increase framebuffer virtual size to enable display panning.
--- arch/arm/mach-exynos/mach-universal_c210.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/mach-universal_c210.c +2 -0
@@ -817,6 +817,8 @@ static struct s3c_fb_pd_win universal_fb_win0 = { }, .max_bpp = 32, .default_bpp = 16, + .virtual_x = 480, + .virtual_y = 2 * 800, };static struct s3c_fb_platdata universal_lcd_pdata__initdata = {
Signature · 1 line
1.7.8.3
PATCH 2/6 ARM: SAMSUNG: Add support for S5K6AAFX image sensor on Universal C210 board
In reply to Sylwester NawrockiAdd voltage regulator and platform data definitions for S5K6AAFX image sensor driver.
--- arch/arm/mach-exynos/mach-universal_c210.c | 74 ++++++++++++++++++++++++++-- 1 files changed, 70 insertions(+), 4 deletions(-)
arch/arm/mach-exynos/mach-universal_c210.c +70 -4
@@ -46,6 +46,7 @@#include <media/v4l2-mediabus.h> #include <media/s5p_fimc.h> #include <media/m5mols.h> +#include <media/s5k6aa.h> #include "common.h"
@@ -122,8 +123,10 @@ static struct regulator_consumer_supply lp3974_buck1_consumer =static struct regulator_consumer_supply lp3974_buck2_consumer =REGULATOR_SUPPLY ("vddg3d" ,NULL ); -static struct regulator_consumer_supply lp3974_buck3_consumer = -REGULATOR_SUPPLY ("vdet" ,"s5p-sdo" ); +static struct regulator_consumer_supply lp3974_buck3_consumer[] = { +REGULATOR_SUPPLY ("vdet" ,"s5p-sdo" ), +REGULATOR_SUPPLY ("vdd_reg" ,"0-003c" ), +};static struct regulator_init_data lp3974_buck1_data = { .constraints = {
@@ -168,8 +171,8 @@ static struct regulator_init_data lp3974_buck3_data = { .enabled = 1, }, }, - .num_consumer_supplies = 1, - .consumer_supplies = &lp3974_buck3_consumer, + .num_consumer_supplies = ARRAY_SIZE(lp3974_buck3_consumer), + .consumer_supplies = lp3974_buck3_consumer, }; static struct regulator_init_data lp3974_buck4_data = {
@@ -302,6 +305,9 @@ static struct regulator_init_data lp3974_ldo8_data = { .consumer_supplies = lp3974_ldo8_consumer, }; +static struct regulator_consumer_supply lp3974_ldo9_consumer = +REGULATOR_SUPPLY ("vddio" ,"0-003c" ); +static struct regulator_init_data lp3974_ldo9_data = { .constraints = { .name ="VCC_2.8V" ,
@@ -313,6 +319,8 @@ static struct regulator_init_data lp3974_ldo9_data = { .enabled = 1, }, }, + .num_consumer_supplies = 1, + .consumer_supplies = &lp3974_ldo9_consumer, }; static struct regulator_init_data lp3974_ldo10_data = {
@@ -411,6 +419,7 @@ static struct regulator_init_data lp3974_ldo15_data = { };static struct regulator_consumer_supply lp3974_ldo16_consumer[] = { +REGULATOR_SUPPLY ("vdda" ,"0-003c" ),REGULATOR_SUPPLY ("a_sensor" ,"0-001f" ), };
@@ -830,6 +839,28 @@ static struct s3c_fb_platdata universal_lcd_pdata __initdata = { .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, }; +static struct regulator_consumer_supply cam_vt_dio_supply = +REGULATOR_SUPPLY ("vdd_core" ,"0-003c" ); + +static struct regulator_init_data cam_vt_dio_reg_init_data = { + .constraints = { .valid_ops_mask =REGULATOR_CHANGE_STATUS }, + .num_consumer_supplies =1 , + .consumer_supplies = &cam_vt_dio_supply, +}; + +static struct fixed_voltage_config cam_vt_dio_fixed_voltage_cfg = { + .supply_name ="CAM_VT_D_IO" , + .microvolts =2800000 , + .gpio =EXYNOS4_GPE2 (1 ),/* CAM_PWR_EN2 */ + .enable_high =1 , + .init_data = &cam_vt_dio_reg_init_data, +}; + +static struct platform_device cam_vt_dio_fixed_reg_dev = { + .name ="reg-fixed-voltage" , .id =FIXED_REG_ID_CAM_VT_DIO , + .dev = { .platform_data = &cam_vt_dio_fixed_voltage_cfg }, +}; +static struct regulator_consumer_supply cam_i_core_supply =REGULATOR_SUPPLY ("core" ,"0-001f" );
@@ -885,6 +916,28 @@ static struct s5p_platform_mipi_csis mipi_csis_platdata = {#define GPIO_CAM_LEVEL_EN (n) EXYNOS4_GPE4(n + 3)#define GPIO_CAM_8M_ISP_INT EXYNOS4_GPX1(5)/* XEINT_13 */ #define GPIO_CAM_MEGA_nRST EXYNOS4_GPE2(5) +#define GPIO_CAM_VGA_NRST EXYNOS4_GPE4(7) +#define GPIO_CAM_VGA_NSTBY EXYNOS4_GPE4(6) + +static int s5k6aa_set_power (int on) +{ +gpio_set_value (GPIO_CAM_LEVEL_EN (2 ), !!on); +return 0 ; +} + +static struct s5k6aa_platform_data s5k6aa_platdata = { + .mclk_frequency =21600000UL , + .gpio_reset = {GPIO_CAM_VGA_NRST ,0 }, + .gpio_stby = {GPIO_CAM_VGA_NSTBY ,0 }, + .bus_type =V4L2_MBUS_PARALLEL , + .horiz_flip =1 , + .set_power = s5k6aa_set_power, +}; + +static struct i2c_board_info s5k6aa_board_info = { +I2C_BOARD_INFO ("S5K6AA" ,0x3C ), + .platform_data = &s5k6aa_platdata, +};static int m5mols_set_power (struct device *dev,int on) {
@@ -909,6 +962,14 @@ static struct s5p_fimc_isp_info universal_camera_sensors[] = { .mux_id = 0, .flags =V4L2_MBUS_PCLK_SAMPLE_FALLING | V4L2_MBUS_VSYNC_ACTIVE_LOW, + .bus_type = FIMC_ITU_601, + .board_info = &s5k6aa_board_info, + .i2c_bus_num = 0, + .clk_frequency = 24000000UL, + }, { + .mux_id = 0, + .flags =V4L2_MBUS_PCLK_SAMPLE_FALLING | + V4L2_MBUS_VSYNC_ACTIVE_LOW, .bus_type = FIMC_MIPI_CSI2, .board_info = &m5mols_board_info, .i2c_bus_num = 0,
@@ -927,6 +988,8 @@ static struct gpio universal_camera_gpios[] = { { GPIO_CAM_LEVEL_EN(2), GPIOF_OUT_INIT_LOW, "CAM_LVL_EN2" }, { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" }, { GPIO_CAM_MEGA_nRST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" }, + { GPIO_CAM_VGA_NRST, GPIOF_OUT_INIT_LOW, "CAM_VGA_NRST" }, + { GPIO_CAM_VGA_NSTBY, GPIOF_OUT_INIT_LOW, "CAM_VGA_NSTBY" }, };static void universal_camera_init (void )
@@ -950,6 +1013,8 @@ static void universal_camera_init(void)/* Free GPIOs controlled directly by the sensor drivers. */ gpio_free (GPIO_CAM_MEGA_nRST);gpio_free (GPIO_CAM_8M_ISP_INT ); +gpio_free (GPIO_CAM_VGA_NRST ); +gpio_free (GPIO_CAM_VGA_NSTBY );if (exynos4_fimc_setup_gpio (S5P_CAMPORT_A ))pr_err ("Camera port A setup failed\n" );
@@ -988,6 +1053,7 @@ static struct platform_device *universal_devices[] __initdata = { &exynos4_device_pd[PD_MFC ], &exynos4_device_pd[PD_LCD0 ], &exynos4_device_pd[PD_CAM ], + &cam_vt_dio_fixed_reg_dev, &cam_i_core_fixed_reg_dev, &cam_s_if_fixed_reg_dev, &s5p_device_fimc_md,
Signature · 1 line
1.7.8.3
PATCH 3/6 ARM: SAMSUNG: Add support for S5K6AAFX camera on Nuri board
In reply to Sylwester NawrockiAdd voltage regulator and platform data definitions for S5K6AAFX sensor driver and configure I2C6 bus timings.
--- arch/arm/mach-exynos/Kconfig | 2 + arch/arm/mach-exynos/mach-nuri.c | 65 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/Kconfig +2 -0
@@ -269,6 +269,7 @@ config MACH_NURI select S3C_DEV_I2C1 select S3C_DEV_I2C3 select S3C_DEV_I2C5 + select S3C_DEV_I2C6 select S5P_DEV_CSIS0 select S5P_DEV_FIMC0 select S5P_DEV_FIMC1
@@ -285,6 +286,7 @@ config MACH_NURI select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C3 select EXYNOS4_SETUP_I2C5 + select EXYNOS4_SETUP_I2C6 select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY select S5P_SETUP_MIPIPHY
arch/arm/mach-exynos/mach-nuri.c +65 -0
144 lines not on this page · raw message
Signature · 1 line
1.7.8.3
PATCH 4/6 ARM: SAMSUNG: Correct framebuffer window size on Nuri board
In reply to Sylwester NawrockiThe real LCD resolution on Nuri is 1024x600, not 1280x800. This change fixes the color distortion (green shadows) on half of the screen. Also increase framebuffer virtual size for display panning support.
--- arch/arm/mach-exynos/mach-nuri.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-exynos/mach-nuri.c +4 -4
@@ -222,14 +222,14 @@ static struct s3c_fb_pd_win nuri_fb_win0 = { .lower_margin = 1, .hsync_len = 48, .vsync_len = 3, - .xres = 1280, - .yres = 800, + .xres = 1024, + .yres = 600, .refresh = 60, }, .max_bpp = 24, .default_bpp = 16, - .virtual_x = 1280, - .virtual_y = 800, + .virtual_x = 1024, + .virtual_y = 2 * 600, }; static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
Signature · 1 line
1.7.8.3
PATCH 5/6 ARM: SAMSUNG: Correct M-5MOLS sensor clock frequency on Nuri board
In reply to Sylwester NawrockiIn order to keep the sensor's master clock frequency in valid range when FIMC parent clock is xusbxti, the specified frequency must be exactly 24MHZ, otherwise it's being set to too low value due to rounding.
--- arch/arm/mach-exynos/mach-universal_c210.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-exynos/mach-universal_c210.c +1 -1
@@ -973,7 +973,7 @@ static struct s5p_fimc_isp_info universal_camera_sensors[] = { .bus_type = FIMC_MIPI_CSI2, .board_info = &m5mols_board_info, .i2c_bus_num = 0, - .clk_frequency = 21600000UL, + .clk_frequency = 24000000UL, .csi_data_align = 32, }, };
Signature · 1 line
1.7.8.3
Re: [PATCH 5/6] ARM: SAMSUNG: Correct M-5MOLS sensor clock frequency on Nuri board
oops, it's for Universal C210 so the subject should be:
ARM: SAMSUNG: Correct M-5MOLS sensor clock frequency on Universal C210 board
Should I resend or would you fix it when applying.
--
Regards,
Sylwester
Quoted 24 lines · Sylwester Nawrocki
In order to keep the sensor's master clock frequency in valid range when FIMC parent clock is xusbxti, the specified frequency must be exactly 24MHZ, otherwise it's being set to too low value due to rounding.
Signed-off-by Sylwester Nawrocki<[email protected]>Signed-off-by Kyungmin Park<[email protected]>--- arch/arm/mach-exynos/mach-universal_c210.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-exynos/mach-universal_c210.c +1
-1@@ -973,7 +973,7 @@ static struct s5p_fimc_isp_info universal_camera_sensors[] = { .bus_type = FIMC_MIPI_CSI2, .board_info =&m5mols_board_info, .i2c_bus_num = 0, - .clk_frequency = 21600000UL, + .clk_frequency = 24000000UL, .csi_data_align = 32, }, };
RE: [PATCH 5/6] ARM: SAMSUNG: Correct M-5MOLS sensor clock frequency on Nuri board
Quoted 1 line · Sylwester Nawrocki
Hi Sylwester,
Quoted 5 lines
oops, it's for Universal C210 so the subject should be:
ARM: SAMSUNG: Correct M-5MOLS sensor clock frequency on Universal C210 board
OK, let me fix the subject when I apply.
Quoted 2 lines
Should I resend or would you fix it when applying.
No :)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Quoted 31 lines
--
Regards,
Sylwesterarch/arm/mach-
Quoted 12 lines · Sylwester Nawrocki
In order to keep the sensor's master clock frequency in valid range when FIMC parent clock is xusbxti, the specified frequency must be exactly 24MHZ, otherwise it's being set to too low value due to rounding.
Signed-off-by Sylwester Nawrocki<[email protected]>Signed-off-by Kyungmin Park<[email protected]>--- arch/arm/mach-exynos/mach-universal_c210.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach- renamed from arch/arm/mach-exynos/mach-universal_c210.c +0
-0
exynos/mach-universal_c210.carch/arm/mach-exynos/mach-universal_c210.c static struct s5p_fimc_isp_info
Quoted 4 lines
index 44fc43e..0e3aeb9 100644
arch/arm/mach-exynos/mach-universal_c210.c +0
-0@@ -973,7 +973,7 @@ static struct s5p_fimc_isp_infouniversal_camera_sensors[] = {
Quoted 8 lines
arch/arm/mach-exynos/mach-universal_c210.c +1
-1.bus_type = FIMC_MIPI_CSI2, .board_info =&m5mols_board_info, .i2c_bus_num = 0, - .clk_frequency = 21600000UL, + .clk_frequency = 24000000UL, .csi_data_align = 32, }, };
PATCH 6/6 ARM: SAMSUNG: Fix platform data setup for I2C adapter 0
In reply to Sylwester NawrockiThe common static default_i2c_data structure gets bus_num set by each s3c_i2c?_set_platdata() call, except for s3c_i2c0_set_platdata(). Thus if for instance s3c_i2c1_set_platdata() is called prior to s3c_i2c0_set_platdata() the I2C0 controller has bus_num set to wrong value of 1, i.e. the one from previous set_platdata call. Fix this by also setting bus_num for I2C0.
--- arch/arm/plat-samsung/devs.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/plat-samsung/devs.c +3 -1
@@ -496,8 +496,10 @@ void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd) {struct s3c2410_platform_i2c *npd; -if (!pd) +if (!pd) { pd = &default_i2c_data; + pd->bus_num =0 ; + } npd =s3c_set_platdata (pd,sizeof (struct s3c2410_platform_i2c ), &s3c_device_i2c0);
Signature · 1 line
1.7.8.3
cover ARM: SAMSUNG: Board updates and minor fixes
In reply to Sylwester NawrockiQuoted 15 lines · Sylwester Nawrocki
The following patch series adds S5K6AAFX sensor support on Nuri and
UNIVERSAL_C210boards. It also includes minor correction for the I2C controller setup and the M-5MOLS sensor.Sylwester Nawrocki (6):
ARM: SAMSUNG: Increase virtual framebuffer size on Universal C210 board
ARM: SAMSUNG: Add support for S5K6AAFX image sensor on Universal C210
board
ARM: SAMSUNG: Add support for S5K6AAFX camera on Nuri board
ARM: SAMSUNG: Correct framebuffer window size on Nuri board
ARM: SAMSUNG: Correct M-5MOLS sensor clock frequency on Nuri board
ARM: SAMSUNG: Fix platform data setup for I2C adapter 0
Quoted 2 lines
arch/arm/mach-exynos/Kconfig | 2 + arch/arm/mach-exynos/mach-nuri.c | 73
++++++++++++++++++++++++--
Quoted 7 lines
arch/arm/mach-exynos/mach-universal_c210.c | 78 ++++++++++++++++++++++++++-- arch/arm/plat-samsung/devs.c | 4 +- 4 files changed, 147 insertions(+), 10 deletions(-)--
1.7.8.3
OK, looks good to me, will apply in my v3.3-samsung-fixes-2 for 6/6 and next/board-samsung for others.
And I'm not sure some board updates are for fix now so if required, please let me know.
Plus, I looked at some wrong alignment(tab and white space?) in your patches, so if you don't mind, let me fix it when I apply.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
cover ARM: SAMSUNG: Board updates and minor fixes
Quoted 2 lines · Kukjin Kim
OK, looks good to me, will apply in my v3.3-samsung-fixes-2 for 6/6 and next/board-samsung for others.
Thank you, it would be good to also get patches 4/6, 5/6,
ARM: SAMSUNG: Correct M-5MOLS sensor clock frequency on Nuri board
ARM: SAMSUNG: Correct framebuffer window size on Nuri board
in for 3.3 as well. But if it's too much trouble please just queue them for 3.4.
Quoted 5 lines
And I'm not sure some board updates are for fix now so if required, please let me know.
Plus, I looked at some wrong alignment(tab and white space?) in your patches, so if you don't mind, let me fix it when I apply.
Hmm, I thought I've double checked those things, but anyway sorry for overlooking. And please feel free correct if required.
--
Thanks!
Sylwester
cover ARM: SAMSUNG: Board updates and minor fixes
Quoted 4 lines · Sylwester Nawrocki
Quoted 2 lines · Kukjin Kim
OK, looks good to me, will apply in my v3.3-samsung-fixes-2 for 6/6 and next/board-samsung for others.
Quoted 8 lines
Thank you, it would be good to also get patches 4/6, 5/6,
ARM: SAMSUNG: Correct M-5MOLS sensor clock frequency on Nuri board
ARM: SAMSUNG: Correct framebuffer window size on Nuri boardin for 3.3 as well. But if it's too much trouble please just queue them for 3.4.
Looks OK, I updated.
Quoted 9 lines
Quoted 5 lines
And I'm not sure some board updates are for fix now so if required, please let me know.
Plus, I looked at some wrong alignment(tab and white space?) in your patches, so if you don't mind, let me fix it when I apply.
Hmm, I thought I've double checked those things, but anyway sorry for overlooking. And please feel free correct if required.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.