From patchwork Tue Feb 10 09:10:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 44527 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9AB442151F for ; Tue, 10 Feb 2015 09:10:38 +0000 (UTC) Received: by lams18 with SMTP id s18sf8481604lam.1 for ; Tue, 10 Feb 2015 01:10:37 -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=bHy0vSx1Bz5xQcNV6EUzcE9UP/1vyv4x0CkiroPjuBdUZh8VjDvwc9y6f+YgLkZ9b2 8soEduzyEUD2bIMhB62I+rAs3NcMt5wgs7PFN+IU1V80LOz2EcZMdzNDIF/QOBtgrqtJ bqu/X3ropQeiBWlsD9jrSfznRfnrIKyTVmbXJABSV5ibDdrx09c6sw6NxjQgT/zYhvOC I2U5ff7SwSGeHFZ6R2tX8jZDouyKaaOdE1mVkcQNh7iM1jy2EnbLrVNtDq+O5yJWnYqC zsCrMGJcOXUHLlbfXkRT4ehAQctsaD3pvsOq7E/aTWFUpFDITOU/s8UxCKqH0pf1lDc6 U3IQ== X-Gm-Message-State: ALoCoQkMNL3zlaIdZTXe55O7DJajTm+eaRD/rsVbF5PHNFgDPsWxnMoyn8jOw7D0BG+gi94t9aHn X-Received: by 10.180.76.84 with SMTP id i20mr1473116wiw.4.1423559437588; Tue, 10 Feb 2015 01:10:37 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.202 with SMTP id t10ls559718laa.81.gmail; Tue, 10 Feb 2015 01:10:37 -0800 (PST) X-Received: by 10.152.22.129 with SMTP id d1mr21457157laf.22.1423559437415; Tue, 10 Feb 2015 01:10:37 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id zl7si11451610lbb.106.2015.02.10.01.10.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Feb 2015 01:10:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by labpv20 with SMTP id pv20so4993295lab.8 for ; Tue, 10 Feb 2015 01:10:37 -0800 (PST) X-Received: by 10.152.43.193 with SMTP id y1mr22247283lal.35.1423559437116; Tue, 10 Feb 2015 01:10:37 -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 h5csp480811lbj; Tue, 10 Feb 2015 01:10:36 -0800 (PST) X-Received: by 10.68.194.38 with SMTP id ht6mr222349pbc.36.1423559435354; Tue, 10 Feb 2015 01:10:35 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id su9si25839290pab.162.2015.02.10.01.10.33; Tue, 10 Feb 2015 01:10:35 -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 S1753586AbbBJJKc (ORCPT + 5 others); Tue, 10 Feb 2015 04:10:32 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:45775 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753420AbbBJJKb (ORCPT ); Tue, 10 Feb 2015 04:10:31 -0500 Received: by mail-pa0-f47.google.com with SMTP id lj1so39969612pab.6 for ; Tue, 10 Feb 2015 01:10:30 -0800 (PST) X-Received: by 10.66.139.226 with SMTP id rb2mr3426711pab.105.1423559430219; Tue, 10 Feb 2015 01:10:30 -0800 (PST) Received: from localhost.localdomain ([210.177.145.249]) by mx.google.com with ESMTPSA id kl11sm18621053pbd.89.2015.02.10.01.10.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Feb 2015 01:10:29 -0800 (PST) From: Zhangfei Gao To: balbi@ti.com, john.youn@synopsys.com, Mian Yousaf Kaukab , "dan . zhao" , Wangbinghui , Peter Chen , Sergei Shtylyov Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, Zhangfei Gao Subject: [resend PATCH v3 3/4] usb: dwc2: platform: add hi6220 support Date: Tue, 10 Feb 2015 17:10:03 +0800 Message-Id: <1423559404-13058-4-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423559404-13058-1-git-send-email-zhangfei.gao@linaro.org> References: <1423559404-13058-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.53 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},