On 06.07.2017 21:03, Stephen Warren wrote: > On 07/06/2017 11:16 AM, Dmitry Osipenko wrote: >> On 06.07.2017 19:46, Stephen Warren wrote: >>> On 07/05/2017 07:24 PM, Peter Chen wrote: >>>> On Wed, Jul 05, 2017 at 08:19:53PM +0300, Dmitry Osipenko wrote: >>>>> From: Thierry Reding <treding@xxxxxxxxxx> >>>>> >>>>> Override the compatible string of the first USB controller to enable >>>>> device mode. >>>>> >>>>> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx> >>>>> --- >>>>> arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++ >>>>> 1 file changed, 2 insertions(+) >>>>> >>>>> diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts >>>>> b/arch/arm/boot/dts/tegra20-trimslice.dts >>>>> index b902ab594afa..96b4f3f9827b 100644 >>>>> --- a/arch/arm/boot/dts/tegra20-trimslice.dts >>>>> +++ b/arch/arm/boot/dts/tegra20-trimslice.dts >>>>> @@ -336,7 +336,9 @@ >>>>> }; >>>>> usb@c5000000 { >>>>> + compatible = "nvidia,tegra20-udc"; >>>>> status = "okay"; >>>>> + dr_mode = "otg"; >>>> >>>> If this board supports peripheral-only, you need to >>>> set dr_mode as "peripheral". >>> >>> I agree here. Even if the ports can theoretically do otg, and DT is supposed to >>> represent HW not SW, given we have no SW support for actual OTG, it'd be best >>> not to change the DT to OTG until it's actually useful to do so. This comment >>> applies to the patches I ack'd already too. >> >> In case of absence of the "dr_mode" option or without a support of host mode >> switching, UDC driver fallbacks to the peripheral mode. Given that DT is >> supposed to be stable, I'm not sure what to do... should I specify the >> peripheral mode for now (which doesn't represent the HW) or completely remove >> the "dr_mode"? > > I think specifying dr_mode="peripheral" now is fine; we can change it later. > > DT ABI compatibility isn't about never changing the DT content, it's about > making sure that any schema changes occur in a backwards-compatible fashion. > > Also in the case of a USB port that does support OTG, the dr_mode property > represents both (a) the HW's capabilities, and (b) the user's desired (initial, > if e.g. sysfs modification is possible) mode of operation if the HW has multiple > capabilities. Given (b), I think it's fine to specify peripheral mode for now, > and allow the user to change it back to host or OTG mode if they want (although > OTG mode isn't useful/valid until SW support exists). Thank you for the clarification. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html