From patchwork Wed Jul 30 01:35:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kever Yang X-Patchwork-Id: 4644771 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 45C7C9F2B8 for ; Wed, 30 Jul 2014 01:57:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7EFDC2012D for ; Wed, 30 Jul 2014 01:57:49 +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 AB29C2012B for ; Wed, 30 Jul 2014 01:57:48 +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 1XCJ7L-0004wV-U4; Wed, 30 Jul 2014 01:55:47 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XCJ7B-0004sQ-MX for linux-arm-kernel@bombadil.infradead.org; Wed, 30 Jul 2014 01:55:37 +0000 Received: from regular1.263xmail.com ([211.150.99.130]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XCIoL-0002ib-T3 for linux-arm-kernel@lists.infradead.org; Wed, 30 Jul 2014 01:36:10 +0000 Received: from kever.yang?rock-chips.com (unknown [192.168.167.140]) by regular1.263xmail.com (Postfix) with SMTP id 04441551B; Wed, 30 Jul 2014 09:35:21 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ABS-CHECKED: 4 X-KSVirus-check: 0 Received: from lab2000-1.corp.google.com (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 6837B468; Wed, 30 Jul 2014 09:35:11 +0800 (CST) X-RL-SENDER: kever.yang@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 127.0.0.1 X-LOGIN-NAME: kever.yang@rock-chips.com X-UNIQUE-TAG: <3fc857ad8d8f58766013ac13803f9882> X-ATTACHMENT-NUM: 0 X-SENDER: yk@rock-chips.com X-DNS-TYPE: 1 Received: from lab2000-1.corp.google.com (localhost [127.0.0.1]) by smtp.263.net (Postfix) whith ESMTP id 6511JUJSWI; Wed, 30 Jul 2014 09:35:11 +0800 (CST) From: Kever Yang To: heiko@sntech.de, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, rdunlap@infradead.org, linux@arm.linux.org.uk, paulz@synopsys.com, gregkh@linuxfoundation.org, mporter@linaro.org, kishon@ti.com, balbi@ti.com Subject: [PATCH 3/4] usb: dwc2: add compatible data for rockchip soc Date: Tue, 29 Jul 2014 18:35:02 -0700 Message-Id: <1406684102-18313-1-git-send-email-kever.yang@rock-chips.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406683873-18194-1-git-send-email-kever.yang@rock-chips.com> References: <1406683873-18194-1-git-send-email-kever.yang@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140730_023610_527379_31F409E9 X-CRM114-Status: GOOD ( 10.37 ) X-Spam-Score: -0.2 (/) Cc: devicetree@vger.kernel.org, addy.ke@rock-chips.com, dianders@chromium.org, swarren@wwwdotorg.org, linux-doc@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kever.yang@rock-chips.com, olof@lixom.net, xjq@rock-chips.com, lyz@rock-chips.com, cf@rock-chips.com, wulf@rock-chips.com, sonnyrao@chromium.org, linux-arm-kernel@lists.infradead.org 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=-0.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY,URIBL_BLACK autolearn=no 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 This patch add compatible data for dwc2 controller found on rk3066, rk3188 and rk3288 processors from rockchip. Signed-off-by: Kever Yang --- 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 a10e7a3..cc5983c 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -75,6 +75,34 @@ static const struct dwc2_core_params params_bcm2835 = { .uframe_sched = 0, }; +static const struct dwc2_core_params params_rk3066 = { + .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 = 520, /* 520 DWORDs */ + .host_nperio_tx_fifo_size = 128, /* 128 DWORDs */ + .host_perio_tx_fifo_size = 256, /* 256 DWORDs */ + .max_transfer_size = 65536, + .max_packet_count = 512, + .host_channels = 9, + .phy_type = 1, /* UTMI */ + .phy_utmi_width = 16, /* 8 bits */ + .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 = 1, + .ahbcfg = 0x17, /* dma enable & INCR16 */ + .uframe_sched = 1, +}; + /** * dwc2_driver_remove() - Called when the DWC_otg core is unregistered with the * DWC_otg driver @@ -97,6 +125,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 = "rockchip,rk3066-usb", .data = ¶ms_rk3066 }, { .compatible = "snps,dwc2", .data = NULL }, {}, };