2014-04-03 07:35:47

by Subbaraya Sundeep Bhatta

[permalink] [raw]
Subject: [PATCH v2 1/2] usb: doc: udc-xilinx: Add devicetree bindings

Add devicetree bindings for Xilinx axi udc driver.

Signed-off-by: Subbaraya Sundeep Bhatta <[email protected]>
---
Changes for v2:
- replaced xlnx,include-dma with xlnx,has-builtin-dma

.../devicetree/bindings/usb/udc-xilinx.txt | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/usb/udc-xilinx.txt

diff --git a/Documentation/devicetree/bindings/usb/udc-xilinx.txt b/Documentation/devicetree/bindings/usb/udc-xilinx.txt
new file mode 100644
index 0000000..7c24fac
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/udc-xilinx.txt
@@ -0,0 +1,20 @@
+Xilinx AXI USB2 device controller
+
+Required properties:
+- compatible : Should be "xlnx,axi-usb2-device-4.00.a"
+- reg : Physical base address and size of the Axi USB2
+ device registers map.
+- interrupts : Property with a value describing the interrupt
+ number.
+- interrupt-parent : Must be core interrupt controller
+- xlnx,has-builtin-dma : if DMA is included
+
+Example:
+ axi-usb2-device@42e00000 {
+ compatible = "xlnx,axi-usb2-device-4.00.a";
+ interrupt-parent = <0x1>;
+ interrupts = <0x0 0x39 0x1>;
+ reg = <0x42e00000 0x10000>;
+ xlnx,has-builtin-dma;
+ };
+
--
1.7.4


2014-04-03 15:01:43

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] usb: doc: udc-xilinx: Add devicetree bindings

On Thu, Apr 03, 2014 at 01:05:18PM +0530, Subbaraya Sundeep Bhatta wrote:
> Add devicetree bindings for Xilinx axi udc driver.
>
> Signed-off-by: Subbaraya Sundeep Bhatta <[email protected]>
> ---
> Changes for v2:
> - replaced xlnx,include-dma with xlnx,has-builtin-dma
>
> .../devicetree/bindings/usb/udc-xilinx.txt | 20 ++++++++++++++++++++
> 1 files changed, 20 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/usb/udc-xilinx.txt
>
> diff --git a/Documentation/devicetree/bindings/usb/udc-xilinx.txt b/Documentation/devicetree/bindings/usb/udc-xilinx.txt
> new file mode 100644
> index 0000000..7c24fac
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/udc-xilinx.txt
> @@ -0,0 +1,20 @@
> +Xilinx AXI USB2 device controller
> +
> +Required properties:
> +- compatible : Should be "xlnx,axi-usb2-device-4.00.a"
> +- reg : Physical base address and size of the Axi USB2
> + device registers map.
> +- interrupts : Property with a value describing the interrupt
> + number.
> +- interrupt-parent : Must be core interrupt controller
> +- xlnx,has-builtin-dma : if DMA is included

isn't there a configuration register to tell you this ?

> +
> +Example:
> + axi-usb2-device@42e00000 {
> + compatible = "xlnx,axi-usb2-device-4.00.a";
> + interrupt-parent = <0x1>;

why isn't interrupt-parent a phandle ?

--
balbi


Attachments:
(No filename) (1.41 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2014-04-04 05:52:16

by Michal Simek

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] usb: doc: udc-xilinx: Add devicetree bindings

On 04/03/2014 04:59 PM, Felipe Balbi wrote:
> On Thu, Apr 03, 2014 at 01:05:18PM +0530, Subbaraya Sundeep Bhatta wrote:
>> Add devicetree bindings for Xilinx axi udc driver.
>>
>> Signed-off-by: Subbaraya Sundeep Bhatta <[email protected]>
>> ---
>> Changes for v2:
>> - replaced xlnx,include-dma with xlnx,has-builtin-dma
>>
>> .../devicetree/bindings/usb/udc-xilinx.txt | 20 ++++++++++++++++++++
>> 1 files changed, 20 insertions(+), 0 deletions(-)
>> create mode 100644 Documentation/devicetree/bindings/usb/udc-xilinx.txt
>>
>> diff --git a/Documentation/devicetree/bindings/usb/udc-xilinx.txt b/Documentation/devicetree/bindings/usb/udc-xilinx.txt
>> new file mode 100644
>> index 0000000..7c24fac
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/usb/udc-xilinx.txt
>> @@ -0,0 +1,20 @@
>> +Xilinx AXI USB2 device controller
>> +
>> +Required properties:
>> +- compatible : Should be "xlnx,axi-usb2-device-4.00.a"
>> +- reg : Physical base address and size of the Axi USB2
>> + device registers map.
>> +- interrupts : Property with a value describing the interrupt
>> + number.
>> +- interrupt-parent : Must be core interrupt controller
>> +- xlnx,has-builtin-dma : if DMA is included
>
> isn't there a configuration register to tell you this ?

I have checked this with Sundeep and there is nothing like that in the HW.

>
>> +
>> +Example:
>> + axi-usb2-device@42e00000 {
>> + compatible = "xlnx,axi-usb2-device-4.00.a";
>> + interrupt-parent = <0x1>;
>
> why isn't interrupt-parent a phandle ?

Just for the record: Using number here should be also fine because DTC
is converting it to numbers with linux,phandle and phandle.
[linux-next]$ dtc -O dts -I dtb /tftpboot/devicetree.dtb | less
...
ps7-scugic@f8f01000 {
#address-cells = <0x2>;
#interrupt-cells = <0x3>;
#size-cells = <0x1>;
compatible = "arm,cortex-a9-gic", "arm,gic";
interrupt-controller;
num_cpus = <0x2>;
num_interrupts = <0x60>;
reg = <0xf8f01000 0x1000 0xf8f00100 0x100>;
linux,phandle = <0x3>;
phandle = <0x3>;
};

ps7-scutimer@f8f00600 {
clocks = <0x2 0x4>;
compatible = "arm,cortex-a9-twd-timer";
interrupt-parent = <0x3>;
interrupts = <0x1 0xd 0x301>;
reg = <0xf8f00600 0x20>;
};
...

but anyway Sundeep with change it to any sensible value <&intc>;

Thanks for pointing to it,
Michal


--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: http://www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



Attachments:
signature.asc (263.00 B)
OpenPGP digital signature