Re: [PATCH 3/9] phy-rcar-usb-gen2: add device tree support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 06/03/14 19:16, Sergei Shtylyov wrote:
Hello.

On 03/06/2014 09:01 PM, Ben Dooks wrote:

Add support for the phy-rcar-gen2-usb driver to be probed from device
tree.

Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>
Reviewed-by: Ian Molton <ian.molton@xxxxxxxxxxxxxxx>
---
Fixes from v2:
    - fix missed of_match_ptr()
    - fix names of channel selection booleans
    - updated and merged documentation for dt entries

Fixes from v2:
    - fix missing of_if patch

Fixes from v1:
    - use of_property_reasd-bool()
    - remove unused of_id variable

Cc: Felipe Balbi <balbi@xxxxxx>
Cc: linux-usb@xxxxxxxxxxxxxxx
Cc: linux-sh@xxxxxxxxxxxxxxx
Cc: Magnus Damm <magnus.damm@xxxxxxxxx>
Cc: Simon Horman <horms@xxxxxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx

Conflicts:
    drivers/usb/phy/phy-rcar-gen2-usb.c
---
  .../bindings/usb/renesas,rcar-gen2-usb-phy.txt     | 36
++++++++++++++++++++++
  drivers/pci/host/pci-rcar-gen2.c                   |  1 +

    Eh? What does this file have to do with USB PHY?

Ah, it was a fixup for a missing header that got merged
into the wrong file. Will fix that.

  drivers/usb/phy/phy-rcar-gen2-usb.c                | 34
+++++++++++++++++---
  3 files changed, 66 insertions(+), 5 deletions(-)
  create mode 100644
Documentation/devicetree/bindings/usb/renesas,rcar-gen2-usb-phy.txt

diff --git
a/Documentation/devicetree/bindings/usb/renesas,rcar-gen2-usb-phy.txt
b/Documentation/devicetree/bindings/usb/renesas,rcar-gen2-usb-phy.txt
new file mode 100644
index 0000000..5351a30
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/renesas,rcar-gen2-usb-phy.txt
@@ -0,0 +1,36 @@
+Renesas RCar gen2 USB PHY bindings
+----------------------------------
+
+Bindings for the USB PHY block used in some Renesas SoCs.
+
+Required properties:
+ - compatible:  "renesas,usb-phy-r8a7790" for the R8A7790 SoC
+        "renesas,usb-phy-r8a7791" for the R8A7791 SoC
+ - reg : A single region to access device registers
+ - clocks : The reference to the clock to use for this block
+ - clock-names : The name for the clock at index 0 (must be "usbhs")
+
+Optional properties:
+
+ - renesas,usb0-device: boolean, if present USB0 is connected to HS
device
+            otherwise the USB0 is connected to OHCI/EHCI host.

    IIUC, the testing has shown that USBHS is dual-role controller in
that case, i.e. supports both host and device roles (the manual has the
host controller details too). Vladimir, is it so?

Currently there is no auto-detection for this, so it gets set at
start time.

+ - renesas,usb2-xhci: boolean, if present USB2 is connected to XHCI
controller
+              otherwise the USB2 is connected to OHCI/EHCI host.
+
+
+Example device node for SoC dtsi file:
+
+    usbphy: usbphy@e6590100 {
+        compatible = "renesas,usb-phy-r8a7790";
+        clocks = <&mstp7_clks R8A7790_CLK_HSUSB>;
+        clock-names = "usbhs";
+        reg = < 0x0 0xe6590100 0x0 0x100>;
+        status = "disabled";
+    };
+
+Example board file:
+
+&usbphy {
+    status = "okay";
+};

    These are usually merged into one node for the example.

Much nicer if separate.

--
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux