Skip to contentSkip to conversation

mvebu: usb: xhci: Add VBUS regulator supply to the host driver

PATCH Superseded kostap at marvell.com 3 participants 10 messages Feb 9, 2017

Subsystems (2)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 4/6 mvebu: usb: xhci: Add VBUS regulator supply to the host driver

From: Konstantin Porotchkin <[email protected]>

The USB device should linked to VBUS regulator through "vbus-supply" DTS property.
This patch adds handling for "vbus-supply" property inside the USB device entry for turning on the VBUS regulator upon the host adapter probe.

Cc Stefan Roese <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Nadav Haklai <[email protected]>
Cc Neta Zur Hershkovits <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Haim Boot <[email protected]>

---
Changes for v5:
- Extended clocks description in documentation
- Removed print for regulator not found case

 doc/device-tree-bindings/usb/marvell.xhci-usb.txt | 29 +++++++++++++++++++++++
 drivers/usb/host/Kconfig                          |  1 +
 drivers/usb/host/xhci-mvebu.c                     | 13 +++++++++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 doc/device-tree-bindings/usb/marvell.xhci-usb.txt
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +29 -0
new file mode 100644
index 0000000..6cc370c
@@ -0,0 +1,29 @@
+Marvell SOC USB controllers
+
+This controller is integrated in Armada 3700/8K.
+It uses the same properties as a generic XHCI host controller
+
+Required properties :
+ - compatible: should be one or more of:
+   - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx SoCs
+   - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
+ - reg: should contain address and length of the standard XHCI
+   register set for the device.
+ - interrupts: one XHCI interrupt should be described here.
+
+Optional properties:
+ - clocks: reference to a platform clocks that should be enabled/configured
+   upon interface initialization. May not exist on all platforms.
+ - vbus-supply : If present, specifies the fixed regulator to be turned on
+   for providing power to the USB VBUS rail.
+
+Example:
+	cpm_usb3_0: usb3 at 500000 {
+		compatible = "marvell,armada-8k-xhci",
+			     "generic-xhci";
+		reg = <0x500000 0x4000>;
+		interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpm_syscon0 1 22>;
+		vbus-supply = <&reg_usb3h0_vbus>;
+		status = "disabled";
+	};
drivers/usb/host/Kconfig +1 -0
index 5129a57..0bf8274 100644
@@ -25,6 +25,7 @@ config USB_XHCI_MVEBU
 	bool "MVEBU USB 3.0 support"
 	default y
 	depends on ARCH_MVEBU
+	select DM_REGULATOR
 	help
 	  Choose this option to add support for USB 3.0 driver on mvebu
 	  SoCs, which includes Armada8K, Armada3700 and other Armada
drivers/usb/host/xhci-mvebu.c +12 -1
index 46eb937..d880af1 100644
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <usb.h>
+#include <power/regulator.h>
 #include <asm/gpio.h>
 
 #include "xhci.h"
@@ -44,12 +45,22 @@ static int xhci_usb_probe(struct udevice *dev)
 	struct mvebu_xhci_platdata *plat = dev_get_platdata(dev);
 	struct mvebu_xhci *ctx = dev_get_priv(dev);
 	struct xhci_hcor *hcor;
-	int len;
+	int len, ret;
+	struct udevice *regulator;
 
 	ctx->hcd = (struct xhci_hccr *)plat->hcd_base;
 	len = HC_LENGTH(xhci_readl(&ctx->hcd->cr_capbase));
 	hcor = (struct xhci_hcor *)((uintptr_t)ctx->hcd + len);
 
+	ret = device_get_supply_regulator(dev, "vbus-supply", &regulator);
+	if (!ret) {
+		ret = regulator_set_enable(regulator, true);
+		if (ret) {
+			printf("Failed to turn ON the VBUS regulator\n");
+			return ret;
+		}
+	}
+
 	/* Enable USB xHCI (VBUS, reset etc) in board specific code */
 	board_xhci_enable();
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH v5 4/6 mvebu: usb: xhci: Add VBUS regulator supply to the host driver

Quoted 37 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

The USB device should linked to VBUS regulator through "vbus-supply" DTS property.
This patch adds handling for "vbus-supply" property inside the USB device entry for turning on the VBUS regulator upon the host adapter probe.

Cc Stefan Roese <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Nadav Haklai <[email protected]>
Cc Neta Zur Hershkovits <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Haim Boot <[email protected]>

---
Changes for v5:
- Extended clocks description in documentation
- Removed print for regulator not found case

 doc/device-tree-bindings/usb/marvell.xhci-usb.txt | 29 +++++++++++++++++++++++
 drivers/usb/host/Kconfig                          |  1 +
 drivers/usb/host/xhci-mvebu.c                     | 13 +++++++++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 doc/device-tree-bindings/usb/marvell.xhci-usb.txt
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +6 -0
new file mode 100644
index 0000000..6cc370c
@@ -0,0 +1,29 @@
+Marvell SOC USB controllers
+
+This controller is integrated in Armada 3700/8K.
+It uses the same properties as a generic XHCI host controller
+
+Required properties :

doc/device-tree-bindings/usb/marvell.xhci-usb.txt line 16

