Skip to contentSkip to conversation

dt-bindings: phy: Add binding for BCM4908 USB PHYs

PATCH In review Rafał Miłecki 1 participant 3 messages Dec 2, 2020 – Dec 7, 2020

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

PATCH 1/2 dt-bindings: phy: Add binding for BCM4908 USB PHYs

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

BCM4908 SoCs have USB 2.0 PHY and USB 3.0 PHY attached to the MDIO bus. Those bindings allow describing them.

---
 .../bindings/phy/bcm4908-usb-phy.yaml         | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/bcm4908-usb-phy.yaml
Documentation/devicetree/bindings/phy/bcm4908-usb-phy.yaml new file +52 -0
new file mode 100644
index 000000000000..2bf5dcb58c1e
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/bcm4908-usb-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM4908 USB PHYs
+
+description: >
+  This binding describes USB PHYs used in BCM4908 family SoCs.
+
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm4908-usb2-phy
+      - brcm,bcm4908-usb3-phy
+
+  reg:
+    items:
+      - description: PHY MDIO address
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    mdio {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        phy@0 {
+            compatible = "brcm,bcm4908-usb2-phy";
+            reg = <0x0>;
+            #phy-cells = <0>;
+        };
+
+        phy@1 {
+            compatible = "brcm,bcm4908-usb3-phy";
+            reg = <0x1>;
+            #phy-cells = <0>;
+        };
+    };
Signature · 1 line
2.26.2
#1 lore raw

PATCH 2/2 phy: phy-bcm4908-usb: Add drivers for USB PHYs

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

This driver initializes BCM4908 USB PHYs so USB can be utilized.

---
 drivers/phy/broadcom/Kconfig           |   9 ++
 drivers/phy/broadcom/Makefile          |   1 +
 drivers/phy/broadcom/phy-bcm4908-usb.c | 204 +++++++++++++++++++++++++
 3 files changed, 214 insertions(+)
 create mode 100644 drivers/phy/broadcom/phy-bcm4908-usb.c
drivers/phy/broadcom/Kconfig +9 -0
index a1f1a9c90d0d..ff2ca2b77f38 100644
@@ -78,6 +78,15 @@ config PHY_NS2_USB_DRD
 
 	  If unsure, say N.
 
+config PHY_BCM4908_USB
+	tristate "Broadcom BCM4908 USB PHYs support"
+	depends on OF && (ARCH_BCM4908 || COMPILE_TEST)
+	select GENERIC_PHY
+	default ARCH_BCM4908
+	help
+	  Enable this to support the Broadcom BCM4908 USB 2.0 PHY and USB 3.0
+	  PHY. This driver initializes PHYs so USB can be utilized.
+
 config PHY_BRCM_SATA
 	tristate "Broadcom SATA PHY driver"
 	depends on ARCH_BRCMSTB || ARCH_BCM_IPROC || BMIPS_GENERIC || \
drivers/phy/broadcom/Makefile +1 -0
index 7024127f86ad..8e6a9b748421 100644
@@ -6,6 +6,7 @@ obj-$(CONFIG_PHY_BCM_NS_USB2)		+= phy-bcm-ns-usb2.o
 obj-$(CONFIG_PHY_BCM_NS_USB3)		+= phy-bcm-ns-usb3.o
 obj-$(CONFIG_PHY_NS2_PCIE)		+= phy-bcm-ns2-pcie.o
 obj-$(CONFIG_PHY_NS2_USB_DRD)		+= phy-bcm-ns2-usbdrd.o
+obj-$(CONFIG_PHY_BCM4908_USB)		+= phy-bcm4908-usb.o
 obj-$(CONFIG_PHY_BRCM_SATA)		+= phy-brcm-sata.o
 obj-$(CONFIG_PHY_BRCM_USB)		+= phy-brcm-usb-dvr.o
 
drivers/phy/broadcom/phy-bcm4908-usb.c new file +204 -0

204 lines not on this page · raw message

Signature · 1 line
2.26.2