From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 3/3] arm: odroid: usb: add support for usb host including ethernet
Date: Wed, 19 Nov 2014 18:18:52 +0100 [thread overview]
Message-ID: <546CD0FC.2060201@samsung.com> (raw)
In-Reply-To: <CANoR_OA2kJCqOLsRUH2VVZ0cgAfyNCNtH9qiPH457ciETZaJLg@mail.gmail.com>
Hello Suriyan,
On 11/18/2014 06:34 PM, Suriyan Ramasami wrote:
> Hello Przemyslaw,
>
> On Tue, Nov 18, 2014 at 3:09 AM, Przemyslaw Marczak
> <p.marczak@samsung.com> wrote:
>> Hello Suriyan,
>>
>> On 11/18/2014 04:30 AM, Suriyan Ramasami wrote:
>>>
>>> Hello Minkyu Kang/Przemyslaw and of course anyone else who can direct me,
>>>
>>> Thanks for the commit.
>>>
>>> I just realized that the code in this particular patch is missing
>>> the gpio_request() call before calling the gpio_direction_output()
>>> call, and hence fails to initialize the USB3503A hub. This was pointed
>>> out by Przemyslaw in another patch of mine (odroid: blue LED)
>>>
>>> So, my question is, this patch is in u-boot-samsung. To correct the
>>> above mentioned error, do I submit a patch directed to u-boot-samsung?
>>> If so how do I do it? I mean, do I elaborate this in the subject
>>> /.body of the mail?
>>>
>>> Thanks and regards,
>>> - Suriyan
>>>
>>>
>>
>> Yes, the gpio_request() was missed in your code - it prints errors about it
>> but the HUB works fine. So when you send the fixed version this should be
>> okay. Please check ums command before send.
>>
>
> Sure, will do!
>
>> Please also check setting buck value at function board_usb_init(),
>> the buck is disabled and before enable - the value changes two times -
>> probably by mistake.
>>
>
> I think there is an error in the implementation of
> max77686_set_buck_mode(..., buck #, OPMODE_OFF), or I have some gap in
> my understanding of it. I believe that when you set OPMODE_OFF it
> should turn it OFF right? as in no voltage? This does not seem to be
> the case.
> I have to turn the power off and then on, on BUCK8 (LAN9730 feeds off
> of it), to reset the LAN when a usb reset is issued, else it will not
> be detected again when usb start is re-issued.
> Initially, I had max77686_set_buck_mode(p_pmic, 9, OPMODE_OFF); delay;
> max77686(set_buck_mode(p_pmic, 9, OPMODE_ON); but it did not power
> recycle the LAN9730 chip.
> I do not have access to the MAX77686 data sheets to debug this. Hence,
> in my current code I set the voltage to the lowest possible value, and
> then bring it back up to 3.3V to simulate a reset. In fact, I can
> remove the OPMODE_OFF and OPMODE_ON code, and it works.
> Please let me know if there is any change needed in the OPMODE_OFF
> code for it to work the way it should, or correct my understanding of
> what it is supposed to do.
>
> Currently, I am thinking of just having:
> max77686_set_buck_voltage(p_pmic, 8, 750000);
> max77686_set_buck_voltage(p_pmic, 8, 3300000);
> and leave the OPMODE_OFF and OPMODE_ON out of it.
>
Ok, now I see the issue. So I looked into the documentation and there is
a "ENB8" pin in PMIC package - this pin allows steering BUCK8 ON/OFF by
the hardware. If ENB8 is set to "low", then you can do on/off - when
"high" then you can't change it's state by I2C write. This PMIC has a
lot of such gpio for setting the default power-on state of ldo/buck
regulators.
The signal of ENB8 in OdroidU3 schematic is missed, I can suppose that
it is connected to one of SOC RST signal as it is on Odroid X2.
So doing the reset by setting low/high voltage value - seems to be good
in this case.
>> And the gpio_request(...) you can put into board_gpio_init - request gpio
>> only one.
>>
>
> Yes.
>
>> The odroid is available on the market, so I would prefer keep some
>> documentation in the doc/README.odroid.
>> Could you please add short section about the USB usage in U-Boot? This would
>> be useful.
>
> OK!
>
>>
>>
>>> On Mon, Nov 17, 2014 at 6:02 AM, Minkyu Kang <mk7.kang@samsung.com> wrote:
>>>>
>>>> On 30/10/14 01:22, Suriyan Ramasami wrote:
>>>>>
>>>>> This change adds support for enabling the USB host features of the
>>>>> board.
>>>>> This includes the USB3503A hub and the SMC LAN9730 ethernet controller
>>>>> as well.
>>>>>
>>>>> Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com>
>>>>>
>>>>> ---
>>>>>
>>>>> Changes in v3:
>>>>> * removed set_usb_ethaddr() and related code as the GUID registers do
>>>>> not
>>>>> seem to be documented anywhere. This is sad, as this mechanism allows
>>>>> for each Odroid to boot up with the same MAC address every time, but
>>>>> no
>>>>> two odroids shall have the same MAC address on boot. This ensures
>>>>> multiple
>>>>> odroids in the same LAN to come up without conflicting MAC addresses.
>>>>> * Minkyu - Do not mix cpu_is... and proid_is...
>>>>>
>>>>> Changes in v2:
>>>>> * Jaehoon - Split power.[ch] as a separate patch
>>>>> * Removed an unneeded header file from ehci-exynos.c
>>>>> * Jaehoon - Fix indentation in the dts file
>>>>>
>>>>> Changes in v1:
>>>>> * First try
>>>>>
>>>>> arch/arm/dts/exynos4412-odroid.dts | 11 +++++++
>>>>> arch/arm/include/asm/arch-exynos/ehci.h | 13 ++++++++
>>>>> board/samsung/odroid/odroid.c | 32 +++++++++++++++++++
>>>>> drivers/usb/host/ehci-exynos.c | 55
>>>>> ++++++++++++++++++++++++++++-----
>>>>> include/configs/odroid.h | 13 ++++++++
>>>>> 5 files changed, 116 insertions(+), 8 deletions(-)
>>>>>
>>>>
>>>> applied to u-boot-samsung.
>>>>
>>>> Thanks,
>>>> Minkyu Kang.
>>>>
>>>
>>
>> Best regards,
>> --
>> Przemyslaw Marczak
>> Samsung R&D Institute Poland
>> Samsung Electronics
>> p.marczak at samsung.com
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
next prev parent reply other threads:[~2014-11-19 17:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 16:22 [U-Boot] [PATCH v3 1/3] arm: odroid: pmic77686: allow buck voltage settings Suriyan Ramasami
2014-10-29 16:22 ` [U-Boot] [PATCH v3 2/3] arm: odroid: enable/disable usb host phy for exynos4412 Suriyan Ramasami
2014-11-17 14:03 ` Minkyu Kang
2014-10-29 16:22 ` [U-Boot] [PATCH v3 3/3] arm: odroid: usb: add support for usb host including ethernet Suriyan Ramasami
2014-10-30 1:17 ` Jaehoon Chung
2014-10-30 4:40 ` Suriyan Ramasami
2014-10-30 5:11 ` Suriyan Ramasami
2014-11-17 14:02 ` Minkyu Kang
2014-11-18 3:30 ` Suriyan Ramasami
2014-11-18 8:14 ` Minkyu Kang
2014-11-18 11:14 ` Przemyslaw Marczak
2014-11-18 14:05 ` Minkyu Kang
2014-11-18 14:33 ` Przemyslaw Marczak
2014-11-18 11:09 ` Przemyslaw Marczak
2014-11-18 17:34 ` Suriyan Ramasami
2014-11-19 17:18 ` Przemyslaw Marczak [this message]
2014-11-17 14:03 ` [U-Boot] [PATCH v3 1/3] arm: odroid: pmic77686: allow buck voltage settings Minkyu Kang
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=546CD0FC.2060201@samsung.com \
--to=p.marczak@samsung.com \
--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 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.