Chunfeng Yun
5aba179c34
usb: mtu3: fix the failure of qmu stop
...
This happens when do stress test of uvc stream on/off which will
enable/disable endpoints. uvc has four tx requests, and may disable
endpoint between queue tx requests as following:
enable ep --> start qmu
queue tx request0
queue tx request1
queue tx request2 --> resume qmu
disable ep --> stop qmu may fail [1]
queue tx request3 --> will resume qmu, may cause qmu can't work
when enable ep next time [2]
[1]: when the tx fifo has some data to transmit, and
try to stop qmu (stop ep) meanwhile resume qmu (queue tx request),
it may cause stop qmu timeout, then can be fixed by flushing fifo
when stop qmu.
[2]: it resumes qmu again, shall stop qmu again.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reported-by: Min Guo <min.guo@mediatek.com >
Link: https://lore.kernel.org/r/20230119033322.21426-1-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-19 14:12:08 +01:00
Linus Walleij
3e679bde52
usb: fotg210-udc: Implement VBUS session
...
Implement VBUS session handling for FOTG210. This is
mainly used by the UDC driver which needs to call down to
the FOTG210 core and enable/disable VBUS, as this needs to be
handled outside of the HCD and UDC drivers, by platform
specific glue code.
The Gemini has a special bit in a system register to turn
VBUS on and off so we implement this in the FOTG210 core.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-7-100388af9810@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-19 14:10:44 +01:00
Linus Walleij
816f518df2
usb: fotg210-udc: Assign of_node and speed on start
...
Follow the example set by other drivers to assign of_node
and speed to the driver when binding, also print bound
info akin to other UDC drivers.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-6-100388af9810@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-19 14:10:44 +01:00
Linus Walleij
bb5fe85609
usb: fotg210: Check role register in core
...
Read the role register and check that we are in host/peripheral
mode and issue warnings if we're not in the right role when
probing respective driver.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-5-100388af9810@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-19 14:10:44 +01:00
Linus Walleij
faaca43669
usb: fotg210: Move clock handling to core
...
Grab the optional silicon block clock, prepare and enable it in
the core before proceeding to prepare the host or peripheral
driver. This saves duplicate code and also uses the simple
devm_clk_get_optional_enabled() to do everything we really
want to do.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-4-100388af9810@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-19 14:10:44 +01:00
Linus Walleij
baef5330d3
usb: fotg210: Acquire memory resource in core
...
The subdrivers are obtaining and mapping the memory resource
separately. Create a common state container for the shared
resources and start populating this by acquiring the IO
memory resource and remap it and pass this to the subdrivers
for host and peripheral.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-3-100388af9810@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-19 14:10:43 +01:00
Linus Walleij
170da81aab
usb: fotg210: List different variants
...
There are at least two variants of the FOTG: FOTG200 and
FOTG210. Handle them in this driver and let's add
more quirks as we go along.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-2-100388af9810@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-19 14:10:43 +01:00
Linus Walleij
8867258e70
dt-bindings: usb: Correct and extend FOTG210 schema
...
It turns out that this IP block exists in at least two
incarnations: FOTG200 and FOTG210. The one in the Gemini
is FOTG200, so add the variants and rectify the binding
for Gemini.
This affects things such as the placement of certain
registers.
It remains to be seen how similar this block is to the
third USB block from Faraday, FUSB220.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-1-100388af9810@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-19 14:10:43 +01:00
Pawel Laszczak
82b0417e4b
usb: cdnsp: : add scatter gather support for ISOC endpoint
...
Patch implements scatter gather support for isochronous endpoint.
This fix is forced by 'commit e81e7f9a0e
("usb: gadget: uvc: add scatter gather support")'.
After this fix CDNSP driver stop working with UVC class.
Signed-off-by: Pawel Laszczak <pawell@cadence.com >
Reviewed-by: Peter Chen <peter.chen@kernel.org >
Link: https://lore.kernel.org/r/20221222090934.145140-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:30:17 +01:00
Badhri Jagan Sridharan
02b332a063
usb: typec: maxim_contaminant: Implement check_contaminant callback
...
Maxim TCPC has additional ADCs and low current(1ua) current source
to measure the impedance of CC and SBU pins. When tcpm invokes
the check_contaminant callback, Maxim TCPC measures the impedance
of the CC & SBU pins and when the impedance measured is less than
1MOhm, it is assumed that USB-C port is contaminated. CC comparators
are also checked to differentiate between presence of sink and
contaminant. Once USB-C is deemed to be contaminated, MAXIM TCPC
has additional hardware to disable normal DRP toggling cycle and
enable 1ua on CC pins once every 2.4secs/4.8secs. Maxim TCPC
interrupts AP once the impedance on the CC pin is above the
1MOhm threshold. The Maxim tcpc driver then signals TCPM_PORT_CLEAN
to restart toggling.
Renaming tcpci_maxim.c to tcpci_maxim_core.c and moving reg read/write
helper functions to the tcpci_maxim.h header file.
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Link: https://lore.kernel.org/r/20230114093246.1933321-3-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:29:23 +01:00
Badhri Jagan Sridharan
abc028a270
usb: typec: tcpci: Add callback for evaluating contaminant presence
...
This change adds callback to evaluate presence of contaminant in
the TCPCI layer.
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com >
Link: https://lore.kernel.org/r/20230114093246.1933321-2-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:29:23 +01:00
Badhri Jagan Sridharan
599f008c25
usb: typec: tcpm: Add callbacks to mitigate wakeups due to contaminant
...
On some of the TCPC implementations, when the Type-C port is exposed
to contaminants, such as water, TCPC stops toggling while reporting OPEN
either by the time TCPM reads CC pin status or during CC debounce
window. This causes TCPM to be stuck in TOGGLING state. If TCPM is made
to restart toggling, the behavior recurs causing redundant CPU wakeups
till the USB-C port is free of contaminant.
[206199.287817] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
[206199.640337] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
[206199.985789] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
(or)
[ 7853.867577] Start toggling
[ 7853.889921] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
[ 7855.698765] CC1: 0 -> 0, CC2: 0 -> 5 [state TOGGLING, polarity 0, connected]
[ 7855.698790] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
[ 7855.698826] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
[ 7855.703559] CC1: 0 -> 0, CC2: 5 -> 5 [state SNK_ATTACH_WAIT, polarity 0, connected]
[ 7855.856555] CC1: 0 -> 0, CC2: 5 -> 0 [state SNK_ATTACH_WAIT, polarity 0, disconnected]
[ 7855.856581] state change SNK_ATTACH_WAIT -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
[ 7855.856613] pending state change SNK_ATTACH_WAIT -> SNK_UNATTACHED @ 170 ms [rev3 NONE_AMS]
[ 7856.027744] state change SNK_ATTACH_WAIT -> SNK_UNATTACHED [delayed 170 ms]
[ 7856.181949] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
[ 7856.187896] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
[ 7857.645630] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
[ 7857.647291] CC1: 0 -> 0, CC2: 0 -> 5 [state TOGGLING, polarity 0, connected]
[ 7857.647298] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
[ 7857.647310] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS]
[ 7857.808106] CC1: 0 -> 0, CC2: 5 -> 0 [state SNK_ATTACH_WAIT, polarity 0, disconnected]
[ 7857.808123] state change SNK_ATTACH_WAIT -> SNK_ATTACH_WAIT [rev3 NONE_AMS]
[ 7857.808150] pending state change SNK_ATTACH_WAIT -> SNK_UNATTACHED @ 170 ms [rev3 NONE_AMS]
[ 7857.978727] state change SNK_ATTACH_WAIT -> SNK_UNATTACHED [delayed 170 ms]
To mitigate redundant TCPM wakeups, TCPCs which do have the needed hardware
can implement the check_contaminant callback which is invoked by TCPM
to evaluate for presence of contaminant. Lower level TCPC driver can
restart toggling through TCPM_PORT_CLEAN event when the driver detects
that USB-C port is free of contaminant. check_contaminant callback also
passes the disconnect_while_debounce flag which when true denotes that
the CC pins transitioned to OPEN state during the CC debounce window.
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com >
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20230114093246.1933321-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:29:23 +01:00
Prashant Malani
6681e43f50
usb: typec: Make bus switch code retimer-aware
...
Since ports can have retimers associated with them, update the Type-C
alternate mode bus code to also set retimer state when the switch state
is updated.
While we are here, make the typec_retimer_dev_type declaration in the
retimer.h file as extern, so that the header file can be successfully
included in the bus code without redeclaration compilation errors.
Signed-off-by: Prashant Malani <pmalani@chromium.org >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20230112221609.540754-4-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:29:00 +01:00
Prashant Malani
2c8cb236ed
usb: typec: Add wrapper for bus switch set code
...
Add a wrapper that calls the set() function for various switches
associated with a port altmode.
Right now, it just wraps the existing typec_mux_set() command,
but it can be expanded to include other switches in future patches.
No functional changes introduced by this patch.
Signed-off-by: Prashant Malani <pmalani@chromium.org >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20230112221609.540754-3-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:29:00 +01:00
Prashant Malani
2476de8288
usb: typec: Add retimer handle to port altmode
...
Just like it does with muxes, the Type-C bus code can update the state
of connected retimers (especially when altmode-related transitions
occur). Add a retimer handle to the port altmode struct to enable this.
Signed-off-by: Prashant Malani <pmalani@chromium.org >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20230112221609.540754-2-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:29:00 +01:00
Petlozu Pravareshwar
a30951d31b
xhci: tegra: USB2 pad power controls
...
Program USB2 pad PD controls during port connect/disconnect, port
suspend/resume, and test mode, to reduce power consumption on
disconnect or suspend.
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com >
Co-developed-by: Jim Lin <jilin@nvidia.com >
Signed-off-by: Jim Lin <jilin@nvidia.com >
Acked-by: Thierry Reding <treding@nvidia.com >
Reviewed-by: Jon Hunter <jonathanh@nvidia.com >
Tested-by: Jon Hunter <jonathanh@nvidia.com >
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com >
Link: https://lore.kernel.org/r/20221111101813.32482-4-jilin@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:28:17 +01:00
Jim Lin
2cbe475fe7
xhci: hub: export symbol on xhci_hub_control
...
XHCI host drivers may override the default xhci_hub_control() with
their own device specific function. To allow these host drivers to
call the xhci_hub_control() function from within their own
hub_control() callback and be built as a module, export the symbol
for xhci_hub_control.
Signed-off-by: Jim Lin <jilin@nvidia.com >
Reviewed-by: Jon Hunter <jonathanh@nvidia.com >
Tested-by: Jon Hunter <jonathanh@nvidia.com >
Acked-by: Thierry Reding <treding@nvidia.com >
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com >
Link: https://lore.kernel.org/r/20221111101813.32482-3-jilin@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:28:17 +01:00
Jim Lin
592338dde8
xhci: Add hub_control to xhci_driver_overrides
...
Add a hub_control() callback to the xhci_driver_overrides structure to
allow host drivers to override the default hub_control function. This
is required for Tegra which requires device specific actions for power
management to be executed during USB state transitions.
Signed-off-by: Jim Lin <jilin@nvidia.com >
Reviewed-by: Jon Hunter <jonathanh@nvidia.com >
Tested-by: Jon Hunter <jonathanh@nvidia.com >
Acked-by: Thierry Reding <treding@nvidia.com >
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com >
Link: https://lore.kernel.org/r/20221111101813.32482-2-jilin@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:28:17 +01:00
Sing-Han Chen
ee0e40efc4
usb: host: xhci-tegra: Add Tegra234 XHCI support
...
This change adds Tegra234 XUSB host mode controller support.
In Tegra234, some of the registers have moved to bar2 space.
The new soc variable has_bar2 indicates the chip with bar2
area. This patch adds new reg helper to let the driver reuse
the same code for those chips with bar2 support.
Signed-off-by: Sing-Han Chen <singhanc@nvidia.com >
Co-developed-by: Wayne Chang <waynec@nvidia.com >
Signed-off-by: Wayne Chang <waynec@nvidia.com >
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Link: https://lore.kernel.org/r/20230111110450.24617-7-jonathanh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:27:42 +01:00
Sing-Han Chen
d8163a32ca
phy: tegra: xusb: Add Tegra234 support
...
Add support for the XUSB pad controller found on Tegra234 SoCs. It is
mostly similar to the same IP found on Tegra194, because most of
the Tegra234 XUSB PADCTL registers definition and programming sequence
are the same as Tegra194, Tegra234 XUSB PADCTL can share the same
driver with Tegra186 and Tegra194 XUSB PADCTL.
Introduce a new feature, USB2 HW tracking, for Tegra234.
The feature is to enable HW periodical PAD tracking which measure
and capture the electric parameters of USB2.0 PAD.
Signed-off-by: Sing-Han Chen <singhanc@nvidia.com >
Co-developed-by: Wayne Chang <waynec@nvidia.com >
Signed-off-by: Wayne Chang <waynec@nvidia.com >
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Link: https://lore.kernel.org/r/20230111110450.24617-6-jonathanh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:27:42 +01:00
Wayne Chang
71d9e89958
phy: tegra: xusb: Disable trk clk when not in use
...
Pad tracking is a one-time calibration for Tegra186 and Tegra194.
Clk should be disabled after calibration.
Disable clk after calibration.
While at it add 100us delay for HW recording the calibration value.
Signed-off-by: Wayne Chang <waynec@nvidia.com >
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Link: https://lore.kernel.org/r/20230111110450.24617-5-jonathanh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:27:41 +01:00
Wayne Chang
1b17df9973
arm64: tegra: Enable XUSB host function on Jetson AGX Orin
...
This commit enables XUSB host and pad controller on Jetson AGX Orin.
Signed-off-by: Wayne Chang <waynec@nvidia.com >
Signed-off-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Link: https://lore.kernel.org/r/20230111110450.24617-4-jonathanh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:27:41 +01:00
Wayne Chang
2648f68bd0
dt-bindings: usb: Add NVIDIA Tegra234 XUSB host controller binding
...
Add device-tree binding documentation for the XUSB host controller present
on Tegra234 SoC. This controller supports the USB 3.1 specification.
Signed-off-by: Wayne Chang <waynec@nvidia.com >
Signed-off-by: Thierry Reding <treding@nvidia.com >
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230111110450.24617-2-jonathanh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:27:24 +01:00
Daniel Scally
4a0192c01e
usb: gadget: usb: Remove "default" from color matching attributes
...
Color matching attributes in the configfs for UVC are named with the
phrase "default". The implication of that is that they will only be
used _with_ the default color matching descriptor, and that will
shortly no longer be the case.
Remove the "default" from the color matching descriptor attribute
variables.
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
Link: https://lore.kernel.org/r/20221213083736.2284536-2-dan.scally@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:26:43 +01:00
Lucas Stach
263b628ff9
dt-bindings: usb: dwc3-imx8mp: add power domain property
...
The USB controllers in the i.MX8MP are located inside the HSIO
power domain. Add the power-domains property to the DT binding
to be able to describe the hardware properly.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230110180804.594462-1-l.stach@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:24:00 +01:00
Jun Nie
481735d647
usb: typec: tipd: Support wakeup
...
Enable wakeup when pluging or unpluging USB cable. It is up to other
components to hold system in active mode, such as display, so that
user can receive the notification.
Signed-off-by: Jun Nie <jun.nie@linaro.org >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org >
Link: https://lore.kernel.org/r/20230105075058.924680-2-jun.nie@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:23:47 +01:00
Jun Nie
26fe745063
dt-bindings: usb: tps6598x: Add wakeup property
...
Add wakeup property description. People can enable it with adding
the property.
Signed-off-by: Jun Nie <jun.nie@linaro.org >
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230105075058.924680-1-jun.nie@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:23:47 +01:00
Greg Kroah-Hartman
30374434ed
USB: fix memory leak with using debugfs_lookup()
...
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic at
once.
Cc: Alan Stern <stern@rowland.harvard.edu >
Cc: Jilin Yuan <yuanjilin@cdjrlc.com >
Link: https://lore.kernel.org/r/20230106152828.3790902-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:23:31 +01:00
Herve Codina
a6d7b7b095
MAINTAINERS: add the Renesas RZ/N1 USBF controller entry
...
After contributing the driver, add myself as the maintainer
for Renesas RZ/N1 USBF controller.
Signed-off-by: Herve Codina <herve.codina@bootlin.com >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/20230105152257.310642-6-herve.codina@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:22:33 +01:00
Herve Codina
e120690434
ARM: dts: r9a06g032: Add the USBF controller node
...
Add the USBF controller available in the r9a06g032 SoC.
Signed-off-by: Herve Codina <herve.codina@bootlin.com >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/20230105152257.310642-5-herve.codina@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:22:33 +01:00
Herve Codina
3e6e14ffde
usb: gadget: udc: add Renesas RZ/N1 USBF controller support
...
Add support for the Renesas USBF controller.
This controller is an USB2.0 UDC controller available in the
Renesas r9a06g032 SoC (RZ/N1 family).
Signed-off-by: Herve Codina <herve.codina@bootlin.com >
Link: https://lore.kernel.org/r/20230105152257.310642-4-herve.codina@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:22:32 +01:00
Herve Codina
e9fee814b0
soc: renesas: r9a06g032-sysctrl: Handle h2mode setting based on USBF presence
...
The CFG_USB[H2MODE] allows to switch the USB configuration. The
configuration supported are:
- One host and one device
or
- Two hosts
Set CFG_USB[H2MODE] based on the USBF controller (USB device)
availability.
Signed-off-by: Herve Codina <herve.codina@bootlin.com >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/20230105152257.310642-3-herve.codina@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:22:32 +01:00
Herve Codina
a90498e560
dt-bindings: usb: add the Renesas RZ/N1 USBF controller
...
The Renesas RZ/N1 USBF controller is an USB2.0 device controller
(UDC) available in the Renesas r9a06g032 SoC (RZ/N1 family).
Signed-off-by: Herve Codina <herve.codina@bootlin.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/20230105152257.310642-2-herve.codina@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:22:32 +01:00
Andy Shevchenko
8b9c6ab156
usb: typec: intel_pmc_mux: Deduplicate ACPI matching in probe
...
There is no need to call acpi_dev_present() followed by
acpi_dev_get_first_match_dev() as they both do the same
with only difference in the returning value. Instead,
call the latter and check its result.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20230102202933.15968-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:21:45 +01:00
Andy Shevchenko
c3194949ae
usb: typec: intel_pmc_mux: Don't leak the ACPI device reference count
...
When acpi_dev_get_memory_resources() fails, the reference count is
left bumped. Drop it as it's done in the other error paths.
Fixes: 43d596e322 ("usb: typec: intel_pmc_mux: Check the port status before connect")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20230102202933.15968-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:21:44 +01:00
Xu Yang
ccb0beb43a
usb: typec: tcpci: Request IRQ with IRQF_SHARED
...
Under resource constraints, this interrupt may use other interrupt line
or this interrupt line may be shared with other devices as long as they
meet the sharing requirements. Besides, This irq flag will not cause other
side effect if tcpci driver is the only user.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20221214022334.2520677-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:21:31 +01:00
Peng Fan
2c03f7f1ad
dt-bindings: usb: usbmisc-imx: add i.MX8MM usbmisc
...
Add fsl,imx8mm-usbmisc compatible for i.MX8MM
Signed-off-by: Peng Fan <peng.fan@nxp.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221223031012.92932-2-peng.fan@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:20:46 +01:00
Peng Fan
1c796d93b5
dt-bindings: usb: ci-hdrc-usb2: add i.MX8MM compatible
...
Add fsl,imx8mm-usb compatible for i.MX8MM
Signed-off-by: Peng Fan <peng.fan@nxp.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20221223031012.92932-1-peng.fan@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:20:46 +01:00
Ricardo Ribalda
28e1ff70a0
USB: Improve usb_fill_* documentation
...
Document the transfer buffer requirement. That is, the buffer must be
DMAble - otherwise data corruption might occur.
Acked-by: Randy Dunlap <rdunlap@infradead.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org >
Acked-by: Alan Stern <stern@rowland.harvard.edu >
Link: https://lore.kernel.org/r/20221220-usb-dmadoc-v4-0-74a045bf14f4@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:19:40 +01:00
Wayne Chang
2582d629c9
usb: gadget: xudc: Refactor update data role work
...
The notification call chain should be registered after the device gets
ready. Otherwise, we might get errors when setting data roles in an
incomplete system.
This patch refactors update data role work and register the notifier
call chain after the system gets ready.
Signed-off-by: Wayne Chang <waynec@nvidia.com >
Signed-off-by: Haotien Hsu <haotienh@nvidia.com >
Link: https://lore.kernel.org/r/20221216042026.98517-1-haotienh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:19:09 +01:00
Biju Das
569d23e9bf
usb: typec: hd3ss3220: Add polling support
...
Some platforms(for eg: RZ/V2M EVK) does not have interrupt pin
connected to HD3SS3220. Add polling support for role detection.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20221209171836.71610-3-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:18:51 +01:00
Biju Das
bf58a687db
dt-bindings: usb: ti,hd3ss3220: Update interrupt property as optional
...
On some platforms(for eg: RZ/V2M EVK), interrupt is not populated. Update
the binding to make interrupt property as optional.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Acked-by: Rob Herring <robh@kernel.org >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/20221209171836.71610-2-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-17 17:18:51 +01:00
Greg Kroah-Hartman
c2fb9a214d
Merge 6.2-rc3 into usb-next
...
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-09 07:47:32 +01:00
Linus Torvalds
b7bfaa761d
Linux 6.2-rc3
v6.2-rc3
2023-01-08 11:49:43 -06:00
Linus Torvalds
93928d485d
Merge tag 'powerpc-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
...
Pull powerpc fixes from Michael Ellerman:
- Three fixes for various bogosity in our linker script, revealed
by the recent commit which changed discard behaviour with some
toolchains.
* tag 'powerpc-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/vmlinux.lds: Don't discard .comment
powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds
powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT
2023-01-08 06:55:08 -07:00
Linus Torvalds
e9ffbf16ca
Merge tag 'fixes-2023-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
...
Pull memblock fixes from Mike Rapoport:
"Small fixes in kernel-doc and tests:
- Fix kernel-doc for memblock_phys_free() to use correct names for
the counterpart allocation methods
- Fix compilation error in memblock tests"
* tag 'fixes-2023-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
memblock: Fix doc for memblock_phys_free
memblock tests: Fix compilation error.
2023-01-08 02:54:24 -08:00
Linus Torvalds
9b43a525db
Merge tag 'nfs-for-6.2-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
...
Pull NFS client fixes from Trond Myklebust:
- Fix a race in the RPCSEC_GSS upcall code that causes hung RPC calls
- Fix a broken coalescing test in the pNFS file layout driver
- Ensure that the access cache rcu path also applies the login test
- Fix up for a sparse warning
* tag 'nfs-for-6.2-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
NFS: Fix up a sparse warning
NFS: Judge the file access cache's timestamp in rcu path
pNFS/filelayout: Fix coalescing test for single DS
SUNRPC: ensure the matching upcall is in-flight upon downcall
2023-01-07 10:38:11 -08:00
Linus Torvalds
f18fca98ac
Merge tag '6.2-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
...
Pull cifs fixes from Steve French:
"cifs/smb3 client fixes:
- two multichannel fixes
- three reconnect fixes
- unmap fix"
* tag '6.2-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: fix interface count calculation during refresh
cifs: refcount only the selected iface during interface update
cifs: protect access of TCP_Server_Info::{dstaddr,hostname}
cifs: fix race in assemble_neg_contexts()
cifs: ignore ipc reconnect failures during dfs failover
cifs: Fix kmap_local_page() unmapping
2023-01-07 10:26:34 -08:00
Linus Torvalds
0007c04038
Merge tag 'devicetree-fixes-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
...
Pull devicetree fixes from Rob Herring:
- Fix DT memory scanning for some MIPS boards when memory is not
specified in DT
- Redo CONFIG_CMDLINE* handling for missing /chosen node. The first
attempt broke PS3 (and possibly other PPC platforms).
- Fix constraints in QCom Soundwire schema
* tag 'devicetree-fixes-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
of: fdt: Honor CONFIG_CMDLINE* even without /chosen node, take 2
Revert "of: fdt: Honor CONFIG_CMDLINE* even without /chosen node"
dt-bindings: soundwire: qcom,soundwire: correct sizes related to number of ports
of/fdt: run soc memory setup when early_init_dt_scan_memory fails
2023-01-07 10:20:33 -08:00
Linus Torvalds
c28bdeaf5d
Merge tag 'usb-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
...
Pull USB fixes from Greg KH:
"Here are some small USB driver fixes for 6.2-rc3 that resolve some
reported issues. They include:
- of-reported ulpi problem, so the offending commit is reverted
- dwc3 driver bugfixes for recent changes
- fotg210 fixes
Most of these have been in linux-next for a while, the last few were
on the mailing list for a long time and passed all the 0-day bot
testing so all should be fine with them as well"
* tag 'usb-6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: dwc3: gadget: Ignore End Transfer delay on teardown
usb: dwc3: xilinx: include linux/gpio/consumer.h
usb: fotg210-udc: fix error return code in fotg210_udc_probe()
usb: fotg210: fix OTG-only build
Revert "usb: ulpi: defer ulpi_register on ulpi_read_id timeout"
2023-01-07 10:12:42 -08:00