Skip to content

Commit 85a09bf

Browse files
committed
Merge tag 'phy-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next
Kishon writes: phy: for 4.17 *) Add USB PHY driver for MDM6600 on Droid *) Add USB PHY driver for STM32 USB PHY Controller *) Add inno-usb2-phy driver for hi3798cv200 SoC *) Add combo phy driver (SATA/USB/PCIE) for HiSilicon STB SoCs *) Add USB3 PHY driver for Meson GXL and GXM *) Add support for R8A77965 Gen3 USB 2.0 PHY in phy-rcar-gen3-usb2 driver *) Add support for qualcomm QUSB2 V2 and QMP V3 USB3 PHY in phy-qcom-qusb2 and phy-qcom-qmp PHY driver respectively *) Add support for runtime PM in phy-qcom-qusb2 and phy-qcom-qmp PHY drivers *) Add support for Allwinner R40 USB PHY in sun4i-usb PHY driver *) Add support in rockchip-typec PHY driver to make extcon optional and fallback to working in host mode if extcon is missing *) Add support in rockchip-typec PHY driver to mux PHYs connected to DP *) Add support to configure slew rate parameters in phy-mtk-tphy PHY driver *) Add workaround for missing Vbus det interrupts on Allwinner A23/A33 *) Add USB speed related PHY modes in phy core *) Fix PHY 'structure' documentation *) Force rockchip-typec PHY to USB2 if DP-only mode is used *) Fix phy-qcom-qusb2 and phy-qcom-qmp PHY drivers to follow PHY reset and initialization sequence as per hardware programming manual *) Fix Marvell BG2CD SoC USB failure in phy-berlin-usb driver *) Minor fixes in lpc18xx-usb-otg, xusb-tegra210 and phy-rockchip-emmc PHY drivers Signed-off-by: Kishon Vijay Abraham I <[email protected]>
2 parents a8f25c3 + e7f4da4 commit 85a09bf

Some content is hidden

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

45 files changed

+3499
-424
lines changed

Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,29 @@ Example:
7474
reboot-offset = <0x4>;
7575
};
7676

77+
-----------------------------------------------------------------------
78+
Hisilicon Hi3798CV200 Peripheral Controller
79+
80+
The Hi3798CV200 Peripheral Controller controls peripherals, queries
81+
their status, and configures some functions of peripherals.
82+
83+
Required properties:
84+
- compatible: Should contain "hisilicon,hi3798cv200-perictrl", "syscon"
85+
and "simple-mfd".
86+
- reg: Register address and size of Peripheral Controller.
87+
- #address-cells: Should be 1.
88+
- #size-cells: Should be 1.
89+
90+
Examples:
91+
92+
perictrl: peripheral-controller@8a20000 {
93+
compatible = "hisilicon,hi3798cv200-perictrl", "syscon",
94+
"simple-mfd";
95+
reg = <0x8a20000 0x1000>;
96+
#address-cells = <1>;
97+
#size-cells = <1>;
98+
};
99+
77100
-----------------------------------------------------------------------
78101
Hisilicon Hi6220 system controller
79102

Documentation/devicetree/bindings/phy/meson-gxl-usb2-phy.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Required properties:
66
- #phys-cells: must be 0 (see phy-bindings.txt in this directory)
77

88
Optional properties:
9+
- clocks: a phandle to the clock of this PHY
10+
- clock-names: must be "phy"
11+
- resets: a phandle to the reset line of this PHY
12+
- reset-names: must be "phy"
913
- phy-supply: see phy-bindings.txt in this directory
1014

