Skip to contentSkip to conversation

phy: for 4.11 -rc cycle

GIT PULL New Kishon Vijay Abraham I 2 participants 6 messages Mar 22, 2017 – Mar 23, 2017

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

Hi Greg,

Please find the pull request for this -rc cycle below.

The major change is removing USB3 PHY driver for Broadcom NSP merged during the last merge window. It is found there already exists a PHY driver (used by NS) and it can be shared with NSP as well. So in the coming merge windows the existing USB3 PHY for NS will be adapted to work for NSP. Apart from that, no major changes and includes a error handling fix in phy-exynos-pcie and compiler error fix with EXTCON is not selected.

Consider merging it in this -rc cycle and let me know If I have to make any changes.

Thanks
Kishon

The following changes since commit c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201:

Linux 4.11-rc1 (2017-03-05 12:59:56 -0800)

are available in the git repository at:

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

for you to fetch changes up to 1a09b6a7c10e22c489a8b212dd6862b1fd9674ad:

phy: qcom-usb-hs: Add depends on EXTCON (2017-03-09 15:29:57 +0530)

----------------------------------------------------------------
phy: for 4.11-rc

*) Revert USB3 PHY support for Broadcom NSP SoC *) Fix compiler error on qcom-usb-hs when depends on EXTCON
is not added
*) Fix error handling in phy-exynos-pcie

----------------------------------------------------------------
Jaehoon Chung (1):
phy: phy-exynos-pcie: fix the wrong error return

Rafał Miłecki (2):
Revert "phy: Add USB3 PHY support for Broadcom NSP SoC" Revert "dt-bindings: phy: Add documentation for NSP USB3 PHY"

Stephen Boyd (1):
phy: qcom-usb-hs: Add depends on EXTCON

 Documentation/devicetree/bindings/phy/brcm,nsp-usb3-phy.txt |  39 ------------------------------
 drivers/phy/Kconfig                                         |   9 +------
 drivers/phy/Makefile                                        |   1 -
 drivers/phy/phy-bcm-nsp-usb3.c                              | 177 -----------------------------------------------------------------------------------------------------------------------------------------
 drivers/phy/phy-exynos-pcie.c                               |   4 ++--
 5 files changed, 3 insertions(+), 227 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/phy/brcm,nsp-usb3-phy.txt
 delete mode 100644 drivers/phy/phy-bcm-nsp-usb3.c
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/4 Revert "phy: Add USB3 PHY support for Broadcom NSP SoC"

From: Rafał Miłecki <[email protected]>

This reverts commit d7bc1a7d41bf ("phy: Add USB3 PHY support for Broadcom NSP SoC") as we already have driver for this PHY (shared by NS and NSP). It was added in commit e5666281d9ea ("phy: bcm-ns-usb3: new driver for USB 3.0 PHY on Northstar").

Instead of adding separated driver & duplicating code we should work on improving existing (old) one. Thanks to work done by Broadcom we know there is MDIO bus we weren't aware of & we know register names which makes initialization more clear. This is very valuable info and we should work on using it in existing driver afterwards.

---
 drivers/phy/Kconfig            |   8 --
 drivers/phy/Makefile           |   1 -
 drivers/phy/phy-bcm-nsp-usb3.c | 177 -----------------------------------------
 3 files changed, 186 deletions(-)
 delete mode 100644 drivers/phy/phy-bcm-nsp-usb3.c
drivers/phy/Kconfig +0 -8
index dc5277ad1b5a..c11044439fd4 100644
@@ -510,12 +510,4 @@ config PHY_MESON8B_USB2
 	  and GXBB SoCs.
 	  If unsure, say N.
 
-config PHY_NSP_USB3
-	tristate "Broadcom NorthStar plus USB3 PHY driver"
-	depends on OF && (ARCH_BCM_NSP || COMPILE_TEST)
-	select GENERIC_PHY
-	default ARCH_BCM_NSP
-	help
-	  Enable this to support the Broadcom Northstar plus USB3 PHY.
-	  If unsure, say N.
 endmenu
drivers/phy/Makefile +0 -1
index e7b0feb1e125..dd8f3b5d2918 100644
@@ -62,4 +62,3 @@ obj-$(CONFIG_PHY_CYGNUS_PCIE)		+= phy-bcm-cygnus-pcie.o
 obj-$(CONFIG_ARCH_TEGRA) += tegra/
 obj-$(CONFIG_PHY_NS2_PCIE)		+= phy-bcm-ns2-pcie.o
 obj-$(CONFIG_PHY_MESON8B_USB2)		+= phy-meson8b-usb2.o
-obj-$(CONFIG_PHY_NSP_USB3)		+= phy-bcm-nsp-usb3.o
drivers/phy/phy-bcm-nsp-usb3.c deleted +0 -177

177 lines not on this page · raw message

Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/4 Revert "dt-bindings: phy: Add documentation for NSP USB3 PHY"

In reply to Kishon Vijay Abraham I

From: Rafał Miłecki <[email protected]>

This reverts commit c8ca631f9480 ("dt-bindings: phy: Add documentation for NSP USB3 PHY") to match reverting commit adding the new PHY driver. Please note we revert this commit before it reached stable release.

