RE: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling

2016-02-22 Thread Yoshihiro Shimoda
Hi,

> Hi,
> 
> On Tuesday 23 February 2016 11:54 AM, Yoshihiro Shimoda wrote:
> > Hi Kishon,
> >
> > Would you review this patch?
> 
> merged it now. Thanks for reminding.

Thank you!

Best regards,
Yoshihiro Shimoda

> -Kishon
> 



RE: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling

2016-02-22 Thread Yoshihiro Shimoda
Hi,

> Hi,
> 
> On Tuesday 23 February 2016 11:54 AM, Yoshihiro Shimoda wrote:
> > Hi Kishon,
> >
> > Would you review this patch?
> 
> merged it now. Thanks for reminding.

Thank you!

Best regards,
Yoshihiro Shimoda

> -Kishon
> 



Re: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling

2016-02-22 Thread Kishon Vijay Abraham I
Hi,

On Tuesday 23 February 2016 11:54 AM, Yoshihiro Shimoda wrote:
> Hi Kishon,
> 
> Would you review this patch?

merged it now. Thanks for reminding.

-Kishon

> 
> I checked the latest linux-phy.git / next branch today,
> this patch can be applied on the top of branch.
> 
> commit 6b825eb7323a634cdd1014a4aa9a8ff07cf8040c
> Author: Heiko Stuebner <he...@sntech.de>
> Date:   Mon Feb 22 12:55:01 2016 +0100
> 
> phy: rockchip-usb: add handler for usb-uart functionality
> 
> Best regards,
> Yoshihiro Shimoda
> 
>> -Original Message-
>> From: Yoshihiro Shimoda
>> Sent: Tuesday, February 02, 2016 5:29 PM
>> To: kis...@ti.com
>> Cc: pawel.m...@arm.com; mark.rutl...@arm.com; ijc+devicet...@hellion.org.uk; 
>> ga...@codeaurora.org;
>> linux-kernel@vger.kernel.org; devicet...@vger.kernel.org; 
>> linux...@vger.kernel.org; 'Rob Herring' <r...@kernel.org>;
>> linux-renesas-...@vger.kernel.org
>> Subject: RE: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling
>>
>> Hi Kishon,
>>
>> Would you review this patch?
>> I checked the latest linux-phy.git / next branch today, and it is the same 
>> as the following.
>>
>>>>  This patch is based on the linux-phy / next branch.
>>>>  (commit id = 9955a7835bf376e12482583958b2661f501b868b)
>>
>> Best regards,
>> Yoshihiro Shimoda
>>
>>> From: Rob Herring [mailto:r...@kernel.org]
>>> Sent: Sunday, January 10, 2016 7:33 AM
>>> To: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com>
>>> Cc: kis...@ti.com; pawel.m...@arm.com; mark.rutl...@arm.com; 
>>> ijc+devicet...@hellion.org.uk; ga...@codeaurora.org;
>>> linux-kernel@vger.kernel.org; devicet...@vger.kernel.org; 
>>> linux...@vger.kernel.org
>>> Subject: Re: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling
>>>
>>> On Thu, Jan 07, 2016 at 06:16:44PM +0900, Yoshihiro Shimoda wrote:
>>>> Since the related driver (CPG/MSSR driver) only manages the first module
>>>> clock, this driver should not handle the HSUSB registers. So, this patch
>>>> removes the HSUSB registers handling.
>>>>
>>>> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com>
>>>> ---
>>>>  This patch is based on the linux-phy / next branch.
>>>>  (commit id = 9955a7835bf376e12482583958b2661f501b868b)
>>>>
>>>>  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 15 ++--
>>>
>>> Acked-by: Rob Herring <r...@kernel.org>
>>>
>>>>  drivers/phy/phy-rcar-gen3-usb2.c   | 83 
>>>> +++---
>>>>  2 files changed, 15 insertions(+), 83 deletions(-)
>>>
> 


Re: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling

2016-02-22 Thread Kishon Vijay Abraham I
Hi,

On Tuesday 23 February 2016 11:54 AM, Yoshihiro Shimoda wrote:
> Hi Kishon,
> 
> Would you review this patch?

merged it now. Thanks for reminding.

-Kishon