Quoted 10 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +10 -0
+ - compatible: should be one or more of:
+   - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx SoCs
+   - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
+ - reg: should contain address and length of the standard XHCI
+   register set for the device.
+ - interrupts: one XHCI interrupt should be described here.
+
+Optional properties:
+ - clocks: reference to a platform clocks that should be enabled/configured
+   upon interface initialization. May not exist on all platforms.

This is probably block clock then ?

Otherwise,

Quoted 62 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +13 -0
+ - vbus-supply : If present, specifies the fixed regulator to be turned on
+   for providing power to the USB VBUS rail.
+
+Example:
+	cpm_usb3_0: usb3 at 500000 {
+		compatible = "marvell,armada-8k-xhci",
+			     "generic-xhci";
+		reg = <0x500000 0x4000>;
+		interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpm_syscon0 1 22>;
+		vbus-supply = <&reg_usb3h0_vbus>;
+		status = "disabled";
+	};
drivers/usb/host/Kconfig +1 -0
index 5129a57..0bf8274 100644
@@ -25,6 +25,7 @@ config USB_XHCI_MVEBU
 	bool "MVEBU USB 3.0 support"
 	default y
 	depends on ARCH_MVEBU
+	select DM_REGULATOR
 	help
 	  Choose this option to add support for USB 3.0 driver on mvebu
 	  SoCs, which includes Armada8K, Armada3700 and other Armada
drivers/usb/host/xhci-mvebu.c +12 -1
index 46eb937..d880af1 100644
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <usb.h>
+#include <power/regulator.h>
 #include <asm/gpio.h>
 
 #include "xhci.h"
@@ -44,12 +45,22 @@ static int xhci_usb_probe(struct udevice *dev)
 	struct mvebu_xhci_platdata *plat = dev_get_platdata(dev);
 	struct mvebu_xhci *ctx = dev_get_priv(dev);
 	struct xhci_hcor *hcor;
-	int len;
+	int len, ret;
+	struct udevice *regulator;
 
 	ctx->hcd = (struct xhci_hccr *)plat->hcd_base;
 	len = HC_LENGTH(xhci_readl(&ctx->hcd->cr_capbase));
 	hcor = (struct xhci_hcor *)((uintptr_t)ctx->hcd + len);
 
+	ret = device_get_supply_regulator(dev, "vbus-supply", &regulator);
+	if (!ret) {
+		ret = regulator_set_enable(regulator, true);
+		if (ret) {
+			printf("Failed to turn ON the VBUS regulator\n");
+			return ret;
+		}
+	}
+
 	/* Enable USB xHCI (VBUS, reset etc) in board specific code */
 	board_xhci_enable();
 
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

PATCH v5 4/6 mvebu: usb: xhci: Add VBUS regulator supply to the host driver

Quoted 51 lines · Marek Vasut
Quoted 37 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

The USB device should linked to VBUS regulator through "vbus-supply" DTS property.
This patch adds handling for "vbus-supply" property inside the USB device entry for turning on the VBUS regulator upon the host adapter probe.

Cc Stefan Roese <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Nadav Haklai <[email protected]>
Cc Neta Zur Hershkovits <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Haim Boot <[email protected]>

---
Changes for v5:
- Extended clocks description in documentation
- Removed print for regulator not found case

 doc/device-tree-bindings/usb/marvell.xhci-usb.txt | 29 +++++++++++++++++++++++
 drivers/usb/host/Kconfig                          |  1 +
 drivers/usb/host/xhci-mvebu.c                     | 13 +++++++++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 doc/device-tree-bindings/usb/marvell.xhci-usb.txt
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +6 -0
new file mode 100644
index 0000000..6cc370c
@@ -0,0 +1,29 @@
+Marvell SOC USB controllers
+
+This controller is integrated in Armada 3700/8K.
+It uses the same properties as a generic XHCI host controller
+
+Required properties :

doc/device-tree-bindings/usb/marvell.xhci-usb.txt line 16

Quoted 10 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +10 -0
+ - compatible: should be one or more of:
+   - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx SoCs
+   - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
+ - reg: should contain address and length of the standard XHCI
+   register set for the device.
+ - interrupts: one XHCI interrupt should be described here.
+
+Optional properties:
+ - clocks: reference to a platform clocks that should be enabled/configured
+   upon interface initialization. May not exist on all platforms.

This is probably block clock then ?

Quoted 2 lines

Otherwise,

Otherwise the the internal SoC clock does not require gating/muxing or any other configuration for making this USB host adapter running. Not sure if I understood your question well.

Quoted 65 lines
Quoted 63 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +13 -0
+ - vbus-supply : If present, specifies the fixed regulator to be turned on
+   for providing power to the USB VBUS rail.
+
+Example:
+	cpm_usb3_0: usb3 at 500000 {
+		compatible = "marvell,armada-8k-xhci",
+			     "generic-xhci";
+		reg = <0x500000 0x4000>;
+		interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpm_syscon0 1 22>;
+		vbus-supply = <&reg_usb3h0_vbus>;
+		status = "disabled";
+	};
drivers/usb/host/Kconfig +1 -0
index 5129a57..0bf8274 100644
@@ -25,6 +25,7 @@ config USB_XHCI_MVEBU
 	bool "MVEBU USB 3.0 support"
 	default y
 	depends on ARCH_MVEBU
