Skip to contentSkip to conversation

Axi-usb: Add support for 64-bit addressing.

PATCH Superseded Nava kishore Manne 3 participants 8 messages May 24, 2016 – May 30, 2016

Subsystems (3)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Axi-usb: Add support for 64-bit addressing.

This patch updates the driver to support 64-bit DMA addressing.

---
Changes for v3:
-Added new compatable string for 5.00 IP version as suggested by
Arnd Bergmann.
-Used write_fn() insted of lo_hi_writeq() as suggested by
Arnd Bergmann.

Changes for v2:
-Added dma-ranges property in device tree as suggested by Arnd Bergmann. -Modified the driver code based on the xlnx,addrwidth.

 .../devicetree/bindings/usb/udc-xilinx.txt         | 21 +++++----
 drivers/usb/gadget/udc/udc-xilinx.c                | 53 ++++++++++++++++++++--
 2 files changed, 63 insertions(+), 11 deletions(-)
Documentation/devicetree/bindings/usb/udc-xilinx.txt +13 -8
index 47b4e39..09df757 100644
@@ -1,18 +1,23 @@
 Xilinx USB2 device controller
 
 Required properties:
-- compatible		: Should be "xlnx,usb2-device-4.00.a"
+- compatible		: Should be "xlnx,usb2-device-4.00.a" or
+			  "xlnx,usb2-device-5.00"
 - reg			: Physical base address and size of the USB2
 			  device registers map.
 - interrupts		: Should contain single irq line of USB2 device
 			  controller
 - xlnx,has-builtin-dma	: if DMA is included
+- dma-ranges		: Should be as the following
+			  <child-bus-address, parent-bus-address, length>
+- xlnx,addrwidth	: Should be the dma addressing size in bits(ex: 64 bits)
 
 Example:
- 		axi-usb2-device at 42e00000 {
-                        compatible = "xlnx,usb2-device-4.00.a";
-                        interrupts = <0x0 0x39 0x1>;
-                        reg = <0x42e00000 0x10000>;
-                        xlnx,has-builtin-dma;
-                };
-
+		axi-usb2-device at 42e00000 {
+			compatible = "xlnx,usb2-device-4.00.a";
+			interrupts = <0x0 0x39 0x1>;
+			reg = <0x42e00000 0x10000>;
+			dma-ranges = <0x00000000 0x00000000 0x40000000>;
+			xlnx,has-builtin-dma;
+			xlnx,addrwidth = <0x40>;
+		};
drivers/usb/gadget/udc/udc-xilinx.c +50 -3

89 lines not on this page · raw message

Signature · 1 line
2.8.3.394.g3916adf
#1 lore raw
Quoted 8 lines · CEST Nava kishore Manne
Documentation/devicetree/bindings/usb/udc-xilinx.txt +0 -0
index 47b4e39..09df757 100644
@@ -1,18 +1,23 @@
 Xilinx USB2 device controller
 
 Required properties:

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 12

Quoted 10 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +4 -1
-- compatible		: Should be "xlnx,usb2-device-4.00.a"
+- compatible		: Should be "xlnx,usb2-device-4.00.a" or
+			  "xlnx,usb2-device-5.00"
 - reg			: Physical base address and size of the USB2
 			  device registers map.
 - interrupts		: Should contain single irq line of USB2 device
 			  controller
 - xlnx,has-builtin-dma	: if DMA is included
+- dma-ranges		: Should be as the following
+			  <child-bus-address, parent-bus-address, length>

A USB host should not have any children that are DMA capable, I think, so this property doesn't make sense here. It should be part of the parent bus.

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 13

Quoted 1 line
Documentation/devicetree/bindings/usb/udc-xilinx.txt +1 -0
+- xlnx,addrwidth	: Should be the dma addressing size in bits(ex: 64 bits)

I'm still unconvinced about the property definition here. What are the possible options for the IP block? I don't think I ever saw a reply from you to my earlier questions.

Quoted 26 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +14 -1
@@ -214,6 +223,20 @@ static const struct usb_endpoint_descriptor config_bulk_out_desc = {
 	.wMaxPacketSize		= cpu_to_le16(EP0_MAX_PACKET),
 };
 