> 
> I checked the latest linux-phy.git / next branch today,
> this patch can be applied on the top of branch.
> 
> commit 6b825eb7323a634cdd1014a4aa9a8ff07cf8040c
> Author: Heiko Stuebner 
> Date:   Mon Feb 22 12:55:01 2016 +0100
> 
> phy: rockchip-usb: add handler for usb-uart functionality
> 
> Best regards,
> Yoshihiro Shimoda
> 
>> -Original Message-
>> From: Yoshihiro Shimoda
>> Sent: Tuesday, February 02, 2016 5:29 PM
>> To: kis...@ti.com
>> Cc: pawel.m...@arm.com; mark.rutl...@arm.com; ijc+devicet...@hellion.org.uk; 
>> ga...@codeaurora.org;
>> linux-kernel@vger.kernel.org; devicet...@vger.kernel.org; 
>> linux...@vger.kernel.org; 'Rob Herring' ;
>> linux-renesas-...@vger.kernel.org
>> Subject: RE: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling
>>
>> Hi Kishon,
>>
>> Would you review this patch?
>> I checked the latest linux-phy.git / next branch today, and it is the same 
>> as the following.
>>
>>>>  This patch is based on the linux-phy / next branch.
>>>>  (commit id = 9955a7835bf376e12482583958b2661f501b868b)
>>
>> Best regards,
>> Yoshihiro Shimoda
>>
>>> From: Rob Herring [mailto:r...@kernel.org]
>>> Sent: Sunday, January 10, 2016 7:33 AM
>>> To: Yoshihiro Shimoda 
>>> Cc: kis...@ti.com; pawel.m...@arm.com; mark.rutl...@arm.com; 
>>> ijc+devicet...@hellion.org.uk; ga...@codeaurora.org;
>>> linux-kernel@vger.kernel.org; devicet...@vger.kernel.org; 
>>> linux...@vger.kernel.org
>>> Subject: Re: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling
>>>
>>> On Thu, Jan 07, 2016 at 06:16:44PM +0900, Yoshihiro Shimoda wrote:
>>>> Since the related driver (CPG/MSSR driver) only manages the first module
>>>> clock, this driver should not handle the HSUSB registers. So, this patch
>>>> removes the HSUSB registers handling.
>>>>
>>>> Signed-off-by: Yoshihiro Shimoda 
>>>> ---
>>>>  This patch is based on the linux-phy / next branch.
>>>>  (commit id = 9955a7835bf376e12482583958b2661f501b868b)
>>>>
>>>>  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 15 ++--
>>>
>>> Acked-by: Rob Herring 
>>>
>>>>  drivers/phy/phy-rcar-gen3-usb2.c   | 83 
>>>> +++---
>>>>  2 files changed, 15 insertions(+), 83 deletions(-)
>>>
> 


RE: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling

2016-02-22 Thread Yoshihiro Shimoda
Hi Kishon,

Would you review this patch?

I checked the latest linux-phy.git / next branch today,
this patch can be applied on the top of branch.

commit 6b825eb7323a634cdd1014a4aa9a8ff07cf8040c
Author: Heiko Stuebner <he...@sntech.de>
Date:   Mon Feb 22 12:55:01 2016 +0100

phy: rockchip-usb: add handler for usb-uart functionality

Best regards,
Yoshihiro Shimoda

> -Original Message-
> From: Yoshihiro Shimoda
> Sent: Tuesday, February 02, 2016 5:29 PM
> To: kis...@ti.com
> Cc: pawel.m...@arm.com; mark.rutl...@arm.com; ijc+devicet...@hellion.org.uk; 
> ga...@codeaurora.org;
> linux-kernel@vger.kernel.org; devicet...@vger.kernel.org; 
> linux...@vger.kernel.org; 'Rob Herring' <r...@kernel.org>;
> linux-renesas-...@vger.kernel.org
> Subject: RE: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling
> 
> Hi Kishon,
> 
> Would you review this patch?
> I checked the latest linux-phy.git / next branch today, and it is the same as 
> the following.
> 
> > >  This patch is based on the linux-phy / next branch.
> > >  (commit id = 9955a7835bf376e12482583958b2661f501b868b)
> 
> Best regards,
> Yoshihiro Shimoda
> 
> > From: Rob Herring [mailto:r...@kernel.org]
> > Sent: Sunday, January 10, 2016 7:33 AM
> > To: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com>
> > Cc: kis...@ti.com; pawel.m...@arm.com; mark.rutl...@arm.com; 
> > ijc+devicet...@hellion.org.uk; ga...@codeaurora.org;
> > linux-kernel@vger.kernel.org; devicet...@vger.kernel.org; 
> > linux...@vger.kernel.org
> > Subject: Re: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling
> >
> > On Thu, Jan 07, 2016 at 06:16:44PM +0900, Yoshihiro Shimoda wrote:
> > > Since the related driver (CPG/MSSR driver) only manages the first module
> > > clock, this driver should not handle the HSUSB registers. So, this patch
> > > removes the HSUSB registers handling.
> > >
> > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com>
> > > ---
> > >  This patch is based on the linux-phy / next branch.
> > >  (commit id = 9955a7835bf376e12482583958b2661f501b868b)
> > >
> > >  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 15 ++--
> >
> > Acked-by: Rob Herring <r...@kernel.org>
> >
> > >  drivers/phy/phy-rcar-gen3-usb2.c   | 83 
> > > +++---
> > >  2 files changed, 15 insertions(+), 83 deletions(-)
> >



