Skip to contentSkip to conversation

phy: for 4.6 merge window

GIT PULL New Kishon Vijay Abraham I 2 participants 9 messages Mar 2, 2016 – Mar 5, 2016

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

Hi Greg,

Please find the pull request for 4.6 merge window below. It adds a couple of new PHY drivers, usb-uart functionality in rockchip-usb and misc cleanups/fixes.

Let me know If I have to change something.

Thanks
Kishon

The following changes since commit 58a66dba1beac2121d931cda4682ae4d40816af5:

phy: twl4030-usb: Fix unbalanced pm_runtime_enable on module reload (2016-02-10 11:46:01 +0530)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/phy-for-4.6

for you to fetch changes up to 89636adde4a05953e3bf18807ba1f6f205572f67:

phy: Fix armada375 compile test build on UM (2016-03-01 17:13:51 +0530)

----------------------------------------------------------------
phy: for 4.6

*) Add driver for rockchip Display Port PHY *) Add driver for the Rockchip SoC internal eMMC PHY *) Add usb-uart functionality in rockchip-usb *) cleanup rcar usb2 PHY driver
*) Fix for randconfig error

----------------------------------------------------------------
Heiko Stuebner (1):
phy: rockchip-usb: add handler for usb-uart functionality

Krzysztof Kozlowski (1):
phy: Fix armada375 compile test build on UM

Shawn Lin (2):
Documentation: bindings: add dt documentation for Rockchip eMMC PHY
phy: add a driver for the Rockchip SoC internal eMMC PHY

Yakir Yang (2):
phy: Add driver for rockchip Display Port PHY
dt-bindings: add document for rockchip dp phy

Yoshihiro Shimoda (1):
phy: rcar-gen3-usb2: remove HSUSB registers handling

 .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt |   15 +-
 .../devicetree/bindings/phy/rockchip-dp-phy.txt    |   22 ++
 .../devicetree/bindings/phy/rockchip-emmc-phy.txt  |   19 ++
 Documentation/kernel-parameters.txt                |    6 +
 drivers/phy/Kconfig                                |   16 +-
 drivers/phy/Makefile                               |    2 +
 drivers/phy/phy-rcar-gen3-usb2.c                   |   83 +------
 drivers/phy/phy-rockchip-dp.c                      |  151 +++++++++++++
 drivers/phy/phy-rockchip-emmc.c                    |  229 +++++++++++++++++++
 drivers/phy/phy-rockchip-usb.c                     |  233 +++++++++++++++++---
 10 files changed, 656 insertions(+), 120 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/rockchip-dp-phy.txt
 create mode 100644 Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt
 create mode 100644 drivers/phy/phy-rockchip-dp.c
 create mode 100644 drivers/phy/phy-rockchip-emmc.c
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/7 Documentation: bindings: add dt documentation for Rockchip eMMC PHY

From: Shawn Lin <[email protected]>

This patch adds a binding that describes the Rockchip eMMC PHYs found on Rockchip SoCs eMMC interface.

---
 .../devicetree/bindings/phy/rockchip-emmc-phy.txt  |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt
Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt new file +19 -0
new file mode 100644
index 0000000..61916f1
@@ -0,0 +1,19 @@
+Rockchip EMMC PHY
+-----------------------
+
+Required properties:
+ - compatible: rockchip,rk3399-emmc-phy
+ - rockchip,grf : phandle to the syscon managing the "general
+   register files"
+ - #phy-cells: must be 0
+ - reg: PHY configure reg address offset in "general
+   register files"
+
+Example:
+
+emmcphy: phy {
+	compatible = "rockchip,rk3399-emmc-phy";
+	rockchip,grf = <&grf>;
+	reg = <0xf780>;
+	#phy-cells = <0>;
+};
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/7 phy: add a driver for the Rockchip SoC internal eMMC PHY

In reply to Kishon Vijay Abraham I

From: Shawn Lin <[email protected]>

This patch to add a generic PHY driver for ROCKCHIP eMMC PHY. Access the PHY via registers provided by GRF (general register files) module.

---
 drivers/phy/Kconfig             |    7 ++
 drivers/phy/Makefile            |    1 +
 drivers/phy/phy-rockchip-emmc.c |  229 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 237 insertions(+)
 create mode 100644 drivers/phy/phy-rockchip-emmc.c
drivers/phy/Kconfig +7 -0
index 0124d17..bc75f68 100644
@@ -337,6 +337,13 @@ config PHY_ROCKCHIP_USB
 	help
 	  Enable this to support the Rockchip USB 2.0 PHY.
 
