From patchwork Sun Dec 9 19:01:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10720173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD5FF15A6 for ; Sun, 9 Dec 2018 19:02:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2F182A0FA for ; Sun, 9 Dec 2018 19:02:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C74392A0FE; Sun, 9 Dec 2018 19:02:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 762F62A0FB for ; Sun, 9 Dec 2018 19:02:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QME+mhhzka/X4NyKsLJGnEdqXrjVOQjQXtk0ZOzvgGg=; b=pBti5Za7V9Gnd5 UUqHuzgjf8SiRaGNrvN5HaP/KX0yiHMmWas0B4j4EuwYrhUsCYWxd4bZorqX+cXiZtpssgzTG38+M /5A21UkpeFSCDFoPxE+bJ8ojZqeWrLHZ5mOkSPcrKfXpuS7tx6s3yyUvrsptea1MvjrACidgCxu7o obNQcm24N/GzF0JuBZKUNwQFul6YTE2Nz6nDESjTv84i2E98oBrCz2TMAVrgJyEHYpixA22GCTOyo xFlNKcMA+VCKDQzVQtr6wrZUxV/jUgSb2LuzjDVqu3wix4QvdvxTdxrMOZxRTBz18DIYd5jnqELzq 8Bfv6fG05D5fmg3r6KrQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gW4L5-0006V8-Mk; Sun, 09 Dec 2018 19:02:03 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gW4L2-0006SS-NZ for linux-amlogic@lists.infradead.org; Sun, 09 Dec 2018 19:02:02 +0000 Received: by mail-wm1-x341.google.com with SMTP id a18so9114921wmj.1 for ; Sun, 09 Dec 2018 11:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OKSka/+/cVpRHh/4vbzTPbz+qQ+/vVf1kkbTmUZ6zvo=; b=CHw6CpTPHF19FzbrESn/kQOq6RBZjBX2S9LWGTvd4Jy5/8hOTLvK5HaSUSsTjyX1xs LGrSGfuk+YX1siefrZpEO2MfetpTNMBJPehrBu1bYDwZk6z7xwYUAwJpXYhqIFYXycZ2 mfp5AmwylQj3T79OqV0CnFOGUrte4hj3bZCwmJ4TUren8ZJEeIWaD3JVr0UFENi74RtA 28bdnI92HVtRQCuAoYYWN2r9D9dbuxJHM5Ca4uwhxwiGRhjT+RsBdIXFBn3GW/fXz8eQ Si9R+aUBbSZdgu+jIvtCMfGJ53rIeSF7CzDuNBxg0I5a1IE4pWpHFPSC3MsEi8gfLWHe Ak+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OKSka/+/cVpRHh/4vbzTPbz+qQ+/vVf1kkbTmUZ6zvo=; b=RwlPuLoSnhT+b4nushyMxBNNLM6I27jveB42PEbj00WqqoZue46q++Avw5Fi0yNaFT N7YiZ5oGQGknR00vk4G6vRVmiHc05h4Q3GTlgdKyyr5GeAZBkdu3LFb4oQwkKUEWzcqv KKagGhcuGuStJTjmFa8HGWl8CyOYEuhYHgerJ2Q2L2HpV4Ql4riMtNr4qz0EhvhOL15W ax6lCbjuToLOtKQYwiUUixMRgCVfIEmov1lJ0rfNh+OY5wvzJqzxs215I0xamF+DowfT pD0qm6E9Q0NniQKb7cNG2NHAzq2V/B7SWkYiLfFSm8zUtxijMYePajUMQDVzCcdWTBkI FaJw== X-Gm-Message-State: AA+aEWb2aiDnk09+hG5k5RpD/gnfSqSUc0jWlHKk940LwdWBJP6kSHHX AQv3hQv24jxlUl5l/dol0Rg= X-Google-Smtp-Source: AFSGD/X8xBh/cgoJxf6cXn7CZH//Zs45FpKW5F/aGAR9KTjB9/fJPP0PAoWaL249Vj1v8NrGS3Z1TQ== X-Received: by 2002:a1c:c64e:: with SMTP id w75mr8724696wmf.46.1544382106224; Sun, 09 Dec 2018 11:01:46 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD73FBA00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:dc:d73f:ba00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id l197sm30560215wma.44.2018.12.09.11.01.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Dec 2018 11:01:45 -0800 (PST) From: Martin Blumenstingl To: linux-usb@vger.kernel.org, hminas@synopsys.com, gregkh@linuxfoundation.org Subject: [PATCH 1/1] usb: dwc2: disable power_down on Amlogic devices Date: Sun, 9 Dec 2018 20:01:29 +0100 Message-Id: <20181209190129.11870-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181209190129.11870-1-martin.blumenstingl@googlemail.com> References: <20181209190129.11870-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181209_110200_764867_C05AD813 X-CRM114-Status: GOOD ( 13.53 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arthur.Petrosyan@synopsys.com, Martin Blumenstingl , christianshewitt@gmail.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-amlogic@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Disable power_down by setting the parameter to DWC2_POWER_DOWN_PARAM_NONE. This fixes a problem on various Amlogic Meson SoCs where USB devices are only recognized when plugged in before booting Linux. A hot-plugged USB device was not detected even though the device got power (my USB thumb drive for example has an LED which lit up). A similar fix was implemented for Rockchip SoCs in commit c216765d3a1def ("usb: dwc2: disable power_down on rockchip devices"). That commit suggests that a change in the dwc2 driver is the cause because the default value for the "hibernate" parameter (which then got renamed to "power_down" to support other modes) was changed in the v4.17 merge window with: commit 6d23ee9caa6790 ("Merge tag 'usb-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing"). Cc: # 4.19 Suggested-by: Christian Hewitt Signed-off-by: Martin Blumenstingl Acked-by: Minas Harutyunyan Tested-by: Brad Harper --- drivers/usb/dwc2/params.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 7c1b6938f212..38c813b1d203 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -111,6 +111,7 @@ static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg) p->phy_type = DWC2_PHY_TYPE_PARAM_UTMI; p->ahbcfg = GAHBCFG_HBSTLEN_INCR8 << GAHBCFG_HBSTLEN_SHIFT; + p->power_down = DWC2_POWER_DOWN_PARAM_NONE; } static void dwc2_set_amcc_params(struct dwc2_hsotg *hsotg)