RE: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling

2016-02-22 Thread Yoshihiro Shimoda
Hi Kishon,

Would you review this patch?

I checked the latest linux-phy.git / next branch today,
this patch can be applied on the top of branch.

commit 6b825eb7323a634cdd1014a4aa9a8ff07cf8040c
Author: Heiko Stuebner 
Date:   Mon Feb 22 12:55:01 2016 +0100

phy: rockchip-usb: add handler for usb-uart functionality

Best regards,
Yoshihiro Shimoda

> -Original Message-
> From: Yoshihiro Shimoda
> Sent: Tuesday, February 02, 2016 5:29 PM
> To: kis...@ti.com
> Cc: pawel.m...@arm.com; mark.rutl...@arm.com; ijc+devicet...@hellion.org.uk; 
> ga...@codeaurora.org;
> linux-kernel@vger.kernel.org; devicet...@vger.kernel.org; 
> linux...@vger.kernel.org; 'Rob Herring' ;
> linux-renesas-...@vger.kernel.org
> Subject: RE: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling
> 
> Hi Kishon,
> 
> Would you review this patch?
> I checked the latest linux-phy.git / next branch today, and it is the same as 
> the following.
> 
> > >  This patch is based on the linux-phy / next branch.
> > >  (commit id = 9955a7835bf376e12482583958b2661f501b868b)
> 
> Best regards,
> Yoshihiro Shimoda
> 
> > From: Rob Herring [mailto:r...@kernel.org]
> > Sent: Sunday, January 10, 2016 7:33 AM
> > To: Yoshihiro Shimoda 
> > Cc: kis...@ti.com; pawel.m...@arm.com; mark.rutl...@arm.com; 
> > ijc+devicet...@hellion.org.uk; ga...@codeaurora.org;
> > linux-kernel@vger.kernel.org; devicet...@vger.kernel.org; 
> > linux...@vger.kernel.org
> > Subject: Re: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling
> >
> > On Thu, Jan 07, 2016 at 06:16:44PM +0900, Yoshihiro Shimoda wrote:
> > > Since the related driver (CPG/MSSR driver) only manages the first module
> > > clock, this driver should not handle the HSUSB registers. So, this patch
> > > removes the HSUSB registers handling.
> > >
> > > Signed-off-by: Yoshihiro Shimoda 
> > > ---
> > >  This patch is based on the linux-phy / next branch.
> > >  (commit id = 9955a7835bf376e12482583958b2661f501b868b)
> > >
> > >  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 15 ++--
> >
> > Acked-by: Rob Herring 
> >
> > >  drivers/phy/phy-rcar-gen3-usb2.c   | 83 
> > > +++---
> > >  2 files changed, 15 insertions(+), 83 deletions(-)
> >



RE: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling

2016-02-02 Thread Yoshihiro Shimoda
Hi Kishon,

Would you review this patch?
I checked the latest linux-phy.git / next branch today, and it is the same as 
the following.

> >  This patch is based on the linux-phy / next branch.
> >  (commit id = 9955a7835bf376e12482583958b2661f501b868b)

Best regards,
Yoshihiro Shimoda

