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: 9325401 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 83F526089F for ; Sun, 11 Sep 2016 13:43:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76CBE28305 for ; Sun, 11 Sep 2016 13:43:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B52728A7F; Sun, 11 Sep 2016 13:43:55 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 37D9528407 for ; Sun, 11 Sep 2016 13:43:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bj51Z-000130-JD; Sun, 11 Sep 2016 13:42:21 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bj51B-0000wN-CJ; Sun, 11 Sep 2016 13:41:58 +0000 Received: by mail-wm0-x243.google.com with SMTP id d7so2131059wmi.3; Sun, 11 Sep 2016 06:41:37 -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=ZyYl/dYh4ScF/Yys6MZT8QXCnOLQxjJ8pgvYNhVJt1c8XO5wEvJS8Omz54NQdRB6Tt i3TpV87vX4jE6WJO64D6zaI9Czvtp/TJkI3eYn1Yu//vQVJixNAycOA4k5/VnkjNbo23 c8kjPccu3TsoMjypb3BGi3MXL9qLRkporm5SrKjGXb3JEzdu/2US54uTHpo9EgAXN46U H5UG5C9IwKIrjPy00srJ1B0UD+uNdDVjtDFQoUOh8A7W+SOFw3SxDQmeytbWST3BqxZi iEGbQD2t4ud8bl17ojki4AeMyRnMAkbAa6K2zaTktrqvn1u9OgH3gqvZOp16mNPOAwVX 9ByQ== X-Gm-Message-State: AE9vXwOeE/R5tiA4mhRdzxGL26DkKP1piUnMPSL/IVgmvrcaq8yL21uO2B78u9QXNOWblA== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160911_064157_612349_48D7F1F5 X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, gregkh@linuxfoundation.org, Martin Blumenstingl , sboyd@codeaurora.org, mturquette@baylibre.com, will.deacon@arm.com, robh+dt@kernel.org, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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);