Skip to content

Commit 42e3a58

Browse files
committed
Merge tag 'usb-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB driver updates from Greg KH: "Here's the big USB (and PHY) driver patchset for 4.1-rc1. Everything here has been in linux-next, and the full details are below in the shortlog. Nothing major, just the normal round of new drivers,api updates, and other changes, mostly in the USB gadget area, as usual" * tag 'usb-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (252 commits) drivers/usb/core: devio.c: Removed an uneeded space before tab usb: dwc2: host: sleep USB_RESUME_TIMEOUT during resume usb: chipidea: debug: add low power mode check before print registers usb: chipidea: udc: bypass pullup DP when gadget connect in OTG fsm mode usb: core: hub: use new USB_RESUME_TIMEOUT usb: isp1760: hcd: use new USB_RESUME_TIMEOUT usb: dwc2: hcd: use new USB_RESUME_TIMEOUT usb: host: sl811: use new USB_RESUME_TIMEOUT usb: host: r8a66597: use new USB_RESUME_TIMEOUT usb: host: oxu210hp: use new USB_RESUME_TIMEOUT usb: host: fusbh200: use new USB_RESUME_TIMEOUT usb: host: fotg210: use new USB_RESUME_TIMEOUT usb: host: isp116x: use new USB_RESUME_TIMEOUT usb: musb: use new USB_RESUME_TIMEOUT usb: host: uhci: use new USB_RESUME_TIMEOUT usb: host: ehci: use new USB_RESUME_TIMEOUT usb: host: xhci: use new USB_RESUME_TIMEOUT usb: define a generic USB_RESUME_TIMEOUT macro usb: musb: dsps: fix build on i386 when COMPILE_TEST is set ehci-hub: use USB_DT_HUB ...
2 parents 4fd48b4 + 00fe52d commit 42e3a58

File tree

157 files changed

+5626
-2834
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+5626
-2834
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
What: /config/usb-gadget/gadget/functions/printer.name
2+
Date: Apr 2015
3+
KernelVersion: 4.1
4+
Description:
5+
The attributes:
6+
7+
pnp_string - Data to be passed to the host in pnp string
8+
q_len - Number of requests per endpoint
9+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Device tree binding documentation for am816x USB PHY
2+
=========================
3+
4+
Required properties:
5+
- compatible : should be "ti,dm816x-usb-phy"
6+
- reg : offset and length of the PHY register set.
7+
- reg-names : name for the phy registers
8+
- clocks : phandle to the clock
9+
- clock-names : name of the clock
10+
- syscon: phandle for the syscon node to access misc registers
11+
- #phy-cells : from the generic PHY bindings, must be 1
12+
- syscon: phandle for the syscon node to access misc registers
13+
14+
Example:
15+
16+
usb_phy0: usb-phy@20 {
17+
compatible = "ti,dm8168-usb-phy";
18+
reg = <0x20 0x8>;
19+
reg-names = "phy";
20+
clocks = <&main_fapll 6>;
21+
clock-names = "refclk";
22+
#phy-cells = <0>;
23+
syscon = <&scm_conf>;
24+
};

Documentation/devicetree/bindings/phy/phy-miphy365x.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Required nodes : A sub-node is required for each channel the controller
2020
Required properties (port (child) node):
2121
- #phy-cells : Should be 1 (See second example)
2222
Cell after port phandle is device type from:
23-
- MIPHY_TYPE_SATA
24-
- MIPHY_TYPE_PCI
23+
- PHY_TYPE_SATA
24+
- PHY_TYPE_PCI
2525
- reg : Address and length of register sets for each device in
2626
"reg-names"
2727
- reg-names : The names of the register addresses corresponding to the
@@ -68,10 +68,10 @@ property, containing a phandle to the phy port node and a device type.
6868

6969
Example:
7070

71-
#include <dt-bindings/phy/phy-miphy365x.h>
71+
#include <dt-bindings/phy/phy.h>
7272

7373
sata0: sata@fe380000 {
7474
...
75-
phys = <&phy_port0 MIPHY_TYPE_SATA>;
75+
phys = <&phy_port0 PHY_TYPE_SATA>;
7676
...
7777
};