+	select DM_REGULATOR
 	help
 	  Choose this option to add support for USB 3.0 driver on mvebu
 	  SoCs, which includes Armada8K, Armada3700 and other Armada
drivers/usb/host/xhci-mvebu.c +12 -1
index 46eb937..d880af1 100644
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <usb.h>
+#include <power/regulator.h>
 #include <asm/gpio.h>
 
 #include "xhci.h"
@@ -44,12 +45,22 @@ static int xhci_usb_probe(struct udevice *dev)
 	struct mvebu_xhci_platdata *plat = dev_get_platdata(dev);
 	struct mvebu_xhci *ctx = dev_get_priv(dev);
 	struct xhci_hcor *hcor;
-	int len;
+	int len, ret;
+	struct udevice *regulator;
 
 	ctx->hcd = (struct xhci_hccr *)plat->hcd_base;
 	len = HC_LENGTH(xhci_readl(&ctx->hcd->cr_capbase));
 	hcor = (struct xhci_hcor *)((uintptr_t)ctx->hcd + len);
 
+	ret = device_get_supply_regulator(dev, "vbus-supply", &regulator);
+	if (!ret) {
+		ret = regulator_set_enable(regulator, true);
+		if (ret) {
+			printf("Failed to turn ON the VBUS regulator\n");
+			return ret;
+		}
+	}
+
 	/* Enable USB xHCI (VBUS, reset etc) in board specific code */
 	board_xhci_enable();
 
#3 lore raw

PATCH v5 4/6 mvebu: usb: xhci: Add VBUS regulator supply to the host driver

Quoted 58 lines · Konstantin Porotchkin
Quoted 55 lines · Marek Vasut
Quoted 49 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

The USB device should linked to VBUS regulator through "vbus-supply" DTS property.
This patch adds handling for "vbus-supply" property inside the USB device entry for turning on the VBUS regulator upon the host adapter probe.

Cc Stefan Roese <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Nadav Haklai <[email protected]>
Cc Neta Zur Hershkovits <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Haim Boot <[email protected]>

---
Changes for v5:
- Extended clocks description in documentation
- Removed print for regulator not found case

 doc/device-tree-bindings/usb/marvell.xhci-usb.txt | 29
+++++++++++++++++++++++
 drivers/usb/host/Kconfig                          |  1 +
 drivers/usb/host/xhci-mvebu.c                     | 13 +++++++++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 doc/device-tree-bindings/usb/marvell.xhci-usb.txt
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +15 -0
new file mode 100644
index 0000000..6cc370c
@@ -0,0 +1,29 @@
+Marvell SOC USB controllers
+
+This controller is integrated in Armada 3700/8K.
+It uses the same properties as a generic XHCI host controller
+
+Required properties :
+ - compatible: should be one or more of:
+   - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx SoCs
+   - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
+ - reg: should contain address and length of the standard XHCI
+   register set for the device.
+ - interrupts: one XHCI interrupt should be described here.
+
+Optional properties:
+ - clocks: reference to a platform clocks that should be
Quoted 2 lines

enabled/configured
+ upon interface initialization. May not exist on all platforms.

This is probably block clock then ?

Quoted 5 lines
Quoted 2 lines

Otherwise,

Otherwise the the internal SoC clock does not require gating/muxing or any other configuration for making this USB host adapter running. Not sure if I understood your question well.

Well, do these clock drive the USB block or do they drive the register interface or what ?

Quoted 66 lines
Quoted 66 lines
Quoted 64 lines

+ - vbus-supply : If present, specifies the fixed regulator to be turned on

doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +12 -0
+   for providing power to the USB VBUS rail.
+
+Example:
+    cpm_usb3_0: usb3 at 500000 {
+        compatible = "marvell,armada-8k-xhci",
+                 "generic-xhci";
+        reg = <0x500000 0x4000>;
+        interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cpm_syscon0 1 22>;
+        vbus-supply = <&reg_usb3h0_vbus>;
+        status = "disabled";
+    };
drivers/usb/host/Kconfig +1 -0
index 5129a57..0bf8274 100644
@@ -25,6 +25,7 @@ config USB_XHCI_MVEBU
     bool "MVEBU USB 3.0 support"
     default y
     depends on ARCH_MVEBU
+    select DM_REGULATOR
     help
       Choose this option to add support for USB 3.0 driver on mvebu
       SoCs, which includes Armada8K, Armada3700 and other Armada
drivers/usb/host/xhci-mvebu.c +12 -1
index 46eb937..d880af1 100644
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <usb.h>
+#include <power/regulator.h>
 #include <asm/gpio.h>
 
 #include "xhci.h"
@@ -44,12 +45,22 @@ static int xhci_usb_probe(struct udevice *dev)
     struct mvebu_xhci_platdata *plat = dev_get_platdata(dev);
     struct mvebu_xhci *ctx = dev_get_priv(dev);
     struct xhci_hcor *hcor;
-    int len;
+    int len, ret;
+    struct udevice *regulator;
 
     ctx->hcd = (struct xhci_hccr *)plat->hcd_base;
     len = HC_LENGTH(xhci_readl(&ctx->hcd->cr_capbase));
     hcor = (struct xhci_hcor *)((uintptr_t)ctx->hcd + len);
 
+    ret = device_get_supply_regulator(dev, "vbus-supply", &regulator);
+    if (!ret) {
+        ret = regulator_set_enable(regulator, true);
+        if (ret) {
+            printf("Failed to turn ON the VBUS regulator\n");
+            return ret;
+        }
+    }
+
     /* Enable USB xHCI (VBUS, reset etc) in board specific code */
     board_xhci_enable();
 
Signature · 2 lines
Best regards,
Marek Vasut
#4 lore raw

PATCH v5 4/6 mvebu: usb: xhci: Add VBUS regulator supply to the host driver

Quoted 59 lines · Marek Vasut
Quoted 58 lines · Konstantin Porotchkin
Quoted 55 lines · Marek Vasut
Quoted 49 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

The USB device should linked to VBUS regulator through "vbus-supply" DTS property.
This patch adds handling for "vbus-supply" property inside the USB device entry for turning on the VBUS regulator upon the host adapter probe.

Cc Stefan Roese <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Nadav Haklai <[email protected]>
Cc Neta Zur Hershkovits <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Haim Boot <[email protected]>

---
Changes for v5:
- Extended clocks description in documentation
- Removed print for regulator not found case

 doc/device-tree-bindings/usb/marvell.xhci-usb.txt | 29
+++++++++++++++++++++++
 drivers/usb/host/Kconfig                          |  1 +
 drivers/usb/host/xhci-mvebu.c                     | 13 +++++++++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 doc/device-tree-bindings/usb/marvell.xhci-usb.txt
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +15 -0
new file mode 100644
index 0000000..6cc370c
@@ -0,0 +1,29 @@
+Marvell SOC USB controllers
+
+This controller is integrated in Armada 3700/8K.
+It uses the same properties as a generic XHCI host controller
+
+Required properties :
+ - compatible: should be one or more of:
+   - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx SoCs
+   - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
+ - reg: should contain address and length of the standard XHCI
+   register set for the device.
+ - interrupts: one XHCI interrupt should be described here.
+
+Optional properties:
+ - clocks: reference to a platform clocks that should be
Quoted 2 lines

enabled/configured
+ upon interface initialization. May not exist on all platforms.

This is probably block clock then ?

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Otherwise,

Otherwise the the internal SoC clock does not require gating/muxing or any other configuration for making this USB host adapter running. Not sure if I understood your question well.

Well, do these clock drive the USB block or do they drive the register interface or what ?

This entry is generic and applicable to all XHCI controllers, so it is hard to answer your question. It supposes to be a clock that drives the data transfer. It can be directly connected to the internal clock generator and divider or pass though an additional gate/mux. In the last case it can be inhibited or redirected.

Quoted 69 lines
Quoted 67 lines
Quoted 67 lines
Quoted 65 lines

+ - vbus-supply : If present, specifies the fixed regulator to be turned on

doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +12 -0
+   for providing power to the USB VBUS rail.
+
+Example:
+    cpm_usb3_0: usb3 at 500000 {
+        compatible = "marvell,armada-8k-xhci",
+                 "generic-xhci";
+        reg = <0x500000 0x4000>;
+        interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cpm_syscon0 1 22>;
+        vbus-supply = <&reg_usb3h0_vbus>;
+        status = "disabled";
+    };
drivers/usb/host/Kconfig +1 -0
index 5129a57..0bf8274 100644
@@ -25,6 +25,7 @@ config USB_XHCI_MVEBU
     bool "MVEBU USB 3.0 support"
     default y
     depends on ARCH_MVEBU
+    select DM_REGULATOR
     help
       Choose this option to add support for USB 3.0 driver on mvebu
       SoCs, which includes Armada8K, Armada3700 and other Armada
drivers/usb/host/xhci-mvebu.c +12 -1
index 46eb937..d880af1 100644
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <usb.h>
+#include <power/regulator.h>
 #include <asm/gpio.h>
 
 #include "xhci.h"
@@ -44,12 +45,22 @@ static int xhci_usb_probe(struct udevice *dev)
     struct mvebu_xhci_platdata *plat = dev_get_platdata(dev);
     struct mvebu_xhci *ctx = dev_get_priv(dev);
     struct xhci_hcor *hcor;
-    int len;
+    int len, ret;
+    struct udevice *regulator;
 
     ctx->hcd = (struct xhci_hccr *)plat->hcd_base;
     len = HC_LENGTH(xhci_readl(&ctx->hcd->cr_capbase));
     hcor = (struct xhci_hcor *)((uintptr_t)ctx->hcd + len);
 
+    ret = device_get_supply_regulator(dev, "vbus-supply", &regulator);
+    if (!ret) {
+        ret = regulator_set_enable(regulator, true);
+        if (ret) {
+            printf("Failed to turn ON the VBUS regulator\n");
+            return ret;
+        }
+    }
+
     /* Enable USB xHCI (VBUS, reset etc) in board specific code */
     board_xhci_enable();
 
#5 lore raw

PATCH v5 4/6 mvebu: usb: xhci: Add VBUS regulator supply to the host driver

Quoted 67 lines · Konstantin Porotchkin
Quoted 65 lines · Marek Vasut
Quoted 63 lines · Konstantin Porotchkin
Quoted 55 lines · Marek Vasut
Quoted 49 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

The USB device should linked to VBUS regulator through "vbus-supply" DTS property.
This patch adds handling for "vbus-supply" property inside the USB device entry for turning on the VBUS regulator upon the host adapter probe.

