From patchwork Thu Mar 14 14:35:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2275081 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 8C216DF24C for ; Fri, 15 Mar 2013 06:32:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7478BE6286 for ; Thu, 14 Mar 2013 23:32:49 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id 44F08E5FC7 for ; Thu, 14 Mar 2013 07:35:13 -0700 (PDT) Received: from avalon.ideasonboard.com (unknown [109.134.78.251]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0386A35992; Thu, 14 Mar 2013 15:34:59 +0100 (CET) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org, linux-sh@vger.kernel.org Subject: [PATCH v2 3/3] ARM: shmobile: marzen: Add Display Unit support Date: Thu, 14 Mar 2013 15:35:46 +0100 Message-Id: <1363271746-9806-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1363271746-9806-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1363271746-9806-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailman-Approved-At: Thu, 14 Mar 2013 23:26:14 -0700 Cc: Simon Horman X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Only the DU0 VGA output is currently supported. Support for the DU0 LVDS and DU1 LVDS outputs will require information about the panels that will be connected to those outputs. Signed-off-by: Laurent Pinchart --- arch/arm/configs/marzen_defconfig | 2 ++ arch/arm/mach-shmobile/board-marzen.c | 65 +++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index afb17d6..76f9402 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig @@ -79,6 +79,8 @@ CONFIG_GPIO_SYSFS=y CONFIG_THERMAL=y CONFIG_RCAR_THERMAL=y CONFIG_SSB=y +CONFIG_DRM=y +CONFIG_DRM_RCAR_DU=y CONFIG_USB=y CONFIG_USB_RCAR_PHY=y CONFIG_MMC=y diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index cdcb799..0020506 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -147,6 +148,38 @@ static struct platform_device hspi_device = { .num_resources = ARRAY_SIZE(hspi_resources), }; +/* DU */ +static struct resource rcar_du_resources[] = { + [0] = { + .name = "Display Unit", + .start = 0xfff80000, + .end = 0xfffb1007, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = gic_spi(31), + .flags = IORESOURCE_IRQ, + }, +}; + +static struct rcar_du_platform_data rcar_du_pdata = { + .encoders = { + [0] = { + .encoder = RCAR_DU_ENCODER_VGA, + }, + }, +}; + +static struct platform_device rcar_du_device = { + .name = "rcar-du", + .num_resources = ARRAY_SIZE(rcar_du_resources), + .resource = rcar_du_resources, + .dev = { + .platform_data = &rcar_du_pdata, + .coherent_dma_mask = ~0, + }, +}; + /* USB PHY */ static struct resource usb_phy_resources[] = { [0] = { @@ -173,6 +206,7 @@ static struct platform_device *marzen_devices[] __initdata = { &thermal_device, &hspi_device, &usb_phy_device, + &rcar_du_device, }; /* USB */ @@ -363,6 +397,37 @@ static void __init marzen_init(void) gpio_request(GPIO_FN_HSPI_TX0, NULL); gpio_request(GPIO_FN_HSPI_RX0, NULL); + /* Display Unit 0 (CN10: ARGB0) */ + gpio_request(GPIO_FN_DU0_DR7, NULL); + gpio_request(GPIO_FN_DU0_DR6, NULL); + gpio_request(GPIO_FN_DU0_DR5, NULL); + gpio_request(GPIO_FN_DU0_DR4, NULL); + gpio_request(GPIO_FN_DU0_DR3, NULL); + gpio_request(GPIO_FN_DU0_DR2, NULL); + gpio_request(GPIO_FN_DU0_DR1, NULL); + gpio_request(GPIO_FN_DU0_DR0, NULL); + gpio_request(GPIO_FN_DU0_DG7, NULL); + gpio_request(GPIO_FN_DU0_DG6, NULL); + gpio_request(GPIO_FN_DU0_DG5, NULL); + gpio_request(GPIO_FN_DU0_DG4, NULL); + gpio_request(GPIO_FN_DU0_DG3, NULL); + gpio_request(GPIO_FN_DU0_DG2, NULL); + gpio_request(GPIO_FN_DU0_DG1, NULL); + gpio_request(GPIO_FN_DU0_DG0, NULL); + gpio_request(GPIO_FN_DU0_DB7, NULL); + gpio_request(GPIO_FN_DU0_DB6, NULL); + gpio_request(GPIO_FN_DU0_DB5, NULL); + gpio_request(GPIO_FN_DU0_DB4, NULL); + gpio_request(GPIO_FN_DU0_DB3, NULL); + gpio_request(GPIO_FN_DU0_DB2, NULL); + gpio_request(GPIO_FN_DU0_DB1, NULL); + gpio_request(GPIO_FN_DU0_DB0, NULL); + gpio_request(GPIO_FN_DU0_EXVSYNC_DU0_VSYNC, NULL); + gpio_request(GPIO_FN_DU0_EXHSYNC_DU0_HSYNC, NULL); + gpio_request(GPIO_FN_DU0_DOTCLKOUT0, NULL); + gpio_request(GPIO_FN_DU0_DOTCLKOUT1, NULL); + gpio_request(GPIO_FN_DU0_DISP, NULL); + /* USB (CN21) */ gpio_request(GPIO_FN_USB_OVC0, NULL); gpio_request(GPIO_FN_USB_OVC1, NULL);