If new compatible string is needed it should be added to the existing bcm-ns-usb3-phy.txt which already describes this PHY.

---
 .../devicetree/bindings/phy/brcm,nsp-usb3-phy.txt  | 39 ----------------------
 1 file changed, 39 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/phy/brcm,nsp-usb3-phy.txt
Documentation/devicetree/bindings/phy/brcm,nsp-usb3-phy.txt deleted +0 -39
deleted file mode 100644
index e68ae5dec9c9..000000000000
@@ -1,39 +0,0 @@
-Broadcom USB3 phy binding for northstar plus SoC
-The USB3 phy is internal to the SoC and is accessed using mdio interface.
-
-Required mdio bus properties:
-- reg: Should be 0x0 for SoC internal USB3 phy
-- #address-cells: must be 1
-- #size-cells: must be 0
-
-Required USB3 PHY properties:
-- compatible: should be "brcm,nsp-usb3-phy"
-- reg: USB3 Phy address on SoC internal MDIO bus and it should be 0x10.
-- usb3-ctrl-syscon: handler of syscon node defining physical address
-  of usb3 control register.
-- #phy-cells: must be 0
-
-Required usb3 control properties:
-- compatible: should be "brcm,nsp-usb3-ctrl"
-- reg: offset and length of the control registers
-
-Example:
-
-	mdio@0 {
-		reg = <0x0>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		usb3_phy: usb-phy@10 {
-			compatible = "brcm,nsp-usb3-phy";
-			reg = <0x10>;
-			usb3-ctrl-syscon = <&usb3_ctrl>;
-			#phy-cells = <0>;
-			status = "disabled";
-		};
-	};
-
-	usb3_ctrl: syscon@104408 {
-		compatible = "brcm,nsp-usb3-ctrl", "syscon";
-		reg = <0x104408 0x3fc>;
-	};
Signature · 1 line
2.11.0
#3 lore raw

PATCH 3/4 phy: phy-exynos-pcie: fix the wrong error return

In reply to Kishon Vijay Abraham I

From: Jaehoon Chung <[email protected]>

When it doesn't get the blk_base's resource, it was returned the error about phy_base, not blk_base.
This patch is for fixing the wrong error return about blk_base.

Fixes cf0adb8e281b ("phy: phy-exynos-pcie: Add support for Exynos PCIe PHY")
---
 drivers/phy/phy-exynos-pcie.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/phy-exynos-pcie.c +2 -2
index 4f60b83641d5..60baf25d98e2 100644
@@ -254,8 +254,8 @@ static int exynos_pcie_phy_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 	exynos_phy->blk_base = devm_ioremap_resource(dev, res);
-	if (IS_ERR(exynos_phy->phy_base))
-		return PTR_ERR(exynos_phy->phy_base);
+	if (IS_ERR(exynos_phy->blk_base))
+		return PTR_ERR(exynos_phy->blk_base);
 
 	exynos_phy->drv_data = drv_data;
 
Signature · 1 line
2.11.0
#4 lore raw

PATCH 4/4 phy: qcom-usb-hs: Add depends on EXTCON

In reply to Kishon Vijay Abraham I

From: Stephen Boyd <[email protected]>

We get the following compile errors if EXTCON is enabled as a module but this driver is builtin:

drivers/built-in.o: In function `qcom_usb_hs_phy_power_off':
phy-qcom-usb-hs.c:(.text+0x1089): undefined reference to extcon_unregister_notifier' drivers/built-in.o: In function qcom_usb_hs_phy_probe':
phy-qcom-usb-hs.c:(.text+0x11b5): undefined reference to extcon_get_edev_by_phandle' drivers/built-in.o: In function qcom_usb_hs_phy_power_on':
phy-qcom-usb-hs.c:(.text+0x128e): undefined reference to extcon_get_state' phy-qcom-usb-hs.c:(.text+0x12a9): undefined reference to extcon_register_notifier'

so let's mark this as needing to follow the modular status of the extcon framework.

Fixes 9994a33865f4 e2427b09ba929c2b9 (phy: Add support for Qualcomm's USB HS phy")
---
 drivers/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/Kconfig +1 -0
index c11044439fd4..005cadb7a3f8 100644
@@ -449,6 +449,7 @@ config PHY_QCOM_UFS
 config PHY_QCOM_USB_HS
 	tristate "Qualcomm USB HS PHY module"
 	depends on USB_ULPI_BUS
+	depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in
 	select GENERIC_PHY
 	help
 	  Support for the USB high-speed ULPI compliant phy on Qualcomm
Signature · 1 line
2.11.0
#5 lore raw
In reply to Kishon Vijay Abraham I
Quoted 12 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the pull request for this -rc cycle below.

The major change is removing USB3 PHY driver for Broadcom NSP merged during the last merge window. It is found there already exists a PHY driver (used by NS) and it can be shared with NSP as well. So in the coming merge windows the existing USB3 PHY for NS will be adapted to work for NSP. Apart from that, no major changes and includes a error handling fix in phy-exynos-pcie and compiler error fix with EXTCON is not selected.

Quoted 2 lines

Consider merging it in this -rc cycle and let me know If I have to make any changes.

Pulled and pushed out, thanks.

greg k-h