Cc Stefan Roese <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Nadav Haklai <[email protected]>
Cc Neta Zur Hershkovits <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Haim Boot <[email protected]>

---
Changes for v5:
- Extended clocks description in documentation
- Removed print for regulator not found case

 doc/device-tree-bindings/usb/marvell.xhci-usb.txt | 29
+++++++++++++++++++++++
 drivers/usb/host/Kconfig                          |  1 +
 drivers/usb/host/xhci-mvebu.c                     | 13 +++++++++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 doc/device-tree-bindings/usb/marvell.xhci-usb.txt
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +15 -0
new file mode 100644
index 0000000..6cc370c
@@ -0,0 +1,29 @@
+Marvell SOC USB controllers
+
+This controller is integrated in Armada 3700/8K.
+It uses the same properties as a generic XHCI host controller
+
+Required properties :
+ - compatible: should be one or more of:
+   - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx SoCs
+   - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
+ - reg: should contain address and length of the standard XHCI
+   register set for the device.
+ - interrupts: one XHCI interrupt should be described here.
+
+Optional properties:
+ - clocks: reference to a platform clocks that should be
Quoted 2 lines

enabled/configured
+ upon interface initialization. May not exist on all platforms.

This is probably block clock then ?

Quoted 2 lines

Otherwise,

Otherwise the the internal SoC clock does not require gating/muxing or any other configuration for making this USB host adapter running. Not sure if I understood your question well.

Quoted 7 lines
Quoted 2 lines

Well, do these clock drive the USB block or do they drive the register interface or what ?

This entry is generic and applicable to all XHCI controllers, so it is hard to answer your question. It supposes to be a clock that drives the data transfer. It can be directly connected to the internal clock generator and divider or pass though an additional gate/mux. In the last case it can be inhibited or redirected.

So it's a PHY clock then ? Or XHCI block clock ?

marvell.xhci-usb.txt probably doesn't contain generic stuff, but marvell XHCI implementation specific stuff, right ?

Quoted 70 lines
Quoted 69 lines
Quoted 47 lines
Quoted 47 lines
Quoted 47 lines

+ - vbus-supply : If present, specifies the fixed regulator to be turned on

doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +12 -0
+   for providing power to the USB VBUS rail.
+
+Example:
+    cpm_usb3_0: usb3 at 500000 {
+        compatible = "marvell,armada-8k-xhci",
+                 "generic-xhci";
+        reg = <0x500000 0x4000>;
+        interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cpm_syscon0 1 22>;
+        vbus-supply = <&reg_usb3h0_vbus>;
+        status = "disabled";
+    };
drivers/usb/host/Kconfig +1 -0
index 5129a57..0bf8274 100644
@@ -25,6 +25,7 @@ config USB_XHCI_MVEBU
     bool "MVEBU USB 3.0 support"
     default y
     depends on ARCH_MVEBU
+    select DM_REGULATOR
     help
       Choose this option to add support for USB 3.0 driver on mvebu
       SoCs, which includes Armada8K, Armada3700 and other Armada
drivers/usb/host/xhci-mvebu.c +3 -1
index 46eb937..d880af1 100644
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <usb.h>
+#include <power/regulator.h>
 #include <asm/gpio.h>
 
 #include "xhci.h"
@@ -44,12 +45,22 @@ static int xhci_usb_probe(struct udevice *dev)
     struct mvebu_xhci_platdata *plat = dev_get_platdata(dev);
     struct mvebu_xhci *ctx = dev_get_priv(dev);
     struct xhci_hcor *hcor;
-    int len;
+    int len, ret;
+    struct udevice *regulator;
 
Quoted 5 lines
Quoted 5 lines

drivers/usb/host/xhci-mvebu.c static int xhci_usb_probe(struct udevice *dev)

Quoted 5 lines
drivers/usb/host/xhci-mvebu.c +1 -0
     ctx->hcd = (struct xhci_hccr *)plat->hcd_base;
     len = HC_LENGTH(xhci_readl(&ctx->hcd->cr_capbase));
     hcor = (struct xhci_hcor *)((uintptr_t)ctx->hcd + len);
 
+    ret = device_get_supply_regulator(dev, "vbus-supply",

&regulator);

Quoted 14 lines
Quoted 14 lines
Quoted 12 lines
drivers/usb/host/xhci-mvebu.c +8 -0
+    if (!ret) {
+        ret = regulator_set_enable(regulator, true);
+        if (ret) {
+            printf("Failed to turn ON the VBUS regulator\n");
+            return ret;
+        }
+    }
+
     /* Enable USB xHCI (VBUS, reset etc) in board specific code */
     board_xhci_enable();
 
Signature · 2 lines
Best regards,
Marek Vasut
#6 lore raw

PATCH v5 4/6 mvebu: usb: xhci: Add VBUS regulator supply to the host driver

Quoted 76 lines · Marek Vasut
Quoted 67 lines · Konstantin Porotchkin
Quoted 65 lines · Marek Vasut
Quoted 63 lines · Konstantin Porotchkin
Quoted 55 lines · Marek Vasut
Quoted 49 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

The USB device should linked to VBUS regulator through "vbus-supply" DTS property.
This patch adds handling for "vbus-supply" property inside the USB device entry for turning on the VBUS regulator upon the host adapter probe.

