* [PATCH v2] ARM: shmobile: koelsch: Add DU device
@ 2013-12-05 22:34 Laurent Pinchart
2013-12-06 22:53 ` Sergei Shtylyov
2013-12-07 1:11 ` Laurent Pinchart
0 siblings, 2 replies; 3+ messages in thread
From: Laurent Pinchart @ 2013-12-05 22:34 UTC (permalink / raw)
To: linux-sh
Only the LVDS output is currently supported.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/mach-shmobile/board-koelsch.c | 63 ++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
Changes since v1:
- Rebased on top of renesas-devel-v3.13-rc2-20131202
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
index 6e12914..53846ec 100644
--- a/arch/arm/mach-shmobile/board-koelsch.c
+++ b/arch/arm/mach-shmobile/board-koelsch.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <linux/dma-mapping.h>
#include <linux/gpio.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
@@ -26,13 +27,66 @@
#include <linux/leds.h>
#include <linux/pinctrl/machine.h>
#include <linux/platform_data/gpio-rcar.h>
+#include <linux/platform_data/rcar-du.h>
#include <linux/platform_device.h>
#include <mach/common.h>
+#include <mach/irqs.h>
#include <mach/r8a7791.h>
#include <mach/rcar-gen2.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
+/* DU */
+static struct rcar_du_encoder_data lager_du_encoders[] = {
+ {
+ .type = RCAR_DU_ENCODER_NONE,
+ .output = RCAR_DU_OUTPUT_LVDS0,
+ .connector.lvds.panel = {
+ .width_mm = 210,
+ .height_mm = 158,
+ .mode = {
+ .clock = 65000,
+ .hdisplay = 1024,
+ .hsync_start = 1048,
+ .hsync_end = 1184,
+ .htotal = 1344,
+ .vdisplay = 768,
+ .vsync_start = 771,
+ .vsync_end = 777,
+ .vtotal = 806,
+ .flags = 0,
+ },
+ },
+ },
+};
+
+static const struct rcar_du_platform_data lager_du_pdata __initconst = {
+ .encoders = lager_du_encoders,
+ .num_encoders = ARRAY_SIZE(lager_du_encoders),
+};
+
+static const struct resource du_resources[] __initconst = {
+ DEFINE_RES_MEM(0xfeb00000, 0x40000),
+ DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
+ DEFINE_RES_IRQ(gic_spi(256)),
+ DEFINE_RES_IRQ(gic_spi(268)),
+};
+
+static void __init koelsch_add_du_device(void)
+{
+ struct platform_device_info info = {
+ .name = "rcar-du-r8a7791",
+ .id = -1,
+ .res = du_resources,
+ .num_res = ARRAY_SIZE(du_resources),
+ .data = &lager_du_pdata,
+ .size_data = sizeof(lager_du_pdata),
+ .dma_mask = DMA_BIT_MASK(32),
+ };
+
+ platform_device_register_full(&info);
+}
+
/* LEDS */
static struct gpio_led koelsch_leds[] = {
{
@@ -80,6 +134,13 @@ static const struct gpio_keys_platform_data koelsch_keys_pdata __initconst = {
};
static const struct pinctrl_map koelsch_pinctrl_map[] = {
+ /* DU */
+ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
+ "du_rgb666", "du"),
+ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
+ "du_sync", "du"),
+ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
+ "du_clk_out_0", "du"),
/* SCIF0 (CN19: DEBUG SERIAL0) */
PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7791",
"scif0_data_d", "scif0"),
@@ -101,6 +162,8 @@ static void __init koelsch_add_standard_devices(void)
platform_device_register_data(&platform_bus, "gpio-keys", -1,
&koelsch_keys_pdata,
sizeof(koelsch_keys_pdata));
+
+ koelsch_add_du_device();
}
static const char * const koelsch_boards_compat_dt[] __initconst = {
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] ARM: shmobile: koelsch: Add DU device
2013-12-05 22:34 [PATCH v2] ARM: shmobile: koelsch: Add DU device Laurent Pinchart
@ 2013-12-06 22:53 ` Sergei Shtylyov
2013-12-07 1:11 ` Laurent Pinchart
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2013-12-06 22:53 UTC (permalink / raw)
To: linux-sh
Hello.
On 06-12-2013 2:34, Laurent Pinchart wrote:
> Only the LVDS output is currently supported.
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> arch/arm/mach-shmobile/board-koelsch.c | 63 ++++++++++++++++++++++++++++++++++
> 1 file changed, 63 insertions(+)
> Changes since v1:
> - Rebased on top of renesas-devel-v3.13-rc2-20131202
> diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
> index 6e12914..53846ec 100644
> --- a/arch/arm/mach-shmobile/board-koelsch.c
> +++ b/arch/arm/mach-shmobile/board-koelsch.c
[...]
> @@ -26,13 +27,66 @@
> #include <linux/leds.h>
> #include <linux/pinctrl/machine.h>
> #include <linux/platform_data/gpio-rcar.h>
> +#include <linux/platform_data/rcar-du.h>
> #include <linux/platform_device.h>
> #include <mach/common.h>
> +#include <mach/irqs.h>
> #include <mach/r8a7791.h>
> #include <mach/rcar-gen2.h>
> #include <asm/mach-types.h>
> #include <asm/mach/arch.h>
>
> +/* DU */
> +static struct rcar_du_encoder_data lager_du_encoders[] = {
Apparently it should be named koelsch_du_encoders[].
> +static const struct rcar_du_platform_data lager_du_pdata __initconst = {
Again, 'koelsch_du_pdata'...
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] ARM: shmobile: koelsch: Add DU device
2013-12-05 22:34 [PATCH v2] ARM: shmobile: koelsch: Add DU device Laurent Pinchart
2013-12-06 22:53 ` Sergei Shtylyov
@ 2013-12-07 1:11 ` Laurent Pinchart
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2013-12-07 1:11 UTC (permalink / raw)
To: linux-sh
Hi Sergei,
On Saturday 07 December 2013 02:53:06 Sergei Shtylyov wrote:
> On 06-12-2013 2:34, Laurent Pinchart wrote:
> > Only the LVDS output is currently supported.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> >
> > arch/arm/mach-shmobile/board-koelsch.c | 63 ++++++++++++++++++++++++++++
> > 1 file changed, 63 insertions(+)
> >
> > Changes since v1:
> >
> > - Rebased on top of renesas-devel-v3.13-rc2-20131202
> >
> > diff --git a/arch/arm/mach-shmobile/board-koelsch.c
> > b/arch/arm/mach-shmobile/board-koelsch.c index 6e12914..53846ec 100644
> > --- a/arch/arm/mach-shmobile/board-koelsch.c
> > +++ b/arch/arm/mach-shmobile/board-koelsch.c
>
> [...]
>
> > @@ -26,13 +27,66 @@
> > #include <linux/leds.h>
> > #include <linux/pinctrl/machine.h>
> > #include <linux/platform_data/gpio-rcar.h>
> > +#include <linux/platform_data/rcar-du.h>
> > #include <linux/platform_device.h>
> > #include <mach/common.h>
> > +#include <mach/irqs.h>
> > #include <mach/r8a7791.h>
> > #include <mach/rcar-gen2.h>
> > #include <asm/mach-types.h>
> > #include <asm/mach/arch.h>
> >
> > +/* DU */
> > +static struct rcar_du_encoder_data lager_du_encoders[] = {
>
> Apparently it should be named koelsch_du_encoders[].
>
> > +static const struct rcar_du_platform_data lager_du_pdata __initconst = {
>
> Again, 'koelsch_du_pdata'...
Oops... Will resubmit, thank you.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-07 1:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-05 22:34 [PATCH v2] ARM: shmobile: koelsch: Add DU device Laurent Pinchart
2013-12-06 22:53 ` Sergei Shtylyov
2013-12-07 1:11 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox