From patchwork Thu May 7 17:34:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 200925 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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, 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 F2068C54E49 for ; Thu, 7 May 2020 17:34:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1FF121473 for ; Thu, 7 May 2020 17:34:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="odddMpjL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727778AbgEGRef (ORCPT ); Thu, 7 May 2020 13:34:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727092AbgEGRee (ORCPT ); Thu, 7 May 2020 13:34:34 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C88FC05BD43; Thu, 7 May 2020 10:34:34 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id s18so2793330pgl.12; Thu, 07 May 2020 10:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RS2ptxmKb3ffwIAhZDMnM3dCIs8tmDEdZCAAPTqFzQ8=; b=odddMpjLL2dH2fC4tBa8E8pr7CPYFaiYVGu4lDrgU9SCEb6MlYEXlylyXly0z+fBQ5 k9yf1yXYjrXy7qHthqJUc54FgbdpOyb1rVynXSGY7oIFUzrQ0Yftde14FdoAqAw2LPX2 34xHE+g+JWobf5GhEk5a5WBeJHqygwWR0Fq3Dc53qO4oGltGJ2DuJ2vUKNGTsyXaF4+e yPgjcoWQp1pFQflaI/2O7RWpeEprT91myXBy48I279ew8UPJY57LW0heJjgmRS5ryuLp DSSTSeB1iRn2XA8lRjlbzFbwMI9DX4Zy6D/tv0EFI62sQCJp3RtqUDe1x7O9RTt8K/cW NEJw== 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; bh=RS2ptxmKb3ffwIAhZDMnM3dCIs8tmDEdZCAAPTqFzQ8=; b=LG6Dd9zsXl6U8LaDJJQxiySvZ11d7c7C6RLhnhV1+1kDL0t282XestA937BnSsPy8T oj8+XFm+xTrg1eHh8XxcpHi9eGfNJ9faAXe3v4qZBIb3C+vBOe9+hJAogdAQqNqXioRQ 4iQbLrfJGskROOUBfEEfekv1l2dcY+fI1jj4XpcUNS3AXCY46NWTBHbIQvzLnel1I4Vp UBo6uMHYLBPfgPSg9GkMhEEcF9xx8nQGxBg41sZwPokoWAzaELj4Lc/KVKzL8N+aPOJ5 qa+vnBU/4WpwqfA580qY+tQl0jyYCyWgOCqq3i4rjlbxdBudlpixVLk0jI3QdMSV3+ch kdwQ== X-Gm-Message-State: AGi0PuZ6CzZmmAxMJL+edfNCrv0+tMgWBYx+pvauetoBYTAp3u8SIYCi rQJydTEhYarxAIR4X8aszZYno9jBSp0= X-Google-Smtp-Source: APiQypJ7VtkJExDL00fC4A0q7KThBRLb1QmGWQESRsAyRO8MPssMxkDyzZ5abrifclqiTjvvdD2M5A== X-Received: by 2002:a63:d013:: with SMTP id z19mr11807229pgf.202.1588872873572; Thu, 07 May 2020 10:34:33 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id y14sm5368802pff.205.2020.05.07.10.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 10:34:33 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , Alan Stern , Andy Shevchenko , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, Greg Kroah-Hartman , Krzysztof Kozlowski , linux-usb@vger.kernel.org, Mathias Nyman , Rob Herring , Yoshihiro Shimoda , Andy Shevchenko Subject: [PATCH v7 2/5] dt-bindings: Add Broadcom STB USB support Date: Thu, 7 May 2020 13:34:05 -0400 Message-Id: <20200507173408.20754-3-alcooperx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507173408.20754-1-alcooperx@gmail.com> References: <20200507173408.20754-1-alcooperx@gmail.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add DT bindings for Broadcom STB USB EHCI and XHCI drivers. NOTE: The OHCI driver is not included because it uses the generic platform driver. Signed-off-by: Al Cooper Reviewed-by: Rob Herring --- .../bindings/usb/brcm,bcm7445-ehci.yaml | 59 +++++++++++++++++++ .../devicetree/bindings/usb/usb-xhci.txt | 1 + 2 files changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.yaml diff --git a/Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.yaml b/Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.yaml new file mode 100644 index 000000000000..2a9acf2b5a64 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/brcm,bcm7445-ehci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom STB USB EHCI Controller Device Tree Bindings + +allOf: + - $ref: "usb-hcd.yaml" + +maintainers: + - Al Cooper + +properties: + compatible: + const: brcm,bcm7445-ehci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + description: Clock specifier for the EHCI clock + + clock-names: + const: sw_usb + + phys: + maxItems: 1 + + phy-names: + const: usbphy + +required: + - compatible + - reg + - interrupts + - phys + - clocks + +additionalProperties: false + +examples: + - | + usb@f0b00300 { + compatible = "brcm,bcm7445-ehci"; + reg = <0xf0b00300 0xa8>; + interrupts = <0x0 0x5a 0x0>; + phys = <&usbphy_0 0x0>; + phy-names = "usbphy"; + clocks = <&usb20>; + clock-names = "sw_usb"; + }; + +... diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt index dc025f126d71..23e89d798b1b 100644 --- a/Documentation/devicetree/bindings/usb/usb-xhci.txt +++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt @@ -24,6 +24,7 @@ Required properties: device - "renesas,rcar-gen3-xhci" for a generic R-Car Gen3 or RZ/G2 compatible device + - "brcm,bcm7445-xhci" for Broadcom STB SoCs with XHCI - "xhci-platform" (deprecated) When compatible with the generic version, nodes must list the From patchwork Thu May 7 17:34:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 200926 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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 BA6E8C38A2A for ; Thu, 7 May 2020 17:34:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DAB620735 for ; Thu, 7 May 2020 17:34:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="l+q+VPJf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728018AbgEGRel (ORCPT ); Thu, 7 May 2020 13:34:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728003AbgEGRek (ORCPT ); Thu, 7 May 2020 13:34:40 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5B44C05BD43; Thu, 7 May 2020 10:34:40 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id 7so4062755pjo.0; Thu, 07 May 2020 10:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EPpfdrDWyIyJoF1ulwtJ3Qw81WLSoebaZdFuuGZoDek=; b=l+q+VPJf0AqTmc1n+v80+kTMlTK2z8npyK82OZfZ/9x/TOF1BzCAl2PQ70xUHvMDpQ 8uZIuUt3gx5UjJ7qVIm8vO368Zqk+LKpZqoQB9Lvz4Kjb+tgM9ViIsc48W+C39T6g4ye yfR+UH6TQzzTJTiafMhWOCfdcFHWXtjX8IVw39LgjLqJ2w6vHGwkrFUvyKbcO54wR1i9 skBln5pPuZAApexgE7HfQX6k55kd/Lkt6fpeVcvNn7QrMnMY6ywQGRapZUiUuq49NqLj nfNAAEz+/tRjZPThHV+InM9L1e83fQ1c+adoLjoYfZuOtq80duRilt9LRoe8FvWihLDn tpLg== 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; bh=EPpfdrDWyIyJoF1ulwtJ3Qw81WLSoebaZdFuuGZoDek=; b=UmWcC9Ol+wVuIgXFHAB3nAJQ2NESARJo0mDsmXrBEz4acZUdSDofEhjAV+T5aQzOsM MsLmCH/rLHRlhGpxsYj0BRW1KvjPrByslukbAgx8PO5+ZQVhqv25rrOGZZpnMrmxlHPc Kj3WxXAgmxAARCIBowMTvDLbsVn+wSWioQhbm4a1vN/qzjhBC+SFWxXS/HIpqWzlfiD0 30F1ohHgFsiNQm6GDJrXS2c1+fSJJvDj9j71tT4AunlMEX0aAzxOggEzpESBeDJ7w0Xm J2kjQZ21zSnQfbHl11QGQq3pNUeXpp5P/yO62lw8j81ANeG4ZGG+9Wed0kIXRgDw3SlK oQpA== X-Gm-Message-State: AGi0PuaUAbO99oEalIKUJBhDld29IS8QGgKnPRjyblwpxFh6d9I9eI57 dwOy8vFzr0hFnqS1HzEGz6j8h5vlt88= X-Google-Smtp-Source: APiQypL3czYk300rpBGKg2G+mjGxZ5lSkGhjC6H19yktBCHPl5NOAmYDW2y9mD2Ze8Q84xRxXPwWFQ== X-Received: by 2002:a17:90a:1501:: with SMTP id l1mr1307791pja.82.1588872879825; Thu, 07 May 2020 10:34:39 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id y14sm5368802pff.205.2020.05.07.10.34.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 10:34:39 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , Alan Stern , Andy Shevchenko , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, Greg Kroah-Hartman , Krzysztof Kozlowski , linux-usb@vger.kernel.org, Mathias Nyman , Rob Herring , Yoshihiro Shimoda , Andy Shevchenko Subject: [PATCH v7 5/5] usb: host: Add ability to build new Broadcom STB USB drivers Date: Thu, 7 May 2020 13:34:08 -0400 Message-Id: <20200507173408.20754-6-alcooperx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507173408.20754-1-alcooperx@gmail.com> References: <20200507173408.20754-1-alcooperx@gmail.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the build system changes needed to get the Broadcom STB XHCI, EHCI and OHCI functionality working. The OHCI support does not require anything unique to Broadcom so the standard ohci-platform driver is being used. Also update MAINTAINERS. Signed-off-by: Al Cooper --- MAINTAINERS | 8 ++++++++ drivers/usb/host/Kconfig | 20 ++++++++++++++++++++ drivers/usb/host/Makefile | 1 + 3 files changed, 29 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2926327e4976..fb55300c2a84 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3481,6 +3481,14 @@ S: Supported F: Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml F: drivers/i2c/busses/i2c-brcmstb.c +BROADCOM BRCMSTB USB EHCI DRIVER +M: Al Cooper +L: linux-usb@vger.kernel.org +L: bcm-kernel-feedback-list@broadcom.com +S: Maintained +F: Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.yaml +F: drivers/usb/host/ehci-brcm.* + BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER M: Al Cooper L: linux-kernel@vger.kernel.org diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 55bdfdf11e4c..973386bbb522 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -97,6 +97,26 @@ config USB_XHCI_TEGRA endif # USB_XHCI_HCD +config USB_EHCI_BRCMSTB + tristate + +config USB_BRCMSTB + tristate "Broadcom STB USB support" + depends on (ARCH_BRCMSTB && PHY_BRCM_USB) || COMPILE_TEST + select USB_OHCI_HCD_PLATFORM if USB_OHCI_HCD + select USB_EHCI_BRCMSTB if USB_EHCI_HCD + select USB_XHCI_PLATFORM if USB_XHCI_HCD + help + Enables support for XHCI, EHCI and OHCI host controllers + found in Broadcom STB SoC's. + + To compile these drivers as modules, choose M here: the + modules will be called ohci-platform.ko, ehci-brcm.ko and + xhci-plat-hcd.ko + + Disabling this will keep the controllers and corresponding + PHYs powered down. + config USB_EHCI_HCD tristate "EHCI HCD (USB 2.0) support" depends on HAS_DMA && HAS_IOMEM diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index a7f0b8ff7179..265e26cf9209 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -59,6 +59,7 @@ obj-$(CONFIG_USB_EHCI_HCD_STI) += ehci-st.o obj-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o +obj-$(CONFIG_USB_EHCI_BRCMSTB) += ehci-brcm.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o