From patchwork Wed Nov 18 07:39:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 56917 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2404092lbb; Tue, 17 Nov 2015 23:39:18 -0800 (PST) X-Received: by 10.66.234.133 with SMTP id ue5mr138792pac.56.1447832358051; Tue, 17 Nov 2015 23:39:18 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id iw10si2551839pac.40.2015.11.17.23.39.17; Tue, 17 Nov 2015 23:39:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754073AbbKRHjQ (ORCPT + 4 others); Wed, 18 Nov 2015 02:39:16 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:33512 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753789AbbKRHjP (ORCPT ); Wed, 18 Nov 2015 02:39:15 -0500 Received: by pabfh17 with SMTP id fh17so37877649pab.0 for ; Tue, 17 Nov 2015 23:39:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=ozNVCXsDMqS3dQEiLnvc12eJxbv2lyCuw5kz4bh47ys=; b=hDSjX4CmKBFioEvBYO+ZmEhfNz4l977c7nv7//9o8bAkVnLLnC/ZNKJkvigi9whbjy D5PY+OrdR5lQQ8znGPuf62lBOKIsYpgn1pFZ2dRk32CdzZmExpmpJvBZgMSsDtCqciM/ 9Z8WD9+x1GXerJ+FbYP53zLhmOJjFttB0aErOrpm76YgxEEWCC4HVsP3hEgyK8tw4Wmi 5wP2xsGh/mxoCOxBzGjY6zdYdXZT7Mju8Wi9jUh/oRFC4BVt4ajd+JaQ4p4QnByheTmZ BUR/MsEUhdrII8+7rWj7dfd9zndkxU+85ETJqI62ww/TnU3yvH4wlw+NgFKROe4hq57s Qcbw== 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; bh=ozNVCXsDMqS3dQEiLnvc12eJxbv2lyCuw5kz4bh47ys=; b=JPq+RpFRuLRW9aQU7Np8GFwPF3g8GkbFby4lS977jXNOflv7zEwAzGF+sJ6foN9kYc cSS85HEB8zmDSfIepeaF7gsQcVIBwweWISJG/8yxR6sDwoKy7aJcLS0OXahtn2JJweDd CGE+D/zXI+K+hYLnZUU4I8U0Jvxf7J784HHBkWMq2Os7pRUbp33i//vWwEGV7QVhmUvO Xr9uKCU51Q3wV+xfsOMwjUcA9b3W7BYqTdXYBCM4Bl+HY1lC2EXBQ9wKIdj+QFqyVKrz vOTNheW7EEGZy9ZJ1cnqujyzWerO3dVt4FcXY+cA347jXGzKwQVtQdr+095MYhFj497G N1lw== X-Gm-Message-State: ALoCoQn0kiGcJn3GuK4HDKyw+t/P15I7qFz6xwb78Tnikxkbc6xxoPK4DmIijAOYhZApG4vhxv5I X-Received: by 10.66.97.8 with SMTP id dw8mr57636pab.113.1447832354874; Tue, 17 Nov 2015 23:39:14 -0800 (PST) Received: from localhost.localdomain ([45.41.135.34]) by smtp.gmail.com with ESMTPSA id fn4sm2051203pab.46.2015.11.17.23.39.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Nov 2015 23:39:13 -0800 (PST) From: Zhangfei Gao To: balbi@ti.com, john.youn@synopsys.com Cc: linux-usb@vger.kernel.org, Zhangfei Gao Subject: [PATCH] usb: dwc2: add support of hi6220 Date: Wed, 18 Nov 2015 15:39:06 +0800 Message-Id: <1447832347-27475-1-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Support hisilicon,hi6220-usb for HiKey board Signed-off-by: Zhangfei Gao --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + drivers/usb/dwc2/platform.c | 32 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt index fd132cb..2213682 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.txt +++ b/Documentation/devicetree/bindings/usb/dwc2.txt @@ -4,6 +4,7 @@ Platform DesignWare HS OTG USB 2.0 controller Required properties: - compatible : One of: - brcm,bcm2835-usb: The DWC2 USB controller instance in the BCM2835 SoC. + - hisilicon,hi6220-usb: The DWC2 USB controller instance in the hi6220 SoC. - rockchip,rk3066-usb: The DWC2 USB controller instance in the rk3066 Soc; - "rockchip,rk3188-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3188 Soc; - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc; diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index 5859b0f..a5cb1bf 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -54,6 +54,37 @@ 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, + .external_id_pin_ctl = -1, + .hibernation = -1, +}; + static const struct dwc2_core_params params_bcm2835 = { .otg_cap = 0, /* HNP/SRP capable */ .otg_ver = 0, /* 1.3 */ @@ -282,6 +313,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},