From patchwork Fri Nov 9 14:01:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 10676033 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6FD141709 for ; Fri, 9 Nov 2018 14:12:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59D122E4BA for ; Fri, 9 Nov 2018 14:12:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B2BB2E581; Fri, 9 Nov 2018 14:12:10 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 D97B32E4BA for ; Fri, 9 Nov 2018 14:12:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727939AbeKIXwO (ORCPT ); Fri, 9 Nov 2018 18:52:14 -0500 Received: from mail-yb1-f196.google.com ([209.85.219.196]:41965 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727802AbeKIXwO (ORCPT ); Fri, 9 Nov 2018 18:52:14 -0500 Received: by mail-yb1-f196.google.com with SMTP id t13-v6so1077573ybb.8; Fri, 09 Nov 2018 06:11:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=G42SJPWvg3e/7j5Qp8MnT98QJRSCpsI3xdm9poMgmvY=; b=KWY/g4gRfBzGH6QwwDzcH6zsOSTEb4f14J1qzwTy/opYjFaWn4XZebd1GHCLcoa9F3 SFdFX+9GvF+BaXlTeQiUGFy6RB4pcCCjVv9YG2vSg+zXfpA5zxhaLS0zg/xitdydUxrc LYyul+UNsTv2K7AMMl2BK1YkVgaxmL8/T/OB3ejZK7e55n30B71pZgqYi8steJRqun1s 2nDz4lSKm8gdLYPvZJTLdOpmHQHRfPqua+G8gs9jexVAoA/LqyX4x1tVIQ6TeIy/Qjnw 6LF/NyqN5Y35rF6mtUoigyCXIczrFoC5RVWcO+rT1xVRXD8LppEaht0DNHp6KyQEVBVR mImQ== 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; bh=G42SJPWvg3e/7j5Qp8MnT98QJRSCpsI3xdm9poMgmvY=; b=TKLTgjay/MyvGYZ6g5nOag/YrWCncTBEV3c7+01eylDX77+XV4nN5E4dTe1zwj7pul sv3qJwip5ljBomzBORCsRGqsVvGYpz3gUAlcH6jrxV3NFRj9vjkT0WPAFRl4U1UvtGKd lkfdoUCqzOCr0l/oCc3kQSEjYE5LAp84C/nMusxxlVZlm/YmZ4Vg5QYRk4ZLVUcIj4fa Dt1G/86mW87rUpgHZqisfO1oJE2EoRpa8TAKgHHDKy4T+DjYIskJTkf+f3CFOycREXJa JTBAwLD3wnoGO86JZ4Wh6IK+kpYP82cC2lNZCSJcksBqoW5BIY0zyta5NHLWl9NN1Li6 EkEg== X-Gm-Message-State: AGRZ1gIv5VquHFUJ8kwza4bi85huE/7KwKg1XfzJnoJ51l4Vpsu3e7nU 9fddRnCDhVbFyOPxcEE6zb4O2v09rZ0= X-Google-Smtp-Source: AJdET5eFKqLlpgRKUwDpRlAn3EB29zB0qde/b6fjyJQLnDOYDXT7AF3PEt42bRmxzMhloqn1wYEw9g== X-Received: by 2002:a25:49c1:: with SMTP id w184-v6mr8781771yba.457.1541772687901; Fri, 09 Nov 2018 06:11:27 -0800 (PST) Received: from stbsrv-and-3.and.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id c6-v6sm7301965ywh.34.2018.11.09.06.11.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Nov 2018 06:11:27 -0800 (PST) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , Alan Stern , Alban Bedel , Alex Elder , Andrew Morton , Arnd Bergmann , Avi Fishman , bcm-kernel-feedback-list@broadcom.com, Bjorn Andersson , Chunfeng Yun , "David S. Miller" , devicetree@vger.kernel.org, Dmitry Osipenko , Greg Kroah-Hartman , "Gustavo A. R. Silva" , Hans de Goede , James Hogan , Johan Hovold , Kees Cook , linux-usb@vger.kernel.org, Lu Baolu , Mark Rutland , Martin Blumenstingl , Mathias Nyman , Mathias Nyman , Mauro Carvalho Chehab , Rishabh Bhatnagar , Rob Herring , Roger Quadros Subject: [PATCH V4 0/5] Add XHCI, EHCI and OHCI support for Broadcom STB SoS's Date: Fri, 9 Nov 2018 09:01:55 -0500 Message-Id: <1541772120-40394-1-git-send-email-alcooperx@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP V4 - Rename hcd phy flag "suspend_without_phy_exit" to "phy_supplies_usb_clock" to more closely reflect the actaual hardware. Add the device tree property "suspend-without-phy-exit" to set the flag. Remove the code that sets the flag in the OHCI, EHCI and XHCI drivers which means that the ohci_platform.c driver can be used without any modifications. V3 - Based on feedback - Patch 3/6 In xhci-brcm.h, fixed incorrect function name when CONFIG_USB_XHCI_BRCM is not defined. Found by kbuild test robot. - Patch 4/6 In ohci-platform.c, use devm_kmemdup() instead of demv_kzalloc(). - Patch 5/6 In ehci-platform.c, use dma_coerce_mask_and_coherent() instead of dma_coerce_mask_and_coherent(). Remove unneeded #ifdef CONFIG_OF. V2 - Based on feedback, the functionality for XHCI and OHCI was moved from Broadcom platform drivers into the standard XHCI and OHCI platform drivers. The EHCI functionality still uses a Broadcom EHCI driver because of the workarounds needed for bugs in the EHCI controller. This adds support for the XHCI, EHCI and OHCI host controllers found in Broadcom STB SoC's. These drivers depend on getting access to the new Broadcom STB USB PHY driver through a device-tree phandle and will fail if the driver is not available. Al Cooper (5): dt-bindings: Add Broadcom STB USB support usb: core: Add ability to skip phy exit on suspend and init on resume usb: xhci: xhci-plat: Add support for Broadcom STB SoC's usb: ehci: Add new EHCI driver for Broadcom STB SoC's usb: host: Add ability to build new Broadcom STB USB drivers .../devicetree/bindings/usb/brcm,bcm7445-ehci.txt | 24 ++ Documentation/devicetree/bindings/usb/usb-hcd.txt | 3 + Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 + MAINTAINERS | 9 + arch/arm/configs/multi_v7_defconfig | 1 + arch/arm64/configs/defconfig | 1 + drivers/usb/core/hcd.c | 8 +- drivers/usb/core/phy.c | 28 +- drivers/usb/core/phy.h | 9 +- drivers/usb/host/Kconfig | 26 ++ drivers/usb/host/Makefile | 18 +- drivers/usb/host/ehci-brcm.c | 286 +++++++++++++++++++++ drivers/usb/host/xhci-brcm.c | 16 ++ drivers/usb/host/xhci-brcm.h | 16 ++ drivers/usb/host/xhci-plat.c | 8 + include/linux/usb/hcd.h | 6 + 16 files changed, 439 insertions(+), 21 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.txt create mode 100644 drivers/usb/host/ehci-brcm.c create mode 100644 drivers/usb/host/xhci-brcm.c create mode 100644 drivers/usb/host/xhci-brcm.h