Skip to content

Commit

Permalink
Merge tag 'for-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/kishon/linux-phy into usb-testing

Kishon writes:

Adds a new Rockchip PHY driver and contains miscellaneous fixes.
  • Loading branch information
Greg Kroah-Hartman committed Jan 31, 2015
2 parents dd32174 + bbd3ce8 commit 6b629f2
Show file tree
Hide file tree
Showing 16 changed files with 483 additions and 172 deletions.
43 changes: 16 additions & 27 deletions Documentation/devicetree/bindings/phy/phy-miphy28lp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Required properties (port (child) node):
filled in "reg". It can also contain the offset of the system configuration
registers used as glue-logic to setup the device for SATA/PCIe or USB3
devices.
- st,syscfg : Offset of the parent configuration register.
- resets : phandle to the parent reset controller.
- reset-names : Associated name must be "miphy-sw-rst".

Expand Down Expand Up @@ -54,18 +55,12 @@ example:
phy_port0: port@9b22000 {
reg = <0x9b22000 0xff>,
<0x9b09000 0xff>,
<0x9b04000 0xff>,
<0x114 0x4>, /* sysctrl MiPHY cntrl */
<0x818 0x4>, /* sysctrl MiPHY status*/
<0xe0 0x4>, /* sysctrl PCIe */
<0xec 0x4>; /* sysctrl SATA */
<0x9b04000 0xff>;
reg-names = "sata-up",
"pcie-up",
"pipew",
"miphy-ctrl-glue",
"miphy-status-glue",
"pcie-glue",
"sata-glue";
"pipew";

st,syscfg = <0x114 0x818 0xe0 0xec>;
#phy-cells = <1>;
st,osc-rdy;
reset-names = "miphy-sw-rst";
Expand All @@ -75,18 +70,13 @@ example:
phy_port1: port@9b2a000 {
reg = <0x9b2a000 0xff>,
<0x9b19000 0xff>,
<0x9b14000 0xff>,
<0x118 0x4>,
<0x81c 0x4>,
<0xe4 0x4>,
<0xf0 0x4>;
<0x9b14000 0xff>;
reg-names = "sata-up",
"pcie-up",
"pipew",
"miphy-ctrl-glue",
"miphy-status-glue",
"pcie-glue",
"sata-glue";
"pipew";

st,syscfg = <0x118 0x81c 0xe4 0xf0>;

#phy-cells = <1>;
st,osc-force-ext;
reset-names = "miphy-sw-rst";
Expand All @@ -95,13 +85,12 @@ example:

phy_port2: port@8f95000 {
reg = <0x8f95000 0xff>,
<0x8f90000 0xff>,
<0x11c 0x4>,
<0x820 0x4>;
<0x8f90000 0xff>;
reg-names = "pipew",
"usb3-up",
"miphy-ctrl-glue",
"miphy-status-glue";
"usb3-up";

st,syscfg = <0x11c 0x820>;

#phy-cells = <1>;
reset-names = "miphy-sw-rst";
resets = <&softreset STIH407_MIPHY2_SOFTRESET>;
Expand All @@ -125,4 +114,4 @@ example:

Macro definitions for the supported miphy configuration can be found in:

include/dt-bindings/phy/phy-miphy28lp.h
include/dt-bindings/phy/phy.h
15 changes: 8 additions & 7 deletions Documentation/devicetree/bindings/phy/phy-miphy365x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ for SATA and PCIe.

Required properties (controller (parent) node):
- compatible : Should be "st,miphy365x-phy"
- st,syscfg : Should be a phandle of the system configuration register group
which contain the SATA, PCIe mode setting bits
- st,syscfg : Phandle / integer array property. Phandle of sysconfig group
containing the miphy registers and integer array should contain
an entry for each port sub-node, specifying the control
register offset inside the sysconfig group.

Required nodes : A sub-node is required for each channel the controller
provides. Address range information including the usual
Expand All @@ -26,7 +28,6 @@ Required properties (port (child) node):
registers filled in "reg":
- sata: For SATA devices
- pcie: For PCIe devices
- syscfg: To specify the syscfg based config register

Optional properties (port (child) node):
- st,sata-gen : Generation of locally attached SATA IP. Expected values
Expand All @@ -39,20 +40,20 @@ Example:

miphy365x_phy: miphy365x@fe382000 {
compatible = "st,miphy365x-phy";
st,syscfg = <&syscfg_rear>;
st,syscfg = <&syscfg_rear 0x824 0x828>;
#address-cells = <1>;
#size-cells = <1>;
ranges;

phy_port0: port@fe382000 {
reg = <0xfe382000 0x100>, <0xfe394000 0x100>, <0x824 0x4>;
reg-names = "sata", "pcie", "syscfg";
reg = <0xfe382000 0x100>, <0xfe394000 0x100>;
reg-names = "sata", "pcie";
#phy-cells = <1>;
st,sata-gen = <3>;
};

phy_port1: port@fe38a000 {
reg = <0xfe38a000 0x100>, <0xfe804000 0x100>, <0x828 0x4>;;
reg = <0xfe38a000 0x100>, <0xfe804000 0x100>;;
reg-names = "sata", "pcie", "syscfg";
#phy-cells = <1>;
st,pcie-tx-pol-inv;
Expand Down
10 changes: 2 additions & 8 deletions Documentation/devicetree/bindings/phy/phy-stih407-usb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ host controllers (when controlling usb2/1.1 devices) available on STiH407 SoC fa

Required properties:
- compatible : should be "st,stih407-usb2-phy"
- reg : contain the offset and length of the system configuration registers
used as glue logic to control & parameter phy
- reg-names : the names of the system configuration registers in "reg", should be "param" and "reg"
- st,syscfg : sysconfig register to manage phy parameter at driver level
- st,syscfg : phandle of sysconfig bank plus integer array containing phyparam and phyctrl register offsets
- resets : list of phandle and reset specifier pairs. There should be two entries, one
for the whole phy and one for the port
- reset-names : list of reset signal names. Should be "global" and "port"
Expand All @@ -19,11 +16,8 @@ Example:

usb2_picophy0: usbpicophy@f8 {
compatible = "st,stih407-usb2-phy";
reg = <0xf8 0x04>, /* syscfg 5062 */
<0xf4 0x04>; /* syscfg 5061 */
reg-names = "param", "ctrl";
#phy-cells = <0>;
st,syscfg = <&syscfg_core>;
st,syscfg = <&syscfg_core 0x100 0xf4>;
resets = <&softreset STIH407_PICOPHY_SOFTRESET>,
<&picophyreset STIH407_PICOPHY0_RESET>;
reset-names = "global", "port";
Expand Down
37 changes: 37 additions & 0 deletions Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
ROCKCHIP USB2 PHY

Required properties:
- compatible: rockchip,rk3288-usb-phy
- rockchip,grf : phandle to the syscon managing the "general
register files"
- #address-cells: should be 1
- #size-cells: should be 0

Sub-nodes:
Each PHY should be represented as a sub-node.

Sub-nodes
required properties:
- #phy-cells: should be 0
- reg: PHY configure reg address offset in GRF
"0x320" - for PHY attach to OTG controller
"0x334" - for PHY attach to HOST0 controller
"0x348" - for PHY attach to HOST1 controller

Optional Properties:
- clocks : phandle + clock specifier for the phy clocks
- clock-names: string, clock name, must be "phyclk"

Example:

usbphy: phy {
compatible = "rockchip,rk3288-usb-phy";
rockchip,grf = <&grf>;
#address-cells = <1>;
#size-cells = <0>;

usbphy0: usb-phy0 {
#phy-cells = <0>;
reg = <0x320>;
};
};
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/phy/samsung-phy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Samsung S5P/EXYNOS SoC series MIPI CSIS/DSIM DPHY

Required properties:
- compatible : should be "samsung,s5pv210-mipi-video-phy";
- reg : offset and length of the MIPI DPHY register set;
- #phy-cells : from the generic phy bindings, must be 1;
- syscon - phandle to the PMU system controller;

For "samsung,s5pv210-mipi-video-phy" compatible PHYs the second cell in
the PHY specifier identifies the PHY and its meaning is as follows:
Expand Down
10 changes: 5 additions & 5 deletions arch/arm/boot/dts/stih416.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -283,21 +283,21 @@

miphy365x_phy: phy@fe382000 {
compatible = "st,miphy365x-phy";
st,syscfg = <&syscfg_rear>;
st,syscfg = <&syscfg_rear 0x824 0x828>;
#address-cells = <1>;
#size-cells = <1>;
ranges;

phy_port0: port@fe382000 {
#phy-cells = <1>;
reg = <0xfe382000 0x100>, <0xfe394000 0x100>, <0x824 0x4>;
reg-names = "sata", "pcie", "syscfg";
reg = <0xfe382000 0x100>, <0xfe394000 0x100>;
reg-names = "sata", "pcie";
};

phy_port1: port@fe38a000 {
#phy-cells = <1>;
reg = <0xfe38a000 0x100>, <0xfe804000 0x100>, <0x828 0x4>;
reg-names = "sata", "pcie", "syscfg";
reg = <0xfe38a000 0x100>, <0xfe804000 0x100>;
reg-names = "sata", "pcie";
};
};

Expand Down
7 changes: 7 additions & 0 deletions drivers/phy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@ config PHY_QCOM_IPQ806X_SATA
depends on OF
select GENERIC_PHY

config PHY_ROCKCHIP_USB
tristate "Rockchip USB2 PHY Driver"
depends on ARCH_ROCKCHIP && OF
select GENERIC_PHY
help
Enable this to support the Rockchip USB 2.0 PHY.

config PHY_ST_SPEAR1310_MIPHY
tristate "ST SPEAR1310-MIPHY driver"
select GENERIC_PHY
Expand Down
1 change: 1 addition & 0 deletions drivers/phy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ phy-exynos-usb2-$(CONFIG_PHY_EXYNOS5250_USB2) += phy-exynos5250-usb2.o
phy-exynos-usb2-$(CONFIG_PHY_S5PV210_USB2) += phy-s5pv210-usb2.o
obj-$(CONFIG_PHY_EXYNOS5_USBDRD) += phy-exynos5-usbdrd.o
obj-$(CONFIG_PHY_QCOM_APQ8064_SATA) += phy-qcom-apq8064-sata.o
obj-$(CONFIG_PHY_ROCKCHIP_USB) += phy-rockchip-usb.o
obj-$(CONFIG_PHY_QCOM_IPQ806X_SATA) += phy-qcom-ipq806x-sata.o
obj-$(CONFIG_PHY_ST_SPEAR1310_MIPHY) += phy-spear1310-miphy.o
obj-$(CONFIG_PHY_ST_SPEAR1340_MIPHY) += phy-spear1340-miphy.o
Expand Down
4 changes: 2 additions & 2 deletions drivers/phy/phy-armada375-usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ static int armada375_usb_phy_probe(struct platform_device *pdev)

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
usb_cluster_base = devm_ioremap_resource(&pdev->dev, res);
if (!usb_cluster_base)
return -ENOMEM;
if (IS_ERR(usb_cluster_base))
return PTR_ERR(usb_cluster_base);

phy = devm_phy_create(dev, NULL, &armada375_usb_phy_ops);
if (IS_ERR(phy)) {
Expand Down
Loading

0 comments on commit 6b629f2

Please sign in to comment.