Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-26 Thread Marek Vasut
On 02/22/2017 01:58 PM, Uri Mashiach wrote:

[...]

>> Someone would have to put that effort in.
>>
>> I wonder if instead of defining INDEX0, INDEX1 ... this could be turned
>> into integer ...
>>
> 
> Something like the following?
> 
> #ifdef CONFIG_DRA7XX
> #if CONFIG_USB_XHCI_DRA7XX_INDEX == 1
> ...
> #elif CONFIG_USB_XHCI_DRA7XX_INDEX == 0
> ...
> #endif /* CONFIG_USB_XHCI_DRA7XX_INDEX == 1 */
> #elif defined CONFIG_AM43XX
> ...

Yes


-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-22 Thread Uri Mashiach



On 02/20/2017 10:28 AM, Marek Vasut wrote:

On 02/20/2017 08:47 AM, Igor Grinberg wrote:

Hey Marek,


Hi,


We haven't spoken for great while... I'm glad to hear from you!


yeah


On 02/19/17 19:39, Marek Vasut wrote:

On 02/19/2017 05:26 PM, Igor Grinberg wrote:

Hi guys,

On 02/19/17 17:15, Tom Rini wrote:

On Sun, Feb 19, 2017 at 04:13:02PM +0100, Marek Vasut wrote:

On 02/19/2017 03:55 PM, Uri Mashiach wrote:



On 02/19/2017 04:27 PM, Marek Vasut wrote:

On 02/19/2017 02:27 PM, Uri Mashiach wrote:

Modify the determination of the base address of xHCI registers of DRA7XX
targets.
Before the commit: by the target.
After the commit: by the USB port index.

Cc: Lokesh Vutla 
Cc: Marek Vasut 
Signed-off-by: Uri Mashiach 
---
V1 -> V2: Replace the commit "fix XHCI registers base address".
V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"

 configs/dra7xx_evm_defconfig|  1 +
 configs/dra7xx_hs_evm_defconfig |  1 +
 drivers/usb/host/Kconfig| 16 
 include/linux/usb/xhci-omap.h   |  6 --
 4 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 26b26cc..1f47f92 100644


[...]


diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 5129a57..440fbcf 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
 help
   Enables support for the on-chip xHCI controller on Xilinx
ZynqMP SoCs.

+choice
+prompt "DRA7XX xHCI USB index select"
+depends on DRA7XX
+
+config USB_XHCI_DRA7XX_INDEX0
+bool "USB0"
+help
+  DRA7XX xHCI USB0.
+
+config USB_XHCI_DRA7XX_INDEX1
+bool "USB1"
+help
+  DRA7XX xHCI USB1.


What is this all about ? Shouldn't this come from DT ? And what if I
want to use both XHCI ? This looks totally bogus ...


Right, both XHCIs cannot be used with current driver and we do not have
the time to fix it by our own... may be TI has?
Remember, you've accepted the driver and following patches, right?


You mean this patch [1] which actually adds the board dependency ?
Actually , no , I DID NOT. It's been going on for a while that my
role as a USB custodian was actively circumvented and patches which
should've gone through the USB tree just did not.


Ahh.. Sorry, thought you are collecting all the USB patches or at least
provide your Ack so patches can go through other trees..


So did I ...


So please, next time you start blaming someone, get your facts right.


Yeah, I haven't looked at it thoroughly... That's why the "right?" in the
end of my sentence. Sorry once again, I did not mean to offend you.



I already have almost zero motivation to maintain USB in my free time,
being paid nothing for it, not ever hearing a single "thank you" and
just spending time I could use otherwise. Being circumvented and only
catching shit for problematic patches I did NOT even apply though, that
is completely off-putting .


Ah... First of all thank you Marek! You've done a great job AFAIR.
I really mean it.
And it is a pity, things have gone this way.
May be this can still be fixed? Tom?


I already had a long discussion with Tom yesterday ... so let's see .


[1] https://patchwork.ozlabs.org/patch/700372/


Regarding DT, do we have a DT as a requirement to run USB in U-Boot?


It is highly recommended.


Hmmm... I don't really like this approach as it does not help during the board
production, where I'd like to see the bootloader detect as much a it can
during runtime and then flash the board with correct DT...


You can enable all during production, plug USB sticks into every port,
check which controllers detect devices and then only keep those enabled
via the "status" DT prop. As a bonus, you get functional test.

Does the OMAP5 not use DT yet ?


I don't remember this happening and I think it shouldn't be a requirement.





The support for both XHCI is currently missing.
This could be a temporary solution until the DT solution.
The current situation is worse - selecting USB0 or USB1 based on the
target.


So we're replacing it with equally bad solution ?


I don't think equally applies here...
This IS an improvement. Of course it is not like you would want it to be,
but still it is from a platform POV.


TBH, revering 042fdb7cabb8270eb86c45f11263fa91c12e3b65 might be the way
to go.


Ok. I'm fine with this approach.
I'm also fine with if the driver gets fixed and both XHCI instances can be used.


Someone would have to put that effort in.

I wonder if instead of defining INDEX0, INDEX1 ... this could be turned
into integer ...



Something like the following?

#ifdef CONFIG_DRA7XX
#if CONFIG_USB_XHCI_DRA7XX_INDEX == 1
...
#elif CONFIG_USB_XHCI_DRA7XX_INDEX == 0
...
#endif /* CONFIG_USB_XHCI_DRA7XX_INDEX == 1 */
#elif defined CONFIG_AM43XX
...




Hmmm , no.
The MW will open mid-march, there's about a month to fix this,

Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Roger Quadros
Hi,

