From patchwork Thu Feb 5 14:46:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 5784931 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AF3649F302 for ; Thu, 5 Feb 2015 14:49:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDB752022D for ; Thu, 5 Feb 2015 14:49:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12FC220222 for ; Thu, 5 Feb 2015 14:49:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YJNiq-0000Ad-PO; Thu, 05 Feb 2015 14:48:00 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YJNij-0008VG-TT for linux-arm-kernel@lists.infradead.org; Thu, 05 Feb 2015 14:47:54 +0000 Received: by mail-pa0-f49.google.com with SMTP id fa1so10390282pad.8 for ; Thu, 05 Feb 2015 06:47:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=saXW9PoR1LAvMcmJ3qft3FHWtl7wZtZKi8xvT4aBmKA=; b=JPDcV0BL7F6Ur2e5u5qRSkD9h0D41B3Z7uoaSm7huV9Rf4pSao6kNoYCs51JlT751X nDyXebEgpYZoEq3qtKTbHCIYFGAe0qorbMlVhZNqq47J1s0Somoc4cplOIYbGVhxnIJR ciLVT0WozA3vQr6FZcOxf9O/E1SOXGCNyOeIymgYz9SMR+u8vtbMO0VVMyg/19XKljI9 gBnd5v3vS3zQ/Ji/6lmmLRXODweM4XFXaJ4oP/OMBwxyXfQzrABkN7U1Plkwn0Mihy6b GNcJVadUh/Vgs3BLdd1oA8bhYzMmLeGlezqahLLYBti/3QzfkIGJVLNc8xGzUL1n6Hqc gHgQ== X-Gm-Message-State: ALoCoQnB36F+KZHLvc1UadwpEi06behA4Y9sbUvks7nC6MeOffju4FesuKvjBRllumUBh92wCbER X-Received: by 10.68.135.37 with SMTP id pp5mr6034971pbb.105.1423147652332; Thu, 05 Feb 2015 06:47:32 -0800 (PST) Received: from localhost.localdomain (119.81.172.112-static.reverse.softlayer.com. [119.81.172.112]) by mx.google.com with ESMTPSA id rb3sm5353511pab.29.2015.02.05.06.47.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Feb 2015 06:47:31 -0800 (PST) From: Zhangfei Gao To: balbi@ti.com, john.youn@synopsys.com, Mian Yousaf Kaukab , "dan . zhao" Subject: [PATCH 3/4] usb: dwc2: platform: add hi6220 support Date: Thu, 5 Feb 2015 22:46:59 +0800 Message-Id: <1423147620-5760-4-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423147620-5760-1-git-send-email-zhangfei.gao@linaro.org> References: <1423147620-5760-1-git-send-email-zhangfei.gao@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150205_064753_974624_C63810E7 X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Zhangfei Gao X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/platform.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index ae095f0..ceee385 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -50,6 +50,34 @@ static const char dwc2_driver_name[] = "dwc2"; +static const struct dwc2_core_params params_hi6220 = { + .otg_cap = 2, /* No HNP/SRP capable */ + .otg_ver = 0, /* 1.3 */ + .dma_enable = 1, + .dma_desc_enable = 0, + .speed = 0, /* High Speed */ + .enable_dynamic_fifo = 1, + .en_multiple_tx_fifo = 1, + .host_rx_fifo_size = 512, + .host_nperio_tx_fifo_size = 512, + .host_perio_tx_fifo_size = 512, + .max_transfer_size = 65535, + .max_packet_count = 511, + .host_channels = 16, + .phy_type = 1, /* UTMI */ + .phy_utmi_width = 8, + .phy_ulpi_ddr = 0, /* Single */ + .phy_ulpi_ext_vbus = 0, + .i2c_enable = 0, + .ulpi_fs_ls = 0, + .host_support_fs_ls_low_power = 0, + .host_ls_low_power_phy_clk = 0, /* 48 MHz */ + .ts_dline = 0, + .reload_ctl = 0, + .ahbcfg = 0x7 << GAHBCFG_HBSTLEN_SHIFT, /* INCR16 */ + .uframe_sched = 0, +}; + static const struct dwc2_core_params params_bcm2835 = { .otg_cap = 0, /* HNP/SRP capable */ .otg_ver = 0, /* 1.3 */ @@ -129,6 +157,7 @@ static int dwc2_driver_remove(struct platform_device *dev) static const struct of_device_id dwc2_of_match_table[] = { { .compatible = "brcm,bcm2835-usb", .data = ¶ms_bcm2835 }, + { .compatible = "hisilicon,hi6220-usb", .data = ¶ms_hi6220 }, { .compatible = "rockchip,rk3066-usb", .data = ¶ms_rk3066 }, { .compatible = "snps,dwc2", .data = NULL }, { .compatible = "samsung,s3c6400-hsotg", .data = NULL},