Message ID | 1524742006-17984-2-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Apr 26, 2018 at 08:26:41PM +0900, Yoshihiro Shimoda wrote: > This patch adds a new documentation for Renesas R-Car USB 3.0 role > switch that can change the USB 3.0 role to either host or peripheral > by a hardware register that is included in USB3.0 peripheral module. > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > --- > .../bindings/usb/renesas,rcar-usb3-role-sw.txt | 47 ++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > > diff --git a/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt b/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > new file mode 100644 > index 0000000..e074c03 > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > @@ -0,0 +1,47 @@ > +Renesas Electronics R-Car USB 3.0 role switch > + > +A renesas_usb3's node can contain this node. > + > +Required properties: > + - compatible: Must contain "renesas,rcar-usb3-role-switch". > + > +Required nodes: > + - The connection to a usb3.0 host node needs by using OF graph bindings. > + - port@0 = USB 3.0 host port > + - port@1 = USB 3.0 peripheral port > + > +Example of R-Car H3 ES2.0: > + usb3_peri0: usb@ee020000 { > + compatible = "renesas,r8a7795-usb3-peri", > + "renesas,rcar-gen3-usb3-peri"; > + reg = <0 0xee020000 0 0x400>; > + interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&cpg CPG_MOD 328>; > + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; > + resets = <&cpg 328>; > + > + usb3-role-sw { > + compatible = "renesas,rcar-usb3-role-switch"; You don't define any h/w resources. How is this device accessed? > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + > + usb3_host_sw: endpoint { > + remote-endpoint = <&usb3_host_ep>; > + }; > + }; > + > + port@1 { > + reg = <1>; > + > + usb3_peri_sw: endpoint { > + remote-endpoint = <&usb3_peri_ep>; > + }; > + }; > + }; > + }; > + }; > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Rob, Sorry for the delayed response. I had a vacation in last week. > From: Rob Herring, Sent: Saturday, April 28, 2018 5:06 AM > > On Thu, Apr 26, 2018 at 08:26:41PM +0900, Yoshihiro Shimoda wrote: > > This patch adds a new documentation for Renesas R-Car USB 3.0 role > > switch that can change the USB 3.0 role to either host or peripheral > > by a hardware register that is included in USB3.0 peripheral module. > > > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > > --- > > .../bindings/usb/renesas,rcar-usb3-role-sw.txt | 47 ++++++++++++++++++++++ > > 1 file changed, 47 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > > > > diff --git a/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > b/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > > new file mode 100644 > > index 0000000..e074c03 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > > @@ -0,0 +1,47 @@ > > +Renesas Electronics R-Car USB 3.0 role switch > > + > > +A renesas_usb3's node can contain this node. > > + > > +Required properties: > > + - compatible: Must contain "renesas,rcar-usb3-role-switch". > > + > > +Required nodes: > > + - The connection to a usb3.0 host node needs by using OF graph bindings. > > + - port@0 = USB 3.0 host port > > + - port@1 = USB 3.0 peripheral port > > + > > +Example of R-Car H3 ES2.0: > > + usb3_peri0: usb@ee020000 { > > + compatible = "renesas,r8a7795-usb3-peri", > > + "renesas,rcar-gen3-usb3-peri"; > > + reg = <0 0xee020000 0 0x400>; > > + interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&cpg CPG_MOD 328>; > > + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; > > + resets = <&cpg 328>; > > + > > + usb3-role-sw { > > + compatible = "renesas,rcar-usb3-role-switch"; > > You don't define any h/w resources. How is this device accessed? This device accesses one of registers in the usb3_peri0. In the detail, the usb3-role-sw uses 0xee020218 (32-bit register) only. (Unfortunately, the hardware design is not good...) In this case, should I describe the following in the usb3-role-sw node? reg = <0 0xee020218 0 4>; Or, shouldn't I add the usb3-role-sw node and a driver for usb3_peri0 should take care for it? Best regards, Yoshihiro Shimoda -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, May 7, 2018 at 9:43 PM, Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> wrote: > Hi Rob, > > Sorry for the delayed response. I had a vacation in last week. > >> From: Rob Herring, Sent: Saturday, April 28, 2018 5:06 AM >> >> On Thu, Apr 26, 2018 at 08:26:41PM +0900, Yoshihiro Shimoda wrote: >> > This patch adds a new documentation for Renesas R-Car USB 3.0 role >> > switch that can change the USB 3.0 role to either host or peripheral >> > by a hardware register that is included in USB3.0 peripheral module. >> > >> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> >> > --- >> > .../bindings/usb/renesas,rcar-usb3-role-sw.txt | 47 ++++++++++++++++++++++ >> > 1 file changed, 47 insertions(+) >> > create mode 100644 Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt >> > >> > diff --git a/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt >> b/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt >> > new file mode 100644 >> > index 0000000..e074c03 >> > --- /dev/null >> > +++ b/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt >> > @@ -0,0 +1,47 @@ >> > +Renesas Electronics R-Car USB 3.0 role switch >> > + >> > +A renesas_usb3's node can contain this node. >> > + >> > +Required properties: >> > + - compatible: Must contain "renesas,rcar-usb3-role-switch". >> > + >> > +Required nodes: >> > + - The connection to a usb3.0 host node needs by using OF graph bindings. >> > + - port@0 = USB 3.0 host port >> > + - port@1 = USB 3.0 peripheral port >> > + >> > +Example of R-Car H3 ES2.0: >> > + usb3_peri0: usb@ee020000 { >> > + compatible = "renesas,r8a7795-usb3-peri", >> > + "renesas,rcar-gen3-usb3-peri"; >> > + reg = <0 0xee020000 0 0x400>; >> > + interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>; >> > + clocks = <&cpg CPG_MOD 328>; >> > + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; >> > + resets = <&cpg 328>; >> > + >> > + usb3-role-sw { >> > + compatible = "renesas,rcar-usb3-role-switch"; >> >> You don't define any h/w resources. How is this device accessed? > > This device accesses one of registers in the usb3_peri0. > In the detail, the usb3-role-sw uses 0xee020218 (32-bit register) only. > (Unfortunately, the hardware design is not good...) > > In this case, should I describe the following in the usb3-role-sw node? > > reg = <0 0xee020218 0 4>; > > Or, shouldn't I add the usb3-role-sw node and a driver for usb3_peri0 should > take care for it? IMO, the driver should take care of it. Rob -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Rob, > From: Rob Herring, Sent: Saturday, May 12, 2018 1:07 AM > > On Mon, May 7, 2018 at 9:43 PM, Yoshihiro Shimoda > <yoshihiro.shimoda.uh@renesas.com> wrote: > > Hi Rob, > > > > Sorry for the delayed response. I had a vacation in last week. > > > >> From: Rob Herring, Sent: Saturday, April 28, 2018 5:06 AM > >> > >> On Thu, Apr 26, 2018 at 08:26:41PM +0900, Yoshihiro Shimoda wrote: > >> > This patch adds a new documentation for Renesas R-Car USB 3.0 role > >> > switch that can change the USB 3.0 role to either host or peripheral > >> > by a hardware register that is included in USB3.0 peripheral module. > >> > > >> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > >> > --- > >> > .../bindings/usb/renesas,rcar-usb3-role-sw.txt | 47 ++++++++++++++++++++++ > >> > 1 file changed, 47 insertions(+) > >> > create mode 100644 Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > >> > > >> > diff --git a/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > >> b/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > >> > new file mode 100644 > >> > index 0000000..e074c03 > >> > --- /dev/null > >> > +++ b/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt > >> > @@ -0,0 +1,47 @@ > >> > +Renesas Electronics R-Car USB 3.0 role switch > >> > + > >> > +A renesas_usb3's node can contain this node. > >> > + > >> > +Required properties: > >> > + - compatible: Must contain "renesas,rcar-usb3-role-switch". > >> > + > >> > +Required nodes: > >> > + - The connection to a usb3.0 host node needs by using OF graph bindings. > >> > + - port@0 = USB 3.0 host port > >> > + - port@1 = USB 3.0 peripheral port > >> > + > >> > +Example of R-Car H3 ES2.0: > >> > + usb3_peri0: usb@ee020000 { > >> > + compatible = "renesas,r8a7795-usb3-peri", > >> > + "renesas,rcar-gen3-usb3-peri"; > >> > + reg = <0 0xee020000 0 0x400>; > >> > + interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>; > >> > + clocks = <&cpg CPG_MOD 328>; > >> > + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; > >> > + resets = <&cpg 328>; > >> > + > >> > + usb3-role-sw { > >> > + compatible = "renesas,rcar-usb3-role-switch"; > >> > >> You don't define any h/w resources. How is this device accessed? > > > > This device accesses one of registers in the usb3_peri0. > > In the detail, the usb3-role-sw uses 0xee020218 (32-bit register) only. > > (Unfortunately, the hardware design is not good...) > > > > In this case, should I describe the following in the usb3-role-sw node? > > > > reg = <0 0xee020218 0 4>; > > > > Or, shouldn't I add the usb3-role-sw node and a driver for usb3_peri0 should > > take care for it? > > IMO, the driver should take care of it. Thank you for the reply. I'll modify the usb3_peri0 driver for role switch. Best regards, Yoshihiro Shimoda > Rob
diff --git a/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt b/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt new file mode 100644 index 0000000..e074c03 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt @@ -0,0 +1,47 @@ +Renesas Electronics R-Car USB 3.0 role switch + +A renesas_usb3's node can contain this node. + +Required properties: + - compatible: Must contain "renesas,rcar-usb3-role-switch". + +Required nodes: + - The connection to a usb3.0 host node needs by using OF graph bindings. + - port@0 = USB 3.0 host port + - port@1 = USB 3.0 peripheral port + +Example of R-Car H3 ES2.0: + usb3_peri0: usb@ee020000 { + compatible = "renesas,r8a7795-usb3-peri", + "renesas,rcar-gen3-usb3-peri"; + reg = <0 0xee020000 0 0x400>; + interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 328>; + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; + resets = <&cpg 328>; + + usb3-role-sw { + compatible = "renesas,rcar-usb3-role-switch"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb3_host_sw: endpoint { + remote-endpoint = <&usb3_host_ep>; + }; + }; + + port@1 { + reg = <1>; + + usb3_peri_sw: endpoint { + remote-endpoint = <&usb3_peri_ep>; + }; + }; + }; + }; + };
This patch adds a new documentation for Renesas R-Car USB 3.0 role switch that can change the USB 3.0 role to either host or peripheral by a hardware register that is included in USB3.0 peripheral module. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- .../bindings/usb/renesas,rcar-usb3-role-sw.txt | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/renesas,rcar-usb3-role-sw.txt