Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1737777 > unrolled thread

[PATCH V6 0/4] Add Broadcom STB USB phy driver

Started byAl Cooper <alcooperx@gmail.com>
First post2017-09-22 21:40 +0200
Last post2017-09-22 21:40 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH V6 0/4] Add Broadcom STB USB phy driver Al Cooper <alcooperx@gmail.com> - 2017-09-22 21:40 +0200
    [PATCH V6 2/4] dt-bindings: Add Broadcom STB USB PHY binding document Al Cooper <alcooperx@gmail.com> - 2017-09-22 21:40 +0200

#1737777 — [PATCH V6 0/4] Add Broadcom STB USB phy driver

FromAl Cooper <alcooperx@gmail.com>
Date2017-09-22 21:40 +0200
Subject[PATCH V6 0/4] Add Broadcom STB USB phy driver
Message-ID<usBXR-1C1-9@gated-at.bofh.it>
Add a new USB Phy driver for Broadcom STB SoCs. This driver
supports Broadcom STB ARM SoCs. This driver in
combination with the Broadcom STB ohci, ehci and xhci
drivers will enable USB1.1, USB2.0 and USB3.0 support.
This Phy driver also supports the Broadcom BDC gadget
driver.

Changes since v5:
- Fixed over 50 CHECK warnings from checkpatch.pl --strict.

Changes since v4:
- MIPS support was dropped, so remove MIPS specific code
  in the brcmusb_readl/brcmusb_writel routines.
- Use readl/writel instead of readl_relaxed/writel_relaxed.
- Remove double blank lines between some functions.
- Remove support for obselete phy phandle argument.

Changes since v3:
- Removed MIPS support because there is such a small
  amount of code that is common to both ARM and MIPS.
  I'll create a separate MIPS driver in the future.
- Have the Kconfig selection for this driver also select
  "CONFIG_SOC_BRCMSTB" which contains needed functions.
- Change device tree properties to use "brcm,has_xhci" and
  "brcm,has_eohci" to determine if the phy contains
  a xhci phy, and e/ohci phy or both.
- Change the phy xlate routine to return an error instead
  of NULL for a requested phy that doesn't exist.
- Moved some probe functionality into it's own funtion to
  simplify the many "if (has_xhci)" statements.

Changes since v2:
- Fix kbuild errors by changing Kconfig so the driver
  only builds for ARCH_BRCMSTB || BMIPS_GENERIC systems

Changes since v1:
- Rebased to next
- Add Kconfig entry to build the driver
- Commented all delays
- Split out sysfs functionality in separate patch
- Removed parsing of old obselete device tree properties
- Changed device property "device" to "dr_mode" using
  standard values "host" and "peripheral" along with new
  values "drd" and "typec-pd"
- Add ability to handle the standard PHY_TYPE_USB2 and
  PHY_TYPE_USB3 arguments passed in by phy consumers.
- Moved phy_provider_register() to end of probe routine

Al Cooper (4):
  soc: brcmstb: Add Product ID and Family ID helper functions
  dt-bindings: Add Broadcom STB USB PHY binding document
  phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver
  phy: usb: phy-brcm-usb: Add ability to force DRD mode to host or
    device

 .../bindings/phy/brcm,brcmstb-usb-phy.txt          |   43 +
 MAINTAINERS                                        |    7 +
 drivers/phy/broadcom/Kconfig                       |   13 +
 drivers/phy/broadcom/Makefile                      |    3 +
 drivers/phy/broadcom/phy-brcm-usb-init.c           | 1018 ++++++++++++++++++++
 drivers/phy/broadcom/phy-brcm-usb-init.h           |   50 +
 drivers/phy/broadcom/phy-brcm-usb.c                |  459 +++++++++
 drivers/soc/bcm/brcmstb/common.c                   |   12 +
 include/linux/soc/brcmstb/brcmstb.h                |   17 +
 9 files changed, 1622 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
 create mode 100644 drivers/phy/broadcom/phy-brcm-usb-init.c
 create mode 100644 drivers/phy/broadcom/phy-brcm-usb-init.h
 create mode 100644 drivers/phy/broadcom/phy-brcm-usb.c

-- 
1.9.0.138.g2de3478

[toc] | [next] | [standalone]


#1737778 — [PATCH V6 2/4] dt-bindings: Add Broadcom STB USB PHY binding document

FromAl Cooper <alcooperx@gmail.com>
Date2017-09-22 21:40 +0200
Subject[PATCH V6 2/4] dt-bindings: Add Broadcom STB USB PHY binding document
Message-ID<usBXR-1C1-15@gated-at.bofh.it>
In reply to#1737777
Add DT bindings document for Broadcom STB USB PHYs

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Al Cooper <alcooperx@gmail.com>
---
 .../bindings/phy/brcm,brcmstb-usb-phy.txt          | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt

diff --git a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
new file mode 100644
index 0000000..24a0d06
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
@@ -0,0 +1,43 @@
+Broadcom STB USB PHY
+
+Required properties:
+ - compatible: brcm,brcmstb-usb-phy
+ - reg: two offset and length pairs.
+	The first pair specifies a manditory set of memory mapped
+	registers used for general control of the PHY.
+	The second pair specifies optional registers used by some of
+	the SoCs that support USB 3.x
+ - #phy-cells: Shall be 1 as it expects one argument for setting
+	       the type of the PHY. Possible values are:
+	       - PHY_TYPE_USB2 for USB1.1/2.0 PHY
+	       - PHY_TYPE_USB3 for USB3.x PHY
+
+Optional Properties:
+- clocks : clock phandles.
+- clock-names: String, clock name.
+- brcm,ipp: Boolean, Invert Port Power.
+  Possible values are: 0 (Don't invert), 1 (Invert)
+- brcm,ioc: Boolean, Invert Over Current detection.
+  Possible values are: 0 (Don't invert), 1 (Invert)
+NOTE: one or both of the following two properties must be set
+- brcm,has-xhci: Boolean indicating the phy has an XHCI phy.
+- brcm,has-eohci: Boolean indicating the phy has an EHCI/OHCI phy.
+- dr_mode: String, PHY Device mode.
+  Possible values are: "host", "peripheral ", "drd" or "typec-pd"
+  If this property is not defined, the phy will default to "host" mode.
+
+Example:
+
+usbphy_0: usb-phy@f0470200 {
+	reg = <0xf0470200 0xb8>,
+		<0xf0471940 0x6c0>;
+	compatible = "brcm,brcmstb-usb-phy";
+	#phy-cells = <1>;
+	dr_mode = "host"
+	brcm,ioc = <1>;
+	brcm,ipp = <1>;
+	brcm,has-xhci;
+	brcm,has-eohci;
+	clocks = <&usb20>, <&usb30>;
+	clock-names = "sw_usb", "sw_usb3";
+};
-- 
1.9.0.138.g2de3478

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web