* [PATCH v3 0/3] usb: renesas_usbhs: Add RZ/A1 support
@ 2018-01-05 22:46 Chris Brandt
[not found] ` <20180105224647.42262-1-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 13+ messages in thread
From: Chris Brandt @ 2018-01-05 22:46 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Simon Horman
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
Sergei Shtylyov, Chris Brandt
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.
v3:
* Changed 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
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 to device tree
.../devicetree/bindings/usb/renesas_usbhs.txt | 1 +
arch/arm/boot/dts/r7s72100.dtsi | 20 +++++++++
drivers/usb/renesas_usbhs/Makefile | 2 +-
drivers/usb/renesas_usbhs/common.c | 13 ++++++
drivers/usb/renesas_usbhs/common.h | 6 +++
drivers/usb/renesas_usbhs/rza.c | 52 ++++++++++++++++++++++
drivers/usb/renesas_usbhs/rza.h | 4 ++
include/linux/usb/renesas_usbhs.h | 1 +
8 files changed, 98 insertions(+), 1 deletion(-)
create mode 100644 drivers/usb/renesas_usbhs/rza.c
create mode 100644 drivers/usb/renesas_usbhs/rza.h
--
2.15.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v3 1/3] usb: renesas_usbhs: Add support for RZ/A1
[not found] ` <20180105224647.42262-1-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
@ 2018-01-05 22:46 ` Chris Brandt
2018-01-05 22:46 ` [PATCH v3 2/3] dt-bindings: " Chris Brandt
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Chris Brandt @ 2018-01-05 22:46 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Simon Horman
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
Sergei Shtylyov, Chris Brandt
This patch adds the capability to support RZ/A1 SoCs.
Signed-off-by: Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
---
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/common.h | 6 +++++
drivers/usb/renesas_usbhs/rza.c | 52 ++++++++++++++++++++++++++++++++++++++
drivers/usb/renesas_usbhs/rza.h | 4 +++
include/linux/usb/renesas_usbhs.h | 1 +
6 files changed, 77 insertions(+), 1 deletion(-)
create mode 100644 drivers/usb/renesas_usbhs/rza.c
create mode 100644 drivers/usb/renesas_usbhs/rza.h
diff --git a/drivers/usb/renesas_usbhs/Makefile b/drivers/usb/renesas_usbhs/Makefile
index fac147a3ad23..5c5b51bb48ef 100644
--- a/drivers/usb/renesas_usbhs/Makefile
+++ b/drivers/usb/renesas_usbhs/Makefile
@@ -5,7 +5,7 @@
obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs.o
-renesas_usbhs-y := common.o mod.o pipe.o fifo.o rcar2.o rcar3.o
+renesas_usbhs-y := common.o mod.o pipe.o fifo.o rcar2.o rcar3.o rza.o
ifneq ($(CONFIG_USB_RENESAS_USBHS_HCD),)
renesas_usbhs-y += mod_host.o
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index c5289b3ecf8d..4310df46639d 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -17,6 +17,7 @@
#include "common.h"
#include "rcar2.h"
#include "rcar3.h"
+#include "rza.h"
/*
* image of renesas_usbhs
@@ -488,6 +489,10 @@ static const struct of_device_id usbhs_of_match[] = {
.compatible = "renesas,rcar-gen3-usbhs",
.data = (void *)USBHS_TYPE_RCAR_GEN3,
},
+ {
+ .compatible = "renesas,rza1-usbhs",
+ .data = (void *)USBHS_TYPE_RZA1,
+ },
{ },
};
MODULE_DEVICE_TABLE(of, usbhs_of_match);
@@ -520,6 +525,11 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
dparam->pipe_size = ARRAY_SIZE(usbhsc_new_pipe);
}
+ if (dparam->type == USBHS_TYPE_RZA1) {
+ dparam->pipe_configs = usbhsc_new_pipe;
+ dparam->pipe_size = ARRAY_SIZE(usbhsc_new_pipe);
+ }
+
return info;
}
@@ -591,6 +601,9 @@ static int usbhs_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "no notifier registered\n");
}
break;
+ case USBHS_TYPE_RZA1:
+ priv->pfunc = usbhs_rza1_ops;
+ break;
default:
if (!info->platform_callback.get_id) {
dev_err(&pdev->dev, "no platform callbacks");
diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h
index c9747f064601..f619afeae2b8 100644
--- a/drivers/usb/renesas_usbhs/common.h
+++ b/drivers/usb/renesas_usbhs/common.h
@@ -98,6 +98,7 @@ struct usbhs_priv;
#define D2FIFOCTR 0x00F2 /* for R-Car Gen2 */
#define D3FIFOSEL 0x00F4 /* for R-Car Gen2 */
#define D3FIFOCTR 0x00F6 /* for R-Car Gen2 */
+#define SUSPMODE 0x0102 /* for RZ/A */
/* SYSCFG */
#define SCKE (1 << 10) /* USB Module Clock Enable */
@@ -106,6 +107,8 @@ struct usbhs_priv;
#define DRPD (1 << 5) /* D+ Line/D- Line Resistance Control */
#define DPRPU (1 << 4) /* D+ Line Resistance Control */
#define USBE (1 << 0) /* USB Module Operation Enable */
+#define UCKSEL (1 << 2) /* Clock Select for RZ/A1 */
+#define UPLLE (1 << 1) /* USB PLL Enable for RZ/A1 */
/* DVSTCTR */
#define EXTLP (1 << 10) /* Controls the EXTLP pin output state */
@@ -233,6 +236,9 @@ struct usbhs_priv;
#define USBSPD_SPEED_FULL 0x2
#define USBSPD_SPEED_HIGH 0x3
+/* SUSPMODE */
+#define SUSPM (1 << 14) /* SuspendM Control */
+
/*
* struct
*/
diff --git a/drivers/usb/renesas_usbhs/rza.c b/drivers/usb/renesas_usbhs/rza.c
new file mode 100644
index 000000000000..5b287257ec11
--- /dev/null
+++ b/drivers/usb/renesas_usbhs/rza.c
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Renesas USB driver RZ/A initialization and power control
+ *
+ * Copyright (C) 2018 Chris Brandt
+ * Copyright (C) 2018 Renesas Electronics Corporation
+ */
+
+#include <linux/delay.h>
+#include <linux/io.h>
+#include <linux/of_device.h>
+#include "common.h"
+#include "rza.h"
+
+static int usbhs_rza1_hardware_init(struct platform_device *pdev)
+{
+ struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
+ struct device_node *usb_x1_clk, *extal_clk;
+ u32 freq_usb = 0, freq_extal = 0;
+
+ /* Input Clock Selection (NOTE: ch0 controls both ch0 and ch1) */
+ usb_x1_clk = of_find_node_by_name(NULL, "usb_x1");
+ extal_clk = of_find_node_by_name(NULL, "extal");
+ of_property_read_u32(usb_x1_clk, "clock-frequency", &freq_usb);
+ of_property_read_u32(extal_clk, "clock-frequency", &freq_extal);
+ if (freq_usb == 0) {
+ if (freq_extal == 12000000) {
+ /* Select 12MHz XTAL */
+ usbhs_bset(priv, SYSCFG, UCKSEL, UCKSEL);
+ } else {
+ dev_err(usbhs_priv_to_dev(priv), "A 48MHz USB clock or 12MHz main clock is required.\n");
+ return -EIO;
+ }
+ }
+
+ /* Enable USB PLL (NOTE: ch0 controls both ch0 and ch1) */
+ usbhs_bset(priv, SYSCFG, UPLLE, UPLLE);
+ udelay(1000);
+ usbhs_bset(priv, SUSPMODE, SUSPM, SUSPM);
+
+ return 0;
+}
+
+static int usbhs_rza_get_id(struct platform_device *pdev)
+{
+ return USBHS_GADGET;
+}
+
+const struct renesas_usbhs_platform_callback usbhs_rza1_ops = {
+ .hardware_init = usbhs_rza1_hardware_init,
+ .get_id = usbhs_rza_get_id,
+};
diff --git a/drivers/usb/renesas_usbhs/rza.h b/drivers/usb/renesas_usbhs/rza.h
new file mode 100644
index 000000000000..ca917ca54f6d
--- /dev/null
+++ b/drivers/usb/renesas_usbhs/rza.h
@@ -0,0 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "common.h"
+
+extern const struct renesas_usbhs_platform_callback usbhs_rza1_ops;
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
index 9482735d4ca5..53924f8e840c 100644
--- a/include/linux/usb/renesas_usbhs.h
+++ b/include/linux/usb/renesas_usbhs.h
@@ -195,6 +195,7 @@ struct renesas_usbhs_driver_param {
#define USBHS_TYPE_RCAR_GEN2 1
#define USBHS_TYPE_RCAR_GEN3 2
#define USBHS_TYPE_RCAR_GEN3_WITH_PLL 3
+#define USBHS_TYPE_RZA1 4
/*
* option:
--
2.15.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 2/3] dt-bindings: usb: renesas_usbhs: Add support for RZ/A1
[not found] ` <20180105224647.42262-1-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2018-01-05 22:46 ` [PATCH v3 1/3] usb: renesas_usbhs: Add support for RZ/A1 Chris Brandt
@ 2018-01-05 22:46 ` Chris Brandt
[not found] ` <20180105224647.42262-3-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2018-01-05 22:46 ` [PATCH v3 3/3] ARM: dts: r7s72100: add USB device to device tree Chris Brandt
2018-01-08 7:36 ` [PATCH v3 0/3] usb: renesas_usbhs: Add RZ/A1 support Geert Uytterhoeven
3 siblings, 1 reply; 13+ messages in thread
From: Chris Brandt @ 2018-01-05 22:46 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Simon Horman
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
Sergei Shtylyov, Chris Brandt
Document support for RZ/A1 SoCs
Signed-off-by: Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
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/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index 47394ab788e3..fa16d8d33815 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -15,6 +15,7 @@ Required properties:
- "renesas,usbhs-r8a77995" for r8a77995 (R-Car D3) compatible device
- "renesas,rcar-gen2-usbhs" for R-Car Gen2 or RZ/G1 compatible devices
- "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
+ - "renesas,rza1-usbhs" for RZ/A1 compatible device
When compatible with the generic version, nodes must list the
SoC-specific version corresponding to the platform first followed
--
2.15.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 3/3] ARM: dts: r7s72100: add USB device to device tree
[not found] ` <20180105224647.42262-1-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2018-01-05 22:46 ` [PATCH v3 1/3] usb: renesas_usbhs: Add support for RZ/A1 Chris Brandt
2018-01-05 22:46 ` [PATCH v3 2/3] dt-bindings: " Chris Brandt
@ 2018-01-05 22:46 ` Chris Brandt
[not found] ` <20180105224647.42262-4-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2018-01-08 7:36 ` [PATCH v3 0/3] usb: renesas_usbhs: Add RZ/A1 support Geert Uytterhoeven
3 siblings, 1 reply; 13+ messages in thread
From: Chris Brandt @ 2018-01-05 22:46 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Simon Horman
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
Sergei Shtylyov, Chris Brandt
Add USB device support.
Signed-off-by: Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
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 lower case
* Added Reviewed-by
---
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..d94431767913 100644
--- a/arch/arm/boot/dts/r7s72100.dtsi
+++ b/arch/arm/boot/dts/r7s72100.dtsi
@@ -667,4 +667,24 @@
power-domains = <&cpg_clocks>;
status = "disabled";
};
+
+ usbhs0: usb@e8010000 {
+ compatible = "renesas,rza1-usbhs";
+ reg = <0xe8010000 0x1a0>;
+ interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp7_clks R7S72100_CLK_USB0>;
+ renesas,buswait = <4>;
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
+
+ usbhs1: usb@e8207000 {
+ compatible = "renesas,rza1-usbhs";
+ reg = <0xe8207000 0x1a0>;
+ interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp7_clks R7S72100_CLK_USB1>;
+ renesas,buswait = <4>;
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
};
--
2.15.1
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/3] usb: renesas_usbhs: Add RZ/A1 support
[not found] ` <20180105224647.42262-1-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
` (2 preceding siblings ...)
2018-01-05 22:46 ` [PATCH v3 3/3] ARM: dts: r7s72100: add USB device to device tree Chris Brandt
@ 2018-01-08 7:36 ` Geert Uytterhoeven
[not found] ` <CAMuHMdV+1Y+OozRa0P2MJZQ-rT+ZfmW4iy2AYya1EMgrjb+y8Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
3 siblings, 1 reply; 13+ messages in thread
From: Geert Uytterhoeven @ 2018-01-08 7:36 UTC (permalink / raw)
To: Chris Brandt
Cc: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Simon Horman,
USB list, Linux-Renesas, devicetree-u79uwXL29TY76Z2rM5mHXA,
Sergei Shtylyov
Hi Chris,
On Fri, Jan 5, 2018 at 11:46 PM, Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org> wrote:
> 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.
>
> v3:
> * Changed from "renesas,usbhs-r7s72100" to "renesas,rza1-usbhs"
> * Removed "renesas,usbhs-r7s72100"
> * Changed License of rza.c
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.
Summarized:
1. DT bindings should document _all_ compatible values (SoC-specific,
and/or family-specific, generic, ...),
2. DTS should list _all applicable_ compatible values, ordered from
most-specific to least-specific,
3. Drivers should match against the least-specific compatible value to get
the job done.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: usb: renesas_usbhs: Add support for RZ/A1
[not found] ` <20180105224647.42262-3-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
@ 2018-01-08 7:37 ` Geert Uytterhoeven
2018-01-08 7:57 ` Simon Horman
1 sibling, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2018-01-08 7:37 UTC (permalink / raw)
To: Chris Brandt
Cc: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Simon Horman,
USB list, Linux-Renesas, devicetree-u79uwXL29TY76Z2rM5mHXA,
Sergei Shtylyov
Hi Chris,
On Fri, Jan 5, 2018 at 11:46 PM, Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org> wrote:
> Document support for RZ/A1 SoCs
>
> Signed-off-by: Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
> ---
> v3:
> * Removed "renesas,usbhs-r7s72100"
Please don't, cfr. my reply to the cover letter.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 3/3] ARM: dts: r7s72100: add USB device to device tree
[not found] ` <20180105224647.42262-4-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
@ 2018-01-08 7:37 ` Geert Uytterhoeven
2018-01-08 7:52 ` Simon Horman
1 sibling, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2018-01-08 7:37 UTC (permalink / raw)
To: Chris Brandt
Cc: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Simon Horman,
USB list, Linux-Renesas, devicetree-u79uwXL29TY76Z2rM5mHXA,
Sergei Shtylyov
On Fri, Jan 5, 2018 at 11:46 PM, Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org> wrote:
> Add USB device support.
>
> Signed-off-by: Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
> ---
> v3:
> * Changed from "renesas,usbhs-r7s72100" to "renesas,rza1-usbhs"
Please use both, cfr. my reply to the cover letter.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 3/3] ARM: dts: r7s72100: add USB device to device tree
[not found] ` <20180105224647.42262-4-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2018-01-08 7:37 ` Geert Uytterhoeven
@ 2018-01-08 7:52 ` Simon Horman
1 sibling, 0 replies; 13+ messages in thread
From: Simon Horman @ 2018-01-08 7:52 UTC (permalink / raw)
To: Chris Brandt
Cc: Greg Kroah-Hartman, Rob Herring, Mark Rutland,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
Sergei Shtylyov
On Fri, Jan 05, 2018 at 05:46:47PM -0500, Chris Brandt wrote:
> Add USB device support.
>
> Signed-off-by: Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
> ---
> v3:
> * Changed from "renesas,usbhs-r7s72100" to "renesas,rza1-usbhs"
I think you want both. The SoC-specific compat string followed by a fallback
compat string for something broader:
Like this:
compatible = "renesas,usbhs-r7s72100", "renesas,rza1-usbhs";
> 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 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
> index ab9645a42eca..d94431767913 100644
> --- a/arch/arm/boot/dts/r7s72100.dtsi
> +++ b/arch/arm/boot/dts/r7s72100.dtsi
> @@ -667,4 +667,24 @@
> power-domains = <&cpg_clocks>;
> status = "disabled";
> };
> +
> + usbhs0: usb@e8010000 {
> + compatible = "renesas,rza1-usbhs";
> + reg = <0xe8010000 0x1a0>;
> + interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp7_clks R7S72100_CLK_USB0>;
> + renesas,buswait = <4>;
> + power-domains = <&cpg_clocks>;
> + status = "disabled";
> + };
> +
> + usbhs1: usb@e8207000 {
> + compatible = "renesas,rza1-usbhs";
> + reg = <0xe8207000 0x1a0>;
> + interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp7_clks R7S72100_CLK_USB1>;
> + renesas,buswait = <4>;
> + power-domains = <&cpg_clocks>;
> + status = "disabled";
> + };
> };
> --
> 2.15.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: usb: renesas_usbhs: Add support for RZ/A1
[not found] ` <20180105224647.42262-3-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2018-01-08 7:37 ` Geert Uytterhoeven
@ 2018-01-08 7:57 ` Simon Horman
1 sibling, 0 replies; 13+ messages in thread
From: Simon Horman @ 2018-01-08 7:57 UTC (permalink / raw)
To: Chris Brandt
Cc: Greg Kroah-Hartman, Rob Herring, Mark Rutland,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
Sergei Shtylyov
On Fri, Jan 05, 2018 at 05:46:46PM -0500, Chris Brandt wrote:
> Document support for RZ/A1 SoCs
>
> Signed-off-by: Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
> ---
> v3:
> * Removed "renesas,usbhs-r7s72100"
Unless I am mistaken you want both renesas,usbhs-r7s72100, for the SoC
and renesas,rza1-usbhs for the family[*] of SoCs (which currently only has one
member upstream).
Similar to the way there are per-SoC compat strings for R-Car Gen2 and Gen3
SoCs, and per-SoC family fallback compat strings to Gen2 and Gen3.
The motivation for this that empirically SoC families seem to be able to
share the implementation on the driver-side, so only the fallback compat
strings need to be implemented in the driver by defining per-SoC compat
strings we have the flexibility to implement them if differences emerge
between SoCs in the same family.
[*] I used the term family here to group SoCs together. I acknowledge that
Renesas may not refer to them in this way.
> v2:
> * Added Reviewed-by
> ---
> Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> index 47394ab788e3..fa16d8d33815 100644
> --- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> +++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> @@ -15,6 +15,7 @@ Required properties:
> - "renesas,usbhs-r8a77995" for r8a77995 (R-Car D3) compatible device
> - "renesas,rcar-gen2-usbhs" for R-Car Gen2 or RZ/G1 compatible devices
> - "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
> + - "renesas,rza1-usbhs" for RZ/A1 compatible device
>
> When compatible with the generic version, nodes must list the
> SoC-specific version corresponding to the platform first followed
> --
> 2.15.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH v3 0/3] usb: renesas_usbhs: Add RZ/A1 support
[not found] ` <CAMuHMdV+1Y+OozRa0P2MJZQ-rT+ZfmW4iy2AYya1EMgrjb+y8Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-01-08 11:59 ` Chris Brandt
[not found] ` <SG2PR06MB1165E6B9D4C00EE2A98E8E348A130-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-01-08 12:15 ` Geert Uytterhoeven
0 siblings, 2 replies; 13+ messages in thread
From: Chris Brandt @ 2018-01-08 11:59 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Simon Horman,
USB list, Linux-Renesas, devicetree-u79uwXL29TY76Z2rM5mHXA,
Sergei Shtylyov
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, before I submit a V4, here is my understanding:
drivers/.../common.c
* contains -only- '.compatible = "renesas,rza1-usbhs"'
Documentation/.../renesas_usbhs.txt
* contains both "renesas,usbhs-r7s72100" and "renesas,rza1-usbhs"
r7s72100.dtsi
* usbhs0: usb@e8010000 {
compatible = "renesas,usbhs-r7s72100", "renesas,rza1-usbhs";
Is this correct?
Thanks,
Chris
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/3] usb: renesas_usbhs: Add RZ/A1 support
[not found] ` <SG2PR06MB1165E6B9D4C00EE2A98E8E348A130-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2018-01-08 12:14 ` Geert Uytterhoeven
0 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2018-01-08 12:14 UTC (permalink / raw)
To: Chris Brandt
Cc: Simon Horman, Greg Kroah-Hartman, Rob Herring, Mark Rutland,
USB list, Linux-Renesas, devicetree-u79uwXL29TY76Z2rM5mHXA,
Sergei Shtylyov
On Mon, Jan 8, 2018 at 12:59 PM, Chris Brandt <Chris.Brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org> wrote:
> 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, before I submit a V4, here is my understanding:
>
>
> drivers/.../common.c
> * contains -only- '.compatible = "renesas,rza1-usbhs"'
>
>
> Documentation/.../renesas_usbhs.txt
> * contains both "renesas,usbhs-r7s72100" and "renesas,rza1-usbhs"
>
>
> r7s72100.dtsi
> * usbhs0: usb@e8010000 {
> compatible = "renesas,usbhs-r7s72100", "renesas,rza1-usbhs";
>
>
> Is this correct?
>
> Thanks,
> Chris
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/3] usb: renesas_usbhs: Add RZ/A1 support
2018-01-08 11:59 ` Chris Brandt
[not found] ` <SG2PR06MB1165E6B9D4C00EE2A98E8E348A130-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2018-01-08 12:15 ` Geert Uytterhoeven
[not found] ` <CAMuHMdXu22ihgkVgPhCtbk9X21nyk3SFwGAiObEgcv=Kf2H-ow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
1 sibling, 1 reply; 13+ messages in thread
From: Geert Uytterhoeven @ 2018-01-08 12:15 UTC (permalink / raw)
To: Chris Brandt
Cc: Simon Horman, Greg Kroah-Hartman, Rob Herring, Mark Rutland,
USB list, Linux-Renesas, devicetree, Sergei Shtylyov
Hi Chris,
On Mon, Jan 8, 2018 at 12:59 PM, Chris Brandt <Chris.Brandt@renesas.com> wrote:
> 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, before I submit a V4, here is my understanding:
>
> drivers/.../common.c
> * contains -only- '.compatible = "renesas,rza1-usbhs"'
OK.
> Documentation/.../renesas_usbhs.txt
> * contains both "renesas,usbhs-r7s72100" and "renesas,rza1-usbhs"
OK.
> r7s72100.dtsi
> * usbhs0: usb@e8010000 {
> compatible = "renesas,usbhs-r7s72100", "renesas,rza1-usbhs";
OK.
> Is this correct?
Yes.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/3] usb: renesas_usbhs: Add RZ/A1 support
[not found] ` <CAMuHMdXu22ihgkVgPhCtbk9X21nyk3SFwGAiObEgcv=Kf2H-ow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-01-09 9:02 ` Simon Horman
0 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2018-01-09 9:02 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Chris Brandt, Greg Kroah-Hartman, Rob Herring, Mark Rutland,
USB list, Linux-Renesas, devicetree-u79uwXL29TY76Z2rM5mHXA,
Sergei Shtylyov
On Mon, Jan 08, 2018 at 01:15:08PM +0100, Geert Uytterhoeven wrote:
> Hi Chris,
>
> On Mon, Jan 8, 2018 at 12:59 PM, Chris Brandt <Chris.Brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org> wrote:
> > 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, before I submit a V4, here is my understanding:
> >
> > drivers/.../common.c
> > * contains -only- '.compatible = "renesas,rza1-usbhs"'
>
> OK.
>
> > Documentation/.../renesas_usbhs.txt
> > * contains both "renesas,usbhs-r7s72100" and "renesas,rza1-usbhs"
>
> OK.
>
> > r7s72100.dtsi
> > * usbhs0: usb@e8010000 {
> > compatible = "renesas,usbhs-r7s72100", "renesas,rza1-usbhs";
>
> OK.
>
> > Is this correct?
>
> Yes.
Ack.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2018-01-09 9:02 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 22:46 [PATCH v3 0/3] usb: renesas_usbhs: Add RZ/A1 support Chris Brandt
[not found] ` <20180105224647.42262-1-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2018-01-05 22:46 ` [PATCH v3 1/3] usb: renesas_usbhs: Add support for RZ/A1 Chris Brandt
2018-01-05 22:46 ` [PATCH v3 2/3] dt-bindings: " Chris Brandt
[not found] ` <20180105224647.42262-3-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2018-01-08 7:37 ` Geert Uytterhoeven
2018-01-08 7:57 ` Simon Horman
2018-01-05 22:46 ` [PATCH v3 3/3] ARM: dts: r7s72100: add USB device to device tree Chris Brandt
[not found] ` <20180105224647.42262-4-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2018-01-08 7:37 ` Geert Uytterhoeven
2018-01-08 7:52 ` Simon Horman
2018-01-08 7:36 ` [PATCH v3 0/3] usb: renesas_usbhs: Add RZ/A1 support Geert Uytterhoeven
[not found] ` <CAMuHMdV+1Y+OozRa0P2MJZQ-rT+ZfmW4iy2AYya1EMgrjb+y8Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-08 11:59 ` Chris Brandt
[not found] ` <SG2PR06MB1165E6B9D4C00EE2A98E8E348A130-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-01-08 12:14 ` Geert Uytterhoeven
2018-01-08 12:15 ` Geert Uytterhoeven
[not found] ` <CAMuHMdXu22ihgkVgPhCtbk9X21nyk3SFwGAiObEgcv=Kf2H-ow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-09 9:02 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).