All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] MinnowMax GPIO for USB3
@ 2016-06-12  8:43 Bin Meng
  2016-06-12  9:26 ` Bin Meng
  0 siblings, 1 reply; 5+ messages in thread
From: Bin Meng @ 2016-06-12  8:43 UTC (permalink / raw)
  To: u-boot

Hi,

My testing shows that only pin_usb_host_en1 is needed to turn on the
power on the USB3 port. The USB2 port power is turned on by default.

Removing the pin_usb_host_en0 from device tree will make both USB2 and
USB3 port work.

diff --git a/arch/x86/dts/minnowmax.dts b/arch/x86/dts/minnowmax.dts
index 1a8a8cc..63f751f 100644
--- a/arch/x86/dts/minnowmax.dts
+++ b/arch/x86/dts/minnowmax.dts
@@ -58,14 +58,6 @@
                        direction = <PIN_OUTPUT>;
                };

-               pin_usb_host_en0 at 0 {
-                       gpio-offset = <0x80 8>;
-                       pad-offset = <0x260>;
-                       mode-gpio;
-                       output-value = <1>;
-                       direction = <PIN_OUTPUT>;
-               };
-
                pin_usb_host_en1 at 0 {
                        gpio-offset = <0x80 9>;
                        pad-offset = <0x250>;

If we want to keep the pin_usb_host_en0 configuration in the device
tree, then the bug mentioned in [1] will cause the USB3 port does not
work. Only the USB2 port works.

[1] http://lists.denx.de/pipermail/u-boot/2015-October/229469.html

Regards,
Bin

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

* [U-Boot] MinnowMax GPIO for USB3
  2016-06-12  8:43 [U-Boot] MinnowMax GPIO for USB3 Bin Meng
@ 2016-06-12  9:26 ` Bin Meng
  2016-06-14  1:55   ` Bin Meng
  0 siblings, 1 reply; 5+ messages in thread
From: Bin Meng @ 2016-06-12  9:26 UTC (permalink / raw)
  To: u-boot

On Sun, Jun 12, 2016 at 4:43 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi,
>
> My testing shows that only pin_usb_host_en1 is needed to turn on the
> power on the USB3 port. The USB2 port power is turned on by default.
>

Seems I was confused by the GPIO pin number mapping. pin_usb_host_en1
is used to control the USB2 port, while pin_usb_host_en0 is for USB3
port. So I should say:

My testing shows that only pin_usb_host_en1 is needed to turn on the
power on the USB2 (upper white) port. The USB3 (bottom blue) port
power is turned on by default.

[snip]

Regards,
Bin

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

* [U-Boot] MinnowMax GPIO for USB3
  2016-06-12  9:26 ` Bin Meng
@ 2016-06-14  1:55   ` Bin Meng
  2016-06-14 21:36     ` George McCollister
  0 siblings, 1 reply; 5+ messages in thread
From: Bin Meng @ 2016-06-14  1:55 UTC (permalink / raw)
  To: u-boot

Hi George,

On Sun, Jun 12, 2016 at 5:26 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> On Sun, Jun 12, 2016 at 4:43 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi,
>>
>> My testing shows that only pin_usb_host_en1 is needed to turn on the
>> power on the USB3 port. The USB2 port power is turned on by default.
>>
>
> Seems I was confused by the GPIO pin number mapping. pin_usb_host_en1
> is used to control the USB2 port, while pin_usb_host_en0 is for USB3
> port. So I should say:
>
> My testing shows that only pin_usb_host_en1 is needed to turn on the
> power on the USB2 (upper white) port. The USB3 (bottom blue) port
> power is turned on by default.
>
> [snip]

vinoth eswaran confirmed removing pin_usb_host_en0 node from device
tree makes both usb ports work.

However, that is just covering the real bug [1] here. Will you take
time to prepare a patch that fixes the gpio driver?

[1] http://lists.denx.de/pipermail/u-boot/2015-October/229469.html

Regards,
Bin

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

* [U-Boot] MinnowMax GPIO for USB3
  2016-06-14  1:55   ` Bin Meng
@ 2016-06-14 21:36     ` George McCollister
  2016-06-17  3:53       ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: George McCollister @ 2016-06-14 21:36 UTC (permalink / raw)
  To: u-boot