On 19/02/17 18:26, Igor Grinberg wrote:
> Hi guys,
> 
> On 02/19/17 17:15, Tom Rini wrote:
>> On Sun, Feb 19, 2017 at 04:13:02PM +0100, Marek Vasut wrote:
>>> On 02/19/2017 03:55 PM, Uri Mashiach wrote:


 On 02/19/2017 04:27 PM, Marek Vasut wrote:
> On 02/19/2017 02:27 PM, Uri Mashiach wrote:
>> Modify the determination of the base address of xHCI registers of DRA7XX
>> targets.
>> Before the commit: by the target.
>> After the commit: by the USB port index.
>>
>> Cc: Lokesh Vutla 
>> Cc: Marek Vasut 
>> Signed-off-by: Uri Mashiach 
>> ---
>> V1 -> V2: Replace the commit "fix XHCI registers base address".
>> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
>>
>>  configs/dra7xx_evm_defconfig|  1 +
>>  configs/dra7xx_hs_evm_defconfig |  1 +
>>  drivers/usb/host/Kconfig| 16 
>>  include/linux/usb/xhci-omap.h   |  6 --
>>  4 files changed, 22 insertions(+), 2 deletions(-)
>>
>> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
>> index 26b26cc..1f47f92 100644

 [...]

>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
>> index 5129a57..440fbcf 100644
>> --- a/drivers/usb/host/Kconfig
>> +++ b/drivers/usb/host/Kconfig
>> @@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
>>  help
>>Enables support for the on-chip xHCI controller on Xilinx
>> ZynqMP SoCs.
>>
>> +choice
>> +prompt "DRA7XX xHCI USB index select"
>> +depends on DRA7XX
>> +
>> +config USB_XHCI_DRA7XX_INDEX0
>> +bool "USB0"
>> +help
>> +  DRA7XX xHCI USB0.
>> +
>> +config USB_XHCI_DRA7XX_INDEX1
>> +bool "USB1"
>> +help
>> +  DRA7XX xHCI USB1.
>
> What is this all about ? Shouldn't this come from DT ? And what if I
> want to use both XHCI ? This looks totally bogus ...
> 
> Right, both XHCIs cannot be used with current driver and we do not have
> the time to fix it by our own... may be TI has?

This is still a work in progress for us
http://lists.denx.de/pipermail/u-boot/2016-January/239931.html

> Remember, you've accepted the driver and following patches, right?
> 
> Regarding DT, do we have a DT as a requirement to run USB in U-Boot?
> I don't remember this happening and I think it shouldn't be a requirement.
> 
>

 The support for both XHCI is currently missing.
 This could be a temporary solution until the DT solution.
 The current situation is worse - selecting USB0 or USB1 based on the
 target.
>>>
>>> So we're replacing it with equally bad solution ?
> 
> I don't think equally applies here...
> This IS an improvement. Of course it is not like you would want it to be,
> but still it is from a platform POV.
> 
>>> Hmmm , no.
>>> The MW will open mid-march, there's about a month to fix this,
>>> so please do.
>>
>> Do note that the relevant driver here is not yet using DM_USB.
> 
> Yes, the driver should be fixed some day. We would really like to take
> this task, but unfortunately, we cannot, at least not right now.
> But we do need that USB working on our board and not only on TI EVMs...
> 
> Tom,
> Should we fall back to v1 and have a worse solution for the base addresses?
> 

-- 
cheers,
-roger
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Marek Vasut
On 02/20/2017 08:47 AM, Igor Grinberg wrote:
> Hey Marek,

Hi,

> We haven't spoken for great while... I'm glad to hear from you!

yeah

> On 02/19/17 19:39, Marek Vasut wrote:
>> On 02/19/2017 05:26 PM, Igor Grinberg wrote:
>>> Hi guys,
>>>
>>> On 02/19/17 17:15, Tom Rini wrote:
 On Sun, Feb 19, 2017 at 04:13:02PM +0100, Marek Vasut wrote:
> On 02/19/2017 03:55 PM, Uri Mashiach wrote:
>>
>>
>> On 02/19/2017 04:27 PM, Marek Vasut wrote:
>>> On 02/19/2017 02:27 PM, Uri Mashiach wrote:
 Modify the determination of the base address of xHCI registers of 
 DRA7XX
 targets.
 Before the commit: by the target.
 After the commit: by the USB port index.

 Cc: Lokesh Vutla 
 Cc: Marek Vasut 
 Signed-off-by: Uri Mashiach 
 ---
 V1 -> V2: Replace the commit "fix XHCI registers base address".
 V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"

  configs/dra7xx_evm_defconfig|  1 +
  configs/dra7xx_hs_evm_defconfig |  1 +
  drivers/usb/host/Kconfig| 16 
  include/linux/usb/xhci-omap.h   |  6 --
  4 files changed, 22 insertions(+), 2 deletions(-)

 diff --git a/configs/dra7xx_evm_defconfig 
 b/configs/dra7xx_evm_defconfig
 index 26b26cc..1f47f92 100644
>>
>> [...]
>>
 diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
 index 5129a57..440fbcf 100644
 --- a/drivers/usb/host/Kconfig
 +++ b/drivers/usb/host/Kconfig
 @@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
  help
Enables support for the on-chip xHCI controller on Xilinx
 ZynqMP SoCs.

 +choice
 +prompt "DRA7XX xHCI USB index select"
 +depends on DRA7XX
 +
 +config USB_XHCI_DRA7XX_INDEX0
 +bool "USB0"
 +help
 +  DRA7XX xHCI USB0.
 +
 +config USB_XHCI_DRA7XX_INDEX1
 +bool "USB1"
 +help
 +  DRA7XX xHCI USB1.
>>>
>>> What is this all about ? Shouldn't this come from DT ? And what if I
>>> want to use both XHCI ? This looks totally bogus ...
>>>
>>> Right, both XHCIs cannot be used with current driver and we do not have
>>> the time to fix it by our own... may be TI has?
>>> Remember, you've accepted the driver and following patches, right?
>>
>> You mean this patch [1] which actually adds the board dependency ?
>> Actually , no , I DID NOT. It's been going on for a while that my
>> role as a USB custodian was actively circumvented and patches which
>> should've gone through the USB tree just did not.
> 
> Ahh.. Sorry, thought you are collecting all the USB patches or at least
> provide your Ack so patches can go through other trees..

So did I ...

>> So please, next time you start blaming someone, get your facts right.
> 
> Yeah, I haven't looked at it thoroughly... That's why the "right?" in the
> end of my sentence. Sorry once again, I did not mean to offend you.
> 
>>
>> I already have almost zero motivation to maintain USB in my free time,
>> being paid nothing for it, not ever hearing a single "thank you" and
>> just spending time I could use otherwise. Being circumvented and only
>> catching shit for problematic patches I did NOT even apply though, that
>> is completely off-putting .
> 
> Ah... First of all thank you Marek! You've done a great job AFAIR.
> I really mean it.
> And it is a pity, things have gone this way.
> May be this can still be fixed? Tom?

I already had a long discussion with Tom yesterday ... so let's see .

>> [1] https://patchwork.ozlabs.org/patch/700372/
>>
>>> Regarding DT, do we have a DT as a requirement to run USB in U-Boot?
>>
>> It is highly recommended.
> 
> Hmmm... I don't really like this approach as it does not help during the board
> production, where I'd like to see the bootloader detect as much a it can
> during runtime and then flash the board with correct DT...

You can enable all during production, plug USB sticks into every port,
check which controllers detect devices and then only keep those enabled
via the "status" DT prop. As a bonus, you get functional test.

Does the OMAP5 not use DT yet ?

>>> I don't remember this happening and I think it shouldn't be a requirement.
>>>
>>>
>>
>> The support for both XHCI is currently missing.
>> This could be a temporary solution until the DT solution.
>> The current situation is worse - selecting USB0 or USB1 based on the
>> target.
>
> So we're replacing it with equally bad solution ?
>>>
>>> I don't think equally applies here...
>>> This IS an improvement. Of course it is not like you would want it to be,
>>> but still it is from a platform POV.
>>
>> TBH, revering 

Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Igor Grinberg
Hey Marek,

We haven't spoken for great while... I'm glad to hear from you!

On 02/19/17 19:39, Marek Vasut wrote:
> On 02/19/2017 05:26 PM, Igor Grinberg wrote:
>> Hi guys,
>>
>> On 02/19/17 17:15, Tom Rini wrote:
>>> On Sun, Feb 19, 2017 at 04:13:02PM +0100, Marek Vasut wrote:
 On 02/19/2017 03:55 PM, Uri Mashiach wrote:
>
>
> On 02/19/2017 04:27 PM, Marek Vasut wrote:
>> On 02/19/2017 02:27 PM, Uri Mashiach wrote:
>>> Modify the determination of the base address of xHCI registers of DRA7XX
>>> targets.
>>> Before the commit: by the target.
>>> After the commit: by the USB port index.
>>>
>>> Cc: Lokesh Vutla 
>>> Cc: Marek Vasut 
>>> Signed-off-by: Uri Mashiach 
>>> ---
>>> V1 -> V2: Replace the commit "fix XHCI registers base address".
>>> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
>>>
>>>  configs/dra7xx_evm_defconfig|  1 +
>>>  configs/dra7xx_hs_evm_defconfig |  1 +
>>>  drivers/usb/host/Kconfig| 16 
>>>  include/linux/usb/xhci-omap.h   |  6 --
>>>  4 files changed, 22 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
>>> index 26b26cc..1f47f92 100644
>
> [...]
>
>>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
>>> index 5129a57..440fbcf 100644
>>> --- a/drivers/usb/host/Kconfig
>>> +++ b/drivers/usb/host/Kconfig
>>> @@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
>>>  help
>>>Enables support for the on-chip xHCI controller on Xilinx
>>> ZynqMP SoCs.
>>>
>>> +choice
>>> +prompt "DRA7XX xHCI USB index select"
>>> +depends on DRA7XX
>>> +
>>> +config USB_XHCI_DRA7XX_INDEX0
>>> +bool "USB0"
>>> +help
>>> +  DRA7XX xHCI USB0.
>>> +
>>> +config USB_XHCI_DRA7XX_INDEX1
>>> +bool "USB1"
>>> +help
>>> +  DRA7XX xHCI USB1.
>>
>> What is this all about ? Shouldn't this come from DT ? And what if I
>> want to use both XHCI ? This looks totally bogus ...
>>
>> Right, both XHCIs cannot be used with current driver and we do not have
>> the time to fix it by our own... may be TI has?
>> Remember, you've accepted the driver and following patches, right?
> 
> You mean this patch [1] which actually adds the board dependency ?
> Actually , no , I DID NOT. It's been going on for a while that my
> role as a USB custodian was actively circumvented and patches which
> should've gone through the USB tree just did not.

Ahh.. Sorry, thought you are collecting all the USB patches or at least
provide your Ack so patches can go through other trees..

> 
> So please, next time you start blaming someone, get your facts right.

Yeah, I haven't looked at it thoroughly... That's why the "right?" in the
end of my sentence. Sorry once again, I did not mean to offend you.

