From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C4E8C43381 for ; Mon, 4 Mar 2019 10:39:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4AF4B20663 for ; Mon, 4 Mar 2019 10:39:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="WxUQZFtT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726412AbfCDKi6 (ORCPT ); Mon, 4 Mar 2019 05:38:58 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34937 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbfCDKi4 (ORCPT ); Mon, 4 Mar 2019 05:38:56 -0500 Received: by mail-wr1-f65.google.com with SMTP id t18so4956060wrx.2 for ; Mon, 04 Mar 2019 02:38:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=alOo0f/NLXA+J+lrhBG6i0U2G26hjQrx9D9IoyrBZIg=; b=WxUQZFtTnriTzzxpDPE04/Ebi8+i/1cNCtpzm+vH2QJBqDtqma8pxVydVtKUI1Hg35 Hbgt7vedp7dvO+wfIx+WFvv1zlzF7ZlZB9mgRTpi/iMfaIgdzm2bZXE1S9/W2arlxER4 scadIGD3h1T4Y97oBg1glfQDu3sXqCCe46sdVvN7VfvWXAGMSL3HVZIMdJpE0miuyk8I vGP1ln7UKDuWzMC9YXz1g7HptFB3lvbpgvddoNZam3ltGuI3a+6xu/2wj2Enj1WY+YVr 2Vc5nRRR616CdoZf4TijmFvt0LgzHgovRWdyXo8dmKfJovgGlWS7pjaMwkdlFvLO0iBM tc+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=alOo0f/NLXA+J+lrhBG6i0U2G26hjQrx9D9IoyrBZIg=; b=kIqe3cFV+ytp8woSR4k7xGlTY4yYFEBD2TU7BzqOIiwgjIO1ERObiMP+M3Yarcadaz DPHiw95jroGFBPRgqpLt5LDZJkRHUP+ey9bWB8FZ2EbCHbg4lPnaDNjyQ0bv1eEMzzz4 RunIbH4781eMQatkxmR7qy0mqJP+xUDzf1osVbsfprGFWO6lfKHgp6kduUyDPhNTx43G xtSKqfj4tsrhdX8OwVJKXwpxRFCHFZO2dbI/Wf1L7qSrmIUNOrtzs8tI1tmh9YZPYH0h enaUsLmAmaLkgFiraT5eLDZXYWPwa71tITRylAUUGUzZhdndhHSrLzBV1inRegZV0Unq m8xQ== X-Gm-Message-State: APjAAAW0rcs8IkjGR1SO5jVoMB2GnT2pZUc+KvWyt7On+F5XkZL30LWw goZ46gmdYNn0FU6S6vNi8Fniyg== X-Google-Smtp-Source: APXvYqx032M1rOT9J89/8zdCgewi5y7oO3uCtK6v0+YEDnsHvpceN8qgk3Mp0w7vew0PITfpOeJ1KA== X-Received: by 2002:adf:e647:: with SMTP id b7mr12083538wrn.260.1551695933759; Mon, 04 Mar 2019 02:38:53 -0800 (PST) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id g24sm5505676wmh.45.2019.03.04.02.38.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Mar 2019 02:38:52 -0800 (PST) From: Neil Armstrong To: gregkh@linuxfoundation.org, hminas@synopsys.com, balbi@kernel.org, kishon@ti.com, devicetree@vger.kernel.org Cc: Neil Armstrong , linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/8] dt-bindings: usb: dwc3: Add Amlogic G12A DWC3 Glue Bindings Date: Mon, 4 Mar 2019 11:38:42 +0100 Message-Id: <20190304103846.2060-5-narmstrong@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190304103846.2060-1-narmstrong@baylibre.com> References: <20190304103846.2060-1-narmstrong@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adds the bindings for the Amlogic G12A USB Glue HW. The Amlogic G12A SoC Family embeds 2 USB Controllers : - a DWC3 IP configured as Host for USB2 and USB3 - a DWC2 IP configured as Peripheral USB2 Only A glue connects these both controllers to 2 USB2 PHYs, and optionnally to an USB3+PCIE Combo PHY shared with the PCIE controller. The Glue configures the UTMI 8bit interfaces for the USB2 PHYs, including routing of the OTG PHY between the DWC3 and DWC2 controllers, and setups the on-chip OTG mode selection for this PHY. The PHYs phandles are passed to the Glue node since the Glue controls the interface with the PHY, not the DWC3 controller. Signed-off-by: Neil Armstrong --- .../devicetree/bindings/usb/amlogic,dwc3.txt | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt b/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt index 9a8b631904fd..b9f04e617eb7 100644 --- a/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt +++ b/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt @@ -40,3 +40,91 @@ Example device nodes: phy-names = "usb2-phy", "usb3-phy"; }; }; + +Amlogic Meson G12A DWC3 USB SoC Controller Glue + +The Amlogic G12A embeds a DWC3 USB IP Core configured for USB2 and USB3 +in host-only mode, and a DWC2 IP Core configured for USB2 peripheral mode +only. + +A glue connects the DWC3 core to USB2 PHYs and optionnaly to an USB3 PHY. + +One of the USB2 PHY can be re-routed in peripheral mode to a DWC2 USB IP. + +The DWC3 Glue controls the PHY routing and power, an interrupt line is +connected to the Glue to serve as OTG ID change detection. + +Required properties: +- compatible: Should be "amlogic,meson-g12a-usb-ctrl" +- clocks: a handle for the "USB" clock +- resets: a handle for the shared "USB" reset line +- reg: The base address and length of the registers +- interrupts: the interrupt specifier for the OTG detection +- phys: handle to used PHYs on the system + - a <0> phandle can be used if a PHY is not used +- phy-names: names of the used PHYs on the system : + - "usb2-phy0" for USB2 PHY0 if USBHOST_A port is used + - "usb2-phy1" for USB2 PHY1 if USBOTG_B port is used + - "usb3-phy0" for USB3 PHY if USB3_0 is used +- dr_mode: should be "host", "peripheral", or "otg" depending on + the usage and configuration of the OTG Capable port. + - "host" and "peripheral" means a fixed Host or Device only connection + - "otg" means the port can be used as both Host or Device and + be switched automatically using the OTG ID pin. + +Optional properties: +- vbus-supply: should be a phandle to the regulator controlling the VBUS + power supply when used in OTG switchable mode + +Required child nodes: + +A child node must exist to represent the core DWC3 IP block. The name of +the node is not important. The content of the node is defined in dwc3.txt. + +A child node must exist to represent the core DWC2 IP block. The name of +the node is not important. The content of the node is defined in dwc2.txt. + +PHY documentation is provided in the following places: +- Documentation/devicetree/bindings/phy/meson-g12a-usb2-phy.txt +- Documentation/devicetree/bindings/phy/meson-g12a-usb3-pcie-phy.txt + +Example device nodes: + usb: usb@ffe09000 { + compatible = "amlogic,meson-g12a-usb-ctrl"; + reg = <0x0 0xffe09000 0x0 0xa0>; + interrupts = ; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + clocks = <&clkc CLKID_USB>; + resets = <&reset RESET_USB>; + + dr_mode = "otg"; + + phys = <&usb2_phy0>, <&usb2_phy1>, + <&usb3_pcie_phy PHY_TYPE_USB3>; + phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0"; + + dwc2: usb@ff400000 { + compatible = "amlogic,meson-g12a-usb", "snps,dwc2"; + reg = <0x0 0xff400000 0x0 0x40000>; + interrupts = ; + clocks = <&clkc CLKID_USB1_DDR_BRIDGE>; + clock-names = "ddr"; + phys = <&usb2_phy1>; + dr_mode = "peripheral"; + g-rx-fifo-size = <192>; + g-np-tx-fifo-size = <128>; + g-tx-fifo-size = <128 128 16 16 16>; + }; + + dwc3: usb@ff500000 { + compatible = "snps,dwc3"; + reg = <0x0 0xff500000 0x0 0x100000>; + interrupts = ; + dr_mode = "host"; + snps,dis_u2_susphy_quirk; + snps,quirk-frame-length-adjustment; + }; + }; -- 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: [v2,4/8] dt-bindings: usb: dwc3: Add Amlogic G12A DWC3 Glue Bindings From: Neil Armstrong Message-Id: <20190304103846.2060-5-narmstrong@baylibre.com> Date: Mon, 4 Mar 2019 11:38:42 +0100 To: gregkh@linuxfoundation.org, hminas@synopsys.com, balbi@kernel.org, kishon@ti.com, devicetree@vger.kernel.org Cc: Neil Armstrong , linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org List-ID: QWRkcyB0aGUgYmluZGluZ3MgZm9yIHRoZSBBbWxvZ2ljIEcxMkEgVVNCIEdsdWUgSFcuCgpUaGUg QW1sb2dpYyBHMTJBIFNvQyBGYW1pbHkgZW1iZWRzIDIgVVNCIENvbnRyb2xsZXJzIDoKLSBhIERX QzMgSVAgY29uZmlndXJlZCBhc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CisKKwkJ CWR3YzM6IHVzYkBmZjUwMDAwMCB7CisJCQkJY29tcGF0aWJsZSA9ICJzbnBzLGR3YzMiOworCQkJ CXJlZyA9IDwweDAgMHhmZjUwMDAwMCAweDAgMHgxMDAwMDA+OworCQkJCWludGVycnVwdHMgPSA8 R0lDX1NQSSAzMCBJUlFfVFlQRV9MRVZFTF9ISUdIPjsKKwkJCQlkcl9tb2RlID0gImhvc3QiOwor CQkJCXNucHMsZGlzX3UyX3N1c3BoeV9xdWlyazsKKwkJCQlzbnBzLHF1aXJrLWZyYW1lLWxlbmd0 aC1hZGp1c3RtZW50OworCQkJfTsKKwl9Owo= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8A6EC43381 for ; Mon, 4 Mar 2019 10:39:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA35120663 for ; Mon, 4 Mar 2019 10:39:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JUvINbco"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="WxUQZFtT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA35120663 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PuUc++mKjWfeGhrf+S1hXsiFPVWGJ12dBdiiL7ltt6M=; b=JUvINbcocqOggl 8TuG1lzQ7QoZV2VC1cs7YjQg/YrxssF/G+iTLJ7UJYPx89vXmXp76mhxn5zS/oOV3YfcJyUt1On7h TEjAJpdClqgXoSdRbvvUL+4UrpA7TX2KObcwW+Ob7YATqhxVSlzin0QnJSsajFIwGX0HzzuxsWtGa 5i9SRNsdX3NQi1MygB2Yg1MtcTyefcffI8QiEYaaz9uipw+M/eSmbk0r6wgt3r8eN4iucpPjWM7Ec rZCi0sy+EwVaF4czwBdsPXqUl4fzgizMVd75a8RdF6gHmGSduRCgndY8WyJnFn5Kv0+3quef13j8v ewpnq+Tm61XG2JrOsgtg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0l0h-00039j-9l; Mon, 04 Mar 2019 10:39:51 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0kzn-0001vq-AA for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2019 10:38:59 +0000 Received: by mail-wr1-x442.google.com with SMTP id l5so4939259wrw.6 for ; Mon, 04 Mar 2019 02:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=alOo0f/NLXA+J+lrhBG6i0U2G26hjQrx9D9IoyrBZIg=; b=WxUQZFtTnriTzzxpDPE04/Ebi8+i/1cNCtpzm+vH2QJBqDtqma8pxVydVtKUI1Hg35 Hbgt7vedp7dvO+wfIx+WFvv1zlzF7ZlZB9mgRTpi/iMfaIgdzm2bZXE1S9/W2arlxER4 scadIGD3h1T4Y97oBg1glfQDu3sXqCCe46sdVvN7VfvWXAGMSL3HVZIMdJpE0miuyk8I vGP1ln7UKDuWzMC9YXz1g7HptFB3lvbpgvddoNZam3ltGuI3a+6xu/2wj2Enj1WY+YVr 2Vc5nRRR616CdoZf4TijmFvt0LgzHgovRWdyXo8dmKfJovgGlWS7pjaMwkdlFvLO0iBM tc+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=alOo0f/NLXA+J+lrhBG6i0U2G26hjQrx9D9IoyrBZIg=; b=MKpM29p22efFsjnrKCPfeSvxLtI76bsYKwjcUY4xKQbdut66rBEh4Pp+CkLrC6HonV Ok5/nGFy8sYtX2r5Bj3E7AXUK7yFHCZNW/jBDC8Oncb7wROXvB3zLTzpxrYckKFTDoLf DuPLHGrzIvx70tZrmetgA2z/OdLmqmYFjjFlsnUfxI6TbZC72IT3Jl4XWV1mTegknwdj PmqpRXa8Y/tIBNK9Qd9D3ViwLBbMYYxMq53ohdwJMcbRelXuqzjkTbQPusqKhhS61Gcc vtwygMTP52ZYUovuwExlRk7xqR/Gbhawrd5T/PdkzAfO1XkS6d7V95XvR+iTvf5CR/kr +e3Q== X-Gm-Message-State: APjAAAWDK1mZsFMJR3zH7UcEVnaYv+qNGtU18bpMj87f3IUqNK5AjQEM F+vQiXJ3mO3rTpX40hfEec45KQ== X-Google-Smtp-Source: APXvYqx032M1rOT9J89/8zdCgewi5y7oO3uCtK6v0+YEDnsHvpceN8qgk3Mp0w7vew0PITfpOeJ1KA== X-Received: by 2002:adf:e647:: with SMTP id b7mr12083538wrn.260.1551695933759; Mon, 04 Mar 2019 02:38:53 -0800 (PST) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id g24sm5505676wmh.45.2019.03.04.02.38.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Mar 2019 02:38:52 -0800 (PST) From: Neil Armstrong To: gregkh@linuxfoundation.org, hminas@synopsys.com, balbi@kernel.org, kishon@ti.com, devicetree@vger.kernel.org Subject: [PATCH v2 4/8] dt-bindings: usb: dwc3: Add Amlogic G12A DWC3 Glue Bindings Date: Mon, 4 Mar 2019 11:38:42 +0100 Message-Id: <20190304103846.2060-5-narmstrong@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190304103846.2060-1-narmstrong@baylibre.com> References: <20190304103846.2060-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190304_023855_450805_7EF80123 X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Adds the bindings for the Amlogic G12A USB Glue HW. The Amlogic G12A SoC Family embeds 2 USB Controllers : - a DWC3 IP configured as Host for USB2 and USB3 - a DWC2 IP configured as Peripheral USB2 Only A glue connects these both controllers to 2 USB2 PHYs, and optionnally to an USB3+PCIE Combo PHY shared with the PCIE controller. The Glue configures the UTMI 8bit interfaces for the USB2 PHYs, including routing of the OTG PHY between the DWC3 and DWC2 controllers, and setups the on-chip OTG mode selection for this PHY. The PHYs phandles are passed to the Glue node since the Glue controls the interface with the PHY, not the DWC3 controller. Signed-off-by: Neil Armstrong --- .../devicetree/bindings/usb/amlogic,dwc3.txt | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt b/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt index 9a8b631904fd..b9f04e617eb7 100644 --- a/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt +++ b/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt @@ -40,3 +40,91 @@ Example device nodes: phy-names = "usb2-phy", "usb3-phy"; }; }; + +Amlogic Meson G12A DWC3 USB SoC Controller Glue + +The Amlogic G12A embeds a DWC3 USB IP Core configured for USB2 and USB3 +in host-only mode, and a DWC2 IP Core configured for USB2 peripheral mode +only. + +A glue connects the DWC3 core to USB2 PHYs and optionnaly to an USB3 PHY. + +One of the USB2 PHY can be re-routed in peripheral mode to a DWC2 USB IP. + +The DWC3 Glue controls the PHY routing and power, an interrupt line is +connected to the Glue to serve as OTG ID change detection. + +Required properties: +- compatible: Should be "amlogic,meson-g12a-usb-ctrl" +- clocks: a handle for the "USB" clock +- resets: a handle for the shared "USB" reset line +- reg: The base address and length of the registers +- interrupts: the interrupt specifier for the OTG detection +- phys: handle to used PHYs on the system + - a <0> phandle can be used if a PHY is not used +- phy-names: names of the used PHYs on the system : + - "usb2-phy0" for USB2 PHY0 if USBHOST_A port is used + - "usb2-phy1" for USB2 PHY1 if USBOTG_B port is used + - "usb3-phy0" for USB3 PHY if USB3_0 is used +- dr_mode: should be "host", "peripheral", or "otg" depending on + the usage and configuration of the OTG Capable port. + - "host" and "peripheral" means a fixed Host or Device only connection + - "otg" means the port can be used as both Host or Device and + be switched automatically using the OTG ID pin. + +Optional properties: +- vbus-supply: should be a phandle to the regulator controlling the VBUS + power supply when used in OTG switchable mode + +Required child nodes: + +A child node must exist to represent the core DWC3 IP block. The name of +the node is not important. The content of the node is defined in dwc3.txt. + +A child node must exist to represent the core DWC2 IP block. The name of +the node is not important. The content of the node is defined in dwc2.txt. + +PHY documentation is provided in the following places: +- Documentation/devicetree/bindings/phy/meson-g12a-usb2-phy.txt +- Documentation/devicetree/bindings/phy/meson-g12a-usb3-pcie-phy.txt + +Example device nodes: + usb: usb@ffe09000 { + compatible = "amlogic,meson-g12a-usb-ctrl"; + reg = <0x0 0xffe09000 0x0 0xa0>; + interrupts = ; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + clocks = <&clkc CLKID_USB>; + resets = <&reset RESET_USB>; + + dr_mode = "otg"; + + phys = <&usb2_phy0>, <&usb2_phy1>, + <&usb3_pcie_phy PHY_TYPE_USB3>; + phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0"; + + dwc2: usb@ff400000 { + compatible = "amlogic,meson-g12a-usb", "snps,dwc2"; + reg = <0x0 0xff400000 0x0 0x40000>; + interrupts = ; + clocks = <&clkc CLKID_USB1_DDR_BRIDGE>; + clock-names = "ddr"; + phys = <&usb2_phy1>; + dr_mode = "peripheral"; + g-rx-fifo-size = <192>; + g-np-tx-fifo-size = <128>; + g-tx-fifo-size = <128 128 16 16 16>; + }; + + dwc3: usb@ff500000 { + compatible = "snps,dwc3"; + reg = <0x0 0xff500000 0x0 0x100000>; + interrupts = ; + dr_mode = "host"; + snps,dis_u2_susphy_quirk; + snps,quirk-frame-length-adjustment; + }; + }; -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89F5DC43381 for ; Mon, 4 Mar 2019 10:40:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 59E6420663 for ; Mon, 4 Mar 2019 10:40:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hl6iyBrh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="WxUQZFtT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 59E6420663 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ao91fdW64sF5+ojc3kRNtHGvfEkuy7+QncvrVmouaBA=; b=hl6iyBrhsG1sP0 ZLMEka4CLUvaY4cBPAscUbaeBLvHy9QquAL3xqbWtPqP67GdxGB6ORjXiHxNWsn83jcLwsb+iZl45 hb3E9zQBXKqPnaTZ1Br99G+Trpq8raf0YTNVpSj5zFtlKHKRNMvLODzWqVZY+ScDVyaK/Ad1FiKbu PuNoeKjlPWi2idIRIARvWoOFVXa5dMfy2iQ0WIHoCGPsXV6KrXyj48lIoBxnLsP7xkEj3ZBcYRXQC P5a927+n8zuMnETd6uZUE8D0UPqgDZIZFq6MT0wgBlLQ5a+J2gHYYsgFNy1wBd5KgcLzhpdtqvCa1 nPpPSaR/g0q3d6eH/l0g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0l0s-0003OJ-DF; Mon, 04 Mar 2019 10:40:02 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0kzn-0001vp-LK for linux-amlogic@lists.infradead.org; Mon, 04 Mar 2019 10:39:02 +0000 Received: by mail-wr1-x444.google.com with SMTP id w17so4934324wrn.12 for ; Mon, 04 Mar 2019 02:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=alOo0f/NLXA+J+lrhBG6i0U2G26hjQrx9D9IoyrBZIg=; b=WxUQZFtTnriTzzxpDPE04/Ebi8+i/1cNCtpzm+vH2QJBqDtqma8pxVydVtKUI1Hg35 Hbgt7vedp7dvO+wfIx+WFvv1zlzF7ZlZB9mgRTpi/iMfaIgdzm2bZXE1S9/W2arlxER4 scadIGD3h1T4Y97oBg1glfQDu3sXqCCe46sdVvN7VfvWXAGMSL3HVZIMdJpE0miuyk8I vGP1ln7UKDuWzMC9YXz1g7HptFB3lvbpgvddoNZam3ltGuI3a+6xu/2wj2Enj1WY+YVr 2Vc5nRRR616CdoZf4TijmFvt0LgzHgovRWdyXo8dmKfJovgGlWS7pjaMwkdlFvLO0iBM tc+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=alOo0f/NLXA+J+lrhBG6i0U2G26hjQrx9D9IoyrBZIg=; b=ohYz41sJ5hYhRshJQ7f7ZpLX2niAVsEH3XKMgCH9h/4xSSNHToNffLG5dVHNJg6H/J 8il2Jxc/RBLTHZTf1k/3uV6Gsfk28raXb6dFyQqDt3aoZB5zrW2/Mrtg4G8DBJnjFN3S zgEMpvQX+fip0+0oZDOenavDW1vAVTxnlGGXUkGwBhmR6BH/PfaGEDgUHoVseLids+Tp 4OR4UKPU6AmA2rSskjImxBZgZ9/FMucQWOT/QR/By6qVmdWs0+Eb3Inq19746TKNfBru bKcvtfMrIfoxz9fa3rScrYiwBSn/vv4bBWVdgdJ4MaY5elpc9h5t+Ju0dtOPiNOTVRqa w5QA== X-Gm-Message-State: APjAAAV3skSUR2FOEKsbbQldt5bNyR1oqKaLxqkUvqB9e7ejjPgu01kn q/hNCqWqC8NqkURax+bzNR/3Cg== X-Google-Smtp-Source: APXvYqx032M1rOT9J89/8zdCgewi5y7oO3uCtK6v0+YEDnsHvpceN8qgk3Mp0w7vew0PITfpOeJ1KA== X-Received: by 2002:adf:e647:: with SMTP id b7mr12083538wrn.260.1551695933759; Mon, 04 Mar 2019 02:38:53 -0800 (PST) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id g24sm5505676wmh.45.2019.03.04.02.38.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Mar 2019 02:38:52 -0800 (PST) From: Neil Armstrong To: gregkh@linuxfoundation.org, hminas@synopsys.com, balbi@kernel.org, kishon@ti.com, devicetree@vger.kernel.org Subject: [PATCH v2 4/8] dt-bindings: usb: dwc3: Add Amlogic G12A DWC3 Glue Bindings Date: Mon, 4 Mar 2019 11:38:42 +0100 Message-Id: <20190304103846.2060-5-narmstrong@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190304103846.2060-1-narmstrong@baylibre.com> References: <20190304103846.2060-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190304_023855_855796_DB186FA4 X-CRM114-Status: GOOD ( 13.27 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Adds the bindings for the Amlogic G12A USB Glue HW. The Amlogic G12A SoC Family embeds 2 USB Controllers : - a DWC3 IP configured as Host for USB2 and USB3 - a DWC2 IP configured as Peripheral USB2 Only A glue connects these both controllers to 2 USB2 PHYs, and optionnally to an USB3+PCIE Combo PHY shared with the PCIE controller. The Glue configures the UTMI 8bit interfaces for the USB2 PHYs, including routing of the OTG PHY between the DWC3 and DWC2 controllers, and setups the on-chip OTG mode selection for this PHY. The PHYs phandles are passed to the Glue node since the Glue controls the interface with the PHY, not the DWC3 controller. Signed-off-by: Neil Armstrong --- .../devicetree/bindings/usb/amlogic,dwc3.txt | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt b/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt index 9a8b631904fd..b9f04e617eb7 100644 --- a/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt +++ b/Documentation/devicetree/bindings/usb/amlogic,dwc3.txt @@ -40,3 +40,91 @@ Example device nodes: phy-names = "usb2-phy", "usb3-phy"; }; }; + +Amlogic Meson G12A DWC3 USB SoC Controller Glue + +The Amlogic G12A embeds a DWC3 USB IP Core configured for USB2 and USB3 +in host-only mode, and a DWC2 IP Core configured for USB2 peripheral mode +only. + +A glue connects the DWC3 core to USB2 PHYs and optionnaly to an USB3 PHY. + +One of the USB2 PHY can be re-routed in peripheral mode to a DWC2 USB IP. + +The DWC3 Glue controls the PHY routing and power, an interrupt line is +connected to the Glue to serve as OTG ID change detection. + +Required properties: +- compatible: Should be "amlogic,meson-g12a-usb-ctrl" +- clocks: a handle for the "USB" clock +- resets: a handle for the shared "USB" reset line +- reg: The base address and length of the registers +- interrupts: the interrupt specifier for the OTG detection +- phys: handle to used PHYs on the system + - a <0> phandle can be used if a PHY is not used +- phy-names: names of the used PHYs on the system : + - "usb2-phy0" for USB2 PHY0 if USBHOST_A port is used + - "usb2-phy1" for USB2 PHY1 if USBOTG_B port is used + - "usb3-phy0" for USB3 PHY if USB3_0 is used +- dr_mode: should be "host", "peripheral", or "otg" depending on + the usage and configuration of the OTG Capable port. + - "host" and "peripheral" means a fixed Host or Device only connection + - "otg" means the port can be used as both Host or Device and + be switched automatically using the OTG ID pin. + +Optional properties: +- vbus-supply: should be a phandle to the regulator controlling the VBUS + power supply when used in OTG switchable mode + +Required child nodes: + +A child node must exist to represent the core DWC3 IP block. The name of +the node is not important. The content of the node is defined in dwc3.txt. + +A child node must exist to represent the core DWC2 IP block. The name of +the node is not important. The content of the node is defined in dwc2.txt. + +PHY documentation is provided in the following places: +- Documentation/devicetree/bindings/phy/meson-g12a-usb2-phy.txt +- Documentation/devicetree/bindings/phy/meson-g12a-usb3-pcie-phy.txt + +Example device nodes: + usb: usb@ffe09000 { + compatible = "amlogic,meson-g12a-usb-ctrl"; + reg = <0x0 0xffe09000 0x0 0xa0>; + interrupts = ; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + clocks = <&clkc CLKID_USB>; + resets = <&reset RESET_USB>; + + dr_mode = "otg"; + + phys = <&usb2_phy0>, <&usb2_phy1>, + <&usb3_pcie_phy PHY_TYPE_USB3>; + phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0"; + + dwc2: usb@ff400000 { + compatible = "amlogic,meson-g12a-usb", "snps,dwc2"; + reg = <0x0 0xff400000 0x0 0x40000>; + interrupts = ; + clocks = <&clkc CLKID_USB1_DDR_BRIDGE>; + clock-names = "ddr"; + phys = <&usb2_phy1>; + dr_mode = "peripheral"; + g-rx-fifo-size = <192>; + g-np-tx-fifo-size = <128>; + g-tx-fifo-size = <128 128 16 16 16>; + }; + + dwc3: usb@ff500000 { + compatible = "snps,dwc3"; + reg = <0x0 0xff500000 0x0 0x100000>; + interrupts = ; + dr_mode = "host"; + snps,dis_u2_susphy_quirk; + snps,quirk-frame-length-adjustment; + }; + }; -- 2.20.1 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic