[PATCH v2] arm64: dts: renesas: revise properties for R-Car Gen3 SoCs' usb 2.0

2018-09-21 Thread Yoshihiro Shimoda
R-Car Gen3 SoCs need to enable/deassert clocks/resets of both usb 2.0
host (included phy) and peripheral. Otherwise, other side device
cannot work correctly. So, this patch revises properties of clocks
and resets. After that, each device driver can enable/deassert
clocks/resets by its self.

Notes:
 - To work the renesas_usbhs driver correctly when host side drivers
   are disabled and the renesas_usbhs driver doesn't have multiple
   clock management, this patch doesn't change the order of the clocks
   property in each hsusb node.
 - This patch doesn't have any side-effects even if the renesas_usbhs
   driver doesn't have reset_control and multiple clock management.

Signed-off-by: Yoshihiro Shimoda 
Reviewed-by: Simon Horman 
---
 This patch is based on the renesas.git / renesas-devel-20180919-v4.19-rc4 tag.
 This patch is related to the following patches which will be merged into
 v4.20:

  
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-testing&id=0e4aeab775f9e9358c4bc522b87e9f6e2cfe0973
  
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-testing&id=c29e240484ea17c756455149348e59523f462993
  
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-testing&id=f181dbb4824130e84f46e5be5b49cf6456f96683
  
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-testing&id=8e0d368a59bf87efa5ee4daea142527d01447864
  
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-testing&id=3df0e240caba641e0d70640e3baf34d34c105176

Changes from v1:
 - Revise the subject and log a little.
 - Remove clock-names.
 - Add Simon-san's Reviewed-by.

 arch/arm64/boot/dts/renesas/r8a7795.dtsi  | 32 +++
 arch/arm64/boot/dts/renesas/r8a7796.dtsi  | 16 
 arch/arm64/boot/dts/renesas/r8a77965.dtsi | 16 
 arch/arm64/boot/dts/renesas/r8a77990.dtsi | 12 ++--
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 12 ++--
 5 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi 
b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 83077fd..b5f2273 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -697,7 +697,7 @@
 "renesas,rcar-gen3-usbhs";
reg = <0 0xe659 0 0x100>;
interrupts = ;
-   clocks = <&cpg CPG_MOD 704>;
+   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";
@@ -705,7 +705,7 @@
phys = <&usb2_phy0>;
phy-names = "usb";
power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-   resets = <&cpg 704>;
+   resets = <&cpg 704>, <&cpg 703>;
status = "disabled";
};
 
@@ -714,7 +714,7 @@
 "renesas,rcar-gen3-usbhs";
reg = <0 0xe659c000 0 0x100>;
interrupts = ;
-   clocks = <&cpg CPG_MOD 705>;
+   clocks = <&cpg CPG_MOD 705>, <&cpg CPG_MOD 700>;
dmas = <&usb_dmac2 0>, <&usb_dmac2 1>,
   <&usb_dmac3 0>, <&usb_dmac3 1>;
dma-names = "ch0", "ch1", "ch2", "ch3";
@@ -722,7 +722,7 @@
phys = <&usb2_phy3>;
phy-names = "usb";
power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-   resets = <&cpg 705>;
+   resets = <&cpg 705>, <&cpg 700>;
status = "disabled";
};
 
@@ -2097,11 +2097,11 @@
compatible = "generic-ohci";
reg = <0 0xee08 0 0x100>;
interrupts = ;
-   clocks = <&cpg CPG_MOD 703>;
+   clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
phys = <&usb2_phy0>;
phy-names = "usb";
power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-   resets = <&cpg 703>;
+   resets = <&cpg 703>, <&cpg 704>;
status = "disabled";
};
 
@@ -2133,11 +2133,11 @@
compatible = "generic-ohci";
reg = <0 0xee0e 0 0x100>;
interrupts = ;
-   clocks = <&cpg CPG_MOD 700>;
+   clocks = <&cpg CPG_MOD 700>, <&cpg CPG_MOD 705>;
phys = <&usb2_phy3>;
phy-names = "usb";
powe

Re: [PATCH v2] arm64: dts: renesas: revise properties for R-Car Gen3 SoCs' usb 2.0

2018-09-25 Thread Simon Horman
On Fri, Sep 21, 2018 at 04:54:17PM +0900, Yoshihiro Shimoda wrote:
> R-Car Gen3 SoCs need to enable/deassert clocks/resets of both usb 2.0
> host (included phy) and peripheral. Otherwise, other side device
> cannot work correctly. So, this patch revises properties of clocks
> and resets. After that, each device driver can enable/deassert
> clocks/resets by its self.
> 
> Notes:
>  - To work the renesas_usbhs driver correctly when host side drivers
>are disabled and the renesas_usbhs driver doesn't have multiple
>clock management, this patch doesn't change the order of the clocks
>property in each hsusb node.
>  - This patch doesn't have any side-effects even if the renesas_usbhs
>driver doesn't have reset_control and multiple clock management.
> 
> Signed-off-by: Yoshihiro Shimoda 
> Reviewed-by: Simon Horman 

Thanks Shimoda-san,

applied for v4.20.