From patchwork Mon Apr 14 10:58:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3979421 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6F4D19F2BA for ; Mon, 14 Apr 2014 10:57:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86349201DD for ; Mon, 14 Apr 2014 10:57:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38CE8201CE for ; Mon, 14 Apr 2014 10:57:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751644AbaDNK5A (ORCPT ); Mon, 14 Apr 2014 06:57:00 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:62914 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751003AbaDNK47 (ORCPT ); Mon, 14 Apr 2014 06:56:59 -0400 Received: by mail-pa0-f46.google.com with SMTP id kx10so8136410pab.33 for ; Mon, 14 Apr 2014 03:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=fSlwpFgmr/gK4VHaA/pqlsOUeLw1OcLRyCsHg/tVcHA=; b=hroj3fTD3njHlrVFPONi8vfZd3IldPeRYDoD6sLiamAqs/yjznU866hWOs81iGR1e2 czFwaPGj2HNuibhYv3ZZfBAFfPq83DicyOTRHWfz3OVGhvBwLt9qcDNcVyDMAKzWG33a 1Gmqj3XfD5KVzECl7BVHex2CRoP1LCxfj3UgRiG8FaBpBOIm64/jbfm47oWAR1qIPR4O pQpPMrXQ4J7Bi8apNoWbBXIEwjH4mozp90JULacsULz64v0zIday2Ts3SLOqXJG9q9Bo ko1Z5D1CTQxgW59ARNY5LbuHlIbtaPsNSc7puaHh9svdv3WoQAvt20xJezD1orRg9zn4 8UKA== X-Received: by 10.67.13.226 with SMTP id fb2mr1619707pad.146.1397473018648; Mon, 14 Apr 2014 03:56:58 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id vd8sm78882875pac.12.2014.04.14.03.56.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Apr 2014 03:56:57 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , horms@verge.net.au, kuninori.morimoto.gx@gmail.com, laurent.pinchart@ideasonboard.com Date: Mon, 14 Apr 2014 19:58:36 +0900 Message-Id: <20140414105836.12530.68878.sendpatchset@w520> In-Reply-To: <20140414105827.12530.49731.sendpatchset@w520> References: <20140414105827.12530.49731.sendpatchset@w520> Subject: [PATCH 01/02] ARM: shmobile: lager: DT reference VSP1 platform devices Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Add 4 VSP1 devices to the Lager board. Based on BSP code written by Yoshifumi Hosoya, but adjusted to use CCF for clocks. Signed-off-by: Magnus Damm --- Written against renesas-devel-v3.15-rc1-20140414v2 and [PATCH v2 00/05] ARM: shmobile: Lager and Koelsch USB prototype patches arch/arm/mach-shmobile/board-lager-reference.c | 88 ++++++++++++++++++++++++ 1 file changed, 88 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0002/arch/arm/mach-shmobile/board-lager-reference.c +++ work/arch/arm/mach-shmobile/board-lager-reference.c 2014-04-14 18:25:48.000000000 +0900 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -112,6 +113,10 @@ static const struct clk_name clk_names[] { "lvds0", "lvds.0", "rcar-du-r8a7790" }, { "lvds1", "lvds.1", "rcar-du-r8a7790" }, { "hsusb", NULL, "usb_phy_rcar_gen2" }, + { "vsp1-rt", NULL, "vsp1.0" }, + { "vsp1-sy", NULL, "vsp1.1" }, + { "vsp1-du0", NULL, "vsp1.2" }, + { "vsp1-du1", NULL, "vsp1.3" }, }; /* @@ -324,6 +329,88 @@ static void __init lager_add_usb2_device platform_device_register_full(&pci2_info); } +/* VSP1 */ +static const struct vsp1_platform_data lager_vspr_pdata __initconst = { + .features = VSP1_HAS_LUT | VSP1_HAS_SRU, + .rpf_count = 5, + .uds_count = 1, + .wpf_count = 4, +}; + +static const struct vsp1_platform_data lager_vsps_pdata __initconst = { + .features = VSP1_HAS_SRU, + .rpf_count = 5, + .uds_count = 3, + .wpf_count = 4, +}; + +static const struct vsp1_platform_data lager_vspd0_pdata __initconst = { + .features = VSP1_HAS_LIF | VSP1_HAS_LUT, + .rpf_count = 4, + .uds_count = 1, + .wpf_count = 4, +}; + +static const struct vsp1_platform_data lager_vspd1_pdata __initconst = { + .features = VSP1_HAS_LIF | VSP1_HAS_LUT, + .rpf_count = 4, + .uds_count = 1, + .wpf_count = 4, +}; + +static const struct vsp1_platform_data * const lager_vsp1_pdata[4] __initconst = { + &lager_vspr_pdata, + &lager_vsps_pdata, + &lager_vspd0_pdata, + &lager_vspd1_pdata, +}; + +static const struct resource vspr_resources[] __initconst = { + DEFINE_RES_MEM(0xfe920000, 0x8000), + DEFINE_RES_IRQ(gic_spi(266)), +}; + +static const struct resource vsps_resources[] __initconst = { + DEFINE_RES_MEM(0xfe928000, 0x8000), + DEFINE_RES_IRQ(gic_spi(267)), +}; + +static const struct resource vspd0_resources[] __initconst = { + DEFINE_RES_MEM(0xfe930000, 0x8000), + DEFINE_RES_IRQ(gic_spi(246)), +}; + +static const struct resource vspd1_resources[] __initconst = { + DEFINE_RES_MEM(0xfe938000, 0x8000), + DEFINE_RES_IRQ(gic_spi(247)), +}; + +static const struct resource * const vsp1_resources[4] __initconst = { + vspr_resources, + vsps_resources, + vspd0_resources, + vspd1_resources, +}; + +static void __init lager_add_vsp1_devices(void) +{ + struct platform_device_info info = { + .name = "vsp1", + .size_data = sizeof(*lager_vsp1_pdata[0]), + .num_res = 2, + .dma_mask = DMA_BIT_MASK(32), + }; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(vsp1_resources); ++i) { + info.id = i; + info.data = lager_vsp1_pdata[i]; + info.res = vsp1_resources[i]; + + platform_device_register_full(&info); + } +} + static void __init lager_add_standard_devices(void) { shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); @@ -340,6 +427,7 @@ static void __init lager_add_standard_de lager_register_usbhs(); lager_add_usb1_device(); lager_add_usb2_device(); + lager_add_vsp1_devices(); } static const char *lager_boards_compat_dt[] __initdata = {