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: 176402 Delivered-To: patches@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6783549ill; Tue, 15 Oct 2019 20:33:43 -0700 (PDT) X-Received: by 2002:a17:90a:2044:: with SMTP id n62mr2192627pjc.140.1571196823895; Tue, 15 Oct 2019 20:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571196823; cv=none; d=google.com; s=arc-20160816; b=G0cIQjzhb2yDrSFHdTUr6dE8n23iVsl+7VQsJTrnGLjmlnV7qXlkpGY0j3YaIv2Q9c OxG0leYc1IdDY/4q+m1ZWLCWNWnboE+oNBugIHZ3xRN3S8V6ecCOWHFKDB2rNFOXJszB FBSX0ZDhyBzq2KuvUmuucg9Fst5QcB+6y+NDyI3WpQezfHq3pLb19gK+pCLLMIc8vvX7 TxZzduz3fOqorLqy6Q3IiaebPIXCkKhbRzUlEtlvn0O0hD9St+4RqB3I6uTdT04+4yeC vHKz1Io31lobjOTUuk0dKmeKS4jkc3yripriHkNw+kTyRxewR5+dtzN8Xhiw2zPpWW5a L3fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=t2p37ay5nCl2I96qOVhX0P3NjGh9D6Cr7Q7PF/xIWq4=; b=Ia1/ghnG5eZCQ+DGzpLj9D4akUEl9VNk5rM420e+QW755MoH6HfXsAq3WoWl5b+Eg9 l8+8jRLOKLbmR5efNgeeOiKxfKAuAJ2nQez9apgTfxcGTYGQLmCE5EaeCH0lTyvwv/1C /eja4EjnC2Cd5iC/B4krbusPBUrJ7umBx1reA94yPt3EGs98zqTKI51kb6TlDNyMZJig 95sinUq44eE4xBOPz+A9GzlzCMAT/+hOQxs4P4phJB3avTxMu0WF6FA5n9a7OaexIF2e XeORCC2IgYoxBYMMdK1rOzcJ4v7uBdFHx00/9Ab/JUlrqNaNS0RdO0Dvk0R8+U5CpNd2 Ap1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CZiMrOj2; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o63sor22028573pfb.59.2019.10.15.20.33.43 for (Google Transport Security); Tue, 15 Oct 2019 20:33:43 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CZiMrOj2; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=EXfT/u1i6+JMhpJyvWXKDoCLVyMgi+5eMUuoiV373bY9+8B0t6InEbmZlZ/4LuU4jj F7JmSTdoFUdWabA/jj44Ak+eOeF9gIU4kNHG3iQnnmz6B07TUJ42eRaeV0HaC4GVG0wh 2DzipCkUOaPW8g7eN88t4WSmzl+4egrVi0aVd8qJ2DUh7ak0cIzAYdbaYxWQEWqisHsI Vyjvc2ejOcCXYkPhR3PgDeaN3jhSRui2PZ4aizxq1CL4p98EAWv8JOdmA3G/zfzUBG31 tHwqd+YrSDt2GCwD9Z/JIC3GUkeLsndpgA0lQHJcazECNIldZR5AA+5y81oVGEjKErQk +fXA== X-Gm-Message-State: APjAAAWNQElSNS4eBVrbo0EzQhsitqbhlrQ5/gkHuMnHRTaXj4AlCGMS STZW0s6G2q9SLmNMDulKGuegq1p9 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) Return-Path: 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 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 -- 2.17.1