Skip to contentSkip to conversation

USB: ohci-pxa27x: add DT bindings

PATCH Superseded Daniel Mack 2 participants 2 messages Jul 25, 2012

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: ohci-pxa27x: add DT bindings

Add DT bindings to the ohci-pxa27x driver and some documentation.

Successfully tested on a PXA3xx board.

---
 Documentation/devicetree/bindings/usb/pxa-usb.txt |   31 ++++++++++
 drivers/usb/host/ohci-pxa27x.c                    |   68 +++++++++++++++++++++
 2 files changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/pxa-usb.txt
Documentation/devicetree/bindings/usb/pxa-usb.txt new file +31 -0
new file mode 100644
index 0000000..d623012
@@ -0,0 +1,31 @@
+PXA USB controllers
+
+OHCI
+
+Required properties:
+ - compatible: Should be "mrvl,pxa-ohci" for USB controllers
+   used in host mode.
+
+Optional properties:
+ - "mrvl,enable-port1", "mrvl,enable-port2", "mrvl,enable-port3"
+   If present, enables the appropriate USB port of the controller.
+ - "mrvl,port-mode" selects the mode of the ports:
+	1 = PMM_NPS_MODE
+	2 = PMM_GLOBAL_MODE
+	3 = PMM_PERPORT_MODE
+ - "mrvl,power-sense-low" - power sense pin is low-active.
+ - "mrvl,power-control-low" - power control pin is low-active.
+ - "mrvl,no-oc-protection" - disable over-current protection.
+ - "mrvl,oc-mode-perport" - enable per-port over-current protection.
+ - "mrvl,power_on_delay" Power On to Power Good time - in ms.
+
+Example:
+
+	usb0: ohci at 4c000000 {
+		compatible = "mrvl,pxa-ohci", "usb-ohci";
+		reg = <0x4c000000 0x100000>;
+		interrupts = <18>;
+		mrvl,enable-port1;
+		mrvl,port-mode = <2>; /* PMM_GLOBAL_MODE */
+	};
+
drivers/usb/host/ohci-pxa27x.c +68 -0

92 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 USB: ohci-pxa27x: add DT bindings

Quoted 14 lines · Daniel Mack
Documentation/devicetree/bindings/usb/pxa-usb.txt new file +10 -0
@@ -0,0 +1,31 @@
+PXA USB controllers
+
+OHCI
+
+Required properties:
+ - compatible: Should be "mrvl,pxa-ohci" for USB controllers
+   used in host mode.
+
+Optional properties:
+ - "mrvl,enable-port1", "mrvl,enable-port2", "mrvl,enable-port3"

Documentation/devicetree/bindings/usb/pxa-usb.txt line 20

Quoted 10 lines
Documentation/devicetree/bindings/usb/pxa-usb.txt new file +10 -0
+   If present, enables the appropriate USB port of the controller.
+ - "mrvl,port-mode" selects the mode of the ports:
+	1 = PMM_NPS_MODE
+	2 = PMM_GLOBAL_MODE
+	3 = PMM_PERPORT_MODE
+ - "mrvl,power-sense-low" - power sense pin is low-active.
+ - "mrvl,power-control-low" - power control pin is low-active.
+ - "mrvl,no-oc-protection" - disable over-current protection.
+ - "mrvl,oc-mode-perport" - enable per-port over-current protection.
+ - "mrvl,power_on_delay" Power On to Power Good time - in ms.

We're in the process of changing all uses of "mrvl" to "marvell" so we use the same everywhere. Please change this too.

For the various flags, I wonder which ones actually depend on the board configuration and which ones depend only on the SoC variant that is used. If they are just different between SoCs, I would recommend using different "compatible" values and looking up the entire flags word. If most of them are board specific, better leave it like you have now.

For the three enable-port* values, I think using a bit mask would be slightly nicer, but your version is fine too.

Arnd