arm64: dts: renesas: r8a7799{0|5}: add/enable USB2.0 peripheral
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 24 Oct 2018 08:32:33 +0000 (17:32 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 5 Nov 2018 15:08:35 +0000 (16:08 +0100)
This patch adds/enables USB2.0 peripheral for R-Car [DE]3 boards.

R-Car E3 Ebisu board connects the ID pin to the SoC, so this adds
a group "usb0_id" into usb0_pins node. Also, to use SW15 pin 3 side,
this patch adds vbus0_usb2 node on r8a77990-ebisu.dts.

R-Car D3 Draak board doesn't connect the ID pin, so this adds
"renesas,no-otg-pins" property into usb2_phy0 node.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
arch/arm64/boot/dts/renesas/r8a77990.dtsi
arch/arm64/boot/dts/renesas/r8a77995-draak.dts
arch/arm64/boot/dts/renesas/r8a77995.dtsi

index ff428a64341cac82a27f2d25f09effc7547ae4a2..038664e0cdcb6c06fe610a16d79d1aff5fb308fe 100644 (file)
                regulator-always-on;
        };
 
+       vbus0_usb2: regulator-vbus0-usb2 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "USB20_VBUS_CN";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        x13_clk: x13 {
                compatible = "fixed-clock";
                #clock-cells = <0>;
 };
 
 &ehci0 {
+       dr_mode = "otg";
        status = "okay";
 };
 
        clock-frequency = <48000000>;
 };
 
+&hsusb {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &i2c0 {
        status = "okay";
 
 };
 
 &ohci0 {
+       dr_mode = "otg";
        status = "okay";
 };
 
        };
 
        usb0_pins: usb {
-               groups = "usb0_b";
+               groups = "usb0_b", "usb0_id";
                function = "usb0";
        };
 
        pinctrl-0 = <&usb0_pins>;
        pinctrl-names = "default";
 
+       vbus-supply = <&vbus0_usb2>;
        status = "okay";
 };
 
index a945db3c464443af49774547814bea5fafa9d82e..8c9d7faa9e65b41bee36cc3f0dc21986795593e4 100644 (file)
                        resets = <&cpg 407>;
                };
 
+               hsusb: usb@e6590000 {
+                       compatible = "renesas,usbhs-r8a77990",
+                                    "renesas,rcar-gen3-usbhs";
+                       reg = <0 0xe6590000 0 0x200>;
+                       interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 704>, <&cpg CPG_MOD 703>;
+                       dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
+                              <&usb_dmac1 0>, <&usb_dmac1 1>;
+                       dma-names = "ch0", "ch1", "ch2", "ch3";
+                       renesas,buswait = <11>;
+                       phys = <&usb2_phy0>;
+                       phy-names = "usb";
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 704>, <&cpg 703>;
+                       status = "disabled";
+               };
+
+               usb_dmac0: dma-controller@e65a0000 {
+                       compatible = "renesas,r8a77990-usb-dmac",
+                                    "renesas,usb-dmac";
+                       reg = <0 0xe65a0000 0 0x100>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "ch0", "ch1";
+                       clocks = <&cpg CPG_MOD 330>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 330>;
+                       #dma-cells = <1>;
+                       dma-channels = <2>;
+               };
+
+               usb_dmac1: dma-controller@e65b0000 {
+                       compatible = "renesas,r8a77990-usb-dmac",
+                                    "renesas,usb-dmac";
+                       reg = <0 0xe65b0000 0 0x100>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "ch0", "ch1";
+                       clocks = <&cpg CPG_MOD 331>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 331>;
+                       #dma-cells = <1>;
+                       dma-channels = <2>;
+               };
+
                dmac0: dma-controller@e6700000 {
                        compatible = "renesas,dmac-r8a77990",
                                     "renesas,rcar-dmac";
index 2405eaad0296cf4ee6a00f62a1fb43bb0a007922..48bb1d77744ff71a72f3c181e846ae3ac1097252 100644 (file)
 };
 
 &ehci0 {
+       dr_mode = "host";
        status = "okay";
 };
 
        clock-frequency = <48000000>;
 };
 
+&hsusb {
+       dr_mode = "host";
+       status = "okay";
+};
+
 &i2c0 {
        pinctrl-0 = <&i2c0_pins>;
        pinctrl-names = "default";
 };
 
 &ohci0 {
+       dr_mode = "host";
        status = "okay";
 };
 
        pinctrl-0 = <&usb0_pins>;
        pinctrl-names = "default";
 
+       renesas,no-otg-pins;
        status = "okay";
 };
 
index 214f4954b321b89b2dd58d8b81cd48ce0a1bb8ff..8530d9fc137177f1b5800ea5700daca172beb312 100644 (file)
                        status = "disabled";
                };
 
+               hsusb: usb@e6590000 {
+                       compatible = "renesas,usbhs-r8a77995",
+                                    "renesas,rcar-gen3-usbhs";
+                       reg = <0 0xe6590000 0 0x200>;
+                       interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 704>, <&cpg CPG_MOD 703>;
+                       dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
+                              <&usb_dmac1 0>, <&usb_dmac1 1>;
+                       dma-names = "ch0", "ch1", "ch2", "ch3";
+                       renesas,buswait = <11>;
+                       phys = <&usb2_phy0>;
+                       phy-names = "usb";
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 704>, <&cpg 703>;
+                       status = "disabled";
+               };
+
+               usb_dmac0: dma-controller@e65a0000 {
+                       compatible = "renesas,r8a77995-usb-dmac",
+                                    "renesas,usb-dmac";
+                       reg = <0 0xe65a0000 0 0x100>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "ch0", "ch1";
+                       clocks = <&cpg CPG_MOD 330>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 330>;
+                       #dma-cells = <1>;
+                       dma-channels = <2>;
+               };
+
+               usb_dmac1: dma-controller@e65b0000 {
+                       compatible = "renesas,r8a77995-usb-dmac",
+                                    "renesas,usb-dmac";
+                       reg = <0 0xe65b0000 0 0x100>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "ch0", "ch1";
+                       clocks = <&cpg CPG_MOD 331>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 331>;
+                       #dma-cells = <1>;
+                       dma-channels = <2>;
+               };
+
                canfd: can@e66c0000 {
                        compatible = "renesas,r8a77995-canfd",
                                     "renesas,rcar-gen3-canfd";