On 1.7.2016 13:19, Michal Suchanek wrote:
> On 1 July 2016 at 13:02, Michal Suchanek <hramr...@gmail.com> wrote:
>> On 30 June 2016 at 22:30, Ondřej Jirman <m...@xff.cz> wrote:
>>> On 30.6.2016 20:21, Michal Suchanek wrote:
>>>> On 30 June 2016 at 20:06, Michal Suchanek <hramr...@gmail.com> wrote:
>>>>> Hello,
>>>>>
>>>>> On 30 June 2016 at 16:44, Ondřej Jirman <m...@xff.cz> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> hopefuly, it was the NPE that I fixed. It was specifically in the H3 usb
>>>>>> phy code path for phy0. So I believe it was untested,
>>>>>> because I didn't find any dts file that would use phy0.
>>>>>>
>>>>>
>>>>> This WorksForMe(TM).
>>>>
>>>> There is still small problem left. When I boot with the USB cable
>>>> connected I have to disconnect and reconnect the cable to get the
>>>> gadget working.
>>>>
>>>
>>> Good to know, I'll test this case. It will probably be something around
>>> the iddet handling during phy0 initialization, which leads to the
>>> connected cable being treated as OTG, which would turn the usb port into
>>> host mode. You can verify that by looking into sysfs where there's an
>>> attribute that tells the current mode (peripheral / host). I don't
>>> rember where exactly it could be found.
>>>
>>
>> This is interesting. The USB gadget works (from the start without 
>> reconnecting)
>> with one PC + hub and fails with other PC + hub. Both pretty much 100%
>>
>> Ironically the broken hub provides sound voltage above 5.1V and the working
>> one should give about 4.75V given its 0.2V drop from the board power level.
> 
> For the record
> 
> /sys/devices/platform/soc/1c19000.usb/musb-hdrc.1.auto/mode is
> b_idle when gadget is broken
> b_peripherial when gadget is working

Hi, you may try adding printks to sun4i_usb_phy0_id_vbus_det_scan in
phy-sun4i-usb.c inside the if (id_notify) and if (vbus_notify), and try
if you can observe any differences between the two hubs in dmesg output.

Or first, I'd suggest to add unconditional "return true" to
sun4i_usb_phy0_poll, if that fixes anything. This will enable polling on
the iddet gpio. (Perhaps gpio interrupts are not very reliable?)

regards,
  Ondrej

> Thanks
> 
> Michal
> 

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to