Cc Stefan Roese <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Nadav Haklai <[email protected]>
Cc Neta Zur Hershkovits <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Haim Boot <[email protected]>

---
Changes for v5:
- Extended clocks description in documentation
- Removed print for regulator not found case

 doc/device-tree-bindings/usb/marvell.xhci-usb.txt | 29
+++++++++++++++++++++++
 drivers/usb/host/Kconfig                          |  1 +
 drivers/usb/host/xhci-mvebu.c                     | 13 +++++++++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 doc/device-tree-bindings/usb/marvell.xhci-usb.txt
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +15 -0
new file mode 100644
index 0000000..6cc370c
@@ -0,0 +1,29 @@
+Marvell SOC USB controllers
+
+This controller is integrated in Armada 3700/8K.
+It uses the same properties as a generic XHCI host controller
+
+Required properties :
+ - compatible: should be one or more of:
+   - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx SoCs
+   - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
+ - reg: should contain address and length of the standard XHCI
+   register set for the device.
+ - interrupts: one XHCI interrupt should be described here.
+
+Optional properties:
+ - clocks: reference to a platform clocks that should be
Quoted 2 lines

enabled/configured
+ upon interface initialization. May not exist on all platforms.

This is probably block clock then ?

Quoted 2 lines

Otherwise,

Otherwise the the internal SoC clock does not require gating/muxing or any other configuration for making this USB host adapter running. Not sure if I understood your question well.

Quoted 7 lines
Quoted 2 lines

Well, do these clock drive the USB block or do they drive the register interface or what ?

This entry is generic and applicable to all XHCI controllers, so it is hard to answer your question. It supposes to be a clock that drives the data transfer. It can be directly connected to the internal clock generator and divider or pass though an additional gate/mux. In the last case it can be inhibited or redirected.

Quoted 4 lines

So it's a PHY clock then ? Or XHCI block clock ?

marvell.xhci-usb.txt probably doesn't contain generic stuff, but marvell XHCI implementation specific stuff, right ?

No, in this particular case this entry is generic. That is why I proposed to remove it in the past. For the purpose of mvebu XHCI driver this entry is not required.
In general and in Marvell case particularly, every unit is driven by some kind of internal clock.

Quoted 73 lines
Quoted 71 lines
Quoted 70 lines
Quoted 48 lines
Quoted 48 lines
Quoted 48 lines

+ - vbus-supply : If present, specifies the fixed regulator to be turned on

doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +12 -0
+   for providing power to the USB VBUS rail.
+
+Example:
+    cpm_usb3_0: usb3 at 500000 {
+        compatible = "marvell,armada-8k-xhci",
+                 "generic-xhci";
+        reg = <0x500000 0x4000>;
+        interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cpm_syscon0 1 22>;
+        vbus-supply = <&reg_usb3h0_vbus>;
+        status = "disabled";
+    };
drivers/usb/host/Kconfig +1 -0
index 5129a57..0bf8274 100644
@@ -25,6 +25,7 @@ config USB_XHCI_MVEBU
     bool "MVEBU USB 3.0 support"
     default y
     depends on ARCH_MVEBU
+    select DM_REGULATOR
     help
       Choose this option to add support for USB 3.0 driver on mvebu
       SoCs, which includes Armada8K, Armada3700 and other Armada
drivers/usb/host/xhci-mvebu.c +3 -1
index 46eb937..d880af1 100644
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <usb.h>
+#include <power/regulator.h>
 #include <asm/gpio.h>
 
 #include "xhci.h"
@@ -44,12 +45,22 @@ static int xhci_usb_probe(struct udevice *dev)
     struct mvebu_xhci_platdata *plat = dev_get_platdata(dev);
     struct mvebu_xhci *ctx = dev_get_priv(dev);
     struct xhci_hcor *hcor;
-    int len;
+    int len, ret;
+    struct udevice *regulator;
 
Quoted 5 lines
Quoted 5 lines

drivers/usb/host/xhci-mvebu.c static int xhci_usb_probe(struct udevice *dev)

Quoted 5 lines
drivers/usb/host/xhci-mvebu.c +1 -0
     ctx->hcd = (struct xhci_hccr *)plat->hcd_base;
     len = HC_LENGTH(xhci_readl(&ctx->hcd->cr_capbase));
     hcor = (struct xhci_hcor *)((uintptr_t)ctx->hcd + len);
 
+    ret = device_get_supply_regulator(dev, "vbus-supply",

&regulator);

Quoted 14 lines
Quoted 14 lines
Quoted 12 lines
drivers/usb/host/xhci-mvebu.c +8 -0
+    if (!ret) {
+        ret = regulator_set_enable(regulator, true);
+        if (ret) {
+            printf("Failed to turn ON the VBUS regulator\n");
+            return ret;
+        }
+    }
+
     /* Enable USB xHCI (VBUS, reset etc) in board specific code */
     board_xhci_enable();
 
#7 lore raw

PATCH v5 4/6 mvebu: usb: xhci: Add VBUS regulator supply to the host driver

Quoted 88 lines · Konstantin Porotchkin
Quoted 86 lines · Marek Vasut
Quoted 10 lines · Konstantin Porotchkin
Quoted 8 lines · Marek Vasut
Quoted 7 lines · Konstantin Porotchkin
Quoted 4 lines · Marek Vasut
Quoted 3 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

