Skip to content
Snippets Groups Projects
  1. Dec 04, 2019
    • Yu Chen's avatar
      misc: hisi_hikey_usb: Driver to support usb functionality of Hikey960 · 9492649c
      Yu Chen authored and Bryan O'Donoghue's avatar Bryan O'Donoghue committed
      The HiKey960 has a fairly complex USB configuration due to it
      needing to support a USB-C port for host/device mode and multiple
      USB-A ports in host mode using a single USB controller.
      
      See schematics here:
        https://github.com/96boards/documentation/raw/master/consumer/hikey/hikey960/hardware-docs/HiKey960_Schematics.pdf
      
      
      
      This driver acts as a usb-role-switch intermediary, intercepting
      the role switch notifications from the tcpm code, and passing
      them on to the dwc3 core.
      
      In doing so, it also controls the onboard hub and power gpios in
      order to properly route the data lines between the USB-C port
      and the onboard hub to the USB-A ports.
      
      NOTE: It was noted that controlling the TYPEC_VBUS_POWER_OFF and
      TYPEC_VBUS_POWER_ON values here is not reccomended. I'm looking
      for a way to remove that bit from the logic here, but wanted to
      still get feedback on this approach.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      CC: ShuFan Lee <shufan_lee@richtek.com>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: Yu Chen <chenyu56@huawei.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Jun Li <lijun.kernel@gmail.com>
      Cc: Valentin Schneider <valentin.schneider@arm.com>
      Cc: Jack Pham <jackp@codeaurora.org>
      Cc: linux-usb@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Signed-off-by: default avatarYu Chen <chenyu56@huawei.com>
      [jstultz: Major rework to make the driver a usb-role-switch
                intermediary]
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Change-Id: Icf381520abd46d083750d01f91e478321560fbf9
    • Yu Chen's avatar
      dt-bindings: misc: Add bindings for HiSilicon usb hub and data role switch... · a9fccc8c
      Yu Chen authored and Bryan O'Donoghue's avatar Bryan O'Donoghue committed
      dt-bindings: misc: Add bindings for HiSilicon usb hub and data role switch functionality on HiKey960
      
      This patch adds binding documentation to support usb hub and usb
      data role switch of Hisilicon HiKey960 Board.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      CC: ShuFan Lee <shufan_lee@richtek.com>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: Yu Chen <chenyu56@huawei.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Jun Li <lijun.kernel@gmail.com>
      Cc: Valentin Schneider <valentin.schneider@arm.com>
      Cc: Jack Pham <jackp@codeaurora.org>
      Cc: linux-usb@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Signed-off-by: default avatarYu Chen <chenyu56@huawei.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Change-Id: I3f111b39b7a982b3489549076412a2f7c3c3d008
      a9fccc8c
    • John Stultz's avatar
      usb: dwc3: Rework resets initialization to be more flexible · 944aad3d
      John Stultz authored and Bryan O'Donoghue's avatar Bryan O'Donoghue committed
      
      The dwc3 core binding specifies one reset.
      
      However some variants of the hardware may have more. Previously
      this was handled by using the dwc3-of-simple glue driver, but
      that resulted in a proliferation of bindings for for every
      variant, when the only difference was the clocks and resets
      lists.
      
      So this patch reworks the reading of the resets to fetch all the
      resets specified in the dts together.
      
      This patch was recommended by Rob Herring <robh@kernel.org>
      as an alternative to creating multiple bindings for each variant
      of hardware.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      CC: ShuFan Lee <shufan_lee@richtek.com>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: Yu Chen <chenyu56@huawei.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Jun Li <lijun.kernel@gmail.com>
      Cc: Valentin Schneider <valentin.schneider@arm.com>
      Cc: Jack Pham <jackp@codeaurora.org>
      Cc: linux-usb@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Suggested-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Change-Id: I4a26492f19e857f3f9f29bcdab81458016f70977
      944aad3d
    • John Stultz's avatar
      usb: dwc3: Rework clock initialization to be more flexible · 08149c6d
      John Stultz authored and Bryan O'Donoghue's avatar Bryan O'Donoghue committed
      
      The dwc3 core binding specifies three clocks:
        ref, bus_early, and suspend
      
      which are all controlled in the driver together.
      
      However some variants of the hardware my not have all three
      clks, or some may have more. Usually this was handled by using
      the dwc3-of-simple glue driver, but that resulted in a
      proliferation of bindings for for every variant, when the only
      difference was the clocks and resets lists.
      
      So this patch reworks the reading of the clks from the dts to
      use devm_clk_bulk_get_all() will will fetch all the clocks
      specified in the dts together.
      
      This patch was recommended by Rob Herring <robh@kernel.org>
      as an alternative to creating multiple bindings for each variant
      of hardware.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      CC: ShuFan Lee <shufan_lee@richtek.com>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: Yu Chen <chenyu56@huawei.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Jun Li <lijun.kernel@gmail.com>
      Cc: Valentin Schneider <valentin.schneider@arm.com>
      Cc: Jack Pham <jackp@codeaurora.org>
      Cc: linux-usb@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Suggested-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Change-Id: I3319bec8253edc131d772ca66dc9335435b06424
      08149c6d
    • John Stultz's avatar
      dt-bindings: usb: dwc3: Allow clock list & resets to be more flexible · cfcebc99
      John Stultz authored and Bryan O'Donoghue's avatar Bryan O'Donoghue committed
      
      Rather then adding another device specific binding to support
      hikey960, Rob Herring suggested we expand the current dwc3
      binding to allow for variable numbers of clocks and resets.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      CC: ShuFan Lee <shufan_lee@richtek.com>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: Yu Chen <chenyu56@huawei.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Jun Li <lijun.kernel@gmail.com>
      Cc: Valentin Schneider <valentin.schneider@arm.com>
      Cc: Jack Pham <jackp@codeaurora.org>
      Cc: linux-usb@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Suggested-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Change-Id: I0176989314d7b7e6ea586f5036f072442f7e34e1
      cfcebc99
    • John Stultz's avatar
      usb: dwc3: Add support for role-switch-default-mode binding · 0f1027ef
      John Stultz authored and Bryan O'Donoghue's avatar Bryan O'Donoghue committed
      
      Support the new role-switch-default-mode binding for configuring
      the default role the controller assumes as when the usb role is
      USB_ROLE_NONE
      
      This patch was split out from a larger patch originally by
      Yu Chen <chenyu56@huawei.com>
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      CC: ShuFan Lee <shufan_lee@richtek.com>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: Yu Chen <chenyu56@huawei.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Jun Li <lijun.kernel@gmail.com>
      Cc: Valentin Schneider <valentin.schneider@arm.com>
      Cc: Jack Pham <jackp@codeaurora.org>
      Cc: linux-usb@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Change-Id: Ic6e4df1109b350deaecdc69f667d49ce91d599f3
      0f1027ef
    • John Stultz's avatar
      dt-bindings: usb: generic: Add role-switch-default-mode binding · 699ce60b
      John Stultz authored and Bryan O'Donoghue's avatar Bryan O'Donoghue committed
      
      Add binding to configure the default role the controller
      assumes is host mode when the usb role is USB_ROLE_NONE.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      CC: ShuFan Lee <shufan_lee@richtek.com>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: Yu Chen <chenyu56@huawei.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Jun Li <lijun.kernel@gmail.com>
      Cc: Valentin Schneider <valentin.schneider@arm.com>
      Cc: Jack Pham <jackp@codeaurora.org>
      Cc: linux-usb@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Change-Id: I6ac1d9c56039d76d924148e29a5e4b0bb304ed0f
      699ce60b
    • Yu Chen's avatar
      usb: dwc3: Registering a role switch in the DRD code. · e623e22f
      Yu Chen authored and Bryan O'Donoghue's avatar Bryan O'Donoghue committed
      
      The Type-C drivers use USB role switch API to inform the
      system about the negotiated data role, so registering a role
      switch in the DRD code in order to support platforms with
      USB Type-C connectors.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      CC: ShuFan Lee <shufan_lee@richtek.com>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: Yu Chen <chenyu56@huawei.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Jun Li <lijun.kernel@gmail.com>
      Cc: Valentin Schneider <valentin.schneider@arm.com>
      Cc: Jack Pham <jackp@codeaurora.org>
      Cc: linux-usb@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Suggested-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarYu Chen <chenyu56@huawei.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Change-Id: Ibd89b7eb3e59688895a2d317f3515e6d2705c6f3
      e623e22f
    • Bryan O'Donoghue's avatar
      dt-bindings: connector: Improve the english of the initial description · 92b56677
      Bryan O'Donoghue authored
      
      The description lacks a few indefinite articles when reading and as a
      result is a bit clunky to read. Introduce a few indefinite articles to
      appease the grammar gods.
      
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Chanwoo Choi <cw00.choi@samsung.com>
      Cc: linux-usb@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      92b56677
    • Bryan O'Donoghue's avatar
      usb: common: usb-conn-gpio: Don't log an error on probe deferral · 306366c4
      Bryan O'Donoghue authored
      
      This patch makes the printout of the error message for failing to get a
      VBUS regulator handle conditional on the error code being something other
      than -EPROBE_DEFER.
      
      Deferral is a normal thing, we don't need an error message for this.
      
      Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: Nagarjuna Kristam <nkristam@nvidia.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: linux-usb@vger.kernel.org
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      306366c4
  2. Dec 03, 2019
  3. Nov 27, 2019
  4. Nov 25, 2019
Loading