> 
> I already have almost zero motivation to maintain USB in my free time,
> being paid nothing for it, not ever hearing a single "thank you" and
> just spending time I could use otherwise. Being circumvented and only
> catching shit for problematic patches I did NOT even apply though, that
> is completely off-putting .

Ah... First of all thank you Marek! You've done a great job AFAIR.
I really mean it.
And it is a pity, things have gone this way.
May be this can still be fixed? Tom?

> 
> [1] https://patchwork.ozlabs.org/patch/700372/
> 
>> Regarding DT, do we have a DT as a requirement to run USB in U-Boot?
> 
> It is highly recommended.

Hmmm... I don't really like this approach as it does not help during the board
production, where I'd like to see the bootloader detect as much a it can
during runtime and then flash the board with correct DT...

> 
>> I don't remember this happening and I think it shouldn't be a requirement.
>>
>>
>
> The support for both XHCI is currently missing.
> This could be a temporary solution until the DT solution.
> The current situation is worse - selecting USB0 or USB1 based on the
> target.

 So we're replacing it with equally bad solution ?
>>
>> I don't think equally applies here...
>> This IS an improvement. Of course it is not like you would want it to be,
>> but still it is from a platform POV.
> 
> TBH, revering 042fdb7cabb8270eb86c45f11263fa91c12e3b65 might be the way
> to go.

Ok. I'm fine with this approach.
I'm also fine with if the driver gets fixed and both XHCI instances can be used.

> 
 Hmmm , no.
 The MW will open mid-march, there's about a month to fix this,
 so please do.
>>>
>>> Do note that the relevant driver here is not yet using DM_USB.
>>
>> Yes, the driver should be fixed some day. We would really like to take
>> this task, but unfortunately, we cannot, at least not right now.
>> But we do need that USB working on our 

Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Marek Vasut
On 02/19/2017 05:26 PM, Igor Grinberg wrote:
> Hi guys,
> 
> On 02/19/17 17:15, Tom Rini wrote:
>> On Sun, Feb 19, 2017 at 04:13:02PM +0100, Marek Vasut wrote:
>>> On 02/19/2017 03:55 PM, Uri Mashiach wrote:


 On 02/19/2017 04:27 PM, Marek Vasut wrote:
> On 02/19/2017 02:27 PM, Uri Mashiach wrote:
>> Modify the determination of the base address of xHCI registers of DRA7XX
>> targets.
>> Before the commit: by the target.
>> After the commit: by the USB port index.
>>
>> Cc: Lokesh Vutla 
>> Cc: Marek Vasut 
>> Signed-off-by: Uri Mashiach 
>> ---
>> V1 -> V2: Replace the commit "fix XHCI registers base address".
>> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
>>
>>  configs/dra7xx_evm_defconfig|  1 +
>>  configs/dra7xx_hs_evm_defconfig |  1 +
>>  drivers/usb/host/Kconfig| 16 
>>  include/linux/usb/xhci-omap.h   |  6 --
>>  4 files changed, 22 insertions(+), 2 deletions(-)
>>
>> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
>> index 26b26cc..1f47f92 100644

 [...]

>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
>> index 5129a57..440fbcf 100644
>> --- a/drivers/usb/host/Kconfig
>> +++ b/drivers/usb/host/Kconfig
>> @@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
>>  help
>>Enables support for the on-chip xHCI controller on Xilinx
>> ZynqMP SoCs.
>>
>> +choice
>> +prompt "DRA7XX xHCI USB index select"
>> +depends on DRA7XX
>> +
>> +config USB_XHCI_DRA7XX_INDEX0
>> +bool "USB0"
>> +help
>> +  DRA7XX xHCI USB0.
>> +
>> +config USB_XHCI_DRA7XX_INDEX1
>> +bool "USB1"
>> +help
>> +  DRA7XX xHCI USB1.
>
> What is this all about ? Shouldn't this come from DT ? And what if I
> want to use both XHCI ? This looks totally bogus ...
> 
> Right, both XHCIs cannot be used with current driver and we do not have
> the time to fix it by our own... may be TI has?
> Remember, you've accepted the driver and following patches, right?

You mean this patch [1] which actually adds the board dependency ?
Actually , no , I DID NOT. It's been going on for a while that my
role as a USB custodian was actively circumvented and patches which
should've gone through the USB tree just did not.

So please, next time you start blaming someone, get your facts right.

I already have almost zero motivation to maintain USB in my free time,
being paid nothing for it, not ever hearing a single "thank you" and
just spending time I could use otherwise. Being circumvented and only
catching shit for problematic patches I did NOT even apply though, that
is completely off-putting .

[1] https://patchwork.ozlabs.org/patch/700372/

> Regarding DT, do we have a DT as a requirement to run USB in U-Boot?

It is highly recommended.

> I don't remember this happening and I think it shouldn't be a requirement.
> 
>

 The support for both XHCI is currently missing.
 This could be a temporary solution until the DT solution.
 The current situation is worse - selecting USB0 or USB1 based on the
 target.
>>>
>>> So we're replacing it with equally bad solution ?
> 
> I don't think equally applies here...
> This IS an improvement. Of course it is not like you would want it to be,
> but still it is from a platform POV.

TBH, revering 042fdb7cabb8270eb86c45f11263fa91c12e3b65 might be the way
to go.

>>> Hmmm , no.
>>> The MW will open mid-march, there's about a month to fix this,
>>> so please do.
>>
>> Do note that the relevant driver here is not yet using DM_USB.
> 
> Yes, the driver should be fixed some day. We would really like to take
> this task, but unfortunately, we cannot, at least not right now.
> But we do need that USB working on our board and not only on TI EVMs...