The USB device should linked to VBUS regulator through

"vbus-supply"

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

DTS property.
This patch adds handling for "vbus-supply" property inside the USB device entry for turning on the VBUS regulator upon the host

adapter

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines

probe.

Cc Stefan Roese <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Nadav Haklai <[email protected]>
Cc Neta Zur Hershkovits <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Haim Boot <[email protected]>

---
Changes for v5:
- Extended clocks description in documentation
- Removed print for regulator not found case

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
 doc/device-tree-bindings/usb/marvell.xhci-usb.txt | 29
+++++++++++++++++++++++
 drivers/usb/host/Kconfig                          |  1 +
 drivers/usb/host/xhci-mvebu.c                     | 13 +++++++++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644

doc/device-tree-bindings/usb/marvell.xhci-usb.txt

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 8 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +0 -0
new file mode 100644
index 0000000..6cc370c

doc/device-tree-bindings/usb/marvell.xhci-usb.txt line 8

Quoted 8 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +8 -0
@@ -0,0 +1,29 @@
+Marvell SOC USB controllers
+
+This controller is integrated in Armada 3700/8K.
+It uses the same properties as a generic XHCI host controller
+
+Required properties :
+ - compatible: should be one or more of:
+   - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx

SoCs

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 9 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +7 -0
+   - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
+ - reg: should contain address and length of the standard XHCI
+   register set for the device.
+ - interrupts: one XHCI interrupt should be described here.
+
+Optional properties:
+ - clocks: reference to a platform clocks that should be

enabled/configured
+ upon interface initialization. May not exist on all platforms.

This is probably block clock then ?

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Otherwise,

Otherwise the the internal SoC clock does not require

gating/muxing or

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

any other configuration for making this USB host adapter running. Not sure if I understood your question well.

Well, do these clock drive the USB block or do they drive the

register

Quoted 3 lines
Quoted 1 line

interface or what ?

This entry is generic and applicable to all XHCI controllers, so it is hard to answer your question. It supposes to be a clock that drives

the

Quoted 2 lines

data transfer. It can be directly connected to the internal clock generator and divider or pass though an additional gate/mux. In the

last

Quoted 1 line

case it can be inhibited or redirected.

So it's a PHY clock then ? Or XHCI block clock ?

Quoted 7 lines
Quoted 2 lines

marvell.xhci-usb.txt probably doesn't contain generic stuff, but marvell XHCI implementation specific stuff, right ?

No, in this particular case this entry is generic. That is why I proposed to remove it in the past.
For the purpose of mvebu XHCI driver this entry is not required. In general and in Marvell case particularly, every unit is driven by some kind of internal clock.

And those internal clock can never ever be gated ? That's some odd design, I would not expect that on an advanced ARM chip ... I guess marvell is not power conscious ? :) The example contradicts what you just said though, it points into some clock module ...

Signature · 2 lines
Best regards,
Marek Vasut
#8 lore raw

PATCH v5 4/6 mvebu: usb: xhci: Add VBUS regulator supply to the host driver

Quoted 97 lines · Marek Vasut
Quoted 88 lines · Konstantin Porotchkin
Quoted 86 lines · Marek Vasut
Quoted 10 lines · Konstantin Porotchkin
Quoted 8 lines · Marek Vasut
Quoted 7 lines · Konstantin Porotchkin
Quoted 4 lines · Marek Vasut
Quoted 3 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

The USB device should linked to VBUS regulator through

"vbus-supply"

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

DTS property.
This patch adds handling for "vbus-supply" property inside the USB device entry for turning on the VBUS regulator upon the host

adapter

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines

probe.

Cc Stefan Roese <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Nadav Haklai <[email protected]>
Cc Neta Zur Hershkovits <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Haim Boot <[email protected]>

---
Changes for v5:
- Extended clocks description in documentation
- Removed print for regulator not found case

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
 doc/device-tree-bindings/usb/marvell.xhci-usb.txt | 29
+++++++++++++++++++++++
 drivers/usb/host/Kconfig                          |  1 +
 drivers/usb/host/xhci-mvebu.c                     | 13 +++++++++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644

doc/device-tree-bindings/usb/marvell.xhci-usb.txt

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 8 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +0 -0
new file mode 100644
index 0000000..6cc370c

doc/device-tree-bindings/usb/marvell.xhci-usb.txt line 8

Quoted 8 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +8 -0
@@ -0,0 +1,29 @@
+Marvell SOC USB controllers
+
+This controller is integrated in Armada 3700/8K.
+It uses the same properties as a generic XHCI host controller
+
+Required properties :
+ - compatible: should be one or more of:
+   - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx

SoCs

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 9 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +7 -0
+   - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
+ - reg: should contain address and length of the standard XHCI
+   register set for the device.
+ - interrupts: one XHCI interrupt should be described here.
+
+Optional properties:
+ - clocks: reference to a platform clocks that should be

enabled/configured
+ upon interface initialization. May not exist on all platforms.

This is probably block clock then ?

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Otherwise,

Otherwise the the internal SoC clock does not require

gating/muxing or

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

any other configuration for making this USB host adapter running. Not sure if I understood your question well.

