From patchwork Sat Feb 7 04:56:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 44494 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9D90821521 for ; Sat, 7 Feb 2015 04:56:48 +0000 (UTC) Received: by labgd6 with SMTP id gd6sf3213024lab.1 for ; Fri, 06 Feb 2015 20:56:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=E8Af3mhwLqNOdIKIgyaJmtn3FwmXkDz6WLFhT+1XSxE=; b=VoWDh0SenJPL7vWY8s2YyOXCK5kskvZK5qtpMNjYOa052TDwn+JPeUvZoXQi/J1BbD UwSQegge8cb5pS/0lbKxVATClsWqBb6OyHB3m5y9f02IZZne29vxzd8W0xDM1OB7kXmY 1w/73sluNkvHK4J6gZ+ZQRqmke0SxooX409unHLpF/FvSyDkrQMrpLtcZY7WDRmeu8qc T8kq2djtkmLOA8WjxldZq5R9VmvEb9oDIoGhg3sAOxz5eZ49Ub9OtZgJvOvbtoXO3Sqi pzKFOLwDoUaUD95s0vJpePuhVL/zA1vH702s2iHV0qvfe5u/m2wyuGEOOpEZ/r12+5k0 6lfw== X-Gm-Message-State: ALoCoQn1mtWriRooefibzRiuyFkipYbzsLMPw49JQpySgZQA9immCf8w0G/Qo78oebCi8wzac2Ar X-Received: by 10.180.109.13 with SMTP id ho13mr650411wib.7.1423285007031; Fri, 06 Feb 2015 20:56:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.239.165 with SMTP id vt5ls370047lac.0.gmail; Fri, 06 Feb 2015 20:56:46 -0800 (PST) X-Received: by 10.112.114.230 with SMTP id jj6mr5765241lbb.112.1423285006676; Fri, 06 Feb 2015 20:56:46 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id wt8si2780473lbb.98.2015.02.06.20.56.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Feb 2015 20:56:46 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labhv19 with SMTP id hv19so4865582lab.10 for ; Fri, 06 Feb 2015 20:56:46 -0800 (PST) X-Received: by 10.152.20.4 with SMTP id j4mr5789793lae.29.1423285006398; Fri, 06 Feb 2015 20:56:46 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2208728lbj; Fri, 6 Feb 2015 20:56:45 -0800 (PST) X-Received: by 10.68.111.65 with SMTP id ig1mr11138029pbb.38.1423285004574; Fri, 06 Feb 2015 20:56:44 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id up15si12492318pbc.256.2015.02.06.20.56.43; Fri, 06 Feb 2015 20:56:44 -0800 (PST) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753082AbbBGE4m (ORCPT + 5 others); Fri, 6 Feb 2015 23:56:42 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:36372 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752525AbbBGE4l (ORCPT ); Fri, 6 Feb 2015 23:56:41 -0500 Received: by mail-pa0-f51.google.com with SMTP id hz1so16839458pad.10 for ; Fri, 06 Feb 2015 20:56:41 -0800 (PST) X-Received: by 10.66.192.106 with SMTP id hf10mr10960349pac.90.1423285001272; Fri, 06 Feb 2015 20:56:41 -0800 (PST) Received: from localhost.localdomain ([180.150.157.4]) by mx.google.com with ESMTPSA id iv1sm9583297pbc.87.2015.02.06.20.56.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 Feb 2015 20:56:40 -0800 (PST) From: Zhangfei Gao To: balbi@ti.com, john.youn@synopsys.com, Mian Yousaf Kaukab , "dan . zhao" , Sergei Shtylyov , Peter Chen Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, Zhangfei Gao Subject: [PATCH v2 3/4] usb: dwc2: platform: add hi6220 support Date: Sat, 7 Feb 2015 12:56:05 +0800 Message-Id: <1423284966-3485-4-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423284966-3485-1-git-send-email-zhangfei.gao@linaro.org> References: <1423284966-3485-1-git-send-email-zhangfei.gao@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zhangfei.gao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Zhangfei Gao --- drivers/usb/dwc2/platform.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index ae095f0..f7c67db 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -50,6 +50,35 @@ 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 = GAHBCFG_HBSTLEN_INCR16 << + GAHBCFG_HBSTLEN_SHIFT, + .uframe_sched = 0, +}; + static const struct dwc2_core_params params_bcm2835 = { .otg_cap = 0, /* HNP/SRP capable */ .otg_ver = 0, /* 1.3 */ @@ -129,6 +158,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},