+/**
+ * xudc_write64 - write 64bit value to device registers
+ * @addr: base addr of device registers
+ * @offset: register offset
+ * @val: data to be written
+ **/
+static void xudc_write64(struct xusb_ep *ep, u32 offset, u64 val)
+{
+	struct xusb_udc *udc = ep->udc;
+
+	udc->write_fn(udc->addr, offset, lower_32_bits(val));
+	udc->write_fn(udc->addr, offset+0x04, upper_32_bits(val));
+}
+
 /**
  * xudc_write32 - little endian write to device registers
  * @addr: base addr of device registers
@@ -330,8 +353,13 @@ static int xudc_start_dma(struct xusb_ep *ep, dma_addr_t src,
 	 * destination registers and then set the length
 	 * into the DMA length register.
 	 */
-	udc->write_fn(udc->addr, XUSB_DMA_DSAR_ADDR_OFFSET, src);

Documentation/devicetree/bindings/usb/udc-xilinx.txt static int xudc_start_dma(struct xusb_ep *ep, dma_addr_t src, · line 364

Quoted 10 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +7 -1
-	udc->write_fn(udc->addr, XUSB_DMA_DDAR_ADDR_OFFSET, dst);
+	if (udc->dma_addrwidth > 32) {
+		xudc_write64(ep, XUSB_DMA_DSAR_ADDR_OFFSET_LSB, src);
+		xudc_write64(ep, XUSB_DMA_DDAR_ADDR_OFFSET_LSB, dst);
+	} else {
+		udc->write_fn(udc->addr, XUSB_DMA_DSAR_ADDR_OFFSET, src);
+		udc->write_fn(udc->addr, XUSB_DMA_DDAR_ADDR_OFFSET, dst);
+	}
 	udc->write_fn(udc->addr, XUSB_DMA_LENGTH_OFFSET, length);
 

This looks good.

Arnd

#2 lore raw
Quoted 24 lines

-----Original Message-----
From: Arnd Bergmann [mailto:arnd at arndb.de]
Sent: Tuesday, May 24, 2016 2:21 PM
To: Nava kishore Manne <[email protected]>
Cc: robh+dt at kernel.org; pawel.moll at arm.com; mark.rutland at arm.com; ijc+devicetree at hellion.org.uk; galak at codeaurora.org; Michal Simek <[email protected]>; Soren Brinkmann <[email protected]>; balbi at ti.com; gregkh at linuxfoundation.org; Hyun Kwon <[email protected]>; Nava kishore Manne <[email protected]>; Radhey Shyam Pandey <[email protected]>; devicetree at vger.kernel.org; linux- arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
Subject: Re: [PATCH v3] Axi-usb: Add support for 64-bit addressing.

Quoted 8 lines · CEST Nava kishore Manne
Documentation/devicetree/bindings/usb/udc-xilinx.txt +0 -0
index 47b4e39..09df757 100644
@@ -1,18 +1,23 @@
 Xilinx USB2 device controller
 
Quoted 15 lines

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 12

Quoted 11 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +4 -1
 Required properties:
-- compatible		: Should be "xlnx,usb2-device-4.00.a"
+- compatible		: Should be "xlnx,usb2-device-4.00.a" or
+			  "xlnx,usb2-device-5.00"
 - reg			: Physical base address and size of the USB2
 			  device registers map.
 - interrupts		: Should contain single irq line of USB2 device
 			  controller
 - xlnx,has-builtin-dma	: if DMA is included
+- dma-ranges		: Should be as the following
+			  <child-bus-address, parent-bus-address, length>

A USB host should not have any children that are DMA capable, I think, so this property doesn't make sense here. It should be part of the parent bus.

Will send next version (v4) by removing this property from the DT.

Quoted 7 lines

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 13

Quoted 1 line
Documentation/devicetree/bindings/usb/udc-xilinx.txt +1 -0
+- xlnx,addrwidth	: Should be the dma addressing size in bits(ex: 64

bits)

I'm still unconvinced about the property definition here. What are the possible options for the IP block? I don't think I ever saw a reply from you to my earlier questions.

Sorry Let me clearly explain

Quoted 1 line

From the IP version 5.0 onwards The IP support both 32-bit and 64-bit addressing.

But the older version of the IP's supports only 32-bit addressing.

This addrwidth property differentiates the address width for the new IP (I mean 5.0 version on wards) For older IP it will be always 32-bit.

Please let me know if you are still not clear.

Regards,
Navakishore.

Quoted 43 lines

Documentation/devicetree/bindings/usb/udc-xilinx.txt static const struct usb_endpoint_descriptor

Quoted 1 line
Documentation/devicetree/bindings/usb/udc-xilinx.txt +0 -0
@@ -214,6 +223,20 @@ static const struct usb_endpoint_descriptor

config_bulk_out_desc = {

Quoted 19 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +12 -0
 	.wMaxPacketSize		= cpu_to_le16(EP0_MAX_PACKET),
 };
 
+/**
+ * xudc_write64 - write 64bit value to device registers
+ * @addr: base addr of device registers
+ * @offset: register offset
+ * @val: data to be written
+ **/
+static void xudc_write64(struct xusb_ep *ep, u32 offset, u64 val) {
+	struct xusb_udc *udc = ep->udc;
+
+	udc->write_fn(udc->addr, offset, lower_32_bits(val));
+	udc->write_fn(udc->addr, offset+0x04, upper_32_bits(val)); }
+
 /**
  * xudc_write32 - little endian write to device registers
  * @addr: base addr of device registers @@ -330,8 +353,13 @@ static

int xudc_start_dma(struct xusb_ep *ep, dma_addr_t src,

Documentation/devicetree/bindings/usb/udc-xilinx.txt

Quoted 7 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +2 -2
 	 * destination registers and then set the length
 	 * into the DMA length register.
 	 */
-	udc->write_fn(udc->addr, XUSB_DMA_DSAR_ADDR_OFFSET, src);
-	udc->write_fn(udc->addr, XUSB_DMA_DDAR_ADDR_OFFSET, dst);
+	if (udc->dma_addrwidth > 32) {
+		xudc_write64(ep, XUSB_DMA_DSAR_ADDR_OFFSET_LSB,

src);

Documentation/devicetree/bindings/usb/udc-xilinx.txt

Quoted 1 line
Documentation/devicetree/bindings/usb/udc-xilinx.txt +1 -0
+		xudc_write64(ep, XUSB_DMA_DDAR_ADDR_OFFSET_LSB,

dst);

Documentation/devicetree/bindings/usb/udc-xilinx.txt

Quoted 2 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +2 -0
+	} else {
+		udc->write_fn(udc->addr,

XUSB_DMA_DSAR_ADDR_OFFSET, src);

Documentation/devicetree/bindings/usb/udc-xilinx.txt

Quoted 1 line
Documentation/devicetree/bindings/usb/udc-xilinx.txt +1 -0
+		udc->write_fn(udc->addr,

XUSB_DMA_DDAR_ADDR_OFFSET, dst);

Documentation/devicetree/bindings/usb/udc-xilinx.txt

Quoted 3 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +1 -0
+	}
 	udc->write_fn(udc->addr, XUSB_DMA_LENGTH_OFFSET, length);

This looks good.

Arnd

maintainer
#3 lore raw
Quoted 49 lines · Nava kishore Manne
Quoted 24 lines

-----Original Message-----
From: Arnd Bergmann [mailto:arnd at arndb.de]
Sent: Tuesday, May 24, 2016 2:21 PM
To: Nava kishore Manne <[email protected]>
Cc: robh+dt at kernel.org; pawel.moll at arm.com; mark.rutland at arm.com; ijc+devicetree at hellion.org.uk; galak at codeaurora.org; Michal Simek <[email protected]>; Soren Brinkmann <[email protected]>; balbi at ti.com; gregkh at linuxfoundation.org; Hyun Kwon <[email protected]>; Nava kishore Manne <[email protected]>; Radhey Shyam Pandey <[email protected]>; devicetree at vger.kernel.org; linux- arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
Subject: Re: [PATCH v3] Axi-usb: Add support for 64-bit addressing.

Quoted 8 lines · CEST Nava kishore Manne
Documentation/devicetree/bindings/usb/udc-xilinx.txt +0 -0
index 47b4e39..09df757 100644
@@ -1,18 +1,23 @@
 Xilinx USB2 device controller
 
Quoted 15 lines

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 12

Quoted 11 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +4 -1
 Required properties:
-- compatible		: Should be "xlnx,usb2-device-4.00.a"
+- compatible		: Should be "xlnx,usb2-device-4.00.a" or
+			  "xlnx,usb2-device-5.00"
 - reg			: Physical base address and size of the USB2
 			  device registers map.
 - interrupts		: Should contain single irq line of USB2 device
 			  controller
 - xlnx,has-builtin-dma	: if DMA is included
+- dma-ranges		: Should be as the following
+			  <child-bus-address, parent-bus-address, length>

A USB host should not have any children that are DMA capable, I think, so this property doesn't make sense here. It should be part of the parent bus.

Will send next version (v4) by removing this property from the DT.

Quoted 7 lines

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 13

Quoted 1 line
Documentation/devicetree/bindings/usb/udc-xilinx.txt +1 -0
+- xlnx,addrwidth	: Should be the dma addressing size in bits(ex: 64

bits)

I'm still unconvinced about the property definition here. What are the possible options for the IP block? I don't think I ever saw a reply from you to my earlier questions.

Quoted 7 lines

Sorry Let me clearly explain

From the IP version 5.0 onwards The IP support both 32-bit and 64-bit addressing. But the older version of the IP's supports only 32-bit addressing.

This addrwidth property differentiates the address width for the new IP (I mean 5.0 version on wards) For older IP it will be always 32-bit.

Then I think you should have a simple boolean property for 64-bit configuration.

#4 lore raw
Quoted 52 lines · CEST Rob Herring
Quoted 51 lines · Nava kishore Manne
Quoted 24 lines

-----Original Message-----
From: Arnd Bergmann [mailto:arnd at arndb.de]
Sent: Tuesday, May 24, 2016 2:21 PM
To: Nava kishore Manne <[email protected]>
Cc: robh+dt at kernel.org; pawel.moll at arm.com; mark.rutland at arm.com; ijc+devicetree at hellion.org.uk; galak at codeaurora.org; Michal Simek <[email protected]>; Soren Brinkmann <[email protected]>; balbi at ti.com; gregkh at linuxfoundation.org; Hyun Kwon <[email protected]>; Nava kishore Manne <[email protected]>; Radhey Shyam Pandey <[email protected]>; devicetree at vger.kernel.org; linux- arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
Subject: Re: [PATCH v3] Axi-usb: Add support for 64-bit addressing.

Quoted 8 lines · CEST Nava kishore Manne
Documentation/devicetree/bindings/usb/udc-xilinx.txt +0 -0
index 47b4e39..09df757 100644
@@ -1,18 +1,23 @@
 Xilinx USB2 device controller
 
Quoted 15 lines

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 12

Quoted 11 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +4 -1
 Required properties:
-- compatible             : Should be "xlnx,usb2-device-4.00.a"
+- compatible             : Should be "xlnx,usb2-device-4.00.a" or
+                   "xlnx,usb2-device-5.00"
 - reg                    : Physical base address and size of the USB2
                    device registers map.
 - interrupts             : Should contain single irq line of USB2 device
                    controller
 - xlnx,has-builtin-dma   : if DMA is included
+- dma-ranges             : Should be as the following
+                   <child-bus-address, parent-bus-address, length>

A USB host should not have any children that are DMA capable, I think, so this property doesn't make sense here. It should be part of the parent bus.

Will send next version (v4) by removing this property from the DT.

Quoted 7 lines

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 13

Quoted 1 line
Documentation/devicetree/bindings/usb/udc-xilinx.txt +1 -0
+- xlnx,addrwidth : Should be the dma addressing size in bits(ex: 64

bits)

I'm still unconvinced about the property definition here. What are the possible options for the IP block? I don't think I ever saw a reply from you to my earlier questions.

Sorry Let me clearly explain

Quoted 8 lines
Quoted 5 lines

From the IP version 5.0 onwards The IP support both 32-bit and 64-bit addressing. But the older version of the IP's supports only 32-bit addressing.

This addrwidth property differentiates the address width for the new IP (I mean 5.0 version on wards) For older IP it will be always 32-bit.

Then I think you should have a simple boolean property for 64-bit configuration.

I think matching on the version number is slightly better, as we have the version already and it identifies whether the register exists.

Having a boolean property of course works as well, it just duplicates that information.

Arnd

maintainer
#5 lore raw
Quoted 59 lines · Arnd Bergmann
Quoted 58 lines · CEST Rob Herring
Quoted 56 lines · Nava kishore Manne
Quoted 24 lines

-----Original Message-----
From: Arnd Bergmann [mailto:arnd at arndb.de]
Sent: Tuesday, May 24, 2016 2:21 PM
To: Nava kishore Manne <[email protected]>
Cc: robh+dt at kernel.org; pawel.moll at arm.com; mark.rutland at arm.com; ijc+devicetree at hellion.org.uk; galak at codeaurora.org; Michal Simek <[email protected]>; Soren Brinkmann <[email protected]>; balbi at ti.com; gregkh at linuxfoundation.org; Hyun Kwon <[email protected]>; Nava kishore Manne <[email protected]>; Radhey Shyam Pandey <[email protected]>; devicetree at vger.kernel.org; linux- arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
Subject: Re: [PATCH v3] Axi-usb: Add support for 64-bit addressing.

Quoted 8 lines · CEST Nava kishore Manne
Documentation/devicetree/bindings/usb/udc-xilinx.txt +0 -0
index 47b4e39..09df757 100644
@@ -1,18 +1,23 @@
 Xilinx USB2 device controller
 
Quoted 15 lines

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 12

Quoted 11 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +4 -1
 Required properties:
-- compatible             : Should be "xlnx,usb2-device-4.00.a"
+- compatible             : Should be "xlnx,usb2-device-4.00.a" or
+                   "xlnx,usb2-device-5.00"
 - reg                    : Physical base address and size of the USB2
                    device registers map.
 - interrupts             : Should contain single irq line of USB2 device
                    controller
 - xlnx,has-builtin-dma   : if DMA is included
+- dma-ranges             : Should be as the following
+                   <child-bus-address, parent-bus-address, length>

A USB host should not have any children that are DMA capable, I think, so this property doesn't make sense here. It should be part of the parent bus.

Will send next version (v4) by removing this property from the DT.

Quoted 7 lines

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 13

Quoted 1 line
Documentation/devicetree/bindings/usb/udc-xilinx.txt +1 -0
+- xlnx,addrwidth : Should be the dma addressing size in bits(ex: 64

bits)

I'm still unconvinced about the property definition here. What are the possible options for the IP block? I don't think I ever saw a reply from you to my earlier questions.

Sorry Let me clearly explain

From the IP version 5.0 onwards The IP support both 32-bit and 64-bit addressing. But the older version of the IP's supports only 32-bit addressing.

This addrwidth property differentiates the address width for the new IP (I mean 5.0 version on wards) For older IP it will be always 32-bit.

Quoted 8 lines
Quoted 2 lines

Then I think you should have a simple boolean property for 64-bit configuration.

I think matching on the version number is slightly better, as we have the version already and it identifies whether the register exists.

Having a boolean property of course works as well, it just duplicates that information.

It doesn't because v5.0 h/w can be configured for either 32 or 64-bit mode. Normally, we would encode configuration into the compatible strings, but I view FPGA based blocks to be an exception. Of course, since they can just "fix the h/w" we could just require h/w version and feature registers. ;)

Rob

#6 lore raw
Quoted 90 lines

-----Original Message-----
From: Rob Herring [mailto:robh at kernel.org]
Sent: Thursday, May 26, 2016 12:24 AM
To: Arnd Bergmann <[email protected]>
Cc: Nava kishore Manne <[email protected]>; pawel.moll at arm.com; mark.rutland at arm.com; ijc+devicetree at hellion.org.uk; galak at codeaurora.org; Michal Simek <[email protected]>; Soren Brinkmann <[email protected]>; balbi at ti.com;
gregkh at linuxfoundation.org; Hyun Kwon <[email protected]>; Radhey Shyam Pandey <[email protected]>; devicetree at vger.kernel.org; linux- arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
Subject: Re: [PATCH v3] Axi-usb: Add support for 64-bit addressing.

Quoted 9 lines · Arnd Bergmann
Quoted 8 lines · CEST Rob Herring
Quoted 7 lines · Nava kishore Manne
Quoted 7 lines

-----Original Message-----
From: Arnd Bergmann [mailto:arnd at arndb.de]
Sent: Tuesday, May 24, 2016 2:21 PM
To: Nava kishore Manne <[email protected]>
Cc: robh+dt at kernel.org; pawel.moll at arm.com;

mark.rutland at arm.com;

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

ijc+devicetree at hellion.org.uk; galak at codeaurora.org; Michal Simek <[email protected]>; Soren Brinkmann <[email protected]>; balbi at ti.com; gregkh at linuxfoundation.org; Hyun Kwon <[email protected]>; Nava kishore Manne <[email protected]>;

Radhey

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Shyam Pandey <[email protected]>; devicetree at vger.kernel.org; linux- arm-kernel at lists.infradead.org;
linux-kernel at vger.kernel.org
Subject: Re: [PATCH v3] Axi-usb: Add support for 64-bit addressing.

On Tuesday, May 24, 2016 10:51:08 AM CEST Nava kishore Manne

Quoted 9 lines · wrote:
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

diff --git a/Documentation/devicetree/bindings/usb/udc-xilinx.txt b/Documentation/devicetree/bindings/usb/udc-xilinx.txt index 47b4e39..09df757 100644

Documentation/devicetree/bindings/usb/udc-xilinx.txt +0 -0
@@ -1,18 +1,23 @@
 Xilinx USB2 device controller
 
Quoted 15 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +5 -1
 Required properties:
-- compatible             : Should be "xlnx,usb2-device-4.00.a"
+- compatible             : Should be "xlnx,usb2-device-4.00.a" or
+                   "xlnx,usb2-device-5.00"
 - reg                    : Physical base address and size of the USB2
                    device registers map.
 - interrupts             : Should contain single irq line of USB2 device
                    controller
 - xlnx,has-builtin-dma   : if DMA is included
+- dma-ranges             : Should be as the following
+                   <child-bus-address, parent-bus-address,
+length>
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

A USB host should not have any children that are DMA capable, I think, so this property doesn't make sense here. It should be part of

the parent bus.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

Will send next version (v4) by removing this property from the DT.

Quoted 4 lines

Documentation/devicetree/bindings/usb/udc-xilinx.txt line 15

Quoted 2 lines
Documentation/devicetree/bindings/usb/udc-xilinx.txt +2 -0
+- xlnx,addrwidth : Should be the dma addressing size in
+bits(ex: 64

bits)

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines

I'm still unconvinced about the property definition here. What are the possible options for the IP block? I don't think I ever saw a reply from you to my earlier questions.

Sorry Let me clearly explain

From the IP version 5.0 onwards The IP support both 32-bit and 64-bit

addressing.

Quoted 11 lines
Quoted 7 lines
Quoted 4 lines

But the older version of the IP's supports only 32-bit addressing.

This addrwidth property differentiates the address width for the new IP (I mean 5.0 version on wards) For older IP it will be always 32-bit.

Then I think you should have a simple boolean property for 64-bit configuration.

I think matching on the version number is slightly better, as we have the version already and it identifies whether the register exists.

Quoted 8 lines
Quoted 2 lines

Having a boolean property of course works as well, it just duplicates that information.

It doesn't because v5.0 h/w can be configured for either 32 or 64-bit mode. Normally, we would encode configuration into the compatible strings, but I view FPGA based blocks to be an exception. Of course, since they can just "fix the h/w" we could just require h/w version and feature registers. ;)

The Axi-usb 5.00 IP is a FPGA based one. This IP needs to support two H/w designs one with 32 bit DMA addressing another one is 64 bit DMA addressing. And also in the software point for view we don?t have any register to figure out whether it is supporting 32 bit DMA addressing or 64 bit DMA addressing. To support both the designs I kept addrwidth property in the dt. I think here addrwidth property is make sense to differentiate the h/w configurations. If you want me to changes it to boolean please let me know I will fix it in the next version.

Regards,
Navakishore.

Quoted 1 line

Rob

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

#7 lore raw
Quoted 5 lines · CEST Nava kishore Manne
Quoted 1 line

The Axi-usb 5.00 IP is a FPGA based one. This IP needs to support two H/w designs one with 32 bit DMA addressing another one is 64 bit DMA addressing. And also in the software point for view we don?t have any register to figure out whether it is supporting 32 bit DMA addressing or 64 bit DMA addressing. To support both the designs I kept addrwidth property in the dt. I think here addrwidth property is make sense to differentiate the h/w configurations. If you want me to changes it to boolean please let me know I will fix it in the next version.

I think boolean would be more logical here, since what is configurable here is not how many bits are supported, but whether the XUSB_DMA_DSAR_ADDR register is present or not.

Arnd