public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3]ulpi: add generic ULPI functionality
Date: Sun, 27 Nov 2011 09:50:24 +0200	[thread overview]
Message-ID: <4ED1EBC0.8060706@compulab.co.il> (raw)
In-Reply-To: <CAB+7RbHsb0Cev6GtD7HiYLzXDLUi8U4qQ=c1_yGhGiazavrbAQ@mail.gmail.com>

On 11/25/11 20:39, Jana Rapava wrote:
> 
> 
> 2011/11/24 Igor Grinberg <grinberg at compulab.co.il <mailto:grinberg@compulab.co.il>>
> 
>     > +/*
>     > + * If enable is 0, pull-down resistor not connected to D+, else pull-down
>     > + * resistor connected to D+.
>     > + * Default behaviour is as for enable equal to 1.
>     > + */
>     > +void ulpi_dp_pulldown(u32 ulpi_viewport, int enable)
>     > +{
>     > +     if (enable)
>     > +             ulpi_write(ulpi_viewport,
>     > +                     (u32)&ulpi->otg_ctrl_set, ULPI_OTG_DP_PULLDOWN);
>     > +     else
>     > +             ulpi_write(ulpi_viewport,
>     > +                     (u32)&ulpi->otg_ctrl_clear, ULPI_OTG_DP_PULLDOWN);
>     > +}
>     > +
>     > +/*
>     > + * If enable is 0, pull-down resistor not connected to D- else pull-down
>     > + * resistor connected to D-.
>     > + * Default behaviour is as for enable equal to 1.
>     > + */
>     > +void ulpi_dm_pulldown(u32 ulpi_viewport, int enable)
>     > +{
>     > +     if (enable)
>     > +             ulpi_write(ulpi_viewport,
>     > +                     (u32)&ulpi->otg_ctrl_set, ULPI_OTG_DM_PULLDOWN);
>     > +     else
>     > +             ulpi_write(ulpi_viewport,
>     > +                     (u32)&ulpi->otg_ctrl_clear, ULPI_OTG_DM_PULLDOWN);
>     > +}
> 
> 
>     Correct me if I'm wrong, but I don't think there is a use for
>     the above functions in separate and the user will have to
>     call them both.
>     So, can these two functions be united in one,
>     say ulpi_pulldown(u32 ..., int enable)?
> 
> 
> If I understand ULPI specification well, the overall effect is the same
> when both bits are set to 1 as when they are set to 0.
> And default setting is for both bits to be 1, so I don't think that have
> one function for both bits make sense.

It has nothing to do with the ULPI spec, but with the USB (or USB2.0) spec.
This technique is used for speed identification, so for both, Low and Full
speed devices to function properly, both resistors must be enabled.

So for sake of correctness, please, provide one unite function.

-- 
Regards,
Igor.

  reply	other threads:[~2011-11-27  7:50 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-05 20:50 [U-Boot] [PATCH] ulpi: add generic ULPI functionality Jana Rapava
2011-11-05 21:37 ` Marek Vasut
2011-11-05 23:08   ` Jana Rapava
2011-11-05 23:13     ` Marek Vasut
2011-11-05 23:32       ` Jana Rapava
2011-11-05 23:35         ` Marek Vasut
2011-11-08 11:08         ` Igor Grinberg
2011-11-08 11:33 ` Igor Grinberg
2011-11-12  1:09   ` Jana Rapava
2011-11-14  7:40     ` Igor Grinberg
2011-11-12 17:29 ` [U-Boot] [PATCH v2] " Jana Rapava
2011-11-14  8:13   ` Igor Grinberg
2011-11-24 12:22   ` [U-Boot] [PATCH v3]ulpi: " Jana Rapava
2011-11-24 13:26     ` Igor Grinberg
2011-11-24 14:21       ` Marek Vasut
2011-11-25 18:39       ` Jana Rapava
2011-11-27  7:50         ` Igor Grinberg [this message]
2011-11-25 20:05     ` [U-Boot] [PATCH v4] ulpi: " Jana Rapava
2011-11-27  4:00       ` Simon Glass
2011-11-27  8:08         ` Igor Grinberg
2011-11-27 22:37           ` Jana Rapava
2011-11-27 23:34           ` Simon Glass
2011-11-27 22:30         ` Jana Rapava
2011-11-28  0:19       ` [U-Boot] [PATCH v5] " Jana Rapava
2011-11-28  7:39         ` Igor Grinberg
2011-11-28 17:06         ` Simon Glass
2011-11-28 19:43         ` [U-Boot] [PATCH v6] " Jana Rapava
2011-11-28 20:56           ` Simon Glass
2011-12-01 11:12           ` Igor Grinberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ED1EBC0.8060706@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox