From patchwork Mon Apr 24 16:53:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Ulli Kroll X-Patchwork-Id: 754342 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wBXVj6ZC0z9sMN for ; Tue, 25 Apr 2017 02:54:01 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b="EEFzhDJE"; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id ADC95B8045F; Mon, 24 Apr 2017 18:53:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Mon, 24 Apr 2017 18:53:52 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id DE62EB80057 for ; Mon, 24 Apr 2017 18:53:51 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .googlemail. - helo: .mail-wm0-f68.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 24 Apr 2017 18:53:51 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id u65so18719179wmu.3 for ; Mon, 24 Apr 2017 09:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=W2uQkaojyXI/VPGs8KUDxFJnlGDrp+Gbr2vXAOLDuTY=; b=EEFzhDJELMjH2jel1Ra59ZV/eLNZ35ZzZi5GKBKYpRIzvr1c+D6CPDWS9G3NppSSTp TPlA5qn+FKhTOwDmrekN+5CdBFIyfQADch5H4C33brgdUhBgSWo1o8mxToIXld2IJpEV /lu0L6yZWJvFfiY8roRVrmnYgcdEIpNx2aXC2II6x/ieGs6067ILwV53rNa/D7/4UBEN pQ6k7lBZiVheP1z1oSCrfccZIk3Um1TGPU01mlsZ/BefIJ7ohFoSfGfeamZ14/Qo6zZi pyrzFeg07oU0VFe02tGT9NaLZpnd4dI496KxrCZ7PF2NCNw6G+U2AVsMdLQSeNb7ApE9 ATjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=W2uQkaojyXI/VPGs8KUDxFJnlGDrp+Gbr2vXAOLDuTY=; b=k5kvIFUmghOmJMJrAp7xImh0FfmZpfZHhJz65YCTRA68RXDvl+MTODJidvgfs0nFyr svR7/WCQeHnr469C17VcYOPMnbv0g2U7NlgaIQiSK5p8cUj7ZpXwCZe2Vm43Lpg0B7Yj W5M9jdP9qFw2bsj2+ZsWLZzIJBh3pfDJouRc8bGHb9ejuGFSBIahv9Mnyrmi4Kr9xPk5 w4cF2Z0hwyoT3sCRkGLy3gOhwy7E03jfSbh+kZ4nky1/eI1r41bFl0Q3Hdh1ZmMJSSTz fyLE8MFRoGv1bOugMPy9HkPUjKzHrmJoCykSP8+CE2r8LtNDbG46V/SA+7RLSN3rjyTm fLRg== X-Gm-Message-State: AN3rC/5GD+H31PDlBMjk/3UpUB6EEm44d/v42TVXaJEpDhsqsvszLhp6 DM4+isjNZrP8Yw== X-Received: by 10.28.69.73 with SMTP id s70mr10188624wma.33.1493052830558; Mon, 24 Apr 2017 09:53:50 -0700 (PDT) Received: from localhost (cable-78-35-118-8.netcologne.de. [78.35.118.8]) by smtp.gmail.com with ESMTPSA id s82sm945062wmb.33.2017.04.24.09.53.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Apr 2017 09:53:49 -0700 (PDT) Date: Mon, 24 Apr 2017 18:53:10 +0200 (CEST) From: Hans Ulli Kroll X-X-Sender: elektroman@T420s To: Linus Walleij In-Reply-To: <20170421204058.6206-1-linus.walleij@linaro.org> Message-ID: References: <20170421204058.6206-1-linus.walleij@linaro.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Subject: Re: [OpenWrt-Devel] [PATCH 1/5 v3] usb: host: add DT bindings for faraday fotg2 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openwrt-devel@openwrt.org, devicetree@vger.kernel.org, Paulius Zaleckas , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Janos Laube , linux-arm-kernel@lists.infradead.org Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Hi Linus On Fri, 21 Apr 2017, Linus Walleij wrote: > From: Hans Ulli Kroll > > This adds device tree bindings for the Faraday FOTG2 > dual-mode host controller. > > Cc: devicetree@vger.kernel.org > Signed-off-by: Hans Ulli Kroll > Signed-off-by: Linus Walleij > --- > ChangeLog v1->v3: > - Change compatible to "faraday,fotg210" as the name of the > hardware block. > - Add an elaborate SoC-specific compatible string for the > Cortina Systems Gemini so that SoC-specific features can > be enabled. > - Add cortina,gemini-mini-b to indicate a Gemini PHY with > a Mini-B adapter connected. > - Indicated that the Gemini version can handle "wakeup-source". > - Add optional IP block clock. > --- > .../devicetree/bindings/usb/faraday,fotg210.txt | 35 ++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/faraday,fotg210.txt > Got NAK'ed from Rob on some ealier round due missing "device mode" on this IP. I've blatantly overrided this to a host only driver. These are the needed changes in DT to support both modes Note the -dr at the end of fotg210, to reflect this in an dual role device diff --git a/Documentation/devicetree/bindings/usb/faraday,fotg210.txt b/Documentation/devicetree/bindings/usb/faraday,fotg210.txt index cf06808303e2..862cda19e9d3 100644 --- a/Documentation/devicetree/bindings/usb/faraday,fotg210.txt +++ b/Documentation/devicetree/bindings/usb/faraday,fotg210.txt @@ -13,6 +13,9 @@ Required properties: Optional properties: - clocks: should contain the IP block clock - clock-names: should be "PCLK" for the IP block clock +- dr_mode : indicates the working mode for "fotg210-dr" compatible + controllers. Can be "host", "peripheral". Default to + "host" if not defined for backward compatibility. Required properties for "cortina,gemini-usb" compatible: - syscon: a phandle to the system controller to access PHY registers @@ -25,7 +28,7 @@ Optional properties for "cortina,gemini-usb" compatible: Example for Gemini: usb@68000000 { - compatible = "cortina,gemini-usb", "faraday,fotg210"; + compatible = "cortina,gemini-usb", "faraday,fotg210-dr"; reg = <0x68000000 0x1000>; interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cc 12>;