* [PATCHv2 1/7] ARM: S5PC110: update framebuffer setup information for Goni
2010-09-20 12:55 [PATCH v2] ARM: S5PC110: Samsung Goni board update Marek Szyprowski
@ 2010-09-20 12:55 ` Marek Szyprowski
2010-09-28 7:07 ` Kukjin Kim
2010-09-20 12:55 ` [PATCHv2 2/7] ARM: S5PC110: fb setup for Goni - remove pixel clock Marek Szyprowski
` (5 subsequent siblings)
6 siblings, 1 reply; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-20 12:55 UTC (permalink / raw)
To: linux-arm-kernel
Change the default upper_margin and vsync_len to get rid of repeated last
line on the display.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-s5pv210/mach-goni.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index d9fe739..4bd5582 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -91,10 +91,10 @@ static struct s3c_fb_pd_win goni_fb_win0 = {
.pixclock = 1000000000000ULL / ((16+16+2+480)*(28+3+2+800)*55),
.left_margin = 16,
.right_margin = 16,
- .upper_margin = 3,
+ .upper_margin = 2,
.lower_margin = 28,
.hsync_len = 2,
- .vsync_len = 2,
+ .vsync_len = 1,
.xres = 480,
.yres = 800,
.refresh = 55,
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCHv2 1/7] ARM: S5PC110: update framebuffer setup information for Goni
2010-09-20 12:55 ` [PATCHv2 1/7] ARM: S5PC110: update framebuffer setup information for Goni Marek Szyprowski
@ 2010-09-28 7:07 ` Kukjin Kim
0 siblings, 0 replies; 23+ messages in thread
From: Kukjin Kim @ 2010-09-28 7:07 UTC (permalink / raw)
To: linux-arm-kernel
Marek Szyprowski wrote:
>
> Change the default upper_margin and vsync_len to get rid of repeated last
> line on the display.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/mach-s5pv210/mach-goni.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/mach-goni.c
b/arch/arm/mach-s5pv210/mach-
> goni.c
> index d9fe739..4bd5582 100644
> --- a/arch/arm/mach-s5pv210/mach-goni.c
> +++ b/arch/arm/mach-s5pv210/mach-goni.c
> @@ -91,10 +91,10 @@ static struct s3c_fb_pd_win goni_fb_win0 = {
> .pixclock = 1000000000000ULL /
> ((16+16+2+480)*(28+3+2+800)*55),
> .left_margin = 16,
> .right_margin = 16,
> - .upper_margin = 3,
> + .upper_margin = 2,
> .lower_margin = 28,
> .hsync_len = 2,
> - .vsync_len = 2,
> + .vsync_len = 1,
> .xres = 480,
> .yres = 800,
> .refresh = 55,
> --
This is better than your previous patch to me.
Will apply.
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] 23+ messages in thread
* [PATCHv2 2/7] ARM: S5PC110: fb setup for Goni - remove pixel clock
2010-09-20 12:55 [PATCH v2] ARM: S5PC110: Samsung Goni board update Marek Szyprowski
2010-09-20 12:55 ` [PATCHv2 1/7] ARM: S5PC110: update framebuffer setup information for Goni Marek Szyprowski
@ 2010-09-20 12:55 ` Marek Szyprowski
2010-09-28 7:08 ` Kukjin Kim
2010-09-20 12:55 ` [PATCHv2 3/7] ARM: S5PC110: add support for S6E63M0 LCD controller on Goni board Marek Szyprowski
` (4 subsequent siblings)
6 siblings, 1 reply; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-20 12:55 UTC (permalink / raw)
To: linux-arm-kernel
Since commit 67a38950f0917aecfe1a3e46720d8bbb0020 there is no need
to set pixel clock for the s3c-fb driver's window information.
The correct pixel clock value can be automatically calculated from
the other screen parameters. This patch removes the redundant pixel clock
parameter.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-s5pv210/mach-goni.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 4bd5582..b0ae208 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -88,7 +88,6 @@ static struct s3c2410_uartcfg goni_uartcfgs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win goni_fb_win0 = {
.win_mode = {
- .pixclock = 1000000000000ULL / ((16+16+2+480)*(28+3+2+800)*55),
.left_margin = 16,
.right_margin = 16,
.upper_margin = 2,
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCHv2 2/7] ARM: S5PC110: fb setup for Goni - remove pixel clock
2010-09-20 12:55 ` [PATCHv2 2/7] ARM: S5PC110: fb setup for Goni - remove pixel clock Marek Szyprowski
@ 2010-09-28 7:08 ` Kukjin Kim
0 siblings, 0 replies; 23+ messages in thread
From: Kukjin Kim @ 2010-09-28 7:08 UTC (permalink / raw)
To: linux-arm-kernel
Marek Szyprowski wrote:
>
> Since commit 67a38950f0917aecfe1a3e46720d8bbb0020 there is no need
> to set pixel clock for the s3c-fb driver's window information.
> The correct pixel clock value can be automatically calculated from
> the other screen parameters. This patch removes the redundant pixel clock
> parameter.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/mach-s5pv210/mach-goni.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/mach-goni.c
b/arch/arm/mach-s5pv210/mach-
> goni.c
> index 4bd5582..b0ae208 100644
> --- a/arch/arm/mach-s5pv210/mach-goni.c
> +++ b/arch/arm/mach-s5pv210/mach-goni.c
> @@ -88,7 +88,6 @@ static struct s3c2410_uartcfg goni_uartcfgs[] __initdata
= {
> /* Frame Buffer */
> static struct s3c_fb_pd_win goni_fb_win0 = {
> .win_mode = {
> - .pixclock = 1000000000000ULL /
> ((16+16+2+480)*(28+3+2+800)*55),
> .left_margin = 16,
> .right_margin = 16,
> .upper_margin = 2,
> --
Ok..will apply.
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] 23+ messages in thread
* [PATCHv2 3/7] ARM: S5PC110: add support for S6E63M0 LCD controller on Goni board
2010-09-20 12:55 [PATCH v2] ARM: S5PC110: Samsung Goni board update Marek Szyprowski
2010-09-20 12:55 ` [PATCHv2 1/7] ARM: S5PC110: update framebuffer setup information for Goni Marek Szyprowski
2010-09-20 12:55 ` [PATCHv2 2/7] ARM: S5PC110: fb setup for Goni - remove pixel clock Marek Szyprowski
@ 2010-09-20 12:55 ` Marek Szyprowski
2010-09-28 7:38 ` Kukjin Kim
2010-09-20 12:55 ` [PATCHv2 4/7] ARM: S5PC110: Add si470x radio device to the GONI board Marek Szyprowski
` (3 subsequent siblings)
6 siblings, 1 reply; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-20 12:55 UTC (permalink / raw)
To: linux-arm-kernel
Add required platform definitions for S6E63M0 LCD controller on Samsung
Goni board.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-s5pv210/mach-goni.c | 71 +++++++++++++++++++++++++++++++++++++
1 files changed, 71 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index b0ae208..b263f3a 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -16,6 +16,9 @@
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <linux/mfd/max8998.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/spi_gpio.h>
+#include <linux/lcd.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/gpio.h>
@@ -111,6 +114,70 @@ static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
.setup_gpio = s5pv210_fb_gpio_setup_24bpp,
};
+static int lcd_power_on(struct lcd_device *ld, int enable)
+{
+ return 1;
+}
+
+static int reset_lcd(struct lcd_device *ld)
+{
+ static unsigned int first = 1;
+ int reset_gpio = -1;
+
+ reset_gpio = S5PV210_MP05(5);
+
+ if (first) {
+ gpio_request(reset_gpio, "MLCD_RST");
+ first = 0;
+ }
+
+ gpio_direction_output(reset_gpio, 1);
+ return 1;
+}
+
+static struct lcd_platform_data s6e63m0_platform_data = {
+ .reset = reset_lcd,
+ .power_on = lcd_power_on,
+ .lcd_enabled = 0,
+
+ .reset_delay = 120, /* 120ms */
+ .power_on_delay = 25, /* 25ms */
+ .power_off_delay = 200, /* 200ms */
+};
+
+#define LCD_BUS_NUM 3
+#define DISPLAY_CS S5PV210_MP01(1)
+static struct spi_board_info spi_board_info[] __initdata = {
+ {
+ .modalias = "s6e63m0",
+ .platform_data = (void *)&s6e63m0_platform_data,
+ .max_speed_hz = 1200000,
+ .bus_num = LCD_BUS_NUM,
+ .chip_select = 0,
+ .mode = SPI_MODE_3,
+ .controller_data = (void *)DISPLAY_CS,
+ },
+};
+
+#define DISPLAY_CLK S5PV210_MP04(1)
+#define DISPLAY_SI S5PV210_MP04(3)
+static struct spi_gpio_platform_data lcd_spi_gpio_data = {
+ .sck = DISPLAY_CLK,
+ .mosi = DISPLAY_SI,
+ .miso = SPI_GPIO_NO_MISO,
+
+ .num_chipselect = 1,
+};
+
+static struct platform_device goni_spi_gpio = {
+ .name = "spi_gpio",
+ .id = LCD_BUS_NUM,
+ .dev = {
+ .parent = &s3c_device_fb.dev,
+ .platform_data = &lcd_spi_gpio_data,
+ },
+};
+
/* KEYPAD */
static uint32_t keymap[] __initdata = {
/* KEY(row, col, keycode) */
@@ -479,6 +546,7 @@ static void goni_setup_sdhci(void)
static struct platform_device *goni_devices[] __initdata = {
&s3c_device_fb,
&s5p_device_onenand,
+ &goni_spi_gpio,
&goni_i2c_gpio_pmic,
&goni_device_gpiokeys,
&s5p_device_fimc0,
@@ -509,6 +577,9 @@ static void __init goni_machine_init(void)
/* FB */
s3c_fb_set_platdata(&goni_lcd_pdata);
+ /* SPI */
+ spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
+
/* KEYPAD */
samsung_keypad_set_platdata(&keypad_data);
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCHv2 3/7] ARM: S5PC110: add support for S6E63M0 LCD controller on Goni board
2010-09-20 12:55 ` [PATCHv2 3/7] ARM: S5PC110: add support for S6E63M0 LCD controller on Goni board Marek Szyprowski
@ 2010-09-28 7:38 ` Kukjin Kim
2010-09-28 12:27 ` Marek Szyprowski
2010-09-28 13:15 ` [PATCH v3] " Marek Szyprowski
0 siblings, 2 replies; 23+ messages in thread
From: Kukjin Kim @ 2010-09-28 7:38 UTC (permalink / raw)
To: linux-arm-kernel
Marek Szyprowski wrote:
>
> Add required platform definitions for S6E63M0 LCD controller on Samsung
> Goni board.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/mach-s5pv210/mach-goni.c | 71
> +++++++++++++++++++++++++++++++++++++
> 1 files changed, 71 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/mach-goni.c
b/arch/arm/mach-s5pv210/mach-
> goni.c
> index b0ae208..b263f3a 100644
> --- a/arch/arm/mach-s5pv210/mach-goni.c
> +++ b/arch/arm/mach-s5pv210/mach-goni.c
> @@ -16,6 +16,9 @@
> #include <linux/i2c.h>
> #include <linux/i2c-gpio.h>
> #include <linux/mfd/max8998.h>
> +#include <linux/spi/spi.h>
> +#include <linux/spi/spi_gpio.h>
> +#include <linux/lcd.h>
> #include <linux/gpio_keys.h>
> #include <linux/input.h>
> #include <linux/gpio.h>
> @@ -111,6 +114,70 @@ static struct s3c_fb_platdata goni_lcd_pdata
__initdata =
> {
> .setup_gpio = s5pv210_fb_gpio_setup_24bpp,
> };
>
> +static int lcd_power_on(struct lcd_device *ld, int enable)
> +{
> + return 1;
Always 1?
> +}
> +
> +static int reset_lcd(struct lcd_device *ld)
> +{
> + static unsigned int first = 1;
> + int reset_gpio = -1;
> +
> + reset_gpio = S5PV210_MP05(5);
> +
> + if (first) {
> + gpio_request(reset_gpio, "MLCD_RST");
> + first = 0;
> + }
> +
> + gpio_direction_output(reset_gpio, 1);
> + return 1;
> +}
Hmm...
Could you please explain about the functionality of above reset_lcd()?
> +
> +static struct lcd_platform_data s6e63m0_platform_data = {
> + .reset = reset_lcd,
> + .power_on = lcd_power_on,
> + .lcd_enabled = 0,
> +
> + .reset_delay = 120, /* 120ms */
> + .power_on_delay = 25, /* 25ms */
> + .power_off_delay = 200, /* 200ms */
> +};
> +
> +#define LCD_BUS_NUM 3
> +#define DISPLAY_CS S5PV210_MP01(1)
> +static struct spi_board_info spi_board_info[] __initdata = {
> + {
> + .modalias = "s6e63m0",
> + .platform_data = (void *)&s6e63m0_platform_data,
^^^^^^^^
No need.
> + .max_speed_hz = 1200000,
> + .bus_num = LCD_BUS_NUM,
> + .chip_select = 0,
> + .mode = SPI_MODE_3,
> + .controller_data = (void *)DISPLAY_CS,
> + },
> +};
> +
> +#define DISPLAY_CLK S5PV210_MP04(1)
> +#define DISPLAY_SI S5PV210_MP04(3)
> +static struct spi_gpio_platform_data lcd_spi_gpio_data = {
> + .sck = DISPLAY_CLK,
> + .mosi = DISPLAY_SI,
How about use the S5PV210_MPXX directly with comment?
> + .miso = SPI_GPIO_NO_MISO,
> +
> + .num_chipselect = 1,
> +};
> +
> +static struct platform_device goni_spi_gpio = {
> + .name = "spi_gpio",
> + .id = LCD_BUS_NUM,
> + .dev = {
> + .parent = &s3c_device_fb.dev,
> + .platform_data = &lcd_spi_gpio_data,
> + },
> +};
> +
> /* KEYPAD */
> static uint32_t keymap[] __initdata = {
> /* KEY(row, col, keycode) */
> @@ -479,6 +546,7 @@ static void goni_setup_sdhci(void)
> static struct platform_device *goni_devices[] __initdata = {
> &s3c_device_fb,
> &s5p_device_onenand,
> + &goni_spi_gpio,
> &goni_i2c_gpio_pmic,
> &goni_device_gpiokeys,
> &s5p_device_fimc0,
> @@ -509,6 +577,9 @@ static void __init goni_machine_init(void)
> /* FB */
> s3c_fb_set_platdata(&goni_lcd_pdata);
>
> + /* SPI */
> + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
> +
> /* KEYPAD */
> samsung_keypad_set_platdata(&keypad_data);
>
> --
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] 23+ messages in thread* [PATCHv2 3/7] ARM: S5PC110: add support for S6E63M0 LCD controller on Goni board
2010-09-28 7:38 ` Kukjin Kim
@ 2010-09-28 12:27 ` Marek Szyprowski
2010-09-28 13:15 ` [PATCH v3] " Marek Szyprowski
1 sibling, 0 replies; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-28 12:27 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Tuesday, September 28, 2010 9:39 AM wrote:
> Marek Szyprowski wrote:
> >
> > Add required platform definitions for S6E63M0 LCD controller on Samsung
> > Goni board.
> >
> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > ---
> > arch/arm/mach-s5pv210/mach-goni.c | 71
> > +++++++++++++++++++++++++++++++++++++
> > 1 files changed, 71 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-s5pv210/mach-goni.c
> b/arch/arm/mach-s5pv210/mach-
> > goni.c
> > index b0ae208..b263f3a 100644
> > --- a/arch/arm/mach-s5pv210/mach-goni.c
> > +++ b/arch/arm/mach-s5pv210/mach-goni.c
> > @@ -16,6 +16,9 @@
> > #include <linux/i2c.h>
> > #include <linux/i2c-gpio.h>
> > #include <linux/mfd/max8998.h>
> > +#include <linux/spi/spi.h>
> > +#include <linux/spi/spi_gpio.h>
> > +#include <linux/lcd.h>
> > #include <linux/gpio_keys.h>
> > #include <linux/input.h>
> > #include <linux/gpio.h>
> > @@ -111,6 +114,70 @@ static struct s3c_fb_platdata goni_lcd_pdata
> __initdata =
> > {
> > .setup_gpio = s5pv210_fb_gpio_setup_24bpp,
> > };
> >
> > +static int lcd_power_on(struct lcd_device *ld, int enable)
> > +{
> > + return 1;
>
> Always 1?
Yes, currently LCD panel is always powered, so this function is just a stub. Lack
of it would cause a different driver behavior.
> > +}
> > +
> > +static int reset_lcd(struct lcd_device *ld)
> > +{
> > + static unsigned int first = 1;
> > + int reset_gpio = -1;
> > +
> > + reset_gpio = S5PV210_MP05(5);
> > +
> > + if (first) {
> > + gpio_request(reset_gpio, "MLCD_RST");
> > + first = 0;
> > + }
> > +
> > + gpio_direction_output(reset_gpio, 1);
> > + return 1;
> > +}
>
> Hmm...
> Could you please explain about the functionality of above reset_lcd()?
It sets the S5PV210_MP05(5) pin to value 1. This function can be called many times
by the driver so a simple singleton template has been used.
> > +
> > +static struct lcd_platform_data s6e63m0_platform_data = {
> > + .reset = reset_lcd,
> > + .power_on = lcd_power_on,
> > + .lcd_enabled = 0,
> > +
> > + .reset_delay = 120, /* 120ms */
> > + .power_on_delay = 25, /* 25ms */
> > + .power_off_delay = 200, /* 200ms */
> > +};
> > +
> > +#define LCD_BUS_NUM 3
> > +#define DISPLAY_CS S5PV210_MP01(1)
> > +static struct spi_board_info spi_board_info[] __initdata = {
> > + {
> > + .modalias = "s6e63m0",
> > + .platform_data = (void *)&s6e63m0_platform_data,
> ^^^^^^^^
> No need.
Right.
>
> > + .max_speed_hz = 1200000,
> > + .bus_num = LCD_BUS_NUM,
> > + .chip_select = 0,
> > + .mode = SPI_MODE_3,
> > + .controller_data = (void *)DISPLAY_CS,
>
>
>
> > + },
> > +};
> > +
> > +#define DISPLAY_CLK S5PV210_MP04(1)
> > +#define DISPLAY_SI S5PV210_MP04(3)
> > +static struct spi_gpio_platform_data lcd_spi_gpio_data = {
> > + .sck = DISPLAY_CLK,
> > + .mosi = DISPLAY_SI,
>
> How about use the S5PV210_MPXX directly with comment?
Ok, no problem, I will resend a new version.
>
> > + .miso = SPI_GPIO_NO_MISO,
> > +
> > + .num_chipselect = 1,
> > +};
> > +
> > +static struct platform_device goni_spi_gpio = {
> > + .name = "spi_gpio",
> > + .id = LCD_BUS_NUM,
> > + .dev = {
> > + .parent = &s3c_device_fb.dev,
> > + .platform_data = &lcd_spi_gpio_data,
> > + },
> > +};
> > +
> > /* KEYPAD */
> > static uint32_t keymap[] __initdata = {
> > /* KEY(row, col, keycode) */
> > @@ -479,6 +546,7 @@ static void goni_setup_sdhci(void)
> > static struct platform_device *goni_devices[] __initdata = {
> > &s3c_device_fb,
> > &s5p_device_onenand,
> > + &goni_spi_gpio,
> > &goni_i2c_gpio_pmic,
> > &goni_device_gpiokeys,
> > &s5p_device_fimc0,
> > @@ -509,6 +577,9 @@ static void __init goni_machine_init(void)
> > /* FB */
> > s3c_fb_set_platdata(&goni_lcd_pdata);
> >
> > + /* SPI */
> > + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
> > +
> > /* KEYPAD */
> > samsung_keypad_set_platdata(&keypad_data);
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 23+ messages in thread* [PATCH v3] ARM: S5PC110: add support for S6E63M0 LCD controller on Goni board
2010-09-28 7:38 ` Kukjin Kim
2010-09-28 12:27 ` Marek Szyprowski
@ 2010-09-28 13:15 ` Marek Szyprowski
2010-10-02 10:40 ` Kukjin Kim
1 sibling, 1 reply; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-28 13:15 UTC (permalink / raw)
To: linux-arm-kernel
Add required platform definitions for S6E63M0 LCD controller on Samsung
Goni board.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
Changes since v2:
- removed defines for lcd pin names
arch/arm/mach-s5pv210/mach-goni.c | 66 +++++++++++++++++++++++++++++++++++++
1 files changed, 66 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index b0ae208..ac6ebab 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -16,6 +16,9 @@
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <linux/mfd/max8998.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/spi_gpio.h>
+#include <linux/lcd.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/gpio.h>
@@ -111,6 +114,65 @@ static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
.setup_gpio = s5pv210_fb_gpio_setup_24bpp,
};
+static int lcd_power_on(struct lcd_device *ld, int enable)
+{
+ return 1;
+}
+
+static int reset_lcd(struct lcd_device *ld)
+{
+ static unsigned int first = 1;
+ int reset_gpio = -1;
+
+ reset_gpio = S5PV210_MP05(5);
+
+ if (first) {
+ gpio_request(reset_gpio, "MLCD_RST");
+ first = 0;
+ }
+
+ gpio_direction_output(reset_gpio, 1);
+ return 1;
+}
+
+static struct lcd_platform_data s6e63m0_platform_data = {
+ .reset = reset_lcd,
+ .power_on = lcd_power_on,
+ .lcd_enabled = 0,
+ .reset_delay = 120, /* 120ms */
+ .power_on_delay = 25, /* 25ms */
+ .power_off_delay = 200, /* 200ms */
+};
+
+#define LCD_BUS_NUM 3
+static struct spi_board_info spi_board_info[] __initdata = {
+ {
+ .modalias = "s6e63m0",
+ .platform_data = &goni_lcd_platform_data,
+ .max_speed_hz = 1200000,
+ .bus_num = LCD_BUS_NUM,
+ .chip_select = 0,
+ .mode = SPI_MODE_3,
+ .controller_data = (void *)S5PV210_MP01(1), /* DISPLAY_CS */
+ },
+};
+
+static struct spi_gpio_platform_data lcd_spi_gpio_data = {
+ .sck = S5PV210_MP04(1), /* DISPLAY_CLK */
+ .mosi = S5PV210_MP04(3), /* DISPLAY_SI */
+ .miso = SPI_GPIO_NO_MISO,
+ .num_chipselect = 1,
+};
+
+static struct platform_device goni_spi_gpio = {
+ .name = "spi_gpio",
+ .id = LCD_BUS_NUM,
+ .dev = {
+ .parent = &s3c_device_fb.dev,
+ .platform_data = &lcd_spi_gpio_data,
+ },
+};
+
/* KEYPAD */
static uint32_t keymap[] __initdata = {
/* KEY(row, col, keycode) */
@@ -479,6 +541,7 @@ static void goni_setup_sdhci(void)
static struct platform_device *goni_devices[] __initdata = {
&s3c_device_fb,
&s5p_device_onenand,
+ &goni_spi_gpio,
&goni_i2c_gpio_pmic,
&goni_device_gpiokeys,
&s5p_device_fimc0,
@@ -509,6 +572,9 @@ static void __init goni_machine_init(void)
/* FB */
s3c_fb_set_platdata(&goni_lcd_pdata);
+ /* SPI */
+ spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
+
/* KEYPAD */
samsung_keypad_set_platdata(&keypad_data);
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH v3] ARM: S5PC110: add support for S6E63M0 LCD controller on Goni board
2010-09-28 13:15 ` [PATCH v3] " Marek Szyprowski
@ 2010-10-02 10:40 ` Kukjin Kim
2010-10-04 5:42 ` Marek Szyprowski
0 siblings, 1 reply; 23+ messages in thread
From: Kukjin Kim @ 2010-10-02 10:40 UTC (permalink / raw)
To: linux-arm-kernel
Marek Szyprowski wrote:
>
> Add required platform definitions for S6E63M0 LCD controller on Samsung
> Goni board.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>
> Changes since v2:
> - removed defines for lcd pin names
>
> arch/arm/mach-s5pv210/mach-goni.c | 66
> +++++++++++++++++++++++++++++++++++++
> 1 files changed, 66 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/mach-goni.c
b/arch/arm/mach-s5pv210/mach-
> goni.c
> index b0ae208..ac6ebab 100644
> --- a/arch/arm/mach-s5pv210/mach-goni.c
> +++ b/arch/arm/mach-s5pv210/mach-goni.c
(snip)
> +static struct lcd_platform_data s6e63m0_platform_data = {
> + .reset = reset_lcd,
> + .power_on = lcd_power_on,
> + .lcd_enabled = 0,
> + .reset_delay = 120, /* 120ms */
> + .power_on_delay = 25, /* 25ms */
> + .power_off_delay = 200, /* 200ms */
> +};
> +
> +#define LCD_BUS_NUM 3
> +static struct spi_board_info spi_board_info[] __initdata = {
> + {
> + .modalias = "s6e63m0",
> + .platform_data = &goni_lcd_platform_data,
Happened following build error.
arch/arm/mach-s5pv210/mach-goni.c:153: error: 'goni_lcd_platform_data'
undeclared here (not in a function)
should be 's6e63m0_platform_data'?..let me know your preferred name.
Will apply with changing it.
> + .max_speed_hz = 1200000,
> + .bus_num = LCD_BUS_NUM,
> + .chip_select = 0,
> + .mode = SPI_MODE_3,
> + .controller_data = (void *)S5PV210_MP01(1), /* DISPLAY_CS */
> + },
> +};
(snip)
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] 23+ messages in thread* [PATCH v3] ARM: S5PC110: add support for S6E63M0 LCD controller on Goni board
2010-10-02 10:40 ` Kukjin Kim
@ 2010-10-04 5:42 ` Marek Szyprowski
0 siblings, 0 replies; 23+ messages in thread
From: Marek Szyprowski @ 2010-10-04 5:42 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Saturday, October 02, 2010 12:41 PM Kukjin Kim wrote:
> Marek Szyprowski wrote:
> >
> > Add required platform definitions for S6E63M0 LCD controller on Samsung
> > Goni board.
> >
> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > ---
> >
> > Changes since v2:
> > - removed defines for lcd pin names
> >
> > arch/arm/mach-s5pv210/mach-goni.c | 66
> > +++++++++++++++++++++++++++++++++++++
> > 1 files changed, 66 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-s5pv210/mach-goni.c
> b/arch/arm/mach-s5pv210/mach-
> > goni.c
> > index b0ae208..ac6ebab 100644
> > --- a/arch/arm/mach-s5pv210/mach-goni.c
> > +++ b/arch/arm/mach-s5pv210/mach-goni.c
>
> (snip)
>
> > +static struct lcd_platform_data s6e63m0_platform_data = {
> > + .reset = reset_lcd,
> > + .power_on = lcd_power_on,
> > + .lcd_enabled = 0,
> > + .reset_delay = 120, /* 120ms */
> > + .power_on_delay = 25, /* 25ms */
> > + .power_off_delay = 200, /* 200ms */
> > +};
> > +
> > +#define LCD_BUS_NUM 3
> > +static struct spi_board_info spi_board_info[] __initdata = {
> > + {
> > + .modalias = "s6e63m0",
> > + .platform_data = &goni_lcd_platform_data,
>
> Happened following build error.
> arch/arm/mach-s5pv210/mach-goni.c:153: error: 'goni_lcd_platform_data'
> undeclared here (not in a function)
>
> should be 's6e63m0_platform_data'?..let me know your preferred name.
> Will apply with changing it.
goni_lcd_platform_data is ihmo more appropriate. I'm sorry again for a problem,
looks that I mixed something up and I've sent a patch before final cleaning.
> > + .max_speed_hz = 1200000,
> > + .bus_num = LCD_BUS_NUM,
> > + .chip_select = 0,
> > + .mode = SPI_MODE_3,
> > + .controller_data = (void *)S5PV210_MP01(1), /* DISPLAY_CS */
> > + },
> > +};
>
> (snip)
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCHv2 4/7] ARM: S5PC110: Add si470x radio device to the GONI board
2010-09-20 12:55 [PATCH v2] ARM: S5PC110: Samsung Goni board update Marek Szyprowski
` (2 preceding siblings ...)
2010-09-20 12:55 ` [PATCHv2 3/7] ARM: S5PC110: add support for S6E63M0 LCD controller on Goni board Marek Szyprowski
@ 2010-09-20 12:55 ` Marek Szyprowski
2010-09-28 7:43 ` Kukjin Kim
2010-09-20 12:55 ` [PATCHv2 5/7] ARM: S5PV210: Enable USB HSOTG gadget build Marek Szyprowski
` (2 subsequent siblings)
6 siblings, 1 reply; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-20 12:55 UTC (permalink / raw)
To: linux-arm-kernel
Add required platform definitions for si470x radio device on Samsung
Goni board.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
arch/arm/mach-s5pv210/Kconfig | 2 ++
arch/arm/mach-s5pv210/mach-goni.c | 30 ++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index b46925b..b1f671d 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -83,9 +83,11 @@ config MACH_GONI
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC1
select S3C_DEV_HSMMC2
+ select S3C_DEV_I2C1
select S5P_DEV_ONENAND
select SAMSUNG_DEV_KEYPAD
select S5PV210_SETUP_FB_24BPP
+ select S5PV210_SETUP_I2C1
select S5PV210_SETUP_KEYPAD
select S5PV210_SETUP_SDHCI
help
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index b263f3a..5677c4d 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -38,6 +38,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/fb.h>
+#include <plat/iic.h>
#include <plat/keypad.h>
#include <plat/sdhci.h>
@@ -200,6 +201,27 @@ static struct samsung_keypad_platdata keypad_data __initdata = {
.cols = 3,
};
+/* Radio */
+static struct i2c_board_info i2c1_devs[] __initdata = {
+ {
+ I2C_BOARD_INFO("si470x", 0x10),
+ },
+};
+
+static void __init goni_radio_init(void)
+{
+ int gpio;
+
+ gpio = S5PV210_GPJ2(4); /* XMSMDATA_4 */
+ gpio_request(gpio, "FM_INT");
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+ i2c1_devs[0].irq = gpio_to_irq(gpio);
+
+ gpio = S5PV210_GPJ2(5); /* XMSMDATA_5 */
+ gpio_request(gpio, "FM_RST");
+ gpio_direction_output(gpio, 1);
+}
+
/* MAX8998 regulators */
#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
@@ -556,6 +578,7 @@ static struct platform_device *goni_devices[] __initdata = {
&s3c_device_hsmmc1,
&s3c_device_hsmmc2,
&samsung_device_keypad,
+ &s3c_device_i2c1,
};
static void __init goni_map_io(void)
@@ -567,6 +590,13 @@ static void __init goni_map_io(void)
static void __init goni_machine_init(void)
{
+ /* Radio: call before I2C 1 registeration */
+ goni_radio_init();
+
+ /* I2C1 */
+ s3c_i2c1_set_platdata(NULL);
+ i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
+
/* PMIC */
goni_pmic_init();
i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4, i2c_gpio_pmic_devs,
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCHv2 4/7] ARM: S5PC110: Add si470x radio device to the GONI board
2010-09-20 12:55 ` [PATCHv2 4/7] ARM: S5PC110: Add si470x radio device to the GONI board Marek Szyprowski
@ 2010-09-28 7:43 ` Kukjin Kim
2010-09-28 13:08 ` Marek Szyprowski
0 siblings, 1 reply; 23+ messages in thread
From: Kukjin Kim @ 2010-09-28 7:43 UTC (permalink / raw)
To: linux-arm-kernel
Marek Szyprowski wrote:
>
> Add required platform definitions for si470x radio device on Samsung
> Goni board.
>
> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> arch/arm/mach-s5pv210/Kconfig | 2 ++
> arch/arm/mach-s5pv210/mach-goni.c | 30
> ++++++++++++++++++++++++++++++
> 2 files changed, 32 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
> index b46925b..b1f671d 100644
> --- a/arch/arm/mach-s5pv210/Kconfig
> +++ b/arch/arm/mach-s5pv210/Kconfig
> @@ -83,9 +83,11 @@ config MACH_GONI
> select S3C_DEV_HSMMC
> select S3C_DEV_HSMMC1
> select S3C_DEV_HSMMC2
> + select S3C_DEV_I2C1
> select S5P_DEV_ONENAND
> select SAMSUNG_DEV_KEYPAD
> select S5PV210_SETUP_FB_24BPP
> + select S5PV210_SETUP_I2C1
> select S5PV210_SETUP_KEYPAD
> select S5PV210_SETUP_SDHCI
> help
> diff --git a/arch/arm/mach-s5pv210/mach-goni.c
b/arch/arm/mach-s5pv210/mach-
> goni.c
> index b263f3a..5677c4d 100644
> --- a/arch/arm/mach-s5pv210/mach-goni.c
> +++ b/arch/arm/mach-s5pv210/mach-goni.c
> @@ -38,6 +38,7 @@
> #include <plat/devs.h>
> #include <plat/cpu.h>
> #include <plat/fb.h>
> +#include <plat/iic.h>
> #include <plat/keypad.h>
> #include <plat/sdhci.h>
>
> @@ -200,6 +201,27 @@ static struct samsung_keypad_platdata keypad_data
> __initdata = {
> .cols = 3,
> };
>
> +/* Radio */
> +static struct i2c_board_info i2c1_devs[] __initdata = {
> + {
> + I2C_BOARD_INFO("si470x", 0x10),
> + },
> +};
> +
> +static void __init goni_radio_init(void)
> +{
> + int gpio;
> +
> + gpio = S5PV210_GPJ2(4); /* XMSMDATA_4 */
> + gpio_request(gpio, "FM_INT");
If returned fail?
> + s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
> + i2c1_devs[0].irq = gpio_to_irq(gpio);
Need to sort out gpio interrupt stuff for this.
Anyway, will check it soon.
> +
> + gpio = S5PV210_GPJ2(5); /* XMSMDATA_5 */
> + gpio_request(gpio, "FM_RST");
Same.
> + gpio_direction_output(gpio, 1);
> +}
> +
> /* MAX8998 regulators */
> #if defined(CONFIG_REGULATOR_MAX8998) ||
> defined(CONFIG_REGULATOR_MAX8998_MODULE)
>
> @@ -556,6 +578,7 @@ static struct platform_device *goni_devices[]
__initdata = {
> &s3c_device_hsmmc1,
> &s3c_device_hsmmc2,
> &samsung_device_keypad,
> + &s3c_device_i2c1,
> };
>
> static void __init goni_map_io(void)
> @@ -567,6 +590,13 @@ static void __init goni_map_io(void)
>
> static void __init goni_machine_init(void)
> {
> + /* Radio: call before I2C 1 registeration */
> + goni_radio_init();
> +
> + /* I2C1 */
> + s3c_i2c1_set_platdata(NULL);
> + i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
> +
> /* PMIC */
> goni_pmic_init();
> i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4,
> i2c_gpio_pmic_devs,
> --
Others, looks ok.
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] 23+ messages in thread* [PATCHv2 4/7] ARM: S5PC110: Add si470x radio device to the GONI board
2010-09-28 7:43 ` Kukjin Kim
@ 2010-09-28 13:08 ` Marek Szyprowski
2010-09-28 14:04 ` Kukjin Kim
0 siblings, 1 reply; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-28 13:08 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Tuesday, September 28, 2010 9:44 AM Kukjin Kim wrote:
> Marek Szyprowski wrote:
> >
> > Add required platform definitions for si470x radio device on Samsung
> > Goni board.
> >
> > Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > ---
> > arch/arm/mach-s5pv210/Kconfig | 2 ++
> > arch/arm/mach-s5pv210/mach-goni.c | 30
> > ++++++++++++++++++++++++++++++
> > 2 files changed, 32 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
> > index b46925b..b1f671d 100644
> > --- a/arch/arm/mach-s5pv210/Kconfig
> > +++ b/arch/arm/mach-s5pv210/Kconfig
> > @@ -83,9 +83,11 @@ config MACH_GONI
> > select S3C_DEV_HSMMC
> > select S3C_DEV_HSMMC1
> > select S3C_DEV_HSMMC2
> > + select S3C_DEV_I2C1
> > select S5P_DEV_ONENAND
> > select SAMSUNG_DEV_KEYPAD
> > select S5PV210_SETUP_FB_24BPP
> > + select S5PV210_SETUP_I2C1
> > select S5PV210_SETUP_KEYPAD
> > select S5PV210_SETUP_SDHCI
> > help
> > diff --git a/arch/arm/mach-s5pv210/mach-goni.c
> b/arch/arm/mach-s5pv210/mach-
> > goni.c
> > index b263f3a..5677c4d 100644
> > --- a/arch/arm/mach-s5pv210/mach-goni.c
> > +++ b/arch/arm/mach-s5pv210/mach-goni.c
> > @@ -38,6 +38,7 @@
> > #include <plat/devs.h>
> > #include <plat/cpu.h>
> > #include <plat/fb.h>
> > +#include <plat/iic.h>
> > #include <plat/keypad.h>
> > #include <plat/sdhci.h>
> >
> > @@ -200,6 +201,27 @@ static struct samsung_keypad_platdata keypad_data
> > __initdata = {
> > .cols = 3,
> > };
> >
> > +/* Radio */
> > +static struct i2c_board_info i2c1_devs[] __initdata = {
> > + {
> > + I2C_BOARD_INFO("si470x", 0x10),
> > + },
> > +};
> > +
> > +static void __init goni_radio_init(void)
> > +{
> > + int gpio;
> > +
> > + gpio = S5PV210_GPJ2(4); /* XMSMDATA_4 */
> > + gpio_request(gpio, "FM_INT");
>
> If returned fail?
Then there is something seriously wrong either with the platform or machine
startup code.
It is quite common to omit a check in the machine init code. Just take a look
at mach-s3c64xx/mach-smdk6410.c, smdk6410_machine_init() function. Lack of
checks here doesn't really have ANY impact on the stability of the kernel imho.
> > + s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
> > + i2c1_devs[0].irq = gpio_to_irq(gpio);
>
> Need to sort out gpio interrupt stuff for this.
Right, forgot that this also requires interrupt support for gpio. This
definitely shows how important the gpio interrupt patches are and how much
is blocked because they are still no merged or even commented yet.
> Anyway, will check it soon.
>
>
> > +
> > + gpio = S5PV210_GPJ2(5); /* XMSMDATA_5 */
> > + gpio_request(gpio, "FM_RST");
>
> Same.
>
> > + gpio_direction_output(gpio, 1);
> > +}
> > +
> > /* MAX8998 regulators */
> > #if defined(CONFIG_REGULATOR_MAX8998) ||
> > defined(CONFIG_REGULATOR_MAX8998_MODULE)
> >
> > @@ -556,6 +578,7 @@ static struct platform_device *goni_devices[]
> __initdata = {
> > &s3c_device_hsmmc1,
> > &s3c_device_hsmmc2,
> > &samsung_device_keypad,
> > + &s3c_device_i2c1,
> > };
> >
> > static void __init goni_map_io(void)
> > @@ -567,6 +590,13 @@ static void __init goni_map_io(void)
> >
> > static void __init goni_machine_init(void)
> > {
> > + /* Radio: call before I2C 1 registeration */
> > + goni_radio_init();
> > +
> > + /* I2C1 */
> > + s3c_i2c1_set_platdata(NULL);
> > + i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
> > +
> > /* PMIC */
> > goni_pmic_init();
> > i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4,
> > i2c_gpio_pmic_devs,
> > --
>
> Others, looks ok.
>
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 23+ messages in thread* [PATCHv2 4/7] ARM: S5PC110: Add si470x radio device to the GONI board
2010-09-28 13:08 ` Marek Szyprowski
@ 2010-09-28 14:04 ` Kukjin Kim
2010-09-29 5:28 ` Marek Szyprowski
0 siblings, 1 reply; 23+ messages in thread
From: Kukjin Kim @ 2010-09-28 14:04 UTC (permalink / raw)
To: linux-arm-kernel
Marek Szyprowski wrote:
>
> Hello,
>
Hi ;-)
> On Tuesday, September 28, 2010 9:44 AM Kukjin Kim wrote:
>
> > Marek Szyprowski wrote:
> > >
> > > Add required platform definitions for si470x radio device on Samsung
> > > Goni board.
> > >
> > > Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> > > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > > ---
> > > arch/arm/mach-s5pv210/Kconfig | 2 ++
> > > arch/arm/mach-s5pv210/mach-goni.c | 30
> > > ++++++++++++++++++++++++++++++
> > > 2 files changed, 32 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/arch/arm/mach-s5pv210/Kconfig
b/arch/arm/mach-s5pv210/Kconfig
> > > index b46925b..b1f671d 100644
> > > --- a/arch/arm/mach-s5pv210/Kconfig
> > > +++ b/arch/arm/mach-s5pv210/Kconfig
> > > @@ -83,9 +83,11 @@ config MACH_GONI
> > > select S3C_DEV_HSMMC
> > > select S3C_DEV_HSMMC1
> > > select S3C_DEV_HSMMC2
> > > + select S3C_DEV_I2C1
> > > select S5P_DEV_ONENAND
> > > select SAMSUNG_DEV_KEYPAD
> > > select S5PV210_SETUP_FB_24BPP
> > > + select S5PV210_SETUP_I2C1
> > > select S5PV210_SETUP_KEYPAD
> > > select S5PV210_SETUP_SDHCI
> > > help
> > > diff --git a/arch/arm/mach-s5pv210/mach-goni.c
> > b/arch/arm/mach-s5pv210/mach-
> > > goni.c
> > > index b263f3a..5677c4d 100644
> > > --- a/arch/arm/mach-s5pv210/mach-goni.c
> > > +++ b/arch/arm/mach-s5pv210/mach-goni.c
> > > @@ -38,6 +38,7 @@
> > > #include <plat/devs.h>
> > > #include <plat/cpu.h>
> > > #include <plat/fb.h>
> > > +#include <plat/iic.h>
> > > #include <plat/keypad.h>
> > > #include <plat/sdhci.h>
> > >
> > > @@ -200,6 +201,27 @@ static struct samsung_keypad_platdata keypad_data
> > > __initdata = {
> > > .cols = 3,
> > > };
> > >
> > > +/* Radio */
> > > +static struct i2c_board_info i2c1_devs[] __initdata = {
> > > + {
> > > + I2C_BOARD_INFO("si470x", 0x10),
> > > + },
> > > +};
> > > +
> > > +static void __init goni_radio_init(void)
> > > +{
> > > + int gpio;
> > > +
> > > + gpio = S5PV210_GPJ2(4); /* XMSMDATA_4 */
> > > + gpio_request(gpio, "FM_INT");
> >
> > If returned fail?
>
> Then there is something seriously wrong either with the platform or
machine
> startup code.
>
> It is quite common to omit a check in the machine init code. Just take a
look
> at mach-s3c64xx/mach-smdk6410.c, smdk6410_machine_init() function. Lack of
> checks here doesn't really have ANY impact on the stability of the kernel
imho.
>
Yeah...right now in our codes, something checked the returning of
gpio_request, and others not and the board designer already know where it is
used.
Hmm...I'm not sure which is better to us...but is it better there is
exception/error handling?
Or...is it useless code?
> > > + s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
> > > + i2c1_devs[0].irq = gpio_to_irq(gpio);
> >
> > Need to sort out gpio interrupt stuff for this.
>
> Right, forgot that this also requires interrupt support for gpio. This
> definitely shows how important the gpio interrupt patches are and how much
> is blocked because they are still no merged or even commented yet.
>
Yes, I'm reviewing your '[PATCH 1/6] ARM: Samsung: Add common s5p gpio
interrupt support'...and not finished yet..
But I have to leave office now...it's late here...
I will continue it tomorrow morning.
> > Anyway, will check it soon.
> >
> >
> > > +
> > > + gpio = S5PV210_GPJ2(5); /* XMSMDATA_5 */
> > > + gpio_request(gpio, "FM_RST");
> >
> > Same.
> >
> > > + gpio_direction_output(gpio, 1);
> > > +}
> > > +
> > > /* MAX8998 regulators */
> > > #if defined(CONFIG_REGULATOR_MAX8998) ||
> > > defined(CONFIG_REGULATOR_MAX8998_MODULE)
> > >
> > > @@ -556,6 +578,7 @@ static struct platform_device *goni_devices[]
> > __initdata = {
> > > &s3c_device_hsmmc1,
> > > &s3c_device_hsmmc2,
> > > &samsung_device_keypad,
> > > + &s3c_device_i2c1,
> > > };
> > >
> > > static void __init goni_map_io(void)
> > > @@ -567,6 +590,13 @@ static void __init goni_map_io(void)
> > >
> > > static void __init goni_machine_init(void)
> > > {
> > > + /* Radio: call before I2C 1 registeration */
> > > + goni_radio_init();
> > > +
> > > + /* I2C1 */
> > > + s3c_i2c1_set_platdata(NULL);
> > > + i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
> > > +
> > > /* PMIC */
> > > goni_pmic_init();
> > > i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4,
> > > i2c_gpio_pmic_devs,
> > > --
> >
> > Others, looks ok.
> >
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] 23+ messages in thread* [PATCHv2 4/7] ARM: S5PC110: Add si470x radio device to the GONI board
2010-09-28 14:04 ` Kukjin Kim
@ 2010-09-29 5:28 ` Marek Szyprowski
0 siblings, 0 replies; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-29 5:28 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Tuesday, September 28, 2010 4:05 PM Kukjin Kim wrote:
> > On Tuesday, September 28, 2010 9:44 AM Kukjin Kim wrote:
> >
> > > Marek Szyprowski wrote:
> > > >
> > > > Add required platform definitions for si470x radio device on Samsung
> > > > Goni board.
> > > >
> > > > Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> > > > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > > > ---
> > > > arch/arm/mach-s5pv210/Kconfig | 2 ++
> > > > arch/arm/mach-s5pv210/mach-goni.c | 30
> > > > ++++++++++++++++++++++++++++++
> > > > 2 files changed, 32 insertions(+), 0 deletions(-)
> > > >
> > > > diff --git a/arch/arm/mach-s5pv210/Kconfig
> b/arch/arm/mach-s5pv210/Kconfig
> > > > index b46925b..b1f671d 100644
> > > > --- a/arch/arm/mach-s5pv210/Kconfig
> > > > +++ b/arch/arm/mach-s5pv210/Kconfig
> > > > @@ -83,9 +83,11 @@ config MACH_GONI
> > > > select S3C_DEV_HSMMC
> > > > select S3C_DEV_HSMMC1
> > > > select S3C_DEV_HSMMC2
> > > > + select S3C_DEV_I2C1
> > > > select S5P_DEV_ONENAND
> > > > select SAMSUNG_DEV_KEYPAD
> > > > select S5PV210_SETUP_FB_24BPP
> > > > + select S5PV210_SETUP_I2C1
> > > > select S5PV210_SETUP_KEYPAD
> > > > select S5PV210_SETUP_SDHCI
> > > > help
> > > > diff --git a/arch/arm/mach-s5pv210/mach-goni.c
> > > b/arch/arm/mach-s5pv210/mach-
> > > > goni.c
> > > > index b263f3a..5677c4d 100644
> > > > --- a/arch/arm/mach-s5pv210/mach-goni.c
> > > > +++ b/arch/arm/mach-s5pv210/mach-goni.c
> > > > @@ -38,6 +38,7 @@
> > > > #include <plat/devs.h>
> > > > #include <plat/cpu.h>
> > > > #include <plat/fb.h>
> > > > +#include <plat/iic.h>
> > > > #include <plat/keypad.h>
> > > > #include <plat/sdhci.h>
> > > >
> > > > @@ -200,6 +201,27 @@ static struct samsung_keypad_platdata keypad_data
> > > > __initdata = {
> > > > .cols = 3,
> > > > };
> > > >
> > > > +/* Radio */
> > > > +static struct i2c_board_info i2c1_devs[] __initdata = {
> > > > + {
> > > > + I2C_BOARD_INFO("si470x", 0x10),
> > > > + },
> > > > +};
> > > > +
> > > > +static void __init goni_radio_init(void)
> > > > +{
> > > > + int gpio;
> > > > +
> > > > + gpio = S5PV210_GPJ2(4); /* XMSMDATA_4 */
> > > > + gpio_request(gpio, "FM_INT");
> > >
> > > If returned fail?
> >
> > Then there is something seriously wrong either with the platform or
> machine
> > startup code.
> >
> > It is quite common to omit a check in the machine init code. Just take a
> look
> > at mach-s3c64xx/mach-smdk6410.c, smdk6410_machine_init() function. Lack of
> > checks here doesn't really have ANY impact on the stability of the kernel
> imho.
> >
> Yeah...right now in our codes, something checked the returning of
> gpio_request, and others not and the board designer already know where it is
> used.
>
> Hmm...I'm not sure which is better to us...but is it better there is
> exception/error handling?
> Or...is it useless code?
IMHO such code is useless. If requesting a gpio fails then the kernel will throw
an ops or warning on the first use of that gpio pin, so the board designer will
know that something is really wrong there.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCHv2 5/7] ARM: S5PV210: Enable USB HSOTG gadget build
2010-09-20 12:55 [PATCH v2] ARM: S5PC110: Samsung Goni board update Marek Szyprowski
` (3 preceding siblings ...)
2010-09-20 12:55 ` [PATCHv2 4/7] ARM: S5PC110: Add si470x radio device to the GONI board Marek Szyprowski
@ 2010-09-20 12:55 ` Marek Szyprowski
2010-09-28 7:53 ` Kukjin Kim
2010-09-20 12:55 ` [PATCHv2 6/7] ARM: S5PC110: add support for otg usb gadget on Goni board Marek Szyprowski
2010-09-20 12:55 ` [PATCHv2 7/7] ARM: S5PC110: add support for MMC regulators " Marek Szyprowski
6 siblings, 1 reply; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-20 12:55 UTC (permalink / raw)
To: linux-arm-kernel
Add the necessary definitions and mapping information to enable the
s3c-hsotg gadget to build.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
s5pv210 otg
---
arch/arm/mach-s5pv210/cpu.c | 5 +++++
arch/arm/mach-s5pv210/include/mach/map.h | 4 ++++
arch/arm/mach-s5pv210/include/mach/regs-sys.h | 19 +++++++++++++++++++
arch/arm/plat-s5p/include/plat/map-s5p.h | 1 +
4 files changed, 29 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-s5pv210/include/mach/regs-sys.h
diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c
index c551ab1..8e4a39f 100644
--- a/arch/arm/mach-s5pv210/cpu.c
+++ b/arch/arm/mach-s5pv210/cpu.c
@@ -84,6 +84,11 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
.pfn = __phys_to_pfn(S5PV210_PA_SROMC),
.length = SZ_4K,
.type = MT_DEVICE,
+ }, {
+ .virtual = (unsigned long)S3C_VA_USB_HSPHY,
+ .pfn =__phys_to_pfn(S5PV210_PA_HSPHY),
+ .length = SZ_4K,
+ .type = MT_DEVICE,
}
};
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h
index b86d040..abe20d0 100644
--- a/arch/arm/mach-s5pv210/include/mach/map.h
+++ b/arch/arm/mach-s5pv210/include/mach/map.h
@@ -73,6 +73,9 @@
#define S5PV210_PA_HSMMC(x) (0xEB000000 + ((x) * 0x100000))
+#define S5PV210_PA_HSOTG (0xEC000000)
+#define S5PV210_PA_HSPHY (0xEC100000)
+
#define S5PV210_PA_VIC0 (0xF2000000)
#define S5PV210_PA_VIC1 (0xF2100000)
#define S5PV210_PA_VIC2 (0xF2200000)
@@ -108,6 +111,7 @@
#define S3C_PA_FB S5PV210_PA_FB
#define S3C_PA_RTC S5PV210_PA_RTC
#define S3C_PA_WDT S5PV210_PA_WATCHDOG
+#define S3C_PA_USB_HSOTG S5PV210_PA_HSOTG
#define S5P_PA_FIMC0 S5PV210_PA_FIMC0
#define S5P_PA_FIMC1 S5PV210_PA_FIMC1
#define S5P_PA_FIMC2 S5PV210_PA_FIMC2
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-sys.h b/arch/arm/mach-s5pv210/include/mach/regs-sys.h
new file mode 100644
index 0000000..26691d3
--- /dev/null
+++ b/arch/arm/mach-s5pv210/include/mach/regs-sys.h
@@ -0,0 +1,19 @@
+/* arch/arm/mach-s5pv210/include/mach/regs-sys.h
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com/
+ *
+ * S5PV210 - System registers definitions
+ *
+ * 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.
+*/
+
+#define S5PV210_USB_PHY_CON (S3C_VA_SYS + 0xE80C)
+#define S5PV210_USB_PHY0_EN (1 << 0)
+#define S5PV210_USB_PHY1_EN (1 << 1)
+
+/* compatibility defines for s3c-hsotg driver */
+#define S3C64XX_OTHERS S5PV210_USB_PHY_CON
+#define S3C64XX_OTHERS_USBMASK S5PV210_USB_PHY0_EN
diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h b/arch/arm/plat-s5p/include/plat/map-s5p.h
index c4ff88b..dc5bce9 100644
--- a/arch/arm/plat-s5p/include/plat/map-s5p.h
+++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
@@ -18,6 +18,7 @@
#define S5P_VA_SYSTIMER S3C_ADDR(0x01200000)
#define S5P_VA_SROMC S3C_ADDR(0x01100000)
#define S5P_VA_SYSRAM S3C_ADDR(0x01180000)
+#define S3C_VA_USB_HSPHY S3C_ADDR(0x02000000)
#define S5P_VA_COMBINER_BASE S3C_ADDR(0x00600000)
#define S5P_VA_COMBINER(x) (S5P_VA_COMBINER_BASE + ((x) >> 2) * 0x10)
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCHv2 5/7] ARM: S5PV210: Enable USB HSOTG gadget build
2010-09-20 12:55 ` [PATCHv2 5/7] ARM: S5PV210: Enable USB HSOTG gadget build Marek Szyprowski
@ 2010-09-28 7:53 ` Kukjin Kim
0 siblings, 0 replies; 23+ messages in thread
From: Kukjin Kim @ 2010-09-28 7:53 UTC (permalink / raw)
To: linux-arm-kernel
Marek wrote:
>
> Add the necessary definitions and mapping information to enable the
> s3c-hsotg gadget to build.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>
> s5pv210 otg
Maybe miss typing? ;-)
> ---
> arch/arm/mach-s5pv210/cpu.c | 5 +++++
> arch/arm/mach-s5pv210/include/mach/map.h | 4 ++++
> arch/arm/mach-s5pv210/include/mach/regs-sys.h | 19
> +++++++++++++++++++
> arch/arm/plat-s5p/include/plat/map-s5p.h | 1 +
> 4 files changed, 29 insertions(+), 0 deletions(-)
> create mode 100644 arch/arm/mach-s5pv210/include/mach/regs-sys.h
>
> diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c
> index c551ab1..8e4a39f 100644
> --- a/arch/arm/mach-s5pv210/cpu.c
> +++ b/arch/arm/mach-s5pv210/cpu.c
> @@ -84,6 +84,11 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
> .pfn = __phys_to_pfn(S5PV210_PA_SROMC),
> .length = SZ_4K,
> .type = MT_DEVICE,
> + }, {
> + .virtual = (unsigned long)S3C_VA_USB_HSPHY,
> + .pfn =__phys_to_pfn(S5PV210_PA_HSPHY),
> + .length = SZ_4K,
> + .type = MT_DEVICE,
> }
> };
>
> diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-
> s5pv210/include/mach/map.h
> index b86d040..abe20d0 100644
> --- a/arch/arm/mach-s5pv210/include/mach/map.h
> +++ b/arch/arm/mach-s5pv210/include/mach/map.h
> @@ -73,6 +73,9 @@
>
> #define S5PV210_PA_HSMMC(x) (0xEB000000 + ((x) * 0x100000))
>
> +#define S5PV210_PA_HSOTG (0xEC000000)
> +#define S5PV210_PA_HSPHY (0xEC100000)
> +
> #define S5PV210_PA_VIC0 (0xF2000000)
> #define S5PV210_PA_VIC1 (0xF2100000)
> #define S5PV210_PA_VIC2 (0xF2200000)
> @@ -108,6 +111,7 @@
> #define S3C_PA_FB S5PV210_PA_FB
> #define S3C_PA_RTC S5PV210_PA_RTC
> #define S3C_PA_WDT S5PV210_PA_WATCHDOG
> +#define S3C_PA_USB_HSOTG S5PV210_PA_HSOTG
> #define S5P_PA_FIMC0 S5PV210_PA_FIMC0
> #define S5P_PA_FIMC1 S5PV210_PA_FIMC1
> #define S5P_PA_FIMC2 S5PV210_PA_FIMC2
> diff --git a/arch/arm/mach-s5pv210/include/mach/regs-sys.h
b/arch/arm/mach-
> s5pv210/include/mach/regs-sys.h
> new file mode 100644
> index 0000000..26691d3
> --- /dev/null
> +++ b/arch/arm/mach-s5pv210/include/mach/regs-sys.h
> @@ -0,0 +1,19 @@
> +/* arch/arm/mach-s5pv210/include/mach/regs-sys.h
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com/
> + *
> + * S5PV210 - System registers definitions
> + *
> + * 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.
> +*/
> +
> +#define S5PV210_USB_PHY_CON (S3C_VA_SYS + 0xE80C)
> +#define S5PV210_USB_PHY0_EN (1 << 0)
> +#define S5PV210_USB_PHY1_EN (1 << 1)
> +
> +/* compatibility defines for s3c-hsotg driver */
> +#define S3C64XX_OTHERS S5PV210_USB_PHY_CON
> +#define S3C64XX_OTHERS_USBMASK S5PV210_USB_PHY0_EN
> diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h b/arch/arm/plat-
> s5p/include/plat/map-s5p.h
> index c4ff88b..dc5bce9 100644
> --- a/arch/arm/plat-s5p/include/plat/map-s5p.h
> +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
> @@ -18,6 +18,7 @@
> #define S5P_VA_SYSTIMER S3C_ADDR(0x01200000)
> #define S5P_VA_SROMC S3C_ADDR(0x01100000)
> #define S5P_VA_SYSRAM S3C_ADDR(0x01180000)
> +#define S3C_VA_USB_HSPHY S3C_ADDR(0x02000000)
>
> #define S5P_VA_COMBINER_BASE S3C_ADDR(0x00600000)
> #define S5P_VA_COMBINER(x) (S5P_VA_COMBINER_BASE + ((x) >> 2) *
> 0x10)
> --
Looks ok...will apply with removing above miss typing.
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] 23+ messages in thread
* [PATCHv2 6/7] ARM: S5PC110: add support for otg usb gadget on Goni board
2010-09-20 12:55 [PATCH v2] ARM: S5PC110: Samsung Goni board update Marek Szyprowski
` (4 preceding siblings ...)
2010-09-20 12:55 ` [PATCHv2 5/7] ARM: S5PV210: Enable USB HSOTG gadget build Marek Szyprowski
@ 2010-09-20 12:55 ` Marek Szyprowski
2010-09-28 7:54 ` Kukjin Kim
2010-09-20 12:55 ` [PATCHv2 7/7] ARM: S5PC110: add support for MMC regulators " Marek Szyprowski
6 siblings, 1 reply; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-20 12:55 UTC (permalink / raw)
To: linux-arm-kernel
Add required platform definitions for s3c-hsotg driver to enable usb
gadget support on Samsung Goni board.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-s5pv210/Kconfig | 1 +
arch/arm/mach-s5pv210/mach-goni.c | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index b1f671d..f8bac5a 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -85,6 +85,7 @@ config MACH_GONI
select S3C_DEV_HSMMC2
select S3C_DEV_I2C1
select S5P_DEV_ONENAND
+ select S3C_DEV_USB_HSOTG
select SAMSUNG_DEV_KEYPAD
select S5PV210_SETUP_FB_24BPP
select S5PV210_SETUP_I2C1
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 5677c4d..68e22f2 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -41,6 +41,7 @@
#include <plat/iic.h>
#include <plat/keypad.h>
#include <plat/sdhci.h>
+#include <plat/clock.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -569,6 +570,7 @@ static struct platform_device *goni_devices[] __initdata = {
&s3c_device_fb,
&s5p_device_onenand,
&goni_spi_gpio,
+ &s3c_device_usb_hsotg,
&goni_i2c_gpio_pmic,
&goni_device_gpiokeys,
&s5p_device_fimc0,
@@ -614,6 +616,8 @@ static void __init goni_machine_init(void)
samsung_keypad_set_platdata(&keypad_data);
platform_add_devices(goni_devices, ARRAY_SIZE(goni_devices));
+
+ clk_xusbxti.rate = 24000000;
}
MACHINE_START(GONI, "GONI")
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCHv2 6/7] ARM: S5PC110: add support for otg usb gadget on Goni board
2010-09-20 12:55 ` [PATCHv2 6/7] ARM: S5PC110: add support for otg usb gadget on Goni board Marek Szyprowski
@ 2010-09-28 7:54 ` Kukjin Kim
0 siblings, 0 replies; 23+ messages in thread
From: Kukjin Kim @ 2010-09-28 7:54 UTC (permalink / raw)
To: linux-arm-kernel
Marek Szyprowski wrote:
>
> Add required platform definitions for s3c-hsotg driver to enable usb
> gadget support on Samsung Goni board.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/mach-s5pv210/Kconfig | 1 +
> arch/arm/mach-s5pv210/mach-goni.c | 4 ++++
> 2 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
> index b1f671d..f8bac5a 100644
> --- a/arch/arm/mach-s5pv210/Kconfig
> +++ b/arch/arm/mach-s5pv210/Kconfig
> @@ -85,6 +85,7 @@ config MACH_GONI
> select S3C_DEV_HSMMC2
> select S3C_DEV_I2C1
> select S5P_DEV_ONENAND
> + select S3C_DEV_USB_HSOTG
> select SAMSUNG_DEV_KEYPAD
> select S5PV210_SETUP_FB_24BPP
> select S5PV210_SETUP_I2C1
> diff --git a/arch/arm/mach-s5pv210/mach-goni.c
b/arch/arm/mach-s5pv210/mach-
> goni.c
> index 5677c4d..68e22f2 100644
> --- a/arch/arm/mach-s5pv210/mach-goni.c
> +++ b/arch/arm/mach-s5pv210/mach-goni.c
> @@ -41,6 +41,7 @@
> #include <plat/iic.h>
> #include <plat/keypad.h>
> #include <plat/sdhci.h>
> +#include <plat/clock.h>
>
> /* Following are default values for UCON, ULCON and UFCON UART registers
*/
> #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
> @@ -569,6 +570,7 @@ static struct platform_device *goni_devices[]
__initdata = {
> &s3c_device_fb,
> &s5p_device_onenand,
> &goni_spi_gpio,
> + &s3c_device_usb_hsotg,
> &goni_i2c_gpio_pmic,
> &goni_device_gpiokeys,
> &s5p_device_fimc0,
> @@ -614,6 +616,8 @@ static void __init goni_machine_init(void)
> samsung_keypad_set_platdata(&keypad_data);
>
> platform_add_devices(goni_devices, ARRAY_SIZE(goni_devices));
> +
> + clk_xusbxti.rate = 24000000;
> }
>
> MACHINE_START(GONI, "GONI")
> --
Ok...will apply.
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] 23+ messages in thread
* [PATCHv2 7/7] ARM: S5PC110: add support for MMC regulators on Goni board
2010-09-20 12:55 [PATCH v2] ARM: S5PC110: Samsung Goni board update Marek Szyprowski
` (5 preceding siblings ...)
2010-09-20 12:55 ` [PATCHv2 6/7] ARM: S5PC110: add support for otg usb gadget on Goni board Marek Szyprowski
@ 2010-09-20 12:55 ` Marek Szyprowski
2010-09-20 13:03 ` Mark Brown
2010-09-28 6:27 ` Kukjin Kim
6 siblings, 2 replies; 23+ messages in thread
From: Marek Szyprowski @ 2010-09-20 12:55 UTC (permalink / raw)
To: linux-arm-kernel
Add required platform definitions for MMC power regulators on Samsung
Goni board. GPIO pin GONI_EXT_FLASH_EN has been transferred from machine
startup code to fixed voltage regulator.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
arch/arm/mach-s5pv210/mach-goni.c | 40 ++++++++++++++++++++++++++++++++++--
1 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 68e22f2..a7fbe08 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -16,6 +16,7 @@
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <linux/mfd/max8998.h>
+#include <linux/regulator/fixed.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_gpio.h>
#include <linux/lcd.h>
@@ -226,6 +227,10 @@ static void __init goni_radio_init(void)
/* MAX8998 regulators */
#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
+static struct regulator_consumer_supply goni_ldo5_consumers[] = {
+ REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
+};
+
static struct regulator_init_data goni_ldo2_data = {
.constraints = {
.name = "VALIVE_1.1V",
@@ -265,6 +270,8 @@ static struct regulator_init_data goni_ldo5_data = {
.max_uV = 2800000,
.apply_uV = 1,
},
+ .num_consumer_supplies = ARRAY_SIZE(goni_ldo5_consumers),
+ .consumer_supplies = goni_ldo5_consumers,
};
static struct regulator_init_data goni_ldo6_data = {
@@ -556,11 +563,37 @@ static struct s3c_sdhci_platdata goni_hsmmc2_data __initdata = {
.ext_cd_gpio_invert = 1,
};
+static struct regulator_consumer_supply mmc2_supplies[] = {
+ REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"),
+};
+
+static struct regulator_init_data mmc2_fixed_voltage_init_data = {
+ .constraints = {
+ .name = "V_TF_2.8V",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(mmc2_supplies),
+ .consumer_supplies = mmc2_supplies,
+};
+
+static struct fixed_voltage_config mmc2_fixed_voltage_config = {
+ .supply_name = "EXT_FLASH_EN",
+ .microvolts = 2800000,
+ .gpio = GONI_EXT_FLASH_EN,
+ .enable_high = true,
+ .init_data = &mmc2_fixed_voltage_init_data,
+};
+
+static struct platform_device mmc2_fixed_voltage = {
+ .name = "reg-fixed-voltage",
+ .id = 2,
+ .dev = {
+ .platform_data = &mmc2_fixed_voltage_config,
+ },
+};
+
static void goni_setup_sdhci(void)
{
- gpio_request(GONI_EXT_FLASH_EN, "FLASH_EN");
- gpio_direction_output(GONI_EXT_FLASH_EN, 1);
-
s3c_sdhci0_set_platdata(&goni_hsmmc0_data);
s3c_sdhci1_set_platdata(&goni_hsmmc1_data);
s3c_sdhci2_set_platdata(&goni_hsmmc2_data);
@@ -572,6 +605,7 @@ static struct platform_device *goni_devices[] __initdata = {
&goni_spi_gpio,
&s3c_device_usb_hsotg,
&goni_i2c_gpio_pmic,
+ &mmc2_fixed_voltage,
&goni_device_gpiokeys,
&s5p_device_fimc0,
&s5p_device_fimc1,
--
1.7.1.569.g6f426
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCHv2 7/7] ARM: S5PC110: add support for MMC regulators on Goni board
2010-09-20 12:55 ` [PATCHv2 7/7] ARM: S5PC110: add support for MMC regulators " Marek Szyprowski
@ 2010-09-20 13:03 ` Mark Brown
2010-09-28 6:27 ` Kukjin Kim
1 sibling, 0 replies; 23+ messages in thread
From: Mark Brown @ 2010-09-20 13:03 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Sep 20, 2010 at 02:55:37PM +0200, Marek Szyprowski wrote:
> Add required platform definitions for MMC power regulators on Samsung
> Goni board. GPIO pin GONI_EXT_FLASH_EN has been transferred from machine
> startup code to fixed voltage regulator.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
Looks good from a regulator API point of view:
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCHv2 7/7] ARM: S5PC110: add support for MMC regulators on Goni board
2010-09-20 12:55 ` [PATCHv2 7/7] ARM: S5PC110: add support for MMC regulators " Marek Szyprowski
2010-09-20 13:03 ` Mark Brown
@ 2010-09-28 6:27 ` Kukjin Kim
1 sibling, 0 replies; 23+ messages in thread
From: Kukjin Kim @ 2010-09-28 6:27 UTC (permalink / raw)
To: linux-arm-kernel
Marek Szyprowski wrote:
>
> Add required platform definitions for MMC power regulators on Samsung
> Goni board. GPIO pin GONI_EXT_FLASH_EN has been transferred from machine
> startup code to fixed voltage regulator.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> arch/arm/mach-s5pv210/mach-goni.c | 40
> ++++++++++++++++++++++++++++++++++--
> 1 files changed, 37 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/mach-goni.c
b/arch/arm/mach-s5pv210/mach-
> goni.c
> index 68e22f2..a7fbe08 100644
> --- a/arch/arm/mach-s5pv210/mach-goni.c
> +++ b/arch/arm/mach-s5pv210/mach-goni.c
> @@ -16,6 +16,7 @@
> #include <linux/i2c.h>
> #include <linux/i2c-gpio.h>
> #include <linux/mfd/max8998.h>
> +#include <linux/regulator/fixed.h>
> #include <linux/spi/spi.h>
> #include <linux/spi/spi_gpio.h>
> #include <linux/lcd.h>
> @@ -226,6 +227,10 @@ static void __init goni_radio_init(void)
> /* MAX8998 regulators */
> #if defined(CONFIG_REGULATOR_MAX8998) ||
> defined(CONFIG_REGULATOR_MAX8998_MODULE)
>
> +static struct regulator_consumer_supply goni_ldo5_consumers[] = {
> + REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
> +};
> +
> static struct regulator_init_data goni_ldo2_data = {
> .constraints = {
> .name = "VALIVE_1.1V",
> @@ -265,6 +270,8 @@ static struct regulator_init_data goni_ldo5_data = {
> .max_uV = 2800000,
> .apply_uV = 1,
> },
> + .num_consumer_supplies = ARRAY_SIZE(goni_ldo5_consumers),
> + .consumer_supplies = goni_ldo5_consumers,
> };
>
> static struct regulator_init_data goni_ldo6_data = {
> @@ -556,11 +563,37 @@ static struct s3c_sdhci_platdata goni_hsmmc2_data
> __initdata = {
> .ext_cd_gpio_invert = 1,
> };
>
> +static struct regulator_consumer_supply mmc2_supplies[] = {
> + REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"),
> +};
> +
> +static struct regulator_init_data mmc2_fixed_voltage_init_data = {
> + .constraints = {
> + .name = "V_TF_2.8V",
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = ARRAY_SIZE(mmc2_supplies),
> + .consumer_supplies = mmc2_supplies,
> +};
> +
> +static struct fixed_voltage_config mmc2_fixed_voltage_config = {
> + .supply_name = "EXT_FLASH_EN",
> + .microvolts = 2800000,
> + .gpio = GONI_EXT_FLASH_EN,
> + .enable_high = true,
> + .init_data = &mmc2_fixed_voltage_init_data,
> +};
> +
> +static struct platform_device mmc2_fixed_voltage = {
> + .name = "reg-fixed-voltage",
> + .id = 2,
> + .dev = {
> + .platform_data = &mmc2_fixed_voltage_config,
> + },
> +};
> +
> static void goni_setup_sdhci(void)
> {
> - gpio_request(GONI_EXT_FLASH_EN, "FLASH_EN");
> - gpio_direction_output(GONI_EXT_FLASH_EN, 1);
> -
> s3c_sdhci0_set_platdata(&goni_hsmmc0_data);
> s3c_sdhci1_set_platdata(&goni_hsmmc1_data);
> s3c_sdhci2_set_platdata(&goni_hsmmc2_data);
> @@ -572,6 +605,7 @@ static struct platform_device *goni_devices[]
__initdata = {
> &goni_spi_gpio,
> &s3c_device_usb_hsotg,
> &goni_i2c_gpio_pmic,
> + &mmc2_fixed_voltage,
> &goni_device_gpiokeys,
> &s5p_device_fimc0,
> &s5p_device_fimc1,
> --
Ok...will apply with Mark Brown's reviewed-by.
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] 23+ messages in thread