[U-Boot] [PATCH 3/3] imx: mx6sllevk: add usb support
Marek Vasut
marex at denx.de
Thu Dec 22 05:39:39 CET 2016
On 12/22/2016 02:13 AM, Peng Fan wrote:
>
>
>> -----Original Message-----
>> From: Marek Vasut [mailto:marex at denx.de]
>> Sent: Wednesday, December 21, 2016 10:10 PM
>> To: Peng Fan <peng.fan at nxp.com>; sbabic at denx.de
>> Cc: u-boot at lists.denx.de; van.freenix at gmail.com
>> Subject: Re: [PATCH 3/3] imx: mx6sllevk: add usb support
>>
>> On 12/21/2016 09:14 AM, Peng Fan wrote:
>>> Add usb support for mx6sllevk board.
>>>
>>> Signed-off-by: Peng Fan <peng.fan at nxp.com>
>>> Cc: Stefano Babic <sbabic at denx.de>
>>> ---
> [......]
>
>>> +
>>> +#define USB_OTHERREGS_OFFSET 0x800
>>> +#define UCTRL_PWR_POL (1 << 9)
>>> +
>>> +int board_ehci_hcd_init(int port)
>>> +{
>>> + u32 *usbnc_usb_ctrl;
>>> +
>>> + if (port > 1)
>>> + return -EINVAL;
>>> +
>>> + usbnc_usb_ctrl = (u32 *)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET
>> +
>>> + port * 4);
>>> +
>>> + /* Set Power polarity */
>>> + setbits_le32(usbnc_usb_ctrl, UCTRL_PWR_POL);
>>> + return 0;
>>> +}
>>
>> Is this function similar to what usb_oc_config() does ?
>
> No, this bit is not for overcurrent. According to RM, this is OTG Power Polarity
> This bit should be set according to power switch's enable polarity.
> 1 Power switch has an active-high enable input
> 0 Power switch has an active-low enable input
>
> This is board specific.
Great, except it should also be part of the driver , the same way as
polarity is configured, yes ?
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list