From patchwork Wed Oct 16 03:33:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 1177554 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="CZiMrOj2"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46tHx21dXgz9sPF for ; Wed, 16 Oct 2019 14:35:02 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403809AbfJPDdq (ORCPT ); Tue, 15 Oct 2019 23:33:46 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43426 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403801AbfJPDdp (ORCPT ); Tue, 15 Oct 2019 23:33:45 -0400 Received: by mail-pg1-f196.google.com with SMTP id i32so13390594pgl.10 for ; Tue, 15 Oct 2019 20:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=t2p37ay5nCl2I96qOVhX0P3NjGh9D6Cr7Q7PF/xIWq4=; b=CZiMrOj22KpXig6mUpaY9hbB9sHO+MhThVOQ64XRj3wpJWeBR+AJrWQuPn1sQz1fTo 9Ji4ZiOWf/zF8m8UU3517d0lQfbwTLvOxMsLwiIO/O5U/9w0WerrI6nsDQRwscldQTl9 jefXLMtsGdYavyw1U08uI6lZCGJoViEYfYmkqWJvhXNORoitZg2tfhFahziV9Vlid/0q 7/Cv3cpjUDo0h6vJHGhCyfqSX6njRAsocdpPread36r9t0TypKcUxpF4pSimCu2KMS0p w5r4WFQOKbyWDUnh0GiqHq71y6j8bubKR3lzjPFPvZHkC9GGQTsAmpBbkcw9XPlAVwbP qTgA== 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=t2p37ay5nCl2I96qOVhX0P3NjGh9D6Cr7Q7PF/xIWq4=; b=AHlSG081kGaPK+KpP3eBKt9aa5OTZ+71XfJ9ZuvHvzNFhXjzDno0nudZMSiitdTNZA 0YoK+EmgqIOFjhcWCG+FMFgsct7iI/xO8LgGFLTd+7t34Ym4OHzTUCvuHNs3BIp1wxZS jDm90S13WozqitJdK/ecTFV+JevFLFkLCtRF2B1Hei+BMgABe9ih0v6WNtx0bOGAvXZE ZFAIYStR94oKXcb5CjfZII2QeP7LbCSn15yu7EMBqZBAeK9vj40jBR/8Tz1+Gproq4Yc SNM7wwFzMOu+7M3p+INj/PPKr+amyC9uktIGUlOOt+iobyK7Zt/+fi5+pkfWVKyyfr7M iXrA== X-Gm-Message-State: APjAAAViIL9BsjlMpYUQUcfJNcCW4EMy66XvjxRjbpOIOX7EvY3ePrZV FiV8pKUm+lUh7E6F8589Tbm8Uw== X-Google-Smtp-Source: APXvYqzq0GZIVD2ew73AOT8Th33vq83I60KpAorY2062fa7GN5oPZBwvcUv/DhrYc1lqYdEHwGgmGw== X-Received: by 2002:a62:685:: with SMTP id 127mr40218403pfg.227.1571196823357; Tue, 15 Oct 2019 20:33:43 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id l23sm748356pjy.12.2019.10.15.20.33.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 20:33:42 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Greg Kroah-Hartman , Rob Herring , Mark Rutland , ShuFan Lee , Heikki Krogerus , Suzuki K Poulose , Chunfeng Yun , Yu Chen , Felipe Balbi , Hans de Goede , Andy Shevchenko , Jun Li , Valentin Schneider , Jack Pham , linux-usb@vger.kernel.org, devicetree@vger.kernel.org Subject: [RFC][PATCH v3 00/11] HiKey960 USB support Date: Wed, 16 Oct 2019 03:33:29 +0000 Message-Id: <20191016033340.1288-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org I'm just trying to pick up a patch series submitted previously by Yu Chen to get HiKey960 dev-board's USB functionality working. The current full patchset can be found here: https://git.linaro.org/people/john.stultz/android-dev.git/log/?id=305b332b46901c82d762e44d2ef8c96107a0c94e Previously I sent this series out as two separate series, to try to make the review a little easier. However, the partial series was causing some confusion as well, so this time I've sent almost all of it in one go. NOTE: I unfortunately don't have any deep knowledge of the hardware other then the previously submitted code and what I can intuit from testing, but I tried to document the previously undocumented bindings as best I could, fixed up a few minor checkpatch issues and tried to address previous feedback as best I could. I'd greatly appreciate feedback or thoughts! thanks -john New in v3: * Avoiding adding a hisi specific dwc3 binding and instead trying to make the dwc core binding more flexible as suggsted by Rob Herring. * Made the GCTL soft reset unconditional as suggested by Jack Pham. * Given the negative feedback on the usb class role-switch notifier method for the hub logic to hook into, I've reworked the hub logic to be an usb-role-switch intermediary. * Lots of minor fixups and cleanups, some reported by the kbuild test robot Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland CC: ShuFan Lee Cc: Heikki Krogerus Cc: Suzuki K Poulose Cc: Chunfeng Yun Cc: Yu Chen Cc: Felipe Balbi Cc: Hans de Goede Cc: Andy Shevchenko Cc: Jun Li Cc: Valentin Schneider Cc: Jack Pham Cc: linux-usb@vger.kernel.org Cc: devicetree@vger.kernel.org John Stultz (6): dt-bindings: usb: rt1711h: Add connector bindings dt-bindings: usb: dwc3: Allow clock list & resets to be more flexible usb: dwc3: Rework clock initialization to be more flexible usb: dwc3: Rework resets initialization to be more flexible dt-bindings: usb: generic: Add role-switch-default-host binding usb: dwc3: Add host-mode as default support Yu Chen (5): usb: dwc3: Execute GCTL Core Soft Reset while switch modes usb: dwc3: Increase timeout for CmdAct cleared by device controller usb: dwc3: Registering a role switch in the DRD code. dt-bindings: misc: Add bindings for HiSilicon usb hub and data role switch functionality on HiKey960 misc: hisi_hikey_usb: Driver to support usb functionality of Hikey960 .../bindings/misc/hisilicon-hikey-usb.txt | 40 ++++ .../devicetree/bindings/usb/dwc3.txt | 5 +- .../devicetree/bindings/usb/generic.txt | 5 + .../bindings/usb/richtek,rt1711h.txt | 29 +++ drivers/misc/Kconfig | 6 + drivers/misc/Makefile | 1 + drivers/misc/hisi_hikey_usb.c | 178 ++++++++++++++++++ drivers/usb/dwc3/Kconfig | 1 + drivers/usb/dwc3/core.c | 38 ++-- drivers/usb/dwc3/core.h | 6 + drivers/usb/dwc3/drd.c | 78 +++++++- drivers/usb/dwc3/gadget.c | 2 +- 12 files changed, 369 insertions(+), 20 deletions(-) create mode 100644 Documentation/devicetree/bindings/misc/hisilicon-hikey-usb.txt create mode 100644 drivers/misc/hisi_hikey_usb.c