From patchwork Thu Feb 12 07:37:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 44597 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 340F921527 for ; Thu, 12 Feb 2015 07:38:14 +0000 (UTC) Received: by labgm9 with SMTP id gm9sf5281330lab.2 for ; Wed, 11 Feb 2015 23:38:13 -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=Jwp9rj38dS+2Oux71l4WbmkTDT9kr87nOgJLk7D7evQ=; b=AUvt3eCZvHdev/rJUX90kBNTo2IFbAb2ny/Pev9c8yZVei4sRtrPMOQZVeKAR6I0JY XrQwaqzNn2B9SWONDKqNMGUdaziVQx6HLXQmB14nunm3kOLIIXoClXDywSQQgP4kQDvh 6CuHiKvjew2a9XmjjvAXZNIsUMcOX8xIWL87L7YZAQblrpNeEB9QyjqhAY/ZiQMI3aTp cE01Lf5aprUoXROBJ9hPxUc4yyQTLFz5Ed1wTV21zTIkXy1vmHqIoGR0xin6S/GeboO5 jkrd0WtKsm+WhqarsiWzq1tY/PpCUAKFFnDb/9gsmUwjsabexhUIYWRVDzSjDkYMwntd fWDg== X-Gm-Message-State: ALoCoQmOEJgl4JlNeW+/+uj9I0cLtL8SoBqihrylbxzdwTAZFHkOtfvggvPwTnDZw8UepI+foakw X-Received: by 10.152.26.74 with SMTP id j10mr325329lag.10.1423726693185; Wed, 11 Feb 2015 23:38:13 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.115 with SMTP id jv19ls148166lab.64.gmail; Wed, 11 Feb 2015 23:38:12 -0800 (PST) X-Received: by 10.112.40.65 with SMTP id v1mr2120223lbk.26.1423726692848; Wed, 11 Feb 2015 23:38:12 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id m6si2284616lah.141.2015.02.11.23.38.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Feb 2015 23:38:12 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by labgf13 with SMTP id gf13so8303207lab.9 for ; Wed, 11 Feb 2015 23:38:12 -0800 (PST) X-Received: by 10.112.135.196 with SMTP id pu4mr1971147lbb.41.1423726692765; Wed, 11 Feb 2015 23:38:12 -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 h5csp278747lbj; Wed, 11 Feb 2015 23:38:11 -0800 (PST) X-Received: by 10.70.94.195 with SMTP id de3mr4085140pdb.59.1423726689314; Wed, 11 Feb 2015 23:38:09 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be6si3908288pbd.160.2015.02.11.23.38.08; Wed, 11 Feb 2015 23:38:09 -0800 (PST) Received-SPF: none (google.com: linux-kernel-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 S932358AbbBLHh5 (ORCPT + 28 others); Thu, 12 Feb 2015 02:37:57 -0500 Received: from mail-pd0-f180.google.com ([209.85.192.180]:34703 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932310AbbBLHhx (ORCPT ); Thu, 12 Feb 2015 02:37:53 -0500 Received: by pdjg10 with SMTP id g10so10251510pdj.1 for ; Wed, 11 Feb 2015 23:37:53 -0800 (PST) X-Received: by 10.68.68.171 with SMTP id x11mr4388218pbt.60.1423726673050; Wed, 11 Feb 2015 23:37:53 -0800 (PST) Received: from linaro.solutionip.com ([210.177.145.245]) by mx.google.com with ESMTPSA id om9sm2844635pbb.34.2015.02.11.23.37.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Feb 2015 23:37:51 -0800 (PST) From: Zhangfei Gao To: Kishon Vijay Abraham I , balbi@ti.com, mark.rutland@arm.com, Peter Chen , Sergei Shtylyov , "dan . zhao" , Wangbinghui Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, Zhangfei Gao Subject: [PATCH v4 3/4] usb: dwc2: platform: add hi6220 support Date: Thu, 12 Feb 2015 15:37:25 +0800 Message-Id: <1423726646-30336-4-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423726646-30336-1-git-send-email-zhangfei.gao@linaro.org> References: <1423726646-30336-1-git-send-email-zhangfei.gao@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.44 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},