Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp154735imm; Wed, 5 Sep 2018 23:34:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZYTjMSpEK6mT5K8q/XDbmyMEb+gNgebMxskeJc2SUkUO//XcKuErcyTz2lyEyRFSz+Re2L X-Received: by 2002:a63:731b:: with SMTP id o27-v6mr1264830pgc.216.1536215679471; Wed, 05 Sep 2018 23:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536215679; cv=none; d=google.com; s=arc-20160816; b=WkDOe4kMXUkKWLO1Pdh7WGWdkFSAr8EVD+VgN2f1gplv5z+c5v00A21VQ4ChlKPUTk M8wGH+o8L/0yn7ooNqUgoTYq4ZotaAbpHsPMuZJWt91Mx03gfocpN1wexqvJR76n0/Z1 UbI+BHtkjhRW4EDtM1LqQFmh9NnO3OZRvXB5KuZmPnY1vp7G9tyoVm4W7HeLazOGOrsk /Rb+lw7lJxsA0bblPq8uc1+/IqR9f0iGZIruHEFL+0Dg0FU+XUxVKsxwJgXd7XF/zoaG enW6TsknlCqqsez4uFiYOnYgKFFgLa5uTAplcjVnhE86Z3NkVFkbIeZn1b1e4u30WACa 567Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=KT97wmzNKuFeTsHFzUyHwkZ9FHjOvXquzgZNcGgSaNY=; b=BsSRxSgSeXtHwe6lmEGpFA22BbFsFwRRlXsDOdJv2PX78e+TrL5IqRd/bHBjVCf5IC ypZGSHp+uysQyM+qvvwUl63ldTxNielg16cC28MDVWp525o9NmG7JdLUCvtAfQXIm5nz RbgPKtgtWK0HhmCMjFWkTXfaur6kPK8b7R4gZMzrd3SD0lPcBKILkkM6WpnQW9dP62jD Fm0lNcapZ4ZmFA3rLSxDynY0NgJ9cPBq5pjm5WFWwKHF+KgPHC0opK/kppLY2Eq463AK SMAEbwqT9anfVRe1Dg8MTsukz6BgXWWNo92aa6l6Dw+7u0xgAsgfdTLZz3+t7t2JFd51 sNzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=bKMe1fRm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8-v6si4280355pga.487.2018.09.05.23.34.23; Wed, 05 Sep 2018 23:34:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=bKMe1fRm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726583AbeIFLHF (ORCPT + 99 others); Thu, 6 Sep 2018 07:07:05 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:32978 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725963AbeIFLHE (ORCPT ); Thu, 6 Sep 2018 07:07:04 -0400 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 4455410C1166; Wed, 5 Sep 2018 23:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1536215591; bh=f9OeV60tVDrP8ZrrbUe8JyqYAAnUEFOfk0YM2Ms5Rj4=; h=From:To:CC:Subject:Date:References:From; b=bKMe1fRm7ux7pTyBs6KW7tajqDQRdAuktLerssH9GYIJsnv118oD4lDzbVrHYTYk6 2H6sZZemifsxsZEcA/AlHva7nntgolJGruOey0CYzrQ1Vz2PdmN2xU5ImOlaL9lLUg X/vOtMciyZd2YUjRb1DaDoe5ss5JLon7dJ9QRc6iP76oSL/C6aY6qnf+/XbdbJUag0 duUA9aZY2zQe/YdHFre1WNyIXL66waNGPVMU4Cq3Gcuqv6C8aVCfvPzqu5004GLopH jPImq/inYxDX4GGXBJl8y54RhBCf6BXUzTI+Ugl8cXGFhzCHsrznUECwGREnHjwht4 E59GEZ39gsspQ== Received: from us01wehtc1.internal.synopsys.com (us01wehtc1-vip.internal.synopsys.com [10.12.239.236]) by mailhost.synopsys.com (Postfix) with ESMTP id DDABB4DCA; Wed, 5 Sep 2018 23:33:10 -0700 (PDT) Received: from AM04WEHTCB.internal.synopsys.com (10.116.16.192) by us01wehtc1.internal.synopsys.com (10.12.239.231) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 5 Sep 2018 23:33:10 -0700 Received: from AM04WEMBXA.internal.synopsys.com ([fe80::79c3:55f2:1f20:5bf4]) by am04wehtcb.internal.synopsys.com ([::1]) with mapi id 14.03.0361.001; Thu, 6 Sep 2018 10:33:07 +0400 From: Minas Harutyunyan To: Stefan Wahren , Minas Harutyunyan CC: Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , Doug Anderson , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH RFC] usb: dwc2: power off during shutdown Thread-Topic: [PATCH RFC] usb: dwc2: power off during shutdown Thread-Index: AQHUQdnrerw4ENQnyUeZCj/DHLE7ag== Date: Thu, 6 Sep 2018 06:33:07 +0000 Message-ID: <410670D7E743164D87FA6160E7907A56013A7646E0@am04wembxa.internal.synopsys.com> References: <1535795683-3788-1-git-send-email-stefan.wahren@i2se.com> <410670D7E743164D87FA6160E7907A56013A761B2B@am04wembxa.internal.synopsys.com> <470783016.30183.1536172949193@email.1und1.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.116.70.57] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stefan,=0A= =0A= On 9/5/2018 10:42 PM, Stefan Wahren wrote:=0A= > Hi Minas,=0A= > =0A= >> Minas Harutyunyan hat am 5. September 2= 018 um 10:37 geschrieben:=0A= >>=0A= >>=0A= >> Hi Stefan,=0A= >>=0A= >> On 9/1/2018 1:55 PM, Stefan Wahren wrote:=0A= >>> Currently USB consumes a lot of power after shutting down a Raspberry P= i 3=0A= >>> (example setup with Ethernet and a keyboard connected). So power off=0A= >>> USB on shutdown.=0A= >>>=0A= >>> Measured on Raspberry Pi 3B with 4.19rc1/multi_v7_defconfig (HDMI, Ethe= rnet=0A= >>> and a keyboard connected)=0A= >>>=0A= >>> Before patch: 2.450 W=0A= >>> After patch: 2.090 W=0A= >>>=0A= >>=0A= >> Could you please elaborate. Power measurements done after shutdown?=0A= > =0A= > I did the following:=0A= > =0A= > sudo halt=0A= > wait until "System halted" appears on the screen=0A= > "measured" the current value displayed on my PSU=0A= > =0A= > You are right that not the same as poweroff. But in even in poweroff the = board consumes 0.6 W, but in this case USB is powered down.=0A= > =0A= >> Why=0A= >> your setup continue consume power after shutdown?=0A= > =0A= > The BCM2835 SoC has a GPU and a ARM core. Linux is running only on the AR= M core. The GPU is usually running a close source firmware, which is starte= d at first during boot und runs all the time.=0A= > =0A= >> Maybe its=0A= >> sleep/hibernation mode?=0A= > =0A= > There isn't much implementation of power management for BCM2835 yet. So i= wanted to start with USB.=0A= > Even for sleep/hibernation the consumption is much too high. Because the = system consumes in idle 1.6 W.=0A= > =0A= >>=0A= >> dwc2 core in your platform which type of power optimization supports:=0A= >> partial power down, hibernation or extended hibernation? Please provide= =0A= >> me GHWCFG4 register value of your core.=0A= > =0A= > AFAIK all RPis use the same USB IP core:=0A= > =0A= > GHWCFG4 =3D 0x1ff00020=0A= =0A= Ok, your core doesn't support any power optimization mode.=0A= =0A= =0A= > =0A= > Stefan=0A= > =0A= =0A= 1. Could you please explain what is real/physical cause of power saving =0A= after your patch: VBUS off, PHY clock stop or any other?=0A= 2. Can USB detect remote wake-up signaling from connected =0A= keyboard/ethernet before and after your patch?=0A= =0A= Thanks,=0A= Minas=0A=