> From: Rob Herring [mailto:r...@kernel.org]
> Sent: Sunday, January 10, 2016 7:33 AM
> To: Yoshihiro Shimoda 
> Cc: kis...@ti.com; pawel.m...@arm.com; mark.rutl...@arm.com; 
> ijc+devicet...@hellion.org.uk; ga...@codeaurora.org;
> linux-kernel@vger.kernel.org; devicet...@vger.kernel.org; 
> linux...@vger.kernel.org
> Subject: Re: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling
> 
> On Thu, Jan 07, 2016 at 06:16:44PM +0900, Yoshihiro Shimoda wrote:
> > Since the related driver (CPG/MSSR driver) only manages the first module
> > clock, this driver should not handle the HSUSB registers. So, this patch
> > removes the HSUSB registers handling.
> >
> > Signed-off-by: Yoshihiro Shimoda 
> > ---
> >  This patch is based on the linux-phy / next branch.
> >  (commit id = 9955a7835bf376e12482583958b2661f501b868b)
> >
> >  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 15 ++--
> 
> Acked-by: Rob Herring 
> 
> >  drivers/phy/phy-rcar-gen3-usb2.c   | 83 
> > +++---
> >  2 files changed, 15 insertions(+), 83 deletions(-)
> 



RE: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling

2016-02-02 Thread Yoshihiro Shimoda
Hi Kishon,

Would you review this patch?
I checked the latest linux-phy.git / next branch today, and it is the same as 
the following.

> >  This patch is based on the linux-phy / next branch.
> >  (commit id = 9955a7835bf376e12482583958b2661f501b868b)

Best regards,
Yoshihiro Shimoda

> From: Rob Herring [mailto:r...@kernel.org]
> Sent: Sunday, January 10, 2016 7:33 AM
> To: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com>
> Cc: kis...@ti.com; pawel.m...@arm.com; mark.rutl...@arm.com; 
> ijc+devicet...@hellion.org.uk; ga...@codeaurora.org;
> linux-kernel@vger.kernel.org; devicet...@vger.kernel.org; 
> linux...@vger.kernel.org
> Subject: Re: [PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling
> 
> On Thu, Jan 07, 2016 at 06:16:44PM +0900, Yoshihiro Shimoda wrote:
> > Since the related driver (CPG/MSSR driver) only manages the first module
> > clock, this driver should not handle the HSUSB registers. So, this patch
> > removes the HSUSB registers handling.
> >
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com>
> > ---
> >  This patch is based on the linux-phy / next branch.
> >  (commit id = 9955a7835bf376e12482583958b2661f501b868b)
> >
> >  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 15 ++--
> 
> Acked-by: Rob Herring <r...@kernel.org>
> 
> >  drivers/phy/phy-rcar-gen3-usb2.c   | 83 
> > +++---
> >  2 files changed, 15 insertions(+), 83 deletions(-)
> 



[PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling

2016-01-07 Thread Yoshihiro Shimoda
Since the related driver (CPG/MSSR driver) only manages the first module
clock, this driver should not handle the HSUSB registers. So, this patch
removes the HSUSB registers handling.

Signed-off-by: Yoshihiro Shimoda 
---
 This patch is based on the linux-phy / next branch.
 (commit id = 9955a7835bf376e12482583958b2661f501b868b)

 .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 15 ++--
 drivers/phy/phy-rcar-gen3-usb2.c   | 83 +++---
 2 files changed, 15 insertions(+), 83 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt 
b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
index 2390e4e..eaf7e9b 100644
--- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
+++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
@@ -7,33 +7,26 @@ Required properties:
 - compatible: "renesas,usb2-phy-r8a7795" if the device is a part of an R8A7795
  SoC.
 - reg: offset and length of the partial USB 2.0 Host register block.
-- reg-names: must be "usb2_host".
 - clocks: clock phandle and specifier pair(s).
 - #phy-cells: see phy-bindings.txt in the same directory, must be <0>.
 
 Optional properties:
 To use a USB channel where USB 2.0 Host and HSUSB (USB 2.0 Peripheral) are
-combined, the device tree node should set HSUSB properties to reg and reg-names
-properties. This is because HSUSB has registers to select USB 2.0 host or
-peripheral at that channel:
-- reg: offset and length of the partial HSUSB register block.
-- reg-names: must be "hsusb".
+combined, the device tree node should set interrupt properties to use the
+channel as USB OTG:
 - interrupts: interrupt specifier for the PHY.
 
 Example (R-Car H3):
 
usb-phy@ee080200 {
compatible = "renesas,usb2-phy-r8a7795";
-   reg = <0 0xee080200 0 0x700>, <0 0xe6590100 0 0x100>;
-   reg-names = "usb2_host", "hsusb";
+   reg = <0 0xee080200 0 0x700>;
interrupts = ;
-   clocks = <_clks R8A7795_CLK_EHCI0>,
-<_clks R8A7795_CLK_HSUSB>;
+   clocks = <_clks R8A7795_CLK_EHCI0>;
};
 
usb-phy@ee0a0200 {
compatible = "renesas,usb2-phy-r8a7795";
reg = <0 0xee0a0200 0 0x700>;
-   reg-names = "usb2_host";
clocks = <_clks R8A7795_CLK_EHCI0>;
};
diff --git a/drivers/phy/phy-rcar-gen3-usb2.c b/drivers/phy/phy-rcar-gen3-usb2.c
index ef332ef..bc4f7dd 100644
--- a/drivers/phy/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/phy-rcar-gen3-usb2.c
@@ -74,20 +74,6 @@
 #define USB2_ADPCTRL_IDPULLUP  BIT(5)  /* 1 = ID sampling is enabled */
 #define USB2_ADPCTRL_DRVVBUS   BIT(4)
 
-/*** HSUSB registers (original offset is +0x100) ***/
-#define HSUSB_LPSTS0x02
-#define HSUSB_UGCTRL2  0x84
-
-/* Low Power Status register (LPSTS) */
-#define HSUSB_LPSTS_SUSPM  0x4000
-
-/* USB General control register 2 (UGCTRL2) */
-#define HSUSB_UGCTRL2_MASK 0x0031 /* bit[31:6] should be 0 */
-#define HSUSB_UGCTRL2_USB0SEL  0x0030
-#define HSUSB_UGCTRL2_USB0SEL_HOST 0x0010
-#define HSUSB_UGCTRL2_USB0SEL_HS_USB   0x0020
-#define HSUSB_UGCTRL2_USB0SEL_OTG  0x0030
-
 struct rcar_gen3_data {
void __iomem *base;
struct clk *clk;
@@ -95,8 +81,8 @@ struct rcar_gen3_data {
 
 struct rcar_gen3_chan {
struct rcar_gen3_data usb2;
-   struct rcar_gen3_data hsusb;
struct phy *phy;
+   bool has_otg;
 };
 
 static void rcar_gen3_set_host_mode(struct rcar_gen3_chan *ch, int host)
@@ -202,24 +188,15 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)
 {
struct rcar_gen3_chan *channel = phy_get_drvdata(p);
void __iomem *usb2_base = channel->usb2.base;
-   void __iomem *hsusb_base = channel->hsusb.base;
-   u32 val;
 
/* Initialize USB2 part */
writel(USB2_INT_ENABLE_INIT, usb2_base + USB2_INT_ENABLE);
writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET);
writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET);
 
-   /* Initialize HSUSB part */
-   if (hsusb_base) {
-   val = readl(hsusb_base + HSUSB_UGCTRL2);
-   val = (val & ~HSUSB_UGCTRL2_USB0SEL) |
- HSUSB_UGCTRL2_USB0SEL_OTG;
-   writel(val & HSUSB_UGCTRL2_MASK, hsusb_base + HSUSB_UGCTRL2);
-
-   /* Initialize otg part */
+   /* Initialize otg part */
+   if (channel->has_otg)
rcar_gen3_init_otg(channel);
-   }
 
return 0;
 }
@@ -237,7 +214,6 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
 {
struct rcar_gen3_chan *channel = phy_get_drvdata(p);
void __iomem *usb2_base = channel->usb2.base;
-   void __iomem *hsusb_base = channel->hsusb.base;
u32 val;
 
val = readl(usb2_base + USB2_USBCTR);

[PATCH] phy: rcar-gen3-usb2: remove HSUSB registers handling

2016-01-07 Thread Yoshihiro Shimoda
Since the related driver (CPG/MSSR driver) only manages the first module
clock, this driver should not handle the HSUSB registers. So, this patch
removes the HSUSB registers handling.

Signed-off-by: Yoshihiro Shimoda 
---
 This patch is based on the linux-phy / next branch.
 (commit id = 9955a7835bf376e12482583958b2661f501b868b)

 .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 15 ++--
 drivers/phy/phy-rcar-gen3-usb2.c   | 83 +++---
 2 files changed, 15 insertions(+), 83 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt 
b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
index 2390e4e..eaf7e9b 100644
--- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
+++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
@@ -7,33 +7,26 @@ Required properties:
 - compatible: "renesas,usb2-phy-r8a7795" if the device is a part of an R8A7795
  SoC.
 - reg: offset and length of the partial USB 2.0 Host register block.
-- reg-names: must be "usb2_host".
 - clocks: clock phandle and specifier pair(s).
 - #phy-cells: see phy-bindings.txt in the same directory, must be <0>.
 
 Optional properties:
 To use a USB channel where USB 2.0 Host and HSUSB (USB 2.0 Peripheral) are
-combined, the device tree node should set HSUSB properties to reg and reg-names
-properties. This is because HSUSB has registers to select USB 2.0 host or
-peripheral at that channel:
-- reg: offset and length of the partial HSUSB register block.
-- reg-names: must be "hsusb".
+combined, the device tree node should set interrupt properties to use the
+channel as USB OTG:
 - interrupts: interrupt specifier for the PHY.
 
 Example (R-Car H3):
 
usb-phy@ee080200 {
compatible = "renesas,usb2-phy-r8a7795";
-   reg = <0 0xee080200 0 0x700>, <0 0xe6590100 0 0x100>;
-   reg-names = "usb2_host", "hsusb";
+   reg = <0 0xee080200 0 0x700>;
interrupts = ;
-   clocks = <_clks R8A7795_CLK_EHCI0>,
-<_clks R8A7795_CLK_HSUSB>;
+   clocks = <_clks R8A7795_CLK_EHCI0>;
};
 
usb-phy@ee0a0200 {
compatible = "renesas,usb2-phy-r8a7795";
reg = <0 0xee0a0200 0 0x700>;
-   reg-names = "usb2_host";
clocks = <_clks R8A7795_CLK_EHCI0>;
};
diff --git a/drivers/phy/phy-rcar-gen3-usb2.c b/drivers/phy/phy-rcar-gen3-usb2.c
index ef332ef..bc4f7dd 100644
--- a/drivers/phy/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/phy-rcar-gen3-usb2.c
@@ -74,20 +74,6 @@
 #define USB2_ADPCTRL_IDPULLUP  BIT(5)  /* 1 = ID sampling is enabled */
 #define USB2_ADPCTRL_DRVVBUS   BIT(4)
 
-/*** HSUSB registers (original offset is +0x100) ***/
-#define HSUSB_LPSTS0x02
-#define HSUSB_UGCTRL2  0x84
-
-/* Low Power Status register (LPSTS) */
-#define HSUSB_LPSTS_SUSPM  0x4000
-
-/* USB General control register 2 (UGCTRL2) */
-#define HSUSB_UGCTRL2_MASK 0x0031 /* bit[31:6] should be 0 */
-#define HSUSB_UGCTRL2_USB0SEL  0x0030
-#define HSUSB_UGCTRL2_USB0SEL_HOST 0x0010
-#define HSUSB_UGCTRL2_USB0SEL_HS_USB   0x0020
-#define HSUSB_UGCTRL2_USB0SEL_OTG  0x0030
-
 struct rcar_gen3_data {
void __iomem *base;
struct clk *clk;
@@ -95,8 +81,8 @@ struct rcar_gen3_data {
 
 struct rcar_gen3_chan {
struct rcar_gen3_data usb2;
-   struct rcar_gen3_data hsusb;
struct phy *phy;
+   bool has_otg;
 };
 
 static void rcar_gen3_set_host_mode(struct rcar_gen3_chan *ch, int host)
@@ -202,24 +188,15 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)
 {
struct rcar_gen3_chan *channel = phy_get_drvdata(p);
void __iomem *usb2_base = channel->usb2.base;
-   void __iomem *hsusb_base = channel->hsusb.base;
-   u32 val;
 
/* Initialize USB2 part */
writel(USB2_INT_ENABLE_INIT, usb2_base + USB2_INT_ENABLE);
writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET);
writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET);
 
-   /* Initialize HSUSB part */
-   if (hsusb_base) {
-   val = readl(hsusb_base + HSUSB_UGCTRL2);
-   val = (val & ~HSUSB_UGCTRL2_USB0SEL) |
- HSUSB_UGCTRL2_USB0SEL_OTG;
-   writel(val & HSUSB_UGCTRL2_MASK, hsusb_base + HSUSB_UGCTRL2);
-
-   /* Initialize otg part */
+   /* Initialize otg part */
+   if (channel->has_otg)
rcar_gen3_init_otg(channel);
-   }
 
return 0;
 }
@@ -237,7 +214,6 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
 {
struct rcar_gen3_chan *channel = phy_get_drvdata(p);
void __iomem *usb2_base = channel->usb2.base;
-   void __iomem *hsusb_base = channel->hsusb.base;
u32 val;
 
val =