See above, I believe 042fdb7cabb8270eb86c45f11263fa91c12e3b65 is bogus.

> Tom,
> Should we fall back to v1 and have a worse solution for the base addresses?

OK, I see me being USB custodian has exactly zero value now ... good to
know.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Igor Grinberg
Hi guys,

On 02/19/17 17:15, Tom Rini wrote:
> On Sun, Feb 19, 2017 at 04:13:02PM +0100, Marek Vasut wrote:
>> On 02/19/2017 03:55 PM, Uri Mashiach wrote:
>>>
>>>
>>> On 02/19/2017 04:27 PM, Marek Vasut wrote:
 On 02/19/2017 02:27 PM, Uri Mashiach wrote:
> Modify the determination of the base address of xHCI registers of DRA7XX
> targets.
> Before the commit: by the target.
> After the commit: by the USB port index.
>
> Cc: Lokesh Vutla 
> Cc: Marek Vasut 
> Signed-off-by: Uri Mashiach 
> ---
> V1 -> V2: Replace the commit "fix XHCI registers base address".
> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
>
>  configs/dra7xx_evm_defconfig|  1 +
>  configs/dra7xx_hs_evm_defconfig |  1 +
>  drivers/usb/host/Kconfig| 16 
>  include/linux/usb/xhci-omap.h   |  6 --
>  4 files changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
> index 26b26cc..1f47f92 100644
>>>
>>> [...]
>>>
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index 5129a57..440fbcf 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
>  help
>Enables support for the on-chip xHCI controller on Xilinx
> ZynqMP SoCs.
>
> +choice
> +prompt "DRA7XX xHCI USB index select"
> +depends on DRA7XX
> +
> +config USB_XHCI_DRA7XX_INDEX0
> +bool "USB0"
> +help
> +  DRA7XX xHCI USB0.
> +
> +config USB_XHCI_DRA7XX_INDEX1
> +bool "USB1"
> +help
> +  DRA7XX xHCI USB1.

 What is this all about ? Shouldn't this come from DT ? And what if I
 want to use both XHCI ? This looks totally bogus ...

Right, both XHCIs cannot be used with current driver and we do not have
the time to fix it by our own... may be TI has?
Remember, you've accepted the driver and following patches, right?

Regarding DT, do we have a DT as a requirement to run USB in U-Boot?
I don't remember this happening and I think it shouldn't be a requirement.


>>>
>>> The support for both XHCI is currently missing.
>>> This could be a temporary solution until the DT solution.
>>> The current situation is worse - selecting USB0 or USB1 based on the
>>> target.
>>
>> So we're replacing it with equally bad solution ?

I don't think equally applies here...
This IS an improvement. Of course it is not like you would want it to be,
but still it is from a platform POV.

>> Hmmm , no.
>> The MW will open mid-march, there's about a month to fix this,
>> so please do.
> 
> Do note that the relevant driver here is not yet using DM_USB.

Yes, the driver should be fixed some day. We would really like to take
this task, but unfortunately, we cannot, at least not right now.
But we do need that USB working on our board and not only on TI EVMs...

Tom,
Should we fall back to v1 and have a worse solution for the base addresses?

-- 
Regards,
Igor.



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Igor Grinberg
On 02/19/17 17:52, Marek Vasut wrote:
> On 02/19/2017 04:15 PM, Tom Rini wrote:
>> On Sun, Feb 19, 2017 at 04:13:02PM +0100, Marek Vasut wrote:
>>> On 02/19/2017 03:55 PM, Uri Mashiach wrote:


 On 02/19/2017 04:27 PM, Marek Vasut wrote:
> On 02/19/2017 02:27 PM, Uri Mashiach wrote:
>> Modify the determination of the base address of xHCI registers of DRA7XX
>> targets.
>> Before the commit: by the target.
>> After the commit: by the USB port index.
>>
>> Cc: Lokesh Vutla 
>> Cc: Marek Vasut 
>> Signed-off-by: Uri Mashiach 
>> ---
>> V1 -> V2: Replace the commit "fix XHCI registers base address".
>> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
>>
>>  configs/dra7xx_evm_defconfig|  1 +
>>  configs/dra7xx_hs_evm_defconfig |  1 +
>>  drivers/usb/host/Kconfig| 16 
>>  include/linux/usb/xhci-omap.h   |  6 --
>>  4 files changed, 22 insertions(+), 2 deletions(-)
>>
>> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
>> index 26b26cc..1f47f92 100644

 [...]

>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
>> index 5129a57..440fbcf 100644
>> --- a/drivers/usb/host/Kconfig
>> +++ b/drivers/usb/host/Kconfig
>> @@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
>>  help
>>Enables support for the on-chip xHCI controller on Xilinx
>> ZynqMP SoCs.
>>
>> +choice
>> +prompt "DRA7XX xHCI USB index select"
>> +depends on DRA7XX
>> +
>> +config USB_XHCI_DRA7XX_INDEX0
>> +bool "USB0"
>> +help
>> +  DRA7XX xHCI USB0.
>> +
>> +config USB_XHCI_DRA7XX_INDEX1
>> +bool "USB1"
>> +help
>> +  DRA7XX xHCI USB1.
>
> What is this all about ? Shouldn't this come from DT ? And what if I
> want to use both XHCI ? This looks totally bogus ...
>

 The support for both XHCI is currently missing.
 This could be a temporary solution until the DT solution.
 The current situation is worse - selecting USB0 or USB1 based on the
 target.