Documentation/devicetree/bindings/phy/samsung-phy.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ Required properties:
128128
- compatible : Should be set to one of the following supported values:
129129
- "samsung,exynos5250-usbdrd-phy" - for exynos5250 SoC,
130130
- "samsung,exynos5420-usbdrd-phy" - for exynos5420 SoC.
131+
- "samsung,exynos5433-usbdrd-phy" - for exynos5433 SoC.
131132
- "samsung,exynos7-usbdrd-phy" - for exynos7 SoC.
132133
- reg : Register offset and length of USB DRD PHY register set;
133134
- clocks: Clock IDs array as required by the controller
@@ -139,7 +140,7 @@ Required properties:
139140
PHY operations, associated by phy name. It is used to
140141
determine bit values for clock settings register.
141142
For Exynos5420 this is given as 'sclk_usbphy30' in CMU.
142-
- optional clocks: Exynos7 SoC has now following additional
143+
- optional clocks: Exynos5433 & Exynos7 SoC has now following additional
143144
gate clocks available:
144145
- phy_pipe: for PIPE3 phy
145146
- phy_utmi: for UTMI+ phy
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Allwinner sun9i USB PHY
2+
-----------------------
3+
4+
Required properties:
5+
- compatible : should be one of
6+
* allwinner,sun9i-a80-usb-phy
7+
- reg : a list of offset + length pairs
8+
- #phy-cells : from the generic phy bindings, must be 0
9+
- phy_type : "hsic" for HSIC usage;
10+
other values or absence of this property indicates normal USB
11+
- clocks : phandle + clock specifier for the phy clocks
12+
- clock-names : depending on the "phy_type" property,
13+
* "phy" for normal USB
14+
* "hsic_480M", "hsic_12M" for HSIC
15+
- resets : a list of phandle + reset specifier pairs
16+
- reset-names : depending on the "phy_type" property,
17+
* "phy" for normal USB
18+
* "hsic" for HSIC
19+
20+
Optional Properties:
21+
- phy-supply : from the generic phy bindings, a phandle to a regulator that
22+
provides power to VBUS.
23+
24+
It is recommended to list all clocks and resets available.
25+
The driver will only use those matching the phy_type.
26+
27+
Example:
28+
usbphy1: phy@00a01800 {
29+
compatible = "allwinner,sun9i-a80-usb-phy";
30+
reg = <0x00a01800 0x4>;
31+
clocks = <&usb_phy_clk 2>, <&usb_phy_clk 10>,
32+
<&usb_phy_clk 3>;
33+
clock-names = "hsic_480M", "hsic_12M", "phy";
34+
resets = <&usb_phy_clk 18>, <&usb_phy_clk 19>;
35+
reset-names = "hsic", "phy";
36+
status = "disabled";
37+
#phy-cells = <0>;
38+
};

Documentation/devicetree/bindings/usb/dwc3.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Optional properties:
1414
- phys: from the *Generic PHY* bindings
1515
- phy-names: from the *Generic PHY* bindings
1616
- tx-fifo-resize: determines if the FIFO *has* to be reallocated.
17+
- snps,usb3_lpm_capable: determines if platform is USB3 LPM capable
1718
- snps,disable_scramble_quirk: true when SW should disable data scrambling.
1819
Only really useful for FPGA builds.
1920
- snps,has-lpm-erratum: true when DWC3 was configured with LPM Erratum enabled

Documentation/devicetree/bindings/usb/renesas_usbhs.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ Optional properties:
1515
- phys: phandle + phy specifier pair
1616
- phy-names: must be "usb"
1717
- dmas: Must contain a list of references to DMA specifiers.
18-
- dma-names : Must contain a list of DMA names, "tx" or "rx".
18+
- dma-names : Must contain a list of DMA names:
19+
- tx0 ... tx<n>
20+
- rx0 ... rx<n>
21+
- This <n> means DnFIFO in USBHS module.
1922

2023
Example:
2124
usbhs: usb@e6590000 {

Documentation/devicetree/bindings/usb/usbmisc-imx.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Required properties:
55
- compatible: Should be one of below:
66
"fsl,imx6q-usbmisc" for imx6q
77
"fsl,vf610-usbmisc" for Vybrid vf610
8+
"fsl,imx6sx-usbmisc" for imx6sx
89
- reg: Should contain registers location and length
910

1011
Examples:

Documentation/usb/chipidea.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,24 @@ cat /sys/kernel/debug/ci_hdrc.0/registers
6969
----------------------
7070
"On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification
7171
July 27, 2012 Revision 2.0 version 1.1a"
72+
73+
2. How to enable USB as system wakeup source
74+
-----------------------------------
75+
Below is the example for how to enable USB as system wakeup source
76+
at imx6 platform.
77+
78+
2.1 Enable core's wakeup
79+
echo enabled > /sys/bus/platform/devices/ci_hdrc.0/power/wakeup
80+
2.2 Enable glue layer's wakeup
81+
echo enabled > /sys/bus/platform/devices/2184000.usb/power/wakeup
82+
2.3 Enable PHY's wakeup (optional)
83+
echo enabled > /sys/bus/platform/devices/20c9000.usbphy/power/wakeup
84+
2.4 Enable roothub's wakeup
85+
echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
86+
2.5 Enable related device's wakeup
87+
echo enabled > /sys/bus/usb/devices/1-1/power/wakeup
88+
89+
If the system has only one usb port, and you want usb wakeup at this port, you
90+
can use below script to enable usb wakeup.
91+
for i in $(find /sys -name wakeup | grep usb);do echo enabled > $i;done;
92+

Documentation/usb/gadget-testing.txt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ provided by gadgets.
1919
16. UAC1 function
2020
17. UAC2 function
2121
18. UVC function
22+
19. PRINTER function
2223

2324

2425
1. ACM function
@@ -726,3 +727,49 @@ with these patches:
726727
http://www.spinics.net/lists/linux-usb/msg99220.html
727728

728729
host: luvcview -f yuv
730+
731+
19. PRINTER function
732+
====================
733+
734+
The function is provided by usb_f_printer.ko module.
735+
736+
Function-specific configfs interface
737+
------------------------------------
738+
739+
The function name to use when creating the function directory is "printer".
740+
The printer function provides these attributes in its function directory:
741+
742+
pnp_string - Data to be passed to the host in pnp string
743+
q_len - Number of requests per endpoint
744+
745+
Testing the PRINTER function
746+
----------------------------
747+
748+
The most basic testing:
749+
750+
device: run the gadget
751+
# ls -l /devices/virtual/usb_printer_gadget/
752+
753+
should show g_printer<number>.
754+
755+
If udev is active, then /dev/g_printer<number> should appear automatically.
756+
757+
host:
758+
759+
If udev is active, then e.g. /dev/usb/lp0 should appear.
760+
761+
host->device transmission:
762+
763+
device:
764+
# cat /dev/g_printer<number>
765+
host:
766+
# cat > /dev/usb/lp0
767+
768+
device->host transmission:
769+
770+
# cat > /dev/g_printer<number>
771+
host:
772+
# cat /dev/usb/lp0
773+
774+
More advanced testing can be done with the prn_example
775+
described in Documentation/usb/gadget-printer.txt.

MAINTAINERS

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,8 @@ F: drivers/clocksource/arm_global_timer.c
14681468
F: drivers/i2c/busses/i2c-st.c
14691469
F: drivers/media/rc/st_rc.c
14701470
F: drivers/mmc/host/sdhci-st.c
1471+
F: drivers/phy/phy-miphy28lp.c
1472+
F: drivers/phy/phy-miphy365x.c
14711473
F: drivers/phy/phy-stih407-usb.c
14721474
F: drivers/phy/phy-stih41x-usb.c
14731475
F: drivers/pinctrl/pinctrl-st.c
@@ -2518,7 +2520,7 @@ F: Documentation/zh_CN/
25182520

25192521
CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER
25202522
M: Peter Chen <[email protected]>
2521-
T: git git://github.com/hzpeterchen/linux-usb.git
2523+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
25222524
25232525
S: Maintained
25242526
F: drivers/usb/chipidea/
@@ -10132,6 +10134,12 @@ S: Maintained
1013210134
F: drivers/net/usb/cdc_*.c
1013310135
F: include/uapi/linux/usb/cdc.h
1013410136

10137+
USB CHAOSKEY DRIVER
10138+
M: Keith Packard <[email protected]>
10139+
10140+
S: Maintained
10141+
F: drivers/usb/misc/chaoskey.c
10142+
1013510143
USB CYPRESS C67X00 DRIVER
1013610144
M: Peter Korsgaard <[email protected]>
1013710145
@@ -10212,7 +10220,7 @@ F: drivers/usb/host/ohci*
1021210220

1021310221
USB OTG FSM (Finite State Machine)
1021410222
M: Peter Chen <[email protected]>
10215-
T: git git://github.com/hzpeterchen/linux-usb.git
10223+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
1021610224
1021710225
S: Maintained
1021810226
F: drivers/usb/common/usb-otg-fsm.c

arch/arm/boot/dts/stih416.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "stih416-clock.dtsi"
1111
#include "stih416-pinctrl.dtsi"
1212

13-
#include <dt-bindings/phy/phy-miphy365x.h>
13+
#include <dt-bindings/phy/phy.h>
1414
#include <dt-bindings/interrupt-controller/arm-gic.h>
1515
#include <dt-bindings/reset-controller/stih416-resets.h>
1616
/ {
@@ -306,7 +306,7 @@
306306
reg = <0xfe380000 0x1000>;
307307
interrupts = <GIC_SPI 157 IRQ_TYPE_NONE>;
308308
interrupt-names = "hostc";
309-
phys = <&phy_port0 MIPHY_TYPE_SATA>;
309+
phys = <&phy_port0 PHY_TYPE_SATA>;
310310
phy-names = "sata-phy";
311311
resets = <&powerdown STIH416_SATA0_POWERDOWN>,
312312
<&softreset STIH416_SATA0_SOFTRESET>;

drivers/phy/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ config ARMADA375_USBCLUSTER_PHY
3535
depends on OF
3636
select GENERIC_PHY
3737

38+
config PHY_DM816X_USB
39+
tristate "TI dm816x USB PHY driver"
40+
depends on ARCH_OMAP2PLUS
41+
select GENERIC_PHY
42+
help
43+
Enable this for dm816x USB to work.
44+
3845
config PHY_EXYNOS_MIPI_VIDEO
3946
tristate "S5P/EXYNOS SoC series MIPI CSI-2/DSI PHY driver"
4047
depends on HAS_IOMEM
@@ -174,6 +181,17 @@ config PHY_SUN4I_USB
174181
This driver controls the entire USB PHY block, both the USB OTG
175182
parts, as well as the 2 regular USB 2 host PHYs.
176183

184+
config PHY_SUN9I_USB
185+
tristate "Allwinner sun9i SoC USB PHY driver"
186+
depends on ARCH_SUNXI && HAS_IOMEM && OF
187+
depends on RESET_CONTROLLER
188+
select GENERIC_PHY
189+
help
190+
Enable this to support the transceiver that is part of Allwinner
191+
sun9i SoCs.
192+
193+
This driver controls each individual USB 2 host PHY.
194+
177195
config PHY_SAMSUNG_USB2
178196
tristate "Samsung USB 2.0 PHY driver"
179197
depends on HAS_IOMEM

drivers/phy/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
obj-$(CONFIG_GENERIC_PHY) += phy-core.o
66
obj-$(CONFIG_PHY_BERLIN_USB) += phy-berlin-usb.o
77
obj-$(CONFIG_PHY_BERLIN_SATA) += phy-berlin-sata.o
8+
obj-$(CONFIG_PHY_DM816X_USB) += phy-dm816x-usb.o
89
obj-$(CONFIG_ARMADA375_USBCLUSTER_PHY) += phy-armada375-usb2.o
910
obj-$(CONFIG_BCM_KONA_USB2_PHY) += phy-bcm-kona-usb2.o
1011
obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO) += phy-exynos-dp-video.o
@@ -20,6 +21,7 @@ obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o
2021
obj-$(CONFIG_PHY_EXYNOS5250_SATA) += phy-exynos5250-sata.o
2122
obj-$(CONFIG_PHY_HIX5HD2_SATA) += phy-hix5hd2-sata.o
2223
obj-$(CONFIG_PHY_SUN4I_USB) += phy-sun4i-usb.o
24+
obj-$(CONFIG_PHY_SUN9I_USB) += phy-sun9i-usb.o
2325
obj-$(CONFIG_PHY_SAMSUNG_USB2) += phy-exynos-usb2.o
2426
phy-exynos-usb2-y += phy-samsung-usb2.o
2527
phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o

drivers/phy/phy-berlin-sata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static int phy_berlin_sata_probe(struct platform_device *pdev)
218218
if (priv->nphys == 0)
219219
return -ENODEV;
220220

221-
priv->phys = devm_kzalloc(dev, priv->nphys * sizeof(*priv->phys),
221+
priv->phys = devm_kcalloc(dev, priv->nphys, sizeof(*priv->phys),
222222
GFP_KERNEL);
223223
if (!priv->phys)
224224
return -ENOMEM;

0 commit comments

Comments
 (0)