1115

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
* Amlogic Meson GXL and GXM USB3 PHY and OTG detection binding
2+
3+
Required properties:
4+
- compatible: Should be "amlogic,meson-gxl-usb3-phy"
5+
- #phys-cells: must be 0 (see phy-bindings.txt in this directory)
6+
- reg: The base address and length of the registers
7+
- interrupts: the interrupt specifier for the OTG detection
8+
- clocks: phandles to the clocks for
9+
- the USB3 PHY
10+
- and peripheral mode/OTG detection
11+
- clock-names: must contain "phy" and "peripheral"
12+
- resets: phandle to the reset lines for:
13+
- the USB3 PHY and
14+
- peripheral mode/OTG detection
15+
- reset-names: must contain "phy" and "peripheral"
16+
17+
Optional properties:
18+
- phy-supply: see phy-bindings.txt in this directory
19+
20+
21+
Example:
22+
usb3_phy0: phy@78080 {
23+
compatible = "amlogic,meson-gxl-usb3-phy";
24+
#phy-cells = <0>;
25+
reg = <0x0 0x78080 0x0 0x20>;
26+
interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
27+
clocks = <&clkc CLKID_USB_OTG>, <&clkc_AO CLKID_AO_CEC_32K>;
28+
clock-names = "phy", "peripheral";
29+
resets = <&reset RESET_USB_OTG>, <&reset RESET_USB_OTG>;
30+
reset-names = "phy", "peripheral";
31+
};
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
HiSilicon STB PCIE/SATA/USB3 PHY
2+
3+
Required properties:
4+
- compatible: Should be "hisilicon,hi3798cv200-combphy"
5+
- reg: Should be the address space for COMBPHY configuration and state
6+
registers in peripheral controller, e.g. PERI_COMBPHY0_CFG and
7+
PERI_COMBPHY0_STATE for COMBPHY0 Hi3798CV200 SoC.
8+
- #phy-cells: Should be 1. The cell number is used to select the phy mode
9+
as defined in <dt-bindings/phy/phy.h>.
10+
- clocks: The phandle to clock provider and clock specifier pair.
11+
- resets: The phandle to reset controller and reset specifier pair.
12+
13+
Refer to phy/phy-bindings.txt for the generic PHY binding properties.
14+
15+
Optional properties:
16+
- hisilicon,fixed-mode: If the phy device doesn't support mode select
17+
but a fixed mode setting, the property should be present to specify
18+
the particular mode.
19+
- hisilicon,mode-select-bits: If the phy device support mode select,
20+
this property should be present to specify the register bits in
21+
peripheral controller, as a 3 integers tuple:
22+
<register_offset bit_shift bit_mask>.
23+
24+
Notes:
25+
- Between hisilicon,fixed-mode and hisilicon,mode-select-bits, one and only
26+
one of them should be present.
27+
- The device node should be a child of peripheral controller that contains
28+
COMBPHY configuration/state and PERI_CTRL register used to select PHY mode.
29+
Refer to arm/hisilicon/hisilicon.txt for the parent peripheral controller
30+
bindings.
31+
32+
Examples:
33+
34+
perictrl: peripheral-controller@8a20000 {
35+
compatible = "hisilicon,hi3798cv200-perictrl", "syscon",
36+
"simple-mfd";
37+
reg = <0x8a20000 0x1000>;
38+
#address-cells = <1>;
39+
#size-cells = <1>;
40+
ranges = <0x0 0x8a20000 0x1000>;
41+
42+
combphy0: phy@850 {
43+
compatible = "hisilicon,hi3798cv200-combphy";
44+
reg = <0x850 0x8>;
45+
#phy-cells = <1>;
46+
clocks = <&crg HISTB_COMBPHY0_CLK>;
47+
resets = <&crg 0x188 4>;
48+
hisilicon,fixed-mode = <PHY_TYPE_USB3>;
49+
};
50+
51+
combphy1: phy@858 {
52+
compatible = "hisilicon,hi3798cv200-combphy";
53+
reg = <0x858 0x8>;
54+
#phy-cells = <1>;
55+
clocks = <&crg HISTB_COMBPHY1_CLK>;
56+
resets = <&crg 0x188 12>;
57+
hisilicon,mode-select-bits = <0x0008 11 (0x3 << 11)>;
58+
};
59+
};
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
Device tree bindings for HiSilicon INNO USB2 PHY
2+
3+
Required properties:
4+
- compatible: Should be one of the following strings:
5+
"hisilicon,inno-usb2-phy",
6+
"hisilicon,hi3798cv200-usb2-phy".
7+
- reg: Should be the address space for PHY configuration register in peripheral
8+
controller, e.g. PERI_USB0 for USB 2.0 PHY01 on Hi3798CV200 SoC.
9+
- clocks: The phandle and clock specifier pair for INNO USB2 PHY device
10+
reference clock.
11+
- resets: The phandle and reset specifier pair for INNO USB2 PHY device reset
12+
signal.
13+
- #address-cells: Must be 1.
14+
- #size-cells: Must be 0.
15+
16+
The INNO USB2 PHY device should be a child node of peripheral controller that
17+
contains the PHY configuration register, and each device suppports up to 2 PHY
18+
ports which are represented as child nodes of INNO USB2 PHY device.
19+
20+
Required properties for PHY port node:
21+
- reg: The PHY port instance number.
22+
- #phy-cells: Defined by generic PHY bindings. Must be 0.
23+
- resets: The phandle and reset specifier pair for PHY port reset signal.
24+
25+
Refer to phy/phy-bindings.txt for the generic PHY binding properties
26+
27+
Example:
28+
29+
perictrl: peripheral-controller@8a20000 {
30+
compatible = "hisilicon,hi3798cv200-perictrl", "simple-mfd";
31+
reg = <0x8a20000 0x1000>;
32+
#address-cells = <1>;
33+
#size-cells = <1>;
34+
ranges = <0x0 0x8a20000 0x1000>;
35+
36+
usb2_phy1: usb2-phy@120 {
37+
compatible = "hisilicon,hi3798cv200-usb2-phy";
38+
reg = <0x120 0x4>;
39+
clocks = <&crg HISTB_USB2_PHY1_REF_CLK>;
40+
resets = <&crg 0xbc 4>;
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
44+
usb2_phy1_port0: phy@0 {
45+
reg = <0>;
46+
#phy-cells = <0>;
47+
resets = <&crg 0xbc 8>;
48+
};
49+
50+
usb2_phy1_port1: phy@1 {
51+
reg = <1>;
52+
#phy-cells = <0>;
53+
resets = <&crg 0xbc 9>;
54+
};
55+
};
56+
57+
usb2_phy2: usb2-phy@124 {
58+
compatible = "hisilicon,hi3798cv200-usb2-phy";
59+
reg = <0x124 0x4>;
60+
clocks = <&crg HISTB_USB2_PHY2_REF_CLK>;
61+
resets = <&crg 0xbc 6>;
62+
#address-cells = <1>;
63+
#size-cells = <0>;
64+
65+
usb2_phy2_port0: phy@0 {
66+
reg = <0>;
67+
#phy-cells = <0>;
68+
resets = <&crg 0xbc 10>;
69+
};
70+
};
71+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Device tree binding documentation for Motorola Mapphone MDM6600 USB PHY
2+
3+
Required properties:
4+
- compatible Must be "motorola,mapphone-mdm6600"
5+
- enable-gpios GPIO to enable the USB PHY
6+
- power-gpios GPIO to power on the device
7+
- reset-gpios GPIO to reset the device
8+
- motorola,mode-gpios Two GPIOs to configure MDM6600 USB start-up mode for
9+
normal mode versus USB flashing mode
10+
- motorola,cmd-gpios Three GPIOs to control the power state of the MDM6600
11+
- motorola,status-gpios Three GPIOs to read the power state of the MDM6600
12+
13+
Example:
14+
15+
usb-phy {
16+
compatible = "motorola,mapphone-mdm6600";
17+
enable-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
18+
power-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;
19+
reset-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>;
20+
motorola,mode-gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>,
21+
<&gpio5 21 GPIO_ACTIVE_HIGH>;
22+
motorola,cmd-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>,
23+
<&gpio4 8 GPIO_ACTIVE_HIGH>,
24+
<&gpio5 14 GPIO_ACTIVE_HIGH>;
25+
motorola,status-gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>,
26+
<&gpio2 21 GPIO_ACTIVE_HIGH>,
27+
<&gpio2 23 GPIO_ACTIVE_HIGH>;
28+
#phy-cells = <0>;
29+
};

Documentation/devicetree/bindings/phy/phy-mtk-tphy.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ Optional properties (controller (parent) node):
2727
- reg : offset and length of register shared by multiple ports,
2828
exclude port's private register. It is needed on mt2701
2929
and mt8173, but not on mt2712.
30+
- mediatek,src-ref-clk-mhz : frequency of reference clock for slew rate
31+
calibrate
32+
- mediatek,src-coef : coefficient for slew rate calibrate, depends on
33+
SoC process
3034

3135
Required properties (port (child) node):
3236
- reg : address and length of the register set for the port.

Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,9 @@ Required properties:
1414
- resets : a list of phandle + reset specifier pairs
1515
- reset-names : string reset name, must be:
1616
"uphy", "uphy-pipe", "uphy-tcphy"
17-
- extcon : extcon specifier for the Power Delivery
1817

19-
Note, there are 2 type-c phys for RK3399, and they are almost identical, except
20-
these registers(description below), every register node contains 3 sections:
21-
offset, enable bit, write mask bit.
22-
- rockchip,typec-conn-dir : the register of type-c connector direction,
23-
for type-c phy0, it must be <0xe580 0 16>;
24-
for type-c phy1, it must be <0xe58c 0 16>;
25-
- rockchip,usb3tousb2-en : the register of type-c force usb3 to usb2 enable
26-
control.
27-
for type-c phy0, it must be <0xe580 3 19>;
28-
for type-c phy1, it must be <0xe58c 3 19>;
29-
- rockchip,external-psm : the register of type-c phy external psm clock
30-
selection.
31-
for type-c phy0, it must be <0xe588 14 30>;
32-
for type-c phy1, it must be <0xe594 14 30>;
33-
- rockchip,pipe-status : the register of type-c phy pipe status.
34-
for type-c phy0, it must be <0xe5c0 0 0>;
35-
for type-c phy1, it must be <0xe5c0 16 16>;
18+
Optional properties:
19+
- extcon : extcon specifier for the Power Delivery
3620

3721
Required nodes : a sub-node is required for each port the phy provides.
3822
The sub-node name is used to identify dp or usb3 port,
@@ -43,6 +27,13 @@ Required nodes : a sub-node is required for each port the phy provides.
4327
Required properties (port (child) node):
4428
- #phy-cells : must be 0, See ./phy-bindings.txt for details.
4529

30+
Deprecated properties, do not use in new device tree sources, these
31+
properties are determined by the compatible value:
32+
- rockchip,typec-conn-dir
33+
- rockchip,usb3tousb2-en
34+
- rockchip,external-psm
35+
- rockchip,pipe-status
36+
4637
Example:
4738
tcphy0: phy@ff7c0000 {
4839
compatible = "rockchip,rk3399-typec-phy";
@@ -58,10 +49,6 @@ Example:
5849
<&cru SRST_UPHY0_PIPE_L00>,
5950
<&cru SRST_P_UPHY0_TCPHY>;
6051
reset-names = "uphy", "uphy-pipe", "uphy-tcphy";
61-
rockchip,typec-conn-dir = <0xe580 0 16>;
62-
rockchip,usb3tousb2-en = <0xe580 3 19>;
63-
rockchip,external-psm = <0xe588 14 30>;
64-
rockchip,pipe-status = <0xe5c0 0 0>;
6552

6653
tcphy0_dp: dp-port {
6754
#phy-cells = <0>;
@@ -86,10 +73,6 @@ Example:
8673
<&cru SRST_UPHY1_PIPE_L00>,
8774
<&cru SRST_P_UPHY1_TCPHY>;
8875
reset-names = "uphy", "uphy-pipe", "uphy-tcphy";
89-
rockchip,typec-conn-dir = <0xe58c 0 16>;
90-
rockchip,usb3tousb2-en = <0xe58c 3 19>;
91-
rockchip,external-psm = <0xe594 14 30>;
92-
rockchip,pipe-status = <0xe5c0 16 16>;
9376

9477
tcphy1_dp: dp-port {
9578
#phy-cells = <0>;
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
STMicroelectronics STM32 USB HS PHY controller
2+
3+
The STM32 USBPHYC block contains a dual port High Speed UTMI+ PHY and a UTMI
4+
switch. It controls PHY configuration and status, and the UTMI+ switch that
5+
selects either OTG or HOST controller for the second PHY port. It also sets
6+
PLL configuration.
7+
8+
USBPHYC
9+
|_ PLL
10+
|
11+
|_ PHY port#1 _________________ HOST controller
12+
| _ |
13+
| / 1|________________|
14+
|_ PHY port#2 ----| |________________
15+
| \_0| |
16+
|_ UTMI switch_______| OTG controller
17+
18+
19+
Phy provider node
20+
=================
21+
22+
Required properties:
23+
- compatible: must be "st,stm32mp1-usbphyc"
24+
- reg: address and length of the usb phy control register set
25+
- clocks: phandle + clock specifier for the PLL phy clock
26+
- #address-cells: number of address cells for phys sub-nodes, must be <1>
27+
- #size-cells: number of size cells for phys sub-nodes, must be <0>
28+
29+
Optional properties:
30+
- assigned-clocks: phandle + clock specifier for the PLL phy clock
31+
- assigned-clock-parents: the PLL phy clock parent
32+
- resets: phandle + reset specifier
33+
34+
Required nodes: one sub-node per port the controller provides.
35+
36+
Phy sub-nodes
37+
==============
38+
39+
Required properties:
40+
- reg: phy port index
41+
- phy-supply: phandle to the regulator providing 3V3 power to the PHY,
42+
see phy-bindings.txt in the same directory.
43+
- vdda1v1-supply: phandle to the regulator providing 1V1 power to the PHY
44+
- vdda1v8-supply: phandle to the regulator providing 1V8 power to the PHY
45+
- #phy-cells: see phy-bindings.txt in the same directory, must be <0> for PHY
46+
port#1 and must be <1> for PHY port#2, to select USB controller
47+
48+
49+
Example:
50+
usbphyc: usb-phy@5a006000 {
51+
compatible = "st,stm32mp1-usbphyc";
52+
reg = <0x5a006000 0x1000>;
53+
clocks = <&rcc_clk USBPHY_K>;
54+
resets = <&rcc_rst USBPHY_R>;
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
58+
usbphyc_port0: usb-phy@0 {
59+
reg = <0>;
60+
phy-supply = <&vdd_usb>;
61+
vdda1v1-supply = <&reg11>;
62+
vdda1v8-supply = <&reg18>
63+
#phy-cells = <0>;
64+
};
65+
66+
usbphyc_port1: usb-phy@1 {
67+
reg = <1>;
68+
phy-supply = <&vdd_usb>;
69+
vdda1v1-supply = <&reg11>;
70+
vdda1v8-supply = <&reg18>
71+
#phy-cells = <1>;
72+
};
73+
};

0 commit comments

Comments
 (0)