On Mon, Jun 13, 2016 at 8:55 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi George,
>
> On Sun, Jun 12, 2016 at 5:26 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> On Sun, Jun 12, 2016 at 4:43 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Hi,
>>>
>>> My testing shows that only pin_usb_host_en1 is needed to turn on the
>>> power on the USB3 port. The USB2 port power is turned on by default.
>>>
>>
>> Seems I was confused by the GPIO pin number mapping. pin_usb_host_en1
>> is used to control the USB2 port, while pin_usb_host_en0 is for USB3
>> port. So I should say:
>>
>> My testing shows that only pin_usb_host_en1 is needed to turn on the
>> power on the USB2 (upper white) port. The USB3 (bottom blue) port
>> power is turned on by default.
>>
>> [snip]
>
> vinoth eswaran confirmed removing pin_usb_host_en0 node from device
> tree makes both usb ports work.
>
> However, that is just covering the real bug [1] here. Will you take
> time to prepare a patch that fixes the gpio driver?

I re-worked my patch to fix the gpio driver only to discover that
pinctrl_ich6 uses it's own function ich6_pinctrl_set_value. This is
the problem with having these driver separate... Even if we were to
change pinctrl_ich6 to do something similar (keep a cache of each
banks value) the pin values could still be lost if they changed any
gpio in the same bank with the gpio driver. I'll need to look at it a
bit longer, maybe I'll come up with a solution.

>
> [1] http://lists.denx.de/pipermail/u-boot/2015-October/229469.html
>
> Regards,
> Bin

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

* [U-Boot] MinnowMax GPIO for USB3
  2016-06-14 21:36     ` George McCollister
@ 2016-06-17  3:53       ` Simon Glass
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2016-06-17  3:53 UTC (permalink / raw)
  To: u-boot

Hi George,

On 14 June 2016 at 15:36, George McCollister
<george.mccollister@gmail.com> wrote:
> On Mon, Jun 13, 2016 at 8:55 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi George,
>>
>> On Sun, Jun 12, 2016 at 5:26 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> On Sun, Jun 12, 2016 at 4:43 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> My testing shows that only pin_usb_host_en1 is needed to turn on the
>>>> power on the USB3 port. The USB2 port power is turned on by default.
>>>>
>>>
>>> Seems I was confused by the GPIO pin number mapping. pin_usb_host_en1
>>> is used to control the USB2 port, while pin_usb_host_en0 is for USB3
>>> port. So I should say:
>>>
>>> My testing shows that only pin_usb_host_en1 is needed to turn on the
>>> power on the USB2 (upper white) port. The USB3 (bottom blue) port
>>> power is turned on by default.
>>>
>>> [snip]
>>
>> vinoth eswaran confirmed removing pin_usb_host_en0 node from device
>> tree makes both usb ports work.
>>
>> However, that is just covering the real bug [1] here. Will you take
>> time to prepare a patch that fixes the gpio driver?
>
> I re-worked my patch to fix the gpio driver only to discover that
> pinctrl_ich6 uses it's own function ich6_pinctrl_set_value. This is
> the problem with having these driver separate... Even if we were to
> change pinctrl_ich6 to do something similar (keep a cache of each
> banks value) the pin values could still be lost if they changed any
> gpio in the same bank with the gpio driver. I'll need to look at it a
> bit longer, maybe I'll come up with a solution.

My suggestion is to make the pinctrl driver handle the pinctrl
changes, and have the GPIO driver make pinctrl calls into that
driver...

>
>>
>> [1] http://lists.denx.de/pipermail/u-boot/2015-October/229469.html
>>
>> Regards,
>> Bin


REgards,
Simon

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

end of thread, other threads:[~2016-06-17  3:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-12  8:43 [U-Boot] MinnowMax GPIO for USB3 Bin Meng
2016-06-12  9:26 ` Bin Meng
2016-06-14  1:55   ` Bin Meng
2016-06-14 21:36     ` George McCollister
2016-06-17  3:53       ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.