Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755727AbcJNSXS (ORCPT ); Fri, 14 Oct 2016 14:23:18 -0400 Received: from mail-oi0-f54.google.com ([209.85.218.54]:36082 "EHLO mail-oi0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754189AbcJNSW5 (ORCPT ); Fri, 14 Oct 2016 14:22:57 -0400 MIME-Version: 1.0 In-Reply-To: References: <1476401397-26497-1-git-send-email-john.stultz@linaro.org> <1476401397-26497-3-git-send-email-john.stultz@linaro.org> From: John Stultz Date: Fri, 14 Oct 2016 11:22:56 -0700 Message-ID: Subject: Re: [RFC][PATCH 2/2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220 To: Rob Herring Cc: lkml , Chen Yu , Wei Xu , Guodong Xu , Amit Pundir , Mark Rutland , John Youn , Douglas Anderson , Greg Kroah-Hartman , Linux USB List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1916 Lines: 46 On Fri, Oct 14, 2016 at 8:00 AM, Rob Herring wrote: > On Thu, Oct 13, 2016 at 6:29 PM, John Stultz wrote: >> From: Chen Yu >> >> The Hi6220's usb controller is limited in that it does not >> automatically autonegotiate the usb speed. Thus it requires a >> quirk so that we can manually negotiate the best usb speed for >> the attached device. >> >> Cc: Wei Xu >> Cc: Guodong Xu >> Cc: Amit Pundir >> Cc: Rob Herring >> Cc: Mark Rutland >> Cc: John Youn >> Cc: Douglas Anderson >> Cc: Greg Kroah-Hartman >> Cc: linux-usb@vger.kernel.org >> Signed-off-by: Chen Yu >> Signed-off-by: John Stultz >> --- >> arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 1 + >> drivers/usb/dwc2/core.h | 7 +++ >> drivers/usb/dwc2/hcd.c | 75 +++++++++++++++++++++++++++++++ >> drivers/usb/dwc2/platform.c | 3 ++ >> 4 files changed, 86 insertions(+) >> [snip] >> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c >> index 8e1728b..21c328b 100644 >> --- a/drivers/usb/dwc2/platform.c >> +++ b/drivers/usb/dwc2/platform.c >> @@ -585,6 +585,9 @@ static int dwc2_driver_probe(struct platform_device *dev) >> dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", >> (unsigned long)res->start, hsotg->regs); >> >> + hsotg->change_speed_quirk = device_property_read_bool(&dev->dev, >> + "hi6220,change_speed_quirk"); > > Can't this be determined from the hi6220's compatible string? Ah. Good suggestion! I'm moving the quirk field to the core_params. Should avoid any dts or binding changes. thanks -john