Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca2b6fae authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'phy-for-4.8-rc1' of...

Merge tag 'phy-for-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy

 into usb-testing

Kishon writes:

phy: for 4.8 -rc1

*) Add a new phy_ops for setting the phy mode
*) Add a new phy driver for DA8xx SoC USB PHY
*) Minor fixes and cleanups

Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parents 25b1f9ac c14f8a40
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
TI DA8xx/OMAP-L1xx/AM18xx USB PHY

Required properties:
 - compatible: must be "ti,da830-usb-phy".
 - #phy-cells: must be 1.

This device controls the PHY for both the USB 1.1 OHCI and USB 2.0 OTG
controllers on DA8xx SoCs. Consumers of this device should use index 0 for
the USB 2.0 phy device and index 1 for the USB 1.1 phy device.

It also requires a "syscon" node with compatible = "ti,da830-cfgchip", "syscon"
to access the CFGCHIP2 register.

Example:

	cfgchip: cfgchip@1417c {
		compatible = "ti,da830-cfgchip", "syscon";
		reg = <0x1417c 0x14>;
	};

	usb_phy: usb-phy {
		compatible = "ti,da830-usb-phy";
		#phy-cells = <1>;
	};

	usb20: usb@200000 {
		compatible = "ti,da830-musb";
		reg = <0x200000 0x1000>;
		interrupts = <58>;
		phys = <&usb_phy 0>;
		phy-names = "usb-phy";
	};

	usb11: usb@225000 {
		compatible = "ti,da830-ohci";
		reg = <0x225000 0x1000>;
		interrupts = <59>;
		phys = <&usb_phy 1>;
		phy-names = "usb-phy";
	};
+17 −10
Original line number Diff line number Diff line
@@ -5,11 +5,13 @@ Required properties:
     "rockchip,rk3066a-usb-phy"
     "rockchip,rk3188-usb-phy"
     "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

Deprecated properties:
 - rockchip,grf : phandle to the syscon managing the "general
   register files" - phy should be a child of the GRF instead

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

@@ -28,9 +30,13 @@ Optional Properties:

Example:

grf: syscon@ff770000 {
	compatible = "rockchip,rk3288-grf", "syscon", "simple-mfd";

...

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

@@ -39,3 +45,4 @@ usbphy: phy {
			reg = <0x320>;
		};
	};
};
+10 −0
Original line number Diff line number Diff line
@@ -44,6 +44,16 @@ config ARMADA375_USBCLUSTER_PHY
	depends on OF && HAS_IOMEM
	select GENERIC_PHY

config PHY_DA8XX_USB
	tristate "TI DA8xx USB PHY Driver"
	depends on ARCH_DAVINCI_DA8XX
	select GENERIC_PHY
	select MFD_SYSCON
	help
	  Enable this to support the USB PHY on DA8xx SoCs.

	  This driver controls both the USB 1.1 PHY and the USB 2.0 PHY.

config PHY_DM816X_USB
	tristate "TI dm816x USB PHY driver"
	depends on ARCH_OMAP2PLUS
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ obj-$(CONFIG_GENERIC_PHY) += phy-core.o
obj-$(CONFIG_PHY_BCM_NS_USB2)		+= phy-bcm-ns-usb2.o
obj-$(CONFIG_PHY_BERLIN_USB)		+= phy-berlin-usb.o
obj-$(CONFIG_PHY_BERLIN_SATA)		+= phy-berlin-sata.o
obj-$(CONFIG_PHY_DA8XX_USB)		+= phy-da8xx-usb.o
obj-$(CONFIG_PHY_DM816X_USB)		+= phy-dm816x-usb.o
obj-$(CONFIG_ARMADA375_USBCLUSTER_PHY)	+= phy-armada375-usb2.o
obj-$(CONFIG_BCM_KONA_USB2_PHY)		+= phy-bcm-kona-usb2.o
+15 −0
Original line number Diff line number Diff line
@@ -342,6 +342,21 @@ int phy_power_off(struct phy *phy)
}
EXPORT_SYMBOL_GPL(phy_power_off);

int phy_set_mode(struct phy *phy, enum phy_mode mode)
{
	int ret;

	if (!phy || !phy->ops->set_mode)
		return 0;

	mutex_lock(&phy->mutex);
	ret = phy->ops->set_mode(phy, mode);
	mutex_unlock(&phy->mutex);

	return ret;
}
EXPORT_SYMBOL_GPL(phy_set_mode);

/**
 * _of_phy_get() - lookup and obtain a reference to a phy by phandle
 * @np: device_node for which to get the phy
Loading