From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> To: linux-sh@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, Magnus Damm <magnus.damm@gmail.com> Subject: [RFC/PATCH 3/7] ARM: shmobile: lager-reference: Add DU platform data Date: Tue, 21 Jan 2014 15:32:38 +0000 [thread overview] Message-ID: <1390318362-29954-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (raw) In-Reply-To: <1390318362-29954-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> The DU device is instantiated through the device tree, pass the DU platform data using OF_DEV_AUXDATA. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/board-lager-reference.c | 41 +++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index dc8d76b..0294836 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c @@ -22,11 +22,49 @@ #include <linux/clkdev.h> #include <linux/init.h> #include <linux/of_platform.h> +#include <linux/platform_data/rcar-du.h> #include <mach/common.h> #include <mach/rcar-gen2.h> #include <mach/r8a7790.h> #include <asm/mach/arch.h> +/* DU */ +static struct rcar_du_encoder_data lager_du_encoders[] = { + { + .type = RCAR_DU_ENCODER_VGA, + .output = RCAR_DU_OUTPUT_DPAD0, + }, { + .type = RCAR_DU_ENCODER_NONE, + .output = RCAR_DU_OUTPUT_LVDS1, + .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 struct rcar_du_platform_data lager_du_pdata = { + .encoders = lager_du_encoders, + .num_encoders = ARRAY_SIZE(lager_du_encoders), +}; + +static const struct of_dev_auxdata lager_auxdata_lookup[] __initconst = { + OF_DEV_AUXDATA("renesas,du-r8a7790", 0xfeb00000, NULL, &lager_du_pdata), + {} +}; + static void __init lager_add_standard_devices(void) { #ifdef CONFIG_COMMON_CLK @@ -60,7 +98,8 @@ static void __init lager_add_standard_devices(void) #endif r8a7790_add_dt_devices(); - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + of_platform_populate(NULL, of_default_bus_match_table, + lager_auxdata_lookup, NULL); } static const char *lager_boards_compat_dt[] __initdata = { -- 1.8.3.2
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> To: linux-sh@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, Magnus Damm <magnus.damm@gmail.com> Subject: [RFC/PATCH 3/7] ARM: shmobile: lager-reference: Add DU platform data Date: Tue, 21 Jan 2014 16:32:38 +0100 [thread overview] Message-ID: <1390318362-29954-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (raw) In-Reply-To: <1390318362-29954-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> The DU device is instantiated through the device tree, pass the DU platform data using OF_DEV_AUXDATA. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- arch/arm/mach-shmobile/board-lager-reference.c | 41 +++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index dc8d76b..0294836 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c @@ -22,11 +22,49 @@ #include <linux/clkdev.h> #include <linux/init.h> #include <linux/of_platform.h> +#include <linux/platform_data/rcar-du.h> #include <mach/common.h> #include <mach/rcar-gen2.h> #include <mach/r8a7790.h> #include <asm/mach/arch.h> +/* DU */ +static struct rcar_du_encoder_data lager_du_encoders[] = { + { + .type = RCAR_DU_ENCODER_VGA, + .output = RCAR_DU_OUTPUT_DPAD0, + }, { + .type = RCAR_DU_ENCODER_NONE, + .output = RCAR_DU_OUTPUT_LVDS1, + .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 struct rcar_du_platform_data lager_du_pdata = { + .encoders = lager_du_encoders, + .num_encoders = ARRAY_SIZE(lager_du_encoders), +}; + +static const struct of_dev_auxdata lager_auxdata_lookup[] __initconst = { + OF_DEV_AUXDATA("renesas,du-r8a7790", 0xfeb00000, NULL, &lager_du_pdata), + {} +}; + static void __init lager_add_standard_devices(void) { #ifdef CONFIG_COMMON_CLK @@ -60,7 +98,8 @@ static void __init lager_add_standard_devices(void) #endif r8a7790_add_dt_devices(); - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + of_platform_populate(NULL, of_default_bus_match_table, + lager_auxdata_lookup, NULL); } static const char *lager_boards_compat_dt[] __initdata = { -- 1.8.3.2
next prev parent reply other threads:[~2014-01-21 15:32 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-01-21 15:32 [RFC/PATCH 0/7] Renesas R-Car DU OF support Laurent Pinchart 2014-01-21 15:32 ` Laurent Pinchart 2014-01-21 15:32 ` [RFC/PATCH 1/7] drm/rcar-du: Add " Laurent Pinchart 2014-01-21 15:32 ` Laurent Pinchart 2014-01-21 15:35 ` [RFC/PATCH 1/7 RESEND] " Laurent Pinchart 2014-01-21 15:35 ` Laurent Pinchart 2014-01-23 9:52 ` [RFC/PATCH 1/7] " Magnus Damm 2014-01-23 9:52 ` Magnus Damm 2014-01-23 11:31 ` Laurent Pinchart 2014-01-23 11:31 ` Laurent Pinchart 2014-01-21 15:32 ` [RFC/PATCH 2/7] ARM: shmobile: r8a7790: Add DU node to device tree Laurent Pinchart 2014-01-21 15:32 ` Laurent Pinchart 2014-01-21 15:32 ` Laurent Pinchart [this message] 2014-01-21 15:32 ` [RFC/PATCH 3/7] ARM: shmobile: lager-reference: Add DU platform data Laurent Pinchart 2014-01-21 15:32 ` [RFC/PATCH 4/7] ARM: shmobile: lager: Enable DU device in DT Laurent Pinchart 2014-01-21 15:32 ` Laurent Pinchart 2014-01-21 15:32 ` [RFC/PATCH 5/7] ARM: shmobile: r8a7791: Add DU node to device tree Laurent Pinchart 2014-01-21 15:32 ` Laurent Pinchart 2014-01-21 15:32 ` [RFC/PATCH 6/7] ARM: shmobile: koelsch-reference: Add DU platform data Laurent Pinchart 2014-01-21 15:32 ` Laurent Pinchart 2014-01-21 15:32 ` [RFC/PATCH 7/7] ARM: shmobile: koelsch: Enable DU device in DT Laurent Pinchart 2014-01-21 15:32 ` Laurent Pinchart
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1390318362-29954-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com \ --to=laurent.pinchart+renesas@ideasonboard.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-sh@vger.kernel.org \ --cc=magnus.damm@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.