+config PHY_ROCKCHIP_EMMC
+	tristate "Rockchip EMMC PHY Driver"
+	depends on ARCH_ROCKCHIP && OF
+	select GENERIC_PHY
+	help
+	  Enable this to support the Rockchip EMMC PHY.
+
 config PHY_ST_SPEAR1310_MIPHY
 	tristate "ST SPEAR1310-MIPHY driver"
 	select GENERIC_PHY
drivers/phy/Makefile +1 -0
index c80f09d..50260b4 100644
@@ -37,6 +37,7 @@ 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_ROCKCHIP_EMMC) += phy-rockchip-emmc.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
drivers/phy/phy-rockchip-emmc.c new file +229 -0

229 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/7 phy: Add driver for rockchip Display Port PHY

In reply to Kishon Vijay Abraham I

From: Yakir Yang <[email protected]>

Add phy driver for the Rockchip DisplayPort PHY module. This is required to get DisplayPort working in Rockchip SoCs.

---
 drivers/phy/Kconfig           |    7 ++
 drivers/phy/Makefile          |    1 +
 drivers/phy/phy-rockchip-dp.c |  151 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 159 insertions(+)
 create mode 100644 drivers/phy/phy-rockchip-dp.c
drivers/phy/Kconfig +7 -0
index bc75f68..f58e870 100644
@@ -344,6 +344,13 @@ config PHY_ROCKCHIP_EMMC
 	help
 	  Enable this to support the Rockchip EMMC PHY.
 
+config PHY_ROCKCHIP_DP
+	tristate "Rockchip Display Port PHY Driver"
+	depends on ARCH_ROCKCHIP && OF
+	select GENERIC_PHY
+	help
+	  Enable this to support the Rockchip Display Port PHY.
+
 config PHY_ST_SPEAR1310_MIPHY
 	tristate "ST SPEAR1310-MIPHY driver"
 	select GENERIC_PHY
drivers/phy/Makefile +1 -0
index 50260b4..24596a9 100644
@@ -38,6 +38,7 @@ 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_ROCKCHIP_EMMC) += phy-rockchip-emmc.o
+obj-$(CONFIG_PHY_ROCKCHIP_DP)		+= phy-rockchip-dp.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
drivers/phy/phy-rockchip-dp.c new file +151 -0

151 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 4/7 dt-bindings: add document for rockchip dp phy

In reply to Kishon Vijay Abraham I

From: Yakir Yang <[email protected]>

Add dt binding documentation for rockchip display port PHY.

---
 .../devicetree/bindings/phy/rockchip-dp-phy.txt    |   22 ++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/rockchip-dp-phy.txt
Documentation/devicetree/bindings/phy/rockchip-dp-phy.txt new file +22 -0
new file mode 100644
index 0000000..50c4f9b
@@ -0,0 +1,22 @@
+Rockchip specific extensions to the Analogix Display Port PHY
+------------------------------------
+
+Required properties:
+- compatible : should be one of the following supported values:
+	 - "rockchip.rk3288-dp-phy"
+- clocks: from common clock binding: handle to dp clock.
+	of memory mapped region.
+- clock-names: from common clock binding:
+	Required elements: "24m"
+- rockchip,grf: phandle to the syscon managing the "general register files"
+- #phy-cells : from the generic PHY bindings, must be 0;
+
+Example:
+
+edp_phy: edp-phy {
+	compatible = "rockchip,rk3288-dp-phy";
+	rockchip,grf = <&grf>;
+	clocks = <&cru SCLK_EDP_24M>;
+	clock-names = "24m";
+	#phy-cells = <0>;
+};
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH 5/7 phy: rockchip-usb: add handler for usb-uart functionality

In reply to Kishon Vijay Abraham I

From: Heiko Stuebner <[email protected]>

Most newer Rockchip SoCs provide the possibility to use a usb-phy as passthrough for the debug uart (uart2), making it possible to for example get console output without needing to open the device.

This patch adds an early_initcall to enable this functionality conditionally via the commandline and also disables the corresponding usb controller in the devicetree.

Currently only data for the rk3288 is provided, but at least the rk3188 and arm64 rk3368 also provide this functionality and will be enabled later.

On a spliced usb cable the signals are tx on white wire(D+) and rx on green wire(D-).

The one caveat is that currently the reconfiguration of the phy happens as early_initcall, as the code depends on the unflattened devicetree being available. Everything is fine if only a regular console is active as the console-replay will happen after the reconfiguation. But with earlycon active output up to smp-init currently will get lost.

The phy is an optional property for the connected dwc2 controller, so we still provide the phy device but fail all phy-ops with -EBUSY to make sure the dwc2 does not try to transmit anything on the repurposed phy.

---
 Documentation/kernel-parameters.txt |    6 +
 drivers/phy/phy-rockchip-usb.c      |  233 +++++++++++++++++++++++++++++------
 2 files changed, 203 insertions(+), 36 deletions(-)
