public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support
@ 2023-01-12 21:58 Biju Das
  2023-01-12 21:58 ` [PATCH v2 01/12] dt-bindings: usb: renesas,usb-xhci: Document RZ/V2M support Biju Das
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Biju Das @ 2023-01-12 21:58 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Biju Das, Greg Kroah-Hartman, Mathias Nyman, Lad Prabhakar,
	Yoshihiro Shimoda, Felipe Balbi, linux-usb, devicetree,
	Geert Uytterhoeven, Fabrizio Castro, linux-renesas-soc

This patch series aims to add USB3.1 HOST, Peri and DRD support
on RZ/V2M EVK platform.

The reset for both host and peri are located in USB3DRD block. The
USB3DRD registers are mapped in the AXI address space of the Peripheral
module.

RZ/V2M XHCI is similar to R-Car XHCI but it doesn't require any
firmware.

Host/device needs to do reset release and set the host/device function
on DRD module, before accessing any registers.

v1->v2:
 * Added Rb tag from Rob for host binding patch
 * Renamed clock-name from "host_axi"->"axi"
 * Drop quotes around usb-xhci.yaml.
 * Moved DRD interrupts from device ctrlr to DRD bindings
 * Updated interrupts and dropped interrupt-names in device ctrlr bindings
 * Renamed aclk->axi in device ctrlr bindings
 * Added DRD interrupts and interrupt-names in DRD bindings
 * Dropped peripheral reset and reset-names from DRD bindings
 * Added reg property for usb3 device ctrlr nodes
 * Renamed peri_axi->axi and apb->reg
 * Updated pattern properties and example.
 * Moved header file from include/linux/soc/renesas->include/linux/usb
 * Passing DRD irq resource from parent to usb3_peri for handling it.
 * As drd reg is now separated from usb3 peri, updated DRD reg handling in
   usb3 peri driver.
 * Removed usb3 peri reset handling from DRD driver.
 * Added Rb tag from Geert for reset and clock updates for xhci-plat.

Note:
 * Patch12 dependup on [1]
  [1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20221209171836.71610-3-biju.das.jz@bp.renesas.com/

Biju Das (12):
  dt-bindings: usb: renesas,usb-xhci: Document RZ/V2M support
  dt-bindings: usb: renesas,usb3-peri: Update reset, clock-name and
    interrupts properties
  dt-bindings: usb: renesas,usb3-peri: Document RZ/V2MA bindings
  dt-bindings: usb: Add RZ/V2M USB3DRD binding
  usb: gadget: Add support for RZ/V2M USB3DRD driver
  usb: gadget: udc: renesas_usb3: Add role switch support for RZ/V2M
  usb: host: xhci-plat: Improve clock handling in probe()
  usb: host: xhci-plat: Add reset support
  xhci: host: Add Renesas RZ/V2M SoC support
  arm64: dts: renesas: r9a09g011: Add USB3 DRD, device and host nodes
  arm64: dts: renesas: rzv2mevk2: Enable USB3 DRD, Peripheral and Host
  arm64: dts: renesas: rzv2mevk2: Enable USB3 role switch

 .../bindings/usb/renesas,rzv2m-usb3drd.yaml   | 129 ++++++++++++++++
 .../bindings/usb/renesas,usb-xhci.yaml        |  41 +++++-
 .../bindings/usb/renesas,usb3-peri.yaml       |  40 +----
 .../boot/dts/renesas/r9a09g011-v2mevk2.dts    |  76 ++++++++++
 arch/arm64/boot/dts/renesas/r9a09g011.dtsi    |  45 ++++++
 drivers/usb/gadget/udc/Kconfig                |   7 +
 drivers/usb/gadget/udc/Makefile               |   1 +
 drivers/usb/gadget/udc/renesas_usb3.c         | 136 +++++++++++------
 drivers/usb/gadget/udc/rzv2m_usb3drd.c        | 139 ++++++++++++++++++
 drivers/usb/host/Kconfig                      |   9 ++
 drivers/usb/host/Makefile                     |   3 +
 drivers/usb/host/xhci-plat.c                  |  36 ++++-
 drivers/usb/host/xhci-rzv2m.c                 |  38 +++++
 drivers/usb/host/xhci-rzv2m.h                 |  16 ++
 include/linux/usb/rzv2m_usb3drd.h             |  20 +++
 15 files changed, 649 insertions(+), 87 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/usb/renesas,rzv2m-usb3drd.yaml
 create mode 100644 drivers/usb/gadget/udc/rzv2m_usb3drd.c
 create mode 100644 drivers/usb/host/xhci-rzv2m.c
 create mode 100644 drivers/usb/host/xhci-rzv2m.h
 create mode 100644 include/linux/usb/rzv2m_usb3drd.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2 01/12] dt-bindings: usb: renesas,usb-xhci: Document RZ/V2M support
  2023-01-12 21:58 [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Biju Das
@ 2023-01-12 21:58 ` Biju Das
  2023-01-12 21:58 ` [PATCH v2 02/12] dt-bindings: usb: renesas,usb3-peri: Update reset, clock-name and interrupts properties Biju Das
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Biju Das @ 2023-01-12 21:58 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Biju Das, Greg Kroah-Hartman, Lad Prabhakar, Yoshihiro Shimoda,
	linux-usb, devicetree, Geert Uytterhoeven, Fabrizio Castro,
	linux-renesas-soc, Rob Herring

Document the RZ/V2M SoC bindings.
The RZ/V2M SoC is a little different to the R-Car implementations.
You can access the registers associated with the currently set DRD mode,
therefore as part of init, we have to set the DRD mode to host.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
v1->v2:
 * Added Rb tag from Rob
 * Renamed clock-name "host_axi"->"axi"
 * Drop quotes around usb-xhci.yaml.
---
 .../bindings/usb/renesas,usb-xhci.yaml        | 41 +++++++++++++++++--
 1 file changed, 37 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml b/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
index 4c5efaf02308..1a07c0d2b1b1 100644
--- a/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
+++ b/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
@@ -10,9 +10,6 @@ maintainers:
   - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
   - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
 
-allOf:
-  - $ref: "usb-xhci.yaml"
-
 properties:
   compatible:
     oneOf:
@@ -37,6 +34,11 @@ properties:
               - renesas,xhci-r8a77965 # R-Car M3-N
               - renesas,xhci-r8a77990 # R-Car E3
           - const: renesas,rcar-gen3-xhci # R-Car Gen3 and RZ/G2
+      - items:
+          - enum:
+              - renesas,r9a09g011-xhci # RZ/V2M
+              - renesas,r9a09g055-xhci # RZ/V2MA
+          - const: renesas,rzv2m-xhci  # RZ/{V2M, V2MA}
 
   reg:
     maxItems: 1
@@ -45,7 +47,16 @@ properties:
     maxItems: 1
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    items:
+      - description: Main clock for host
+      - description: Register access clock
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: axi
+      - const: reg
 
   phys:
     maxItems: 1
@@ -68,6 +79,28 @@ required:
   - power-domains
   - resets
 
+allOf:
+  - $ref: usb-xhci.yaml
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - renesas,rzv2m-xhci
+    then:
+      properties:
+        clocks:
+          minItems: 2
+        clock-names:
+          minItems: 2
+      required:
+        - clock-names
+    else:
+      properties:
+        clocks:
+          maxItems: 1
+
 unevaluatedProperties: false
 
 examples:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 02/12] dt-bindings: usb: renesas,usb3-peri: Update reset, clock-name and interrupts properties
  2023-01-12 21:58 [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Biju Das
  2023-01-12 21:58 ` [PATCH v2 01/12] dt-bindings: usb: renesas,usb-xhci: Document RZ/V2M support Biju Das