Well, do these clock drive the USB block or do they drive the

register

Quoted 3 lines
Quoted 1 line

interface or what ?

This entry is generic and applicable to all XHCI controllers, so it is hard to answer your question. It supposes to be a clock that drives

the

Quoted 2 lines

data transfer. It can be directly connected to the internal clock generator and divider or pass though an additional gate/mux. In the

last

Quoted 1 line

case it can be inhibited or redirected.

So it's a PHY clock then ? Or XHCI block clock ?

Quoted 7 lines
Quoted 2 lines

marvell.xhci-usb.txt probably doesn't contain generic stuff, but marvell XHCI implementation specific stuff, right ?

No, in this particular case this entry is generic. That is why I proposed to remove it in the past.
For the purpose of mvebu XHCI driver this entry is not required. In general and in Marvell case particularly, every unit is driven by some kind of internal clock.

Quoted 4 lines

And those internal clock can never ever be gated ? That's some odd design, I would not expect that on an advanced ARM chip ... I guess marvell is not power conscious ? :) The example contradicts what you just said though, it points into some clock module ...

Yes, it can be gated. It is a gated clock coming from system controller. This XHCI driver supports two different SoC families, so the real clock names may vary.
Please help me to understand what is missing in this description? Should I add "this clock is a gated unit clock driven by system controller" to th description?
Should I drop this description file and submit it in a separate patch?

Quoted 2 lines
#9 lore raw

PATCH v5 4/6 mvebu: usb: xhci: Add VBUS regulator supply to the host driver

Quoted 105 lines · Konstantin Porotchkin
Quoted 98 lines · Marek Vasut
Quoted 88 lines · Konstantin Porotchkin
Quoted 86 lines · Marek Vasut
Quoted 10 lines · Konstantin Porotchkin
Quoted 8 lines · Marek Vasut
Quoted 7 lines · Konstantin Porotchkin
Quoted 4 lines · Marek Vasut
Quoted 3 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

The USB device should linked to VBUS regulator through

"vbus-supply"

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

DTS property.
This patch adds handling for "vbus-supply" property inside the USB device entry for turning on the VBUS regulator upon the host

adapter

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines

probe.

Cc Stefan Roese <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Nadav Haklai <[email protected]>
Cc Neta Zur Hershkovits <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Haim Boot <[email protected]>

---
Changes for v5:
- Extended clocks description in documentation
- Removed print for regulator not found case

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
 doc/device-tree-bindings/usb/marvell.xhci-usb.txt | 29
+++++++++++++++++++++++
 drivers/usb/host/Kconfig                          |  1 +
 drivers/usb/host/xhci-mvebu.c                     | 13 +++++++++-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644

doc/device-tree-bindings/usb/marvell.xhci-usb.txt

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 8 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +0 -0
new file mode 100644
index 0000000..6cc370c

doc/device-tree-bindings/usb/marvell.xhci-usb.txt line 8

Quoted 8 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +8 -0
@@ -0,0 +1,29 @@
+Marvell SOC USB controllers
+
+This controller is integrated in Armada 3700/8K.
+It uses the same properties as a generic XHCI host controller
+
+Required properties :
+ - compatible: should be one or more of:
+   - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx

SoCs

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 9 lines
doc/device-tree-bindings/usb/marvell.xhci-usb.txt new file +7 -0
+   - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
+ - reg: should contain address and length of the standard XHCI
+   register set for the device.
+ - interrupts: one XHCI interrupt should be described here.
+
+Optional properties:
+ - clocks: reference to a platform clocks that should be

enabled/configured
+ upon interface initialization. May not exist on all platforms.

This is probably block clock then ?

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Otherwise,

Otherwise the the internal SoC clock does not require

gating/muxing or

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

any other configuration for making this USB host adapter running. Not sure if I understood your question well.

Well, do these clock drive the USB block or do they drive the

register

Quoted 3 lines
Quoted 1 line

interface or what ?

This entry is generic and applicable to all XHCI controllers, so it is hard to answer your question. It supposes to be a clock that drives

the

Quoted 2 lines

data transfer. It can be directly connected to the internal clock generator and divider or pass though an additional gate/mux. In the

last

Quoted 1 line

case it can be inhibited or redirected.

So it's a PHY clock then ? Or XHCI block clock ?

Quoted 8 lines
Quoted 3 lines

marvell.xhci-usb.txt probably doesn't contain generic stuff, but marvell
XHCI implementation specific stuff, right ?

No, in this particular case this entry is generic. That is why I proposed to remove it in the past.
For the purpose of mvebu XHCI driver this entry is not required. In general and in Marvell case particularly, every unit is driven by some kind of internal clock.

Quoted 4 lines

And those internal clock can never ever be gated ? That's some odd design, I would not expect that on an advanced ARM chip ... I guess marvell is not power conscious ? :) The example contradicts what you just said though, it points into some clock module ...

Quoted 7 lines

Yes, it can be gated. It is a gated clock coming from system controller. This XHCI driver supports two different SoC families, so the real clock names may vary.
Please help me to understand what is missing in this description? Should I add "this clock is a gated unit clock driven by system controller" to th description?
Should I drop this description file and submit it in a separate patch?

Something like "phandle to system controller clock for this block" would do then, or something ...

Signature · 2 lines
Best regards,
Marek Vasut