From patchwork Sun Sep 11 13:41:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9325377 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 77C6B607D3 for ; Sun, 11 Sep 2016 13:41:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C52128305 for ; Sun, 11 Sep 2016 13:41:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6064028A7F; Sun, 11 Sep 2016 13:41:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDF4F28305 for ; Sun, 11 Sep 2016 13:41:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756120AbcIKNlj (ORCPT ); Sun, 11 Sep 2016 09:41:39 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33414 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756092AbcIKNlh (ORCPT ); Sun, 11 Sep 2016 09:41:37 -0400 Received: by mail-wm0-f66.google.com with SMTP id b187so9838757wme.0; Sun, 11 Sep 2016 06:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gRpv7lI2/QvEzNkVCUVto0oyp0q1Spw/FL7ErW4dnrc=; b=gx1awS1Hdd11k7xjFN97TGzgBzDyzZpget3RmtRKFizIqtiRT7fjJnXy6uczgqM9f/ bfg+jb9+h6YoIwdnnm8T1gENUY+UsDdVotJAhwL5hwg5EgyOC8f69/uhybGHnzzTKUsi n+FUi2uuXWDMBklb7wdqYV6OAGOxlAGpo/emd2n/6qsK6FBPUkLVeDIOg+vytT2RX1uo L6kzL241xcwe11Gv88QamBhxmUNrja33v2GD+utIJutWUUI121swMNPBd+4MdzrHnaCW NzSedNulwRi8BZF6CSoaauJzDkob4iQn3G31OMMf/NkJGItRazUI+LAzLElVG4WrUhqc iUXA== 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:in-reply-to :references; bh=gRpv7lI2/QvEzNkVCUVto0oyp0q1Spw/FL7ErW4dnrc=; b=NsCNfTePJLNR068VX3aA5Q3gSvj75hHRGFUbgU7MOoh8Xf04+RVYzJotaxAaYpCADr Lz4lFZbZBO16nf7aSHjVhnwjjGpZtMc2Oe2NhB7caCkClk3oP7qmjOIGQBeeY5vSB5wh XI9+9gxz9KGl84m2gq54HdEL4BM0mq9IF/MA7H8jY8fofGMsZ/XruIkgw2qBeK3mKqHu QG/fdc9pv7GwzcD/Ago5K/wfDkBrNnDielYhrJn75HK/aigbGloyHKDgg6MNDAWPP1xy 2C8rTtM/m3eiLaCOAJimozHxBsgI+Nwo/egXJZzW+9DpJAeD2Gqh5Td0mLJirncq2TCl FkWA== X-Gm-Message-State: AE9vXwMmzLZQra0KIoRHPbjRCXV6HxU6hZM8ik9dJMlk9wtEbUOSRME4SIhmN0Zo9jfx2Q== X-Received: by 10.28.125.209 with SMTP id y200mr6142280wmc.112.1473601295760; Sun, 11 Sep 2016 06:41:35 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD3CB9604519CE50E19B62432.dip0.t-ipconnect.de. [2003:dc:d3cb:9604:519c:e50e:19b6:2432]) by smtp.googlemail.com with ESMTPSA id bc5sm13011223wjb.37.2016.09.11.06.41.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Sep 2016 06:41:34 -0700 (PDT) From: Martin Blumenstingl To: linux-clk@vger.kernel.org, linux-usb@vger.kernel.org, linux-amlogic@lists.infradead.org, jbrunet@baylibre.com, johnyoun@synopsys.com, kishon@ti.com, khilman@baylibre.com, carlo@caione.org Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, sboyd@codeaurora.org, mturquette@baylibre.com, will.deacon@arm.com, catalin.marinas@arm.com, gregkh@linuxfoundation.org, mark.rutland@arm.com, robh+dt@kernel.org, Martin Blumenstingl Subject: [PATCH v2 1/6] usb: dwc2: add support for Meson8b and GXBB SoCs Date: Sun, 11 Sep 2016 15:41:06 +0200 Message-Id: <20160911134111.31141-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160911134111.31141-1-martin.blumenstingl@googlemail.com> References: <20160904213152.25837-1-martin.blumenstingl@googlemail.com> <20160911134111.31141-1-martin.blumenstingl@googlemail.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jerome Brunet Add compatible strings for amlogic Meson8b and GXBB SoCs with the corresponding configuration parameters. Signed-off-by: Jerome Brunet Signed-off-by: Martin Blumenstingl Acked-by: John Youn Acked-by: Rob Herring --- Documentation/devicetree/bindings/usb/dwc2.txt | 2 ++ drivers/usb/dwc2/platform.c | 34 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt index 20a68bf..2c30a54 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.txt +++ b/Documentation/devicetree/bindings/usb/dwc2.txt @@ -10,6 +10,8 @@ Required properties: - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc; - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs; - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs; + - "amlogic,meson8b-usb": The DWC2 USB controller instance in Amlogic Meson8b SoCs; + - "amlogic,meson-gxbb-usb": The DWC2 USB controller instance in Amlogic S905 SoCs; - snps,dwc2: A generic DWC2 USB controller with default parameters. - reg : Should contain 1 register range (address and length) - interrupts : Should contain 1 interrupt diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index fc6f525..8f7b34c 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -181,6 +181,38 @@ static const struct dwc2_core_params params_ltq = { .hibernation = -1, }; +static const struct dwc2_core_params params_amlogic = { + .otg_cap = DWC2_CAP_PARAM_NO_HNP_SRP_CAPABLE, + .otg_ver = -1, + .dma_enable = 1, + .dma_desc_enable = 0, + .dma_desc_fs_enable = 0, + .speed = DWC2_SPEED_PARAM_HIGH, + .enable_dynamic_fifo = 1, + .en_multiple_tx_fifo = -1, + .host_rx_fifo_size = 512, + .host_nperio_tx_fifo_size = 500, + .host_perio_tx_fifo_size = 500, + .max_transfer_size = -1, + .max_packet_count = -1, + .host_channels = 16, + .phy_type = DWC2_PHY_TYPE_PARAM_UTMI, + .phy_utmi_width = -1, + .phy_ulpi_ddr = -1, + .phy_ulpi_ext_vbus = -1, + .i2c_enable = -1, + .ulpi_fs_ls = -1, + .host_support_fs_ls_low_power = -1, + .host_ls_low_power_phy_clk = -1, + .ts_dline = -1, + .reload_ctl = 1, + .ahbcfg = GAHBCFG_HBSTLEN_INCR8 << + GAHBCFG_HBSTLEN_SHIFT, + .uframe_sched = 0, + .external_id_pin_ctl = -1, + .hibernation = -1, +}; + /* * Check the dr_mode against the module configuration and hardware * capabilities. @@ -464,6 +496,8 @@ static const struct of_device_id dwc2_of_match_table[] = { { .compatible = "lantiq,xrx200-usb", .data = ¶ms_ltq }, { .compatible = "snps,dwc2", .data = NULL }, { .compatible = "samsung,s3c6400-hsotg", .data = NULL}, + { .compatible = "amlogic,meson8b-usb", .data = ¶ms_amlogic }, + { .compatible = "amlogic,meson-gxbb-usb", .data = ¶ms_amlogic }, {}, }; MODULE_DEVICE_TABLE(of, dwc2_of_match_table);