@ 2023-01-12 21:58 ` Biju Das
  2023-01-13 20:49   ` Rob Herring
  2023-01-12 21:58 ` [PATCH v2 03/12] dt-bindings: usb: renesas,usb3-peri: Document RZ/V2MA bindings Biju Das
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Biju Das @ 2023-01-12 21:58 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Biju Das, Greg Kroah-Hartman, Yoshihiro Shimoda, linux-usb,
	devicetree, Geert Uytterhoeven, Fabrizio Castro,
	linux-renesas-soc

On RZ/V2M, USB3DRD module manages the drd_reset. Moreover, the interrupts
drd, gpi and bc are part of USB3DRD block. This patch removes
drd_reset and the interrupts drd, bc and gpi from usb3_peri bindings.
After this, there is only one reset and interrupts and therefore
removing reset-names and interrupt-names as well.

Whilst, Update the clock-name "aclk"->"axi" to make it consistent with
DRD and host blocks.

There is any harm in making such a change as, no users of
renesas,r9a09g011-usb3-peri yet in kernel release.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * Moved DRD interrupts to DRD bindings
 * Updated interrupts and dropped interrupt-names
 * Renamed aclk->axi
---
 .../bindings/usb/renesas,usb3-peri.yaml       | 39 ++-----------------
 1 file changed, 3 insertions(+), 36 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
index 55dfd121b555..4ba36ebf0f1e 100644
--- a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
+++ b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
@@ -34,20 +34,7 @@ properties:
     maxItems: 1
 
   interrupts:
-    minItems: 1
-    items:
-      - description: Combined interrupt for DMA, SYS and ERR
-      - description: Dual Role Device (DRD)
-      - description: Battery Charging
-      - description: Global Purpose Input
-
-  interrupt-names:
-    minItems: 1
-    items:
-      - const: all_p
-      - const: drd
-      - const: bc
-      - const: gpi
+    maxItems: 1
 
   clocks:
     minItems: 1
@@ -58,7 +45,7 @@ properties:
   clock-names:
     minItems: 1
     items:
-      - const: aclk
+      - const: axi
       - const: reg
 
   phys:
@@ -71,15 +58,7 @@ properties:
     maxItems: 1
 
   resets:
-    minItems: 1
-    items:
-      - description: Peripheral reset
-      - description: DRD reset
-
-  reset-names:
-    items:
-      - const: aresetn_p
-      - const: drd_reset
+    maxItems: 1
 
   usb-role-switch:
     $ref: /schemas/types.yaml#/definitions/flag
@@ -127,25 +106,13 @@ allOf:
           minItems: 2
         clock-names:
           minItems: 2
-        interrupts:
-          minItems: 4
-        interrupt-names:
-          minItems: 4
-        resets:
-          minItems: 2
       required:
         - clock-names
-        - interrupt-names
         - resets
-        - reset-names
     else:
       properties:
         clocks:
           maxItems: 1
-        interrupts:
-          maxItems: 1
-        resets:
-          maxItems: 1
 
 additionalProperties: false
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 03/12] dt-bindings: usb: renesas,usb3-peri: Document RZ/V2MA bindings
  2023-01-12 21:58 [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Biju Das
  2023-01-12 21:58 ` [PATCH v2 01/12] dt-bindings: usb: renesas,usb-xhci: Document RZ/V2M support Biju Das
  2023-01-12 21:58 ` [PATCH v2 02/12] dt-bindings: usb: renesas,usb3-peri: Update reset, clock-name and interrupts properties Biju Das
@ 2023-01-12 21:58 ` Biju Das
  2023-01-13 20:49   ` Rob Herring
  2023-01-12 21:58 ` [PATCH v2 04/12] dt-bindings: usb: Add RZ/V2M USB3DRD binding Biju Das
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Biju Das @ 2023-01-12 21:58 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Biju Das, Greg Kroah-Hartman, Yoshihiro Shimoda, linux-usb,
	devicetree, Geert Uytterhoeven, Fabrizio Castro,
	linux-renesas-soc

