Move options from 'flags' field in private structure to param structure
where other options are already being kept.
Signed-off-by: Chris Brandt
Reviewed-by: Yoshihiro Shimoda
Reviewed-by: Simon Horman
---
v2:
* added reviewed-by
---
drivers/usb/renesas_usbhs/com
Enable USB Host support for both the Type-C connector on the CPU board
and the Type-A plug on the sub board.
Both boards are also capable of USB Device operation as well after the
appropriate Device Tree modifications.
Signed-off-by: Chris Brandt
Reviewed-by: Geert Uytterhoeven
---
v3
Document the optional dr_mode property
Signed-off-by: Chris Brandt
Reviewed-by: Rob Herring
Reviewed-by: Yoshihiro Shimoda
Reviewed-by: Simon Horman
---
v2:
* added reviewed-by
---
Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 3 +++
1 file changed, 3 insertions(+)
diff
Add EHCI and OHCI host support for RZ/A2.
Signed-off-by: Chris Brandt
Reviewed-by: Geert Uytterhoeven
---
v4:
* "fclk" to "fck"
* changed phy reg size 0x10 -> 0x700
* added reviewed-by
v3:
* add usb_x1 as a clock source
* add clock-names
v2:
* changed to gener
For some SoC, CNEN must be set for USB Device mode operation.
Signed-off-by: Chris Brandt
Reviewed-by: Yoshihiro Shimoda
Reviewed-by: Simon Horman
---
v3:
* added reviewed-by
v2:
* options are now held in param
---
drivers/usb/renesas_usbhs/common.c | 6 ++
drivers/usb/renesas_usbhs
Document RZ/A2 (R7S9210) SoC bindings.
Signed-off-by: Chris Brandt
Reviewed-by: Rob Herring
Reviewed-by: Yoshihiro Shimoda
Reviewed-by: Simon Horman
---
v2:
* added reviewed-by
---
Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 10 ++
1 file changed, 6 insertions
The RZ/A2 has an optional dedicated 48MHz clock input for the PLL.
If a clock node named 'usb_x1' exists and set to non-zero, then we can
assume we want it use it.
Signed-off-by: Chris Brandt
Reviewed-by: Yoshihiro Shimoda
Reviewed-by: Simon Horman
---
v4:
* added reviewed-by
v3
When not using OTG, the PHY will need to know if it should function as
host or peripheral by checking dr_mode in the PHY node (not the parent
controller node).
Signed-off-by: Chris Brandt
Reviewed-by: Yoshihiro Shimoda
Reviewed-by: Simon Horman
---
v4:
* added reviewed-by
v3:
* changed
The RZ/A2 is similar to the R-Car Gen3 with some small differences.
Signed-off-by: Chris Brandt
Reviewed-by: Simon Horman
---
v4:
* Removed extra blank line
* Removed 'if' from exit function
* added reviewed-by
v3:
* Removed check for CONFIG_GENERIC_PHY
* rebase on top of Shimo
Add USB Device support for RZ/A2.
Signed-off-by: Chris Brandt
Reviewed-by: Geert Uytterhoeven
---
v3:
* added reviewed-by
v2:
* changed to generic name usb@xxx
* Add space between compatible strings
---
arch/arm/boot/dts/r7s9210.dtsi | 24
1 file changed, 24
Document the USB_X1 input and add clock-names to identify
functional and USB_X1 clocks.
Signed-off-by: Chris Brandt
Reviewed-by: Rob Herring
Reviewed-by: Yoshihiro Shimoda
Reviewed-by: Geert Uytterhoeven
Reviewed-by: Simon Horman
---
v4:
* 'Name' to 'Names'
* &quo
would look like to enable USB channel 0 as a device instead of a host.
&usb2_phy0 {
pinctrl-names = "default";
pinctrl-0 = <&usb0_pins>;
dr_mode = "peripheral";
status = "okay";
};
&usbhs0 {
status = "ok
Some SoC have a CFIFO register that is byte addressable. This means
when the CFIFO access is set to 32-bit, you can write 8-bit values to
addresses CFIFO+0, CFIFO+1, CFIFO+2, CFIFO+3.
Signed-off-by: Chris Brandt
Reviewed-by: Yoshihiro Shimoda
Reviewed-by: Simon Horman
---
v3:
* added reviewed
Add support for r7s9210 (RZ/A2M) SoC
Signed-off-by: Chris Brandt
Reviewed-by: Rob Herring
Reviewed-by: Yoshihiro Shimoda
Reviewed-by: Simon Horman
---
v3:
* added reviewed-by
v2:
* fixed typo from copy/paste of RZ/A1 line
---
Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2
Hi Geert,
On Wed, May 15, 2019 1, Geert Uytterhoeven wrote:
> > > Does resistor R78 need to be mounted, too?
> >
> > By default, R78 and R79 are not populated on these boards, and both Host
> > and Function work fine without board modification, so I would say
> > populating R78 is not a requiremen
Hi Morimoto-san,
> > + if (priv->phy) {
> > + phy_put(priv->phy);
> > + priv->phy = NULL;
> > + }
> > +
> > + return 0;
> > +}
>
> phy_put() will do nothing if priv->phy was NULL.
> We can remove if() here ?
OK. I will remove 'if'.
#I copied Shimoda-san's code from rca
Hi Geert,
On Wed, May 15, 2019, Geert Uytterhoeven wrote:
> > +/* USB-0 as Host */
> > +/* NOTE: Requires JP3 to be fitted */
>
> This not applies to the dr_mode property below, right?
> So perhaps it should be moved there...
>
> > +&usb2_phy0 {
> > + pinctrl-names = "default";
> > +
Hi Geert,
On Wed, May 15, 2019, Geert Uytterhoeven wrote:
> > + reg = <0xe8218200 0x10>;
>
> What about the other registers?
> On R-Car Gen3, size is 0x700.
> Same for usb2_phy1.
Ahhh, good catch.
Chris
Hi Geert,
On Wed, May 15, 2019, Geert Uytterhoeven wrote:
> > + - "renesas,usbhs-r7s9210" for r7s72100 (RZ/A2) compatible device
>
> for r7s9210 ...
Thank you!
Chris
Hi Shimoda-san,
> From: Yoshihiro Shimoda
> Sent: Wednesday, May 15, 2019 3:53 AM
> > +#include "rza.h"
> > +
> > +
>
> I should have realized this on v2 patch though, this double blank lines
> should be a line. After fixed it,
OK, I will remove it and resend.
Chris
For some SoC, CNEN must be set for USB Device mode operation.
Signed-off-by: Chris Brandt
---
v2:
* options are now held in param
---
drivers/usb/renesas_usbhs/common.c | 6 ++
drivers/usb/renesas_usbhs/common.h | 1 +
include/linux/usb/renesas_usbhs.h | 1 +
3 files changed, 8 insertions
When not using OTG, the PHY will need to know if it should function as
host or peripheral by checking dr_mode in the PHY node (not the parent
controller node).
Signed-off-by: Chris Brandt
---
v3:
* changed 'if' to 'switch'
* use rcar_gen3_set_host_mode() instead of writel()
Add USB Device support for RZ/A2.
Signed-off-by: Chris Brandt
---
v2:
* changed to generic name usb@xxx
* Add space between compatible strings
---
arch/arm/boot/dts/r7s9210.dtsi | 24
1 file changed, 24 insertions(+)
diff --git a/arch/arm/boot/dts/r7s9210.dtsi b/arch
The RZ/A2 has an optional dedicated 48MHz clock input for the PLL.
If a clock node named 'usb_x1' exists and set to non-zero, then we can
assume we want it use it.
Signed-off-by: Chris Brandt
---
v3:
* avoid magic number
* use devm_clk_get and clk_get_rate
v2:
* use 'usb
Document RZ/A2 (R7S9210) SoC bindings.
Signed-off-by: Chris Brandt
---
Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
b/Documentation
Add USB clock node. If present, this clock input must be 48MHz.
Signed-off-by: Chris Brandt
Reviewed-by: Simon Horman
---
v2:
* added reviewed-by
---
arch/arm/boot/dts/r7s9210.dtsi | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/r7s9210.dtsi b/arch/arm/boot/dts
Add EHCI and OHCI host support for RZ/A2.
Signed-off-by: Chris Brandt
---
v3:
* add usb_x1 as a clock source
* add clock-names
v2:
* changed to generic name usb@xxx
* Add space between compatible strings
---
arch/arm/boot/dts/r7s9210.dtsi | 66 ++
1
Some SoC have a CFIFO register that is byte addressable. This means
when the CFIFO access is set to 32-bit, you can write 8-bit values to
addresses CFIFO+0, CFIFO+1, CFIFO+2, CFIFO+3.
Signed-off-by: Chris Brandt
---
v2:
* options ahve moved from flags to param
---
drivers/usb/renesas_usbhs
Enable USB Host support for both the Type-C connector on the CPU board
and the Type-A plug on the sub board.
Both boards are also capable of USB Device operation as well after the
appropriate Device Tree modifications.
Signed-off-by: Chris Brandt
---
v2:
* added blank line between nodes
Document the optional dr_mode property
Signed-off-by: Chris Brandt
---
Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
b/Documentation/devicetree/bindings/phy/rcar
;
pinctrl-0 = <&usb0_pins>;
dr_mode = "peripheral";
status = "okay";
};
&usbhs0 {
status = "okay";
};
Chris Brandt (15):
ARM: dts: r7s9210: Add USB clock
ARM: dts: rza2mevb: Add 48MHz USB clock
phy: renesas: rcar-g
The RZ/A2 is similar to the R-Car Gen3 with some small differences.
Signed-off-by: Chris Brandt
---
v3:
* Removed check for CONFIG_GENERIC_PHY
* rebase on top of Shimoda-san (v2) patch
v2:
* combined RZA1 and RZA2 for fifo setting
* added braces to make code easier to read
* fixed and clean
Move options from 'flags' field in private structure to param structure
where other options are already being kept.
Signed-off-by: Chris Brandt
---
drivers/usb/renesas_usbhs/common.c | 23 +++
drivers/usb/renesas_usbhs/common.h | 2 --
include/linux/usb/renes
Add support for r7s9210 (RZ/A2M) SoC
Signed-off-by: Chris Brandt
---
Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
The RZ/A2M EVB has a 48MHz clock attached to USB_X1.
Signed-off-by: Chris Brandt
Reviewed-by: Simon Horman
---
v2:
* added reviewed-by
---
arch/arm/boot/dts/r7s9210-rza2mevb.dts | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/r7s9210-rza2mevb.dts
b/arch/arm/boot
Document the USB_X1 input and add clock-names to identify
functional and USB_X1 clocks.
Signed-off-by: Chris Brandt
---
v3:
* added clock names
v2:
* removed 'use_usb_x1' option
* document that 'usb_x1' clock node will be detected to determine if
48MHz clock exist
Hi Geert,
Thank you for the quick reply.
On Mon, May 13, 2019, Geert Uytterhoeven wrote:
> > [phy-rcar-gen3-usb2.c]
> > usb_x1_clk = devm_clk_get(dev, "usb_x1");
> > if (!IS_ERR(usb_x1_clk)))
> > if (clk_get_rate(usb_x1_clk))
>
> if (!IS_ERR(usb_x1_clk) && clk_ge
Hi Geert and Shimoda-san,
On Fri, May 10, 2019, Geert Uytterhoeven wrote:
> > I think we can reuse it like below:
> >
> > - clock-names: Name of the clocks. This property is model-dependent.
> > - R-Car Gen3 SoCs use a single functional clock. The clock doesn't
> need to be
> > named.
> >
On Sat, May 11, 2019, Sergei Shtylyov wrote:
> > case USB_DR_MODE_UNKNOWN:
> > case USB_DR_MODE_OTG:
>
> Maybe default: instead?
Yes, using default instead works.
Thank you!
Chris
This patch adds the capability to support RZ/A1 SoCs.
Signed-off-by: Chris Brandt
---
v2:
* Removed "renesas,usbhs-r7s72100"
* Changed license of rza.c
---
drivers/usb/renesas_usbhs/Makefile | 2 +-
drivers/usb/renesas_usbhs/common.c | 13 ++
drivers/usb/renesas_usbhs/com
v2:
* Node name is now generic 'usb@'
* GIC_SPI (73-32) is now just GIC_SPI 41
* All hex number are lower case
* Added Reviewed-by
Chris Brandt (3):
usb: renesas_usbhs: Add support for RZ/A1
dt-bindings: usb: renesas_usbhs: Add support for RZ/A1
ARM: dts: r7s72100: add USB devi
Add USB device support.
Signed-off-by: Chris Brandt
Reviewed-by: Geert Uytterhoeven
---
v4:
* Changed to "renesas,usbhs-r7s72100", "renesas,rza1-usbhs"
v3:
* Changed from "renesas,usbhs-r7s72100" to "renesas,rza1-usbhs"
v2:
* Node name is now gener
Document support for RZ/A1 SoCs
Signed-off-by: Chris Brandt
Reviewed-by: Geert Uytterhoeven
---
v4:
* Re-added "renesas,usbhs-r7s72100"
v3:
* Removed "renesas,usbhs-r7s72100"
v2:
* Added Reviewed-by
---
Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 +
Hi Geert and Simon,
On Monday, January 08, 2018, Geert Uytterhoeven wrote:
> Thanks for the update, but I think there has been a misunderstanding.
> I didn't mean to drop "renesas,usbhs-r7s72100" everywhere, only from
> the matching in the driver.
Opps, I was all kinds of confused then.
So, b
Add USB device support.
Signed-off-by: Chris Brandt
Reviewed-by: Geert Uytterhoeven
---
v3:
* Changed from "renesas,usbhs-r7s72100" to "renesas,rza1-usbhs"
v2:
* Node name is now generic 'usb@'
* GIC_SPI (73-32) is now just GIC_SPI 41
* All hex number are l
Document support for RZ/A1 SoCs
Signed-off-by: Chris Brandt
Reviewed-by: Geert Uytterhoeven
---
v3:
* Removed "renesas,usbhs-r7s72100"
v2:
* Added Reviewed-by
---
Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Doc
This patch adds the capability to support RZ/A1 SoCs.
Signed-off-by: Chris Brandt
---
v2:
* Removed "renesas,usbhs-r7s72100"
* Changed license of rza.c
---
drivers/usb/renesas_usbhs/Makefile | 2 +-
drivers/usb/renesas_usbhs/common.c | 13 ++
drivers/usb/renesas_usbhs/com
anged from "renesas,usbhs-r7s72100" to "renesas,rza1-usbhs"
* Removed "renesas,usbhs-r7s72100"
* Changed License of rza.c
v2:
* Node name is now generic 'usb@'
* GIC_SPI (73-32) is now just GIC_SPI 41
* All hex number are lower case
* Added Reviewed-by
Hi Geert,
On Friday, January 05, 2018, Geert Uytterhoeven wrote:
> > + {
> > + .compatible = "renesas,usbhs-r7s72100",
> > + .data = (void *)USBHS_TYPE_RZA1,
> > + },
>
> I think it suffices to drop the part above...
>
> > {
> > .co
name is now generic 'usb@'
* GIC_SPI (73-32) is now just GIC_SPI 41
* All hex number are lower case
* Added Reviewed-by
Chris Brandt (3):
usb: renesas_usbhs: Add support for RZ/A1
dt-bindings: usb: renesas_usbhs: Add support for RZ/A1
ARM: dts: r7s72100: add USB device
Document support for RZ/A1 SoCs
Signed-off-by: Chris Brandt
Reviewed-by: Geert Uytterhoeven
---
v2:
* Added Reviewed-by
---
Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
b
Add USB device support.
Signed-off-by: Chris Brandt
Reviewed-by: Geert Uytterhoeven
---
v2:
* Node name is now generic 'usb@'
* GIC_SPI (73-32) is now just GIC_SPI 41
* All hex number are lower case
* Added Reviewed-by
---
arch/arm/boot/dts/r7s72100.dtsi | 20 ++
This patch adds the capability to support RZ/A1 SoCs.
Signed-off-by: Chris Brandt
---
drivers/usb/renesas_usbhs/Makefile | 2 +-
drivers/usb/renesas_usbhs/common.c | 17 +
drivers/usb/renesas_usbhs/common.h | 6 +
drivers/usb/renesas_usbhs/rza.c| 52
Hi Geert,
On Friday, January 05, 2018, Geert Uytterhoeven wrote:
> > But then...the number goes back to '73' when you look at it in
> > /proc/interrupts.
>
> Having an identical number in /proc/interrupts is a coincidence.
> These numbers are virtual, and may change even across reboots.
I'm not
Hi Geert,
Thanks for the review.
On Friday, January 05, 2018, Geert Uytterhoeven wrote:
> > + interrupts = ;
>
> "41", all other interrupt properties already have the SPI offset
> subtracted?
The actual HW vector number in the hardware manual is '73'.
As you know, you need to subt
On Friday, January 05, 2018, Sergei Shtylyov wrote:
> > + usbhs0: usbhs@e801 {
>
> The node names should be generic, i.e "usb@e801".
>
> > + compatible = "renesas,usbhs-r7s72100";
> > + reg = <0xe801 0x1A0>;
>
> Lowercase in the hex values, please be con
This series adds RZ/A1 gadget support to the renesas_usbhs driver.
Basically, it's almost the same HW as the R-Car (and SH) parts.
The only real difference is the some extra registers for the PHY.
This was tested on an RSK board by connecting to a PC as an
Ethernet CDC gadget.
Chris Bran
This patch adds the capability to support RZ/A1 SoCs.
Signed-off-by: Chris Brandt
---
drivers/usb/renesas_usbhs/Makefile | 2 +-
drivers/usb/renesas_usbhs/common.c | 17 +
drivers/usb/renesas_usbhs/common.h | 6 +
drivers/usb/renesas_usbhs/rza.c| 52
Document support for RZ/A1 SoCs
Signed-off-by: Chris Brandt
---
Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index
Add USB device support.
Signed-off-by: Chris Brandt
---
arch/arm/boot/dts/r7s72100.dtsi | 20
1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
index ab9645a42eca..eb414e735185 100644
--- a/arch/arm/boot/dts
. This
leads to endpoints never getting serviced if one endpoint is using NAK as
a flow control method.
Fixes: 5d3043586db4 ("usb: r8a66597-hcd: host controller driver for R8A6659")
Signed-off-by: Chris Brandt
---
drivers/usb/host/r8a66597-hcd.c | 4 +++-
1 file changed, 3 insert
Signed-off-by: Chris Brandt
---
drivers/usb/host/r8a66597-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 9c3413d550bb..7bf78be1fd32 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/hos
62 matches
Mail list logo