Documentation/kernel-parameters.txt +6 -0
index 87d40a7..d91417b 100644
@@ -3486,6 +3486,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
 	ro		[KNL] Mount root device read-only on boot
 
+	rockchip.usb_uart
+			Enable the uart passthrough on the designated usb port
+			on Rockchip SoCs. When active, the signals of the
+			debug-uart get routed to the D+ and D- pins of the usb
+			port and the regular usb controller gets disabled.
+
 	root=		[KNL] Root filesystem
 			See name_to_dev_t comment in init/do_mounts.c.
 
drivers/phy/phy-rockchip-usb.c +197 -36

319 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#6 lore raw

PATCH 6/7 phy: rcar-gen3-usb2: remove HSUSB registers handling

In reply to Kishon Vijay Abraham I

From: Yoshihiro Shimoda <[email protected]>

Since the related driver (CPG/MSSR driver) only manages the first module clock, this driver should not handle the HSUSB registers. So, this patch removes the HSUSB registers handling.

---
 .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt |   15 +---
 drivers/phy/phy-rcar-gen3-usb2.c                   |   83 +++-----------------
 2 files changed, 15 insertions(+), 83 deletions(-)
Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt +4 -11
index 2390e4e..eaf7e9b 100644
@@ -7,33 +7,26 @@ Required properties:
 - compatible: "renesas,usb2-phy-r8a7795" if the device is a part of an R8A7795
 	      SoC.
 - reg: offset and length of the partial USB 2.0 Host register block.
-- reg-names: must be "usb2_host".
 - clocks: clock phandle and specifier pair(s).
 - #phy-cells: see phy-bindings.txt in the same directory, must be <0>.
 
 Optional properties:
 To use a USB channel where USB 2.0 Host and HSUSB (USB 2.0 Peripheral) are
-combined, the device tree node should set HSUSB properties to reg and reg-names
-properties. This is because HSUSB has registers to select USB 2.0 host or
-peripheral at that channel:
-- reg: offset and length of the partial HSUSB register block.
-- reg-names: must be "hsusb".
+combined, the device tree node should set interrupt properties to use the
+channel as USB OTG:
 - interrupts: interrupt specifier for the PHY.
 
 Example (R-Car H3):
 
 	usb-phy@ee080200 {
 		compatible = "renesas,usb2-phy-r8a7795";
-		reg = <0 0xee080200 0 0x700>, <0 0xe6590100 0 0x100>;
-		reg-names = "usb2_host", "hsusb";
+		reg = <0 0xee080200 0 0x700>;
 		interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&mstp7_clks R8A7795_CLK_EHCI0>,
-			 <&mstp7_clks R8A7795_CLK_HSUSB>;
+		clocks = <&mstp7_clks R8A7795_CLK_EHCI0>;
 	};
 
 	usb-phy@ee0a0200 {
 		compatible = "renesas,usb2-phy-r8a7795";
 		reg = <0 0xee0a0200 0 0x700>;
-		reg-names = "usb2_host";
 		clocks = <&mstp7_clks R8A7795_CLK_EHCI0>;
 	};
drivers/phy/phy-rcar-gen3-usb2.c +11 -72

145 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#7 lore raw

PATCH 7/7 phy: Fix armada375 compile test build on UM

In reply to Kishon Vijay Abraham I

From: Krzysztof Kozlowski <[email protected]>

The phy-armada375-usb2 driver uses IOMEM functions so COMPILE_TEST && OF build failed with:

drivers/built-in.o: In function `armada375_usb_phy_probe':
phy-armada375-usb2.c:(.text+0x121d): undefined reference to `devm_ioremap_resource'

---
 drivers/phy/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/Kconfig +1 -1
index f58e870..26566db 100644
@@ -32,7 +32,7 @@ config PHY_BERLIN_SATA
 config ARMADA375_USBCLUSTER_PHY
 	def_bool y
 	depends on MACH_ARMADA_375 || COMPILE_TEST
-	depends on OF
+	depends on OF && HAS_IOMEM
 	select GENERIC_PHY
 
 config PHY_DM816X_USB
Signature · 1 line
1.7.9.5
#8 lore raw
In reply to Kishon Vijay Abraham I
Quoted 11 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the pull request for 4.6 merge window below. It adds a couple of new PHY drivers, usb-uart functionality in rockchip-usb and misc cleanups/fixes.

Let me know If I have to change something.

Thanks
Kishon

Quoted 7 lines

The following changes since commit 58a66dba1beac2121d931cda4682ae4d40816af5:

phy: twl4030-usb: Fix unbalanced pm_runtime_enable on module reload (2016-02-10 11:46:01 +0530)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/phy-for-4.6

Pulled and pushed out, thanks.

greg k-h