Document RZ/V2MA usb3-peri bindings. RZ/V2MA usb3-peri is identical
to one found on the RZ/V2M SoC. No driver changes are required as
generic compatible string "renesas,rzv2m-usb3-peri" will be used as
a fallback.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * No change
---
 Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
index 4ba36ebf0f1e..b2b811a0ade8 100644
--- a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
+++ b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
@@ -28,6 +28,7 @@ properties:
       - items:
           - enum:
               - renesas,r9a09g011-usb3-peri # RZ/V2M
+              - renesas,r9a09g055-usb3-peri # RZ/V2MA
           - const: renesas,rzv2m-usb3-peri
 
   reg:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 04/12] dt-bindings: usb: Add RZ/V2M USB3DRD binding
  2023-01-12 21:58 [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Biju Das
                   ` (2 preceding siblings ...)
  2023-01-12 21:58 ` [PATCH v2 03/12] dt-bindings: usb: renesas,usb3-peri: Document RZ/V2MA bindings Biju Das
@ 2023-01-12 21:58 ` Biju Das
  2023-01-13 20:50   ` Rob Herring
  2023-01-12 21:59 ` [PATCH v2 10/12] arm64: dts: renesas: r9a09g011: Add USB3 DRD, device and host nodes Biju Das
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Biju Das @ 2023-01-12 21:58 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Biju Das, Greg Kroah-Hartman, linux-usb, devicetree,
	Geert Uytterhoeven, Fabrizio Castro, linux-renesas-soc

Add device tree bindings for the RZ/V2{M, MA} USB3DRD module.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * Added DRD interrupts and interrupt-names
 * Dropped peripheral reset and reset-names
 * Added reg property for usb3 device ctrlr
 * Renamed peri_axi->axi and apb->reg
 * Updated pattern properties and example.
---
 .../bindings/usb/renesas,rzv2m-usb3drd.yaml   | 129 ++++++++++++++++++
 1 file changed, 129 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/renesas,rzv2m-usb3drd.yaml

diff --git a/Documentation/devicetree/bindings/usb/renesas,rzv2m-usb3drd.yaml b/Documentation/devicetree/bindings/usb/renesas,rzv2m-usb3drd.yaml
new file mode 100644
index 000000000000..ff625600d9af
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/renesas,rzv2m-usb3drd.yaml
@@ -0,0 +1,129 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/renesas,rzv2m-usb3drd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas RZ/V2M USB 3.1 DRD controller
+
+maintainers:
+  - Biju Das <biju.das.jz@bp.renesas.com>
+
+description: |
+  The RZ/V2{M, MA} USB3.1 DRD module supports the following functions
+  * Role swapping function by the ID pin of the Micro-AB receptacle
+  * Battery Charging Specification Revision 1.2
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - renesas,r9a09g011-usb3drd  # RZ/V2M
+          - renesas,r9a09g055-usb3drd  # RZ/V2MA
+      - const: renesas,rzv2m-usb3drd
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: Dual Role Device (DRD)
+      - description: Battery Charging
+      - description: Global Purpose Input
+
+  interrupt-names:
+    items:
+      - const: drd
+      - const: bc
+      - const: gpi
+
+  clocks:
+    items:
+      - description: Peripheral AXI clock
+      - description: APB clock
+
+  clock-names:
+    items:
+      - const: axi
+      - const: reg
+
+  power-domains:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+  ranges: true
+
+  '#address-cells':
+    enum: [ 1, 2 ]
+
+  '#size-cells':
+    enum: [ 1, 2 ]
+
+patternProperties:
+  "^usb3peri@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/usb/renesas,usb3-peri.yaml
+
+  "^usb@[0-9a-f]+$":
+    type: object
+    $ref: renesas,usb-xhci.yaml#
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - interrupt-names
+  - clocks
+  - clock-names
+  - power-domains
+  - resets
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/r9a09g011-cpg.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    usb3drd: usb@85070400 {
+        compatible = "renesas,r9a09g011-usb3drd", "renesas,rzv2m-usb3drd";
+        reg = <0x85070400 0x100>;
+        interrupts = <GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>;
+        interrupt-names = "drd", "bc", "gpi";
+        clocks = <&cpg CPG_MOD R9A09G011_USB_ACLK_P>,
+                 <&cpg CPG_MOD R9A09G011_USB_PCLK>;
+        clock-names = "axi", "reg";
+        power-domains = <&cpg>;
+        resets = <&cpg R9A09G011_USB_DRD_RESET>;
+        ranges;
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        usb3host: usb@85060000 {
+           compatible = "renesas,r9a09g011-xhci",
+                        "renesas,rzv2m-xhci";
+           reg = <0x85060000 0x2000>;
+           interrupts = <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>;
+           clocks = <&cpg CPG_MOD R9A09G011_USB_ACLK_H>,
+                    <&cpg CPG_MOD R9A09G011_USB_PCLK>;
+           clock-names = "axi", "reg";
+           power-domains = <&cpg>;
+           resets = <&cpg R9A09G011_USB_ARESETN_H>;
+        };
+
+        usb3peri: usb3peri@85070000 {
+           compatible = "renesas,r9a09g011-usb3-peri",
+                        "renesas,rzv2m-usb3-peri";
+           reg = <0x85070000 0x400>;
+           interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
+           clocks = <&cpg CPG_MOD R9A09G011_USB_ACLK_P>,
+                    <&cpg CPG_MOD R9A09G011_USB_PCLK>;
+           clock-names = "axi", "reg";
+           power-domains = <&cpg>;
+           resets = <&cpg R9A09G011_USB_ARESETN_P>;
+        };
+    };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 10/12] arm64: dts: renesas: r9a09g011: Add USB3 DRD, device and host nodes
  2023-01-12 21:58 [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Biju Das
                   ` (3 preceding siblings ...)
  2023-01-12 21:58 ` [PATCH v2 04/12] dt-bindings: usb: Add RZ/V2M USB3DRD binding Biju Das
@ 2023-01-12 21:59 ` Biju Das
  2023-01-12 21:59 ` [PATCH v2 11/12] arm64: dts: renesas: rzv2mevk2: Enable USB3 DRD, Peripheral and Host Biju Das
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Biju Das @ 2023-01-12 21:59 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Biju Das, Geert Uytterhoeven, Yoshihiro Shimoda, Magnus Damm,
	linux-renesas-soc, devicetree, Fabrizio Castro

This patch add usb3 host and peripheral device node as child of usb3 drd
node to RZ/V2M SoC dtsi. The host/device needs to issue reset release on
DRD module before accessing host/device registers.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * Added all the USB3 nodes
 * Added reg property for USB3 peri
 * Added interrupt propertiees for DRD
---
 arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
index dcd3a05e54fe..958ea705f4d4 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
@@ -69,6 +69,51 @@ gic: interrupt-controller@82010000 {
 			clock-names = "clk";
 		};
 
+		usb3drd: usb3drd@85070400 {
+			compatible = "renesas,r9a09g011-usb3drd",
+				     "renesas,rzv2m-usb3drd";
+			reg = <0x0 0x85070400 0x0 0x100>;
+			interrupts = <GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH>,
+				      <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>,
+				      <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "drd", "bc", "gpi";
+			clocks = <&cpg CPG_MOD R9A09G011_USB_ACLK_P>,
+				 <&cpg CPG_MOD R9A09G011_USB_PCLK>;
+			clock-names = "axi", "reg";
+			resets = <&cpg R9A09G011_USB_DRD_RESET>;
+			power-domains = <&cpg>;
+			ranges;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			status = "disabled";
+
+			usb3host: usb@85060000 {
+				compatible = "renesas,r9a09g011-xhci",
+					     "renesas,rzv2m-xhci";
+				reg = <0 0x85060000 0 0x2000>;
+				interrupts = <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&cpg CPG_MOD R9A09G011_USB_ACLK_H>,
+					 <&cpg CPG_MOD R9A09G011_USB_PCLK>;
+				clock-names = "axi", "reg";
+				resets = <&cpg R9A09G011_USB_ARESETN_H>;
+				power-domains = <&cpg>;
+				status = "disabled";
+			};
+
+			usb3peri: usb3peri@85070000 {
+				compatible = "renesas,r9a09g011-usb3-peri",
+					     "renesas,rzv2m-usb3-peri";
+				reg = <0x0 0x85070000 0x0 0x400>;
+				interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&cpg CPG_MOD R9A09G011_USB_ACLK_P>,
+					 <&cpg CPG_MOD R9A09G011_USB_PCLK>;
+				clock-names = "axi", "reg";
+				resets = <&cpg R9A09G011_USB_ARESETN_P>;
+				power-domains = <&cpg>;
+				status = "disabled";
+			};
+		};
+
 		avb: ethernet@a3300000 {
 			compatible = "renesas,etheravb-r9a09g011","renesas,etheravb-rzv2m";
 			reg = <0 0xa3300000 0 0x800>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 11/12] arm64: dts: renesas: rzv2mevk2: Enable USB3 DRD, Peripheral and Host
  2023-01-12 21:58 [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Biju Das
                   ` (4 preceding siblings ...)
  2023-01-12 21:59 ` [PATCH v2 10/12] arm64: dts: renesas: r9a09g011: Add USB3 DRD, device and host nodes Biju Das
@ 2023-01-12 21:59 ` Biju Das
  2023-01-12 21:59 ` [PATCH v2 12/12] arm64: dts: renesas: rzv2mevk2: Enable USB3 role switch Biju Das
  2023-01-19 13:10 ` [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Greg Kroah-Hartman
  7 siblings, 0 replies; 15+ messages in thread
From: Biju Das @ 2023-01-12 21:59 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Biju Das, Geert Uytterhoeven, Magnus Damm, linux-renesas-soc,
	devicetree, Fabrizio Castro

Enable USB3 Host, Peripheral and DRD modules on RZ/V2M EVK.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * Enabled all the USB3 nodes
---
 arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
index 73d7481b468e..2c051f901ec7 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
@@ -154,6 +154,18 @@ &uart0 {
 	status = "okay";
 };
 
+&usb3drd {
+	status = "okay";
+};
+
+&usb3host {
+	status = "okay";
+};
+
+&usb3peri {
+	status = "okay";
+};
+
 &wdt0 {
 	status = "okay";
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 12/12] arm64: dts: renesas: rzv2mevk2: Enable USB3 role switch
  2023-01-12 21:58 [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Biju Das
                   ` (5 preceding siblings ...)
  2023-01-12 21:59 ` [PATCH v2 11/12] arm64: dts: renesas: rzv2mevk2: Enable USB3 DRD, Peripheral and Host Biju Das
@ 2023-01-12 21:59 ` Biju Das
  2023-01-19 13:10 ` [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Greg Kroah-Hartman
  7 siblings, 0 replies; 15+ messages in thread
From: Biju Das @ 2023-01-12 21:59 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Biju Das, Geert Uytterhoeven, Magnus Damm, linux-renesas-soc,
	devicetree, Fabrizio Castro

Enable USB3 role switch on RZ/V2M EVK by linking USB3 peri node
with hd3ss3220 controller node.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * No change
---
 .../boot/dts/renesas/r9a09g011-v2mevk2.dts    | 64 +++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
index 2c051f901ec7..fdf623ca270b 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
@@ -22,6 +22,29 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	connector {
+		compatible = "usb-c-connector";
+		label = "USB-C";
+		data-role = "dual";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			port@0 {
+				reg = <0>;
+				hs_ep: endpoint {
+					remote-endpoint = <&usb3_hs_ep>;
+				};
+			};
+			port@1 {
+				reg = <1>;
+				ss_ep: endpoint {
+					remote-endpoint = <&hd3ss3220_in_ep>;
+				};
+			};
+		};
+	};
+
 	memory@58000000 {
 		device_type = "memory";
 		/*
@@ -59,6 +82,28 @@ &i2c0 {
 	pinctrl-names = "default";
 	clock-frequency = <400000>;
 	status = "okay";
+
+	hd3ss3220@47 {
+		compatible = "ti,hd3ss3220";
+		reg = <0x47>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			port@0 {
+				reg = <0>;
+				hd3ss3220_in_ep: endpoint {
+					remote-endpoint = <&ss_ep>;
+				};
+			};
+			port@1 {
+				reg = <1>;
+				hd3ss3220_out_ep: endpoint {
+					remote-endpoint = <&usb3_role_switch>;
+				};
+			};
+		};
+	};
 };
 
 &i2c2 {
@@ -163,7 +208,26 @@ &usb3host {
 };
 
 &usb3peri {
+	companion = <&usb3host>;
 	status = "okay";
+	usb-role-switch;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		port@0 {
+			reg = <0>;
+			usb3_hs_ep: endpoint {
+				remote-endpoint = <&hs_ep>;
+			};
+		};
+		port@1 {
+			reg = <1>;
+			usb3_role_switch: endpoint {
+				remote-endpoint = <&hd3ss3220_out_ep>;
+			};
+		};
+	};
 };
 
 &wdt0 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 02/12] dt-bindings: usb: renesas,usb3-peri: Update reset, clock-name and interrupts properties
  2023-01-12 21:58 ` [PATCH v2 02/12] dt-bindings: usb: renesas,usb3-peri: Update reset, clock-name and interrupts properties Biju Das
@ 2023-01-13 20:49   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2023-01-13 20:49 UTC (permalink / raw)
  To: Biju Das
  Cc: Krzysztof Kozlowski, Rob Herring, linux-renesas-soc, linux-usb,
	Geert Uytterhoeven, devicetree, Yoshihiro Shimoda,
	Fabrizio Castro, Greg Kroah-Hartman


On Thu, 12 Jan 2023 21:58:56 +0000, Biju Das wrote:
> On RZ/V2M, USB3DRD module manages the drd_reset. Moreover, the interrupts
> drd, gpi and bc are part of USB3DRD block. This patch removes
> drd_reset and the interrupts drd, bc and gpi from usb3_peri bindings.
> After this, there is only one reset and interrupts and therefore
> removing reset-names and interrupt-names as well.
> 
> Whilst, Update the clock-name "aclk"->"axi" to make it consistent with
> DRD and host blocks.
> 
> There is any harm in making such a change as, no users of
> renesas,r9a09g011-usb3-peri yet in kernel release.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
>  * Moved DRD interrupts to DRD bindings
>  * Updated interrupts and dropped interrupt-names
>  * Renamed aclk->axi
> ---
>  .../bindings/usb/renesas,usb3-peri.yaml       | 39 ++-----------------
>  1 file changed, 3 insertions(+), 36 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 03/12] dt-bindings: usb: renesas,usb3-peri: Document RZ/V2MA bindings
  2023-01-12 21:58 ` [PATCH v2 03/12] dt-bindings: usb: renesas,usb3-peri: Document RZ/V2MA bindings Biju Das
@ 2023-01-13 20:49   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2023-01-13 20:49 UTC (permalink / raw)
  To: Biju Das
  Cc: Greg Kroah-Hartman, devicetree, Yoshihiro Shimoda, Rob Herring,
	Fabrizio Castro, linux-renesas-soc, Krzysztof Kozlowski,
	Geert Uytterhoeven, linux-usb


On Thu, 12 Jan 2023 21:58:57 +0000, Biju Das wrote:
> Document RZ/V2MA usb3-peri bindings. RZ/V2MA usb3-peri is identical
> to one found on the RZ/V2M SoC. No driver changes are required as
> generic compatible string "renesas,rzv2m-usb3-peri" will be used as
> a fallback.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
>  * No change
> ---
>  Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 04/12] dt-bindings: usb: Add RZ/V2M USB3DRD binding
  2023-01-12 21:58 ` [PATCH v2 04/12] dt-bindings: usb: Add RZ/V2M USB3DRD binding Biju Das
@ 2023-01-13 20:50   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2023-01-13 20:50 UTC (permalink / raw)
  To: Biju Das
  Cc: Fabrizio Castro, devicetree, Geert Uytterhoeven,
	linux-renesas-soc, linux-usb, Rob Herring, Krzysztof Kozlowski,
	Greg Kroah-Hartman


On Thu, 12 Jan 2023 21:58:58 +0000, Biju Das wrote:
> Add device tree bindings for the RZ/V2{M, MA} USB3DRD module.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
>  * Added DRD interrupts and interrupt-names
>  * Dropped peripheral reset and reset-names
>  * Added reg property for usb3 device ctrlr
>  * Renamed peri_axi->axi and apb->reg
>  * Updated pattern properties and example.
> ---
>  .../bindings/usb/renesas,rzv2m-usb3drd.yaml   | 129 ++++++++++++++++++
>  1 file changed, 129 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/renesas,rzv2m-usb3drd.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support
  2023-01-12 21:58 [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Biju Das
                   ` (6 preceding siblings ...)
  2023-01-12 21:59 ` [PATCH v2 12/12] arm64: dts: renesas: rzv2mevk2: Enable USB3 role switch Biju Das
@ 2023-01-19 13:10 ` Greg Kroah-Hartman
  2023-01-21  9:59   ` Biju Das
  7 siblings, 1 reply; 15+ messages in thread
From: Greg Kroah-Hartman @ 2023-01-19 13:10 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Krzysztof Kozlowski, Mathias Nyman, Lad Prabhakar,
	Yoshihiro Shimoda, Felipe Balbi, linux-usb, devicetree,
	Geert Uytterhoeven, Fabrizio Castro, linux-renesas-soc

On Thu, Jan 12, 2023 at 09:58:54PM +0000, Biju Das wrote:
> This patch series aims to add USB3.1 HOST, Peri and DRD support
> on RZ/V2M EVK platform.
> 
> The reset for both host and peri are located in USB3DRD block. The
> USB3DRD registers are mapped in the AXI address space of the Peripheral
> module.
> 
> RZ/V2M XHCI is similar to R-Car XHCI but it doesn't require any
> firmware.
> 
> Host/device needs to do reset release and set the host/device function
> on DRD module, before accessing any registers.

After applying this series and building it on x86_64 I get the following
build errors:

ERROR: modpost: "rzv2m_usb3drd_reset" [drivers/usb/host/xhci-plat-hcd.ko] undefined!
ERROR: modpost: "rzv2m_usb3drd_reset" [drivers/usb/gadget/udc/renesas_usb3.ko] undefined!

:(


^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support
  2023-01-19 13:10 ` [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Greg Kroah-Hartman
@ 2023-01-21  9:59   ` Biju Das
  2023-01-21 10:06     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 15+ messages in thread
From: Biju Das @ 2023-01-21  9:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Rob Herring, Krzysztof Kozlowski, Mathias Nyman,
	Prabhakar Mahadev Lad, Yoshihiro Shimoda, Felipe Balbi,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	Geert Uytterhoeven, Fabrizio Castro,
	linux-renesas-soc@vger.kernel.org

Hi Greg,

Thanks for the feedback.

> Subject: Re: [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support
> 
> On Thu, Jan 12, 2023 at 09:58:54PM +0000, Biju Das wrote:
> > This patch series aims to add USB3.1 HOST, Peri and DRD support on
> > RZ/V2M EVK platform.
> >
> > The reset for both host and peri are located in USB3DRD block. The
> > USB3DRD registers are mapped in the AXI address space of the
> > Peripheral module.
> >
> > RZ/V2M XHCI is similar to R-Car XHCI but it doesn't require any
> > firmware.
> >
> > Host/device needs to do reset release and set the host/device function
> > on DRD module, before accessing any registers.
> 
> After applying this series and building it on x86_64 I get the following
> build errors:
> 
> ERROR: modpost: "rzv2m_usb3drd_reset" [drivers/usb/host/xhci-plat-hcd.ko]
> undefined!
> ERROR: modpost: "rzv2m_usb3drd_reset"
> [drivers/usb/gadget/udc/renesas_usb3.ko] undefined!

The file drivers/usb/gadget/udc/rzv2m_usb3drd.c is not getting compiled,

If USB_RZV2M_USB3DRD=y, USB_XHCI_RZV2M=m and USB_RENESAS_USB3=m and 
Because of that modpost is giving undefined error.

So I have updated the KCONFIG like below and now it builds OK now. I will send next version
based on this, if there are no comments.

-- a/drivers/usb/gadget/udc/Kconfig
+++ b/drivers/usb/gadget/udc/Kconfig
@@ -180,10 +180,17 @@ config USB_RENESAS_USBHS_UDC
           gadget drivers to also be dynamically linked.
 
 config USB_RZV2M_USB3DRD
+       tristate 'Renesas USB3.1 DRD controller'
        depends on ARCH_R9A09G011 || COMPILE_TEST
-       bool
-       default y if USB_XHCI_RZV2M
-       default y if USB_RENESAS_USB3
+       default y if USB_XHCI_RZV2M=y
+       default y if USB_RENESAS_USB3=y
+       default m if (USB_XHCI_RZV2M=m && USB_RENESAS_USB3=m)
+       help
+          Renesas USB3.1 DRD controller is a USB DRD controller
+          that supports both host and device switching.
+
+          Say "y" to link the driver statically, or "m" to build a
+          dynamically linked module called "rzv2m_usb3drd".
 
 config USB_RENESAS_USB3
        tristate 'Renesas USB3.0 Peripheral controller'
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 7414facce10f..2b80ce9587c1 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -54,6 +54,7 @@ config USB_XHCI_PCI_RENESAS
 config USB_XHCI_PLATFORM
        tristate "Generic xHCI driver for a platform device"
        select USB_XHCI_RCAR if ARCH_RENESAS
+       select USB_XHCI_RZV2M if ARCH_R9A09G011

Cheers,
Biju

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support
  2023-01-21  9:59   ` Biju Das
@ 2023-01-21 10:06     ` Greg Kroah-Hartman
  2023-01-21 10:54       ` Biju Das
  0 siblings, 1 reply; 15+ messages in thread
From: Greg Kroah-Hartman @ 2023-01-21 10:06 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Krzysztof Kozlowski, Mathias Nyman,
	Prabhakar Mahadev Lad, Yoshihiro Shimoda, Felipe Balbi,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	Geert Uytterhoeven, Fabrizio Castro,
	linux-renesas-soc@vger.kernel.org

On Sat, Jan 21, 2023 at 09:59:53AM +0000, Biju Das wrote:
> Hi Greg,
> 
> Thanks for the feedback.
> 
> > Subject: Re: [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support
> > 
> > On Thu, Jan 12, 2023 at 09:58:54PM +0000, Biju Das wrote:
> > > This patch series aims to add USB3.1 HOST, Peri and DRD support on
> > > RZ/V2M EVK platform.
> > >
> > > The reset for both host and peri are located in USB3DRD block. The
> > > USB3DRD registers are mapped in the AXI address space of the
> > > Peripheral module.
> > >
> > > RZ/V2M XHCI is similar to R-Car XHCI but it doesn't require any
> > > firmware.
> > >
> > > Host/device needs to do reset release and set the host/device function
> > > on DRD module, before accessing any registers.
> > 
> > After applying this series and building it on x86_64 I get the following
> > build errors:
> > 
> > ERROR: modpost: "rzv2m_usb3drd_reset" [drivers/usb/host/xhci-plat-hcd.ko]
> > undefined!
> > ERROR: modpost: "rzv2m_usb3drd_reset"
> > [drivers/usb/gadget/udc/renesas_usb3.ko] undefined!
> 
> The file drivers/usb/gadget/udc/rzv2m_usb3drd.c is not getting compiled,
> 
> If USB_RZV2M_USB3DRD=y, USB_XHCI_RZV2M=m and USB_RENESAS_USB3=m and 
> Because of that modpost is giving undefined error.
> 
> So I have updated the KCONFIG like below and now it builds OK now. I will send next version
> based on this, if there are no comments.
> 
> -- a/drivers/usb/gadget/udc/Kconfig
> +++ b/drivers/usb/gadget/udc/Kconfig
> @@ -180,10 +180,17 @@ config USB_RENESAS_USBHS_UDC
>            gadget drivers to also be dynamically linked.
>  
>  config USB_RZV2M_USB3DRD
> +       tristate 'Renesas USB3.1 DRD controller'
>         depends on ARCH_R9A09G011 || COMPILE_TEST
> -       bool
> -       default y if USB_XHCI_RZV2M
> -       default y if USB_RENESAS_USB3
> +       default y if USB_XHCI_RZV2M=y
> +       default y if USB_RENESAS_USB3=y


These should just be:
	default USB_XHCI_RZV2M
	default USB_RENESAS_USB3
right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support
  2023-01-21 10:06     ` Greg Kroah-Hartman
@ 2023-01-21 10:54       ` Biju Das
  0 siblings, 0 replies; 15+ messages in thread
From: Biju Das @ 2023-01-21 10:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Rob Herring, Krzysztof Kozlowski, Mathias Nyman,
	Prabhakar Mahadev Lad, Yoshihiro Shimoda, Felipe Balbi,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	Geert Uytterhoeven, Fabrizio Castro,
	linux-renesas-soc@vger.kernel.org

Hi Greg,

Thanks for the feedback.

> Subject: Re: [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support
> 
> On Sat, Jan 21, 2023 at 09:59:53AM +0000, Biju Das wrote:
> > Hi Greg,
> >
> > Thanks for the feedback.
> >
> > > Subject: Re: [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support
> > >
> > > On Thu, Jan 12, 2023 at 09:58:54PM +0000, Biju Das wrote:
> > > > This patch series aims to add USB3.1 HOST, Peri and DRD support on
> > > > RZ/V2M EVK platform.
> > > >
> > > > The reset for both host and peri are located in USB3DRD block. The
> > > > USB3DRD registers are mapped in the AXI address space of the
> > > > Peripheral module.
> > > >
> > > > RZ/V2M XHCI is similar to R-Car XHCI but it doesn't require any
> > > > firmware.
> > > >
> > > > Host/device needs to do reset release and set the host/device
> > > > function on DRD module, before accessing any registers.
> > >
> > > After applying this series and building it on x86_64 I get the
> > > following build errors:
> > >
> > > ERROR: modpost: "rzv2m_usb3drd_reset"
> > > [drivers/usb/host/xhci-plat-hcd.ko]
> > > undefined!
> > > ERROR: modpost: "rzv2m_usb3drd_reset"
> > > [drivers/usb/gadget/udc/renesas_usb3.ko] undefined!
> >
> > The file drivers/usb/gadget/udc/rzv2m_usb3drd.c is not getting
> > compiled,
> >
> > If USB_RZV2M_USB3DRD=y, USB_XHCI_RZV2M=m and USB_RENESAS_USB3=m and
> > Because of that modpost is giving undefined error.
> >
> > So I have updated the KCONFIG like below and now it builds OK now. I
> > will send next version based on this, if there are no comments.
> >
> > -- a/drivers/usb/gadget/udc/Kconfig
> > +++ b/drivers/usb/gadget/udc/Kconfig
> > @@ -180,10 +180,17 @@ config USB_RENESAS_USBHS_UDC
> >            gadget drivers to also be dynamically linked.
> >
> >  config USB_RZV2M_USB3DRD
> > +       tristate 'Renesas USB3.1 DRD controller'
> >         depends on ARCH_R9A09G011 || COMPILE_TEST
> > -       bool
> > -       default y if USB_XHCI_RZV2M
> > -       default y if USB_RENESAS_USB3
> > +       default y if USB_XHCI_RZV2M=y
> > +       default y if USB_RENESAS_USB3=y
> 
> 
> These should just be:
> 	default USB_XHCI_RZV2M
> 	default USB_RENESAS_USB3
> right?

Yes, you are correct. Will send next version based on this.

Cheers,
Biju

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-01-21 10:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-12 21:58 [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Biju Das
2023-01-12 21:58 ` [PATCH v2 01/12] dt-bindings: usb: renesas,usb-xhci: Document RZ/V2M support Biju Das
2023-01-12 21:58 ` [PATCH v2 02/12] dt-bindings: usb: renesas,usb3-peri: Update reset, clock-name and interrupts properties Biju Das
2023-01-13 20:49   ` Rob Herring
2023-01-12 21:58 ` [PATCH v2 03/12] dt-bindings: usb: renesas,usb3-peri: Document RZ/V2MA bindings Biju Das
2023-01-13 20:49   ` Rob Herring
2023-01-12 21:58 ` [PATCH v2 04/12] dt-bindings: usb: Add RZ/V2M USB3DRD binding Biju Das
2023-01-13 20:50   ` Rob Herring
2023-01-12 21:59 ` [PATCH v2 10/12] arm64: dts: renesas: r9a09g011: Add USB3 DRD, device and host nodes Biju Das
2023-01-12 21:59 ` [PATCH v2 11/12] arm64: dts: renesas: rzv2mevk2: Enable USB3 DRD, Peripheral and Host Biju Das
2023-01-12 21:59 ` [PATCH v2 12/12] arm64: dts: renesas: rzv2mevk2: Enable USB3 role switch Biju Das
2023-01-19 13:10 ` [PATCH v2 00/12] ADD USB3.1 HOST, Peri and DRD support Greg Kroah-Hartman
2023-01-21  9:59   ` Biju Das
2023-01-21 10:06     ` Greg Kroah-Hartman
2023-01-21 10:54       ` Biju Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox