Hi Felipe,

On 07.10.2015 18:22, Felipe Balbi wrote:
[...]
>>>> b) The M-USB port on our board is wired as host only. If a device is
>>>> unplugged, the driver normally goes into some idle state and waits for
>>>> an ID signal change. But on our board that never happens.
>>>
>>> did you route ID pin anywhere ? I hope you tied it to ground.
>>
>> I think so. I'll double-check that.
> 
> cool, thanks.

The ID pin was not connected, it's tied to ground now, but still the
same behaviour. But I can keep it from entering the musb_try_idle
function by deactivating the vbus timeout. This can be done from
userspace, so we don't need the additional if-statements in the code.

>> [...]
>>>> +  /* Set defaults */
>>>> +  config->num_eps = 16;
>>>> +  config->ram_bits = 12;
>>>> +  config->multipoint = true;
>>>
>>> all of these are board-specific.
>>>
>>>> +
>>>> +  bdata->interface_type = MUSB_INTERFACE_UTMI;
>>>> +  bdata->mode = MUSB_OTG;
>>>> +  bdata->power = 500;
>>>> +  bdata->extvbus = 1;
>>>
>>> so are these.

OK, if everything is declared in the device tree, we don't need to set
default values here.

Regarding the four am35x_... functions from omap_phy_internal.c, it's
not easy to move them over to am35x.c.
While they just set a few bits in some system control module registers,
they call functions from control.c to access the SCM. The control.c
functions are not exported either (and use some static variables and
also local include files from mach-omap2).

>> [...]
>>>> +  phy_clk = clk_get(&pdev->dev, "hsotgusb_fck");
>>>
>>> why did you change the clock name ? That shouldn't be necessary.
>>
>> I did get "failed to get PHY clock" and "failed to get clock"
>> messages.
> 
> right, this a bug elsewhere. Drivers shouldn't care about the exact
> clock name ;-)
> 

The corresponding clock declaration seems to be in
drivers/clk/ti/clk-3xxx.c:

        DT_CLK(NULL, "hsotgusb_ick", "hsotgusb_ick_am35xx"),
        DT_CLK(NULL, "hsotgusb_fck", "hsotgusb_fck_am35xx"),

When I add two more lines there,

        DT_CLK("5c040000.am35x_otg_hs", "ick", "hsotgusb_ick_am35xx"),
        DT_CLK("5c040000.am35x_otg_hs", "fck", "hsotgusb_fck_am35xx"),

the "ick" and "fck" clocks are found. It doesn't work without the
address in the device name, and not with just "musb-am35x" either.
Still, all other device names in that file look simpler, and I'm
wondering if I forgot a proper name declaration somewhere else?

Best regards,
Rolf

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to