>>>
>>> So we're replacing it with equally bad solution ? Hmmm , no.
>>> The MW will open mid-march, there's about a month to fix this,
>>> so please do.
>>
>> Do note that the relevant driver here is not yet using DM_USB.
>>
> We had multi-controller support before DM existed, no problem.
> But then, xhci does support DM, so fixing this should also not
> be a problem.

Right! We're talking on fixing the XHCI driver...
We can't afford it right now...

-- 
Regards,
Igor.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Marek Vasut
On 02/19/2017 04:15 PM, Tom Rini wrote:
> On Sun, Feb 19, 2017 at 04:13:02PM +0100, Marek Vasut wrote:
>> On 02/19/2017 03:55 PM, Uri Mashiach wrote:
>>>
>>>
>>> On 02/19/2017 04:27 PM, Marek Vasut wrote:
 On 02/19/2017 02:27 PM, Uri Mashiach wrote:
> Modify the determination of the base address of xHCI registers of DRA7XX
> targets.
> Before the commit: by the target.
> After the commit: by the USB port index.
>
> Cc: Lokesh Vutla 
> Cc: Marek Vasut 
> Signed-off-by: Uri Mashiach 
> ---
> V1 -> V2: Replace the commit "fix XHCI registers base address".
> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
>
>  configs/dra7xx_evm_defconfig|  1 +
>  configs/dra7xx_hs_evm_defconfig |  1 +
>  drivers/usb/host/Kconfig| 16 
>  include/linux/usb/xhci-omap.h   |  6 --
>  4 files changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
> index 26b26cc..1f47f92 100644
>>>
>>> [...]
>>>
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index 5129a57..440fbcf 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
>  help
>Enables support for the on-chip xHCI controller on Xilinx
> ZynqMP SoCs.
>
> +choice
> +prompt "DRA7XX xHCI USB index select"
> +depends on DRA7XX
> +
> +config USB_XHCI_DRA7XX_INDEX0
> +bool "USB0"
> +help
> +  DRA7XX xHCI USB0.
> +
> +config USB_XHCI_DRA7XX_INDEX1
> +bool "USB1"
> +help
> +  DRA7XX xHCI USB1.

 What is this all about ? Shouldn't this come from DT ? And what if I
 want to use both XHCI ? This looks totally bogus ...

>>>
>>> The support for both XHCI is currently missing.
>>> This could be a temporary solution until the DT solution.
>>> The current situation is worse - selecting USB0 or USB1 based on the
>>> target.
>>
>> So we're replacing it with equally bad solution ? Hmmm , no.
>> The MW will open mid-march, there's about a month to fix this,
>> so please do.
> 
> Do note that the relevant driver here is not yet using DM_USB.
> 
We had multi-controller support before DM existed, no problem.
But then, xhci does support DM, so fixing this should also not
be a problem.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Tom Rini
On Sun, Feb 19, 2017 at 04:13:02PM +0100, Marek Vasut wrote:
> On 02/19/2017 03:55 PM, Uri Mashiach wrote:
> > 
> > 
> > On 02/19/2017 04:27 PM, Marek Vasut wrote:
> >> On 02/19/2017 02:27 PM, Uri Mashiach wrote:
> >>> Modify the determination of the base address of xHCI registers of DRA7XX
> >>> targets.
> >>> Before the commit: by the target.
> >>> After the commit: by the USB port index.
> >>>
> >>> Cc: Lokesh Vutla 
> >>> Cc: Marek Vasut 
> >>> Signed-off-by: Uri Mashiach 
> >>> ---
> >>> V1 -> V2: Replace the commit "fix XHCI registers base address".
> >>> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
> >>>
> >>>  configs/dra7xx_evm_defconfig|  1 +
> >>>  configs/dra7xx_hs_evm_defconfig |  1 +
> >>>  drivers/usb/host/Kconfig| 16 
> >>>  include/linux/usb/xhci-omap.h   |  6 --
> >>>  4 files changed, 22 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
> >>> index 26b26cc..1f47f92 100644
> > 
> > [...]
> > 
> >>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> >>> index 5129a57..440fbcf 100644
> >>> --- a/drivers/usb/host/Kconfig
> >>> +++ b/drivers/usb/host/Kconfig
> >>> @@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
> >>>  help
> >>>Enables support for the on-chip xHCI controller on Xilinx
> >>> ZynqMP SoCs.
> >>>
> >>> +choice
> >>> +prompt "DRA7XX xHCI USB index select"
> >>> +depends on DRA7XX
> >>> +
> >>> +config USB_XHCI_DRA7XX_INDEX0
> >>> +bool "USB0"
> >>> +help
> >>> +  DRA7XX xHCI USB0.
> >>> +
> >>> +config USB_XHCI_DRA7XX_INDEX1
> >>> +bool "USB1"
> >>> +help
> >>> +  DRA7XX xHCI USB1.
> >>
> >> What is this all about ? Shouldn't this come from DT ? And what if I
> >> want to use both XHCI ? This looks totally bogus ...
> >>
> > 
> > The support for both XHCI is currently missing.
> > This could be a temporary solution until the DT solution.
> > The current situation is worse - selecting USB0 or USB1 based on the
> > target.
> 
> So we're replacing it with equally bad solution ? Hmmm , no.
> The MW will open mid-march, there's about a month to fix this,
> so please do.

Do note that the relevant driver here is not yet using DM_USB.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Marek Vasut
On 02/19/2017 03:55 PM, Uri Mashiach wrote:
> 
> 
> On 02/19/2017 04:27 PM, Marek Vasut wrote:
>> On 02/19/2017 02:27 PM, Uri Mashiach wrote:
>>> Modify the determination of the base address of xHCI registers of DRA7XX
>>> targets.
>>> Before the commit: by the target.
>>> After the commit: by the USB port index.
>>>
>>> Cc: Lokesh Vutla 
>>> Cc: Marek Vasut 
>>> Signed-off-by: Uri Mashiach 
>>> ---
>>> V1 -> V2: Replace the commit "fix XHCI registers base address".
>>> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
>>>
>>>  configs/dra7xx_evm_defconfig|  1 +
>>>  configs/dra7xx_hs_evm_defconfig |  1 +
>>>  drivers/usb/host/Kconfig| 16 
>>>  include/linux/usb/xhci-omap.h   |  6 --
>>>  4 files changed, 22 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
>>> index 26b26cc..1f47f92 100644
> 
> [...]
> 
>>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
>>> index 5129a57..440fbcf 100644
>>> --- a/drivers/usb/host/Kconfig
>>> +++ b/drivers/usb/host/Kconfig
>>> @@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
>>>  help
>>>Enables support for the on-chip xHCI controller on Xilinx
>>> ZynqMP SoCs.
>>>
>>> +choice
>>> +prompt "DRA7XX xHCI USB index select"
>>> +depends on DRA7XX
>>> +
>>> +config USB_XHCI_DRA7XX_INDEX0
>>> +bool "USB0"
>>> +help
>>> +  DRA7XX xHCI USB0.
>>> +
>>> +config USB_XHCI_DRA7XX_INDEX1
>>> +bool "USB1"
>>> +help
>>> +  DRA7XX xHCI USB1.
>>
>> What is this all about ? Shouldn't this come from DT ? And what if I
>> want to use both XHCI ? This looks totally bogus ...
>>
> 
> The support for both XHCI is currently missing.
> This could be a temporary solution until the DT solution.
> The current situation is worse - selecting USB0 or USB1 based on the
> target.

So we're replacing it with equally bad solution ? Hmmm , no.
The MW will open mid-march, there's about a month to fix this,
so please do.


-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Marek Vasut
On 02/19/2017 02:27 PM, Uri Mashiach wrote:
> Modify the determination of the base address of xHCI registers of DRA7XX
> targets.
> Before the commit: by the target.
> After the commit: by the USB port index.
> 
> Cc: Lokesh Vutla 
> Cc: Marek Vasut 
> Signed-off-by: Uri Mashiach 
> ---
> V1 -> V2: Replace the commit "fix XHCI registers base address".
> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
> 
>  configs/dra7xx_evm_defconfig|  1 +
>  configs/dra7xx_hs_evm_defconfig |  1 +
>  drivers/usb/host/Kconfig| 16 
>  include/linux/usb/xhci-omap.h   |  6 --
>  4 files changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
> index 26b26cc..1f47f92 100644
> --- a/configs/dra7xx_evm_defconfig
> +++ b/configs/dra7xx_evm_defconfig
> @@ -86,6 +86,7 @@ CONFIG_OMAP_TIMER=y
>  CONFIG_USB=y
>  CONFIG_USB_XHCI_HCD=y
>  CONFIG_USB_XHCI_DWC3=y
> +CONFIG_USB_XHCI_DRA7XX_INDEX1=y
>  CONFIG_USB_DWC3=y
>  CONFIG_USB_DWC3_GADGET=y
>  CONFIG_USB_DWC3_OMAP=y
> diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
> index 244940c..5addd3e 100644
> --- a/configs/dra7xx_hs_evm_defconfig
> +++ b/configs/dra7xx_hs_evm_defconfig
> @@ -91,6 +91,7 @@ CONFIG_OMAP_TIMER=y
>  CONFIG_USB=y
>  CONFIG_USB_XHCI_HCD=y
>  CONFIG_USB_XHCI_DWC3=y
> +CONFIG_USB_XHCI_DRA7XX_INDEX1=y
>  CONFIG_USB_DWC3=y
>  CONFIG_USB_DWC3_GADGET=y
>  CONFIG_USB_DWC3_OMAP=y
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index 5129a57..440fbcf 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
>   help
> Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.
>  
> +choice
> + prompt "DRA7XX xHCI USB index select"
> + depends on DRA7XX
> +
> +config USB_XHCI_DRA7XX_INDEX0
> + bool "USB0"
> + help
> +   DRA7XX xHCI USB0.
> +
> +config USB_XHCI_DRA7XX_INDEX1
> + bool "USB1"
> + help
> +   DRA7XX xHCI USB1.

What is this all about ? Shouldn't this come from DT ? And what if I
want to use both XHCI ? This looks totally bogus ...

> +endchoice
> +
>  endif # USB_XHCI_HCD
>  
>  config USB_EHCI_HCD
> diff --git a/include/linux/usb/xhci-omap.h b/include/linux/usb/xhci-omap.h
> index 9de80d7..3f65a76 100644
> --- a/include/linux/usb/xhci-omap.h
> +++ b/include/linux/usb/xhci-omap.h
> @@ -10,14 +10,16 @@
>  #ifndef _ASM_ARCH_XHCI_OMAP_H_
>  #define _ASM_ARCH_XHCI_OMAP_H_
>  
> -#ifdef CONFIG_TARGET_DRA7XX_EVM
> +#ifdef CONFIG_DRA7XX
> +#ifdef CONFIG_USB_XHCI_DRA7XX_INDEX1
>  #define OMAP_XHCI_BASE 0x488d
>  #define OMAP_OCP1_SCP_BASE 0x4A081000
>  #define OMAP_OTG_WRAPPER_BASE 0x488c
> -#elif defined CONFIG_TARGET_AM57XX_EVM
> +#elif defined CONFIG_USB_XHCI_DRA7XX_INDEX0
>  #define OMAP_XHCI_BASE 0x4889
>  #define OMAP_OCP1_SCP_BASE 0x4A084c00
>  #define OMAP_OTG_WRAPPER_BASE 0x4888
> +#endif /* CONFIG_USB_XHCI_DRA7XX_INDEX1 */
>  #elif defined CONFIG_AM43XX
>  #define OMAP_XHCI_BASE 0x483d
>  #define OMAP_OCP1_SCP_BASE 0x483E8000
> 


-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Uri Mashiach



On 02/19/2017 04:27 PM, Marek Vasut wrote:

On 02/19/2017 02:27 PM, Uri Mashiach wrote:

Modify the determination of the base address of xHCI registers of DRA7XX
targets.
Before the commit: by the target.
After the commit: by the USB port index.

Cc: Lokesh Vutla 
Cc: Marek Vasut 
Signed-off-by: Uri Mashiach 
---
V1 -> V2: Replace the commit "fix XHCI registers base address".
V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"

 configs/dra7xx_evm_defconfig|  1 +
 configs/dra7xx_hs_evm_defconfig |  1 +
 drivers/usb/host/Kconfig| 16 
 include/linux/usb/xhci-omap.h   |  6 --
 4 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 26b26cc..1f47f92 100644


[...]


diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 5129a57..440fbcf 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
help
  Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.

+choice
+   prompt "DRA7XX xHCI USB index select"
+   depends on DRA7XX
+
+config USB_XHCI_DRA7XX_INDEX0
+   bool "USB0"
+   help
+ DRA7XX xHCI USB0.
+
+config USB_XHCI_DRA7XX_INDEX1
+   bool "USB1"
+   help
+ DRA7XX xHCI USB1.


What is this all about ? Shouldn't this come from DT ? And what if I
want to use both XHCI ? This looks totally bogus ...



The support for both XHCI is currently missing.
This could be a temporary solution until the DT solution.
The current situation is worse - selecting USB0 or USB1 based on the target.


+endchoice
+
 endif # USB_XHCI_HCD

 config USB_EHCI_HCD
diff --git a/include/linux/usb/xhci-omap.h b/include/linux/usb/xhci-omap.h
index 9de80d7..3f65a76 100644
--- a/include/linux/usb/xhci-omap.h
+++ b/include/linux/usb/xhci-omap.h
@@ -10,14 +10,16 @@
 #ifndef _ASM_ARCH_XHCI_OMAP_H_


[...]


 #define OMAP_OCP1_SCP_BASE 0x483E8000






--
Regards,
Uri
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-20 Thread Uri Mashiach
Modify the determination of the base address of xHCI registers of DRA7XX
targets.
Before the commit: by the target.
After the commit: by the USB port index.

Cc: Lokesh Vutla 
Cc: Marek Vasut 
Signed-off-by: Uri Mashiach 
---
V1 -> V2: Replace the commit "fix XHCI registers base address".
V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"

 configs/dra7xx_evm_defconfig|  1 +
 configs/dra7xx_hs_evm_defconfig |  1 +
 drivers/usb/host/Kconfig| 16 
 include/linux/usb/xhci-omap.h   |  6 --
 4 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 26b26cc..1f47f92 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -86,6 +86,7 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_XHCI_DRA7XX_INDEX1=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
index 244940c..5addd3e 100644
--- a/configs/dra7xx_hs_evm_defconfig
+++ b/configs/dra7xx_hs_evm_defconfig
@@ -91,6 +91,7 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_XHCI_DRA7XX_INDEX1=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 5129a57..440fbcf 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -43,6 +43,22 @@ config USB_XHCI_ZYNQMP
help
  Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.
 
+choice
+   prompt "DRA7XX xHCI USB index select"
+   depends on DRA7XX
+
+config USB_XHCI_DRA7XX_INDEX0
+   bool "USB0"
+   help
+ DRA7XX xHCI USB0.
+
+config USB_XHCI_DRA7XX_INDEX1
+   bool "USB1"
+   help
+ DRA7XX xHCI USB1.
+
+endchoice
+
 endif # USB_XHCI_HCD
 
 config USB_EHCI_HCD
diff --git a/include/linux/usb/xhci-omap.h b/include/linux/usb/xhci-omap.h
index 9de80d7..3f65a76 100644
--- a/include/linux/usb/xhci-omap.h
+++ b/include/linux/usb/xhci-omap.h
@@ -10,14 +10,16 @@
 #ifndef _ASM_ARCH_XHCI_OMAP_H_
 #define _ASM_ARCH_XHCI_OMAP_H_
 
-#ifdef CONFIG_TARGET_DRA7XX_EVM
+#ifdef CONFIG_DRA7XX
+#ifdef CONFIG_USB_XHCI_DRA7XX_INDEX1
 #define OMAP_XHCI_BASE 0x488d
 #define OMAP_OCP1_SCP_BASE 0x4A081000
 #define OMAP_OTG_WRAPPER_BASE 0x488c
-#elif defined CONFIG_TARGET_AM57XX_EVM
+#elif defined CONFIG_USB_XHCI_DRA7XX_INDEX0
 #define OMAP_XHCI_BASE 0x4889
 #define OMAP_OCP1_SCP_BASE 0x4A084c00
 #define OMAP_OTG_WRAPPER_BASE 0x4888
+#endif /* CONFIG_USB_XHCI_DRA7XX_INDEX1 */
 #elif defined CONFIG_AM43XX
 #define OMAP_XHCI_BASE 0x483d
 #define OMAP_OCP1_SCP_BASE 0x483E8000
-- 
2.7.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot