All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Stefan Wahren <stefan.wahren@i2se.com>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Doug Anderson <dianders@chromium.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC] usb: dwc2: power off during shutdown
Date: Thu, 6 Sep 2018 06:33:07 +0000	[thread overview]
Message-ID: <410670D7E743164D87FA6160E7907A56013A7646E0@am04wembxa.internal.synopsys.com> (raw)
In-Reply-To: 470783016.30183.1536172949193@email.1und1.de

Hi Stefan,

On 9/5/2018 10:42 PM, Stefan Wahren wrote:
> Hi Minas,
> 
>> Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> hat am 5. September 2018 um 10:37 geschrieben:
>>
>>
>> Hi Stefan,
>>
>> On 9/1/2018 1:55 PM, Stefan Wahren wrote:
>>> Currently USB consumes a lot of power after shutting down a Raspberry Pi 3
>>> (example setup with Ethernet and a keyboard connected). So power off
>>> USB on shutdown.
>>>
>>> Measured on Raspberry Pi 3B with 4.19rc1/multi_v7_defconfig (HDMI, Ethernet
>>> and a keyboard connected)
>>>
>>> Before patch: 2.450 W
>>> After patch:  2.090 W
>>>
>>
>> Could you please elaborate. Power measurements done after shutdown?
> 
> I did the following:
> 
> sudo halt
> wait until "System halted" appears on the screen
> "measured" the current value displayed on my PSU
> 
> 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.
> 
>> Why
>> your setup continue consume power after shutdown?
> 
> The BCM2835 SoC has a GPU and a ARM core. Linux is running only on the ARM core. The GPU is usually running a close source firmware, which is started at first during boot und runs all the time.
> 
>> Maybe its
>> sleep/hibernation mode?
> 
> There isn't much implementation of power management for BCM2835 yet. So i wanted to start with USB.
> Even for sleep/hibernation the consumption is much too high. Because the system consumes in idle 1.6 W.
> 
>>
>> dwc2 core in your platform which type of power optimization supports:
>> partial power down, hibernation or extended hibernation? Please provide
>> me GHWCFG4 register value of your core.
> 
> AFAIK all RPis use the same USB IP core:
> 
> GHWCFG4 = 0x1ff00020

Ok, your core doesn't support any power optimization mode.


> 
> Stefan
> 

1. Could you please explain what is real/physical cause of power saving 
after your patch: VBUS off, PHY clock stop or any other?
2. Can USB detect remote wake-up signaling from connected 
keyboard/ethernet before and after your patch?

Thanks,
Minas

WARNING: multiple messages have this Message-ID (diff)
From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Stefan Wahren <stefan.wahren@i2se.com>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Doug Anderson <dianders@chromium.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [RFC] usb: dwc2: power off during shutdown
Date: Thu, 6 Sep 2018 06:33:07 +0000	[thread overview]
Message-ID: <410670D7E743164D87FA6160E7907A56013A7646E0@am04wembxa.internal.synopsys.com> (raw)

Hi Stefan,

On 9/5/2018 10:42 PM, Stefan Wahren wrote:
> Hi Minas,
> 
>> Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> hat am 5. September 2018 um 10:37 geschrieben:
>>
>>
>> Hi Stefan,
>>
>> On 9/1/2018 1:55 PM, Stefan Wahren wrote:
>>> Currently USB consumes a lot of power after shutting down a Raspberry Pi 3
>>> (example setup with Ethernet and a keyboard connected). So power off
>>> USB on shutdown.
>>>
>>> Measured on Raspberry Pi 3B with 4.19rc1/multi_v7_defconfig (HDMI, Ethernet
>>> and a keyboard connected)
>>>
>>> Before patch: 2.450 W
>>> After patch:  2.090 W
>>>
>>
>> Could you please elaborate. Power measurements done after shutdown?
> 
> I did the following:
> 
> sudo halt
> wait until "System halted" appears on the screen
> "measured" the current value displayed on my PSU
> 
> 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.
> 
>> Why
>> your setup continue consume power after shutdown?
> 
> The BCM2835 SoC has a GPU and a ARM core. Linux is running only on the ARM core. The GPU is usually running a close source firmware, which is started at first during boot und runs all the time.
> 
>> Maybe its
>> sleep/hibernation mode?
> 
> There isn't much implementation of power management for BCM2835 yet. So i wanted to start with USB.
> Even for sleep/hibernation the consumption is much too high. Because the system consumes in idle 1.6 W.
> 
>>
>> dwc2 core in your platform which type of power optimization supports:
>> partial power down, hibernation or extended hibernation? Please provide
>> me GHWCFG4 register value of your core.
> 
> AFAIK all RPis use the same USB IP core:
> 
> GHWCFG4 = 0x1ff00020

Ok, your core doesn't support any power optimization mode.


> 
> Stefan
> 

1. Could you please explain what is real/physical cause of power saving 
after your patch: VBUS off, PHY clock stop or any other?
2. Can USB detect remote wake-up signaling from connected 
keyboard/ethernet before and after your patch?

Thanks,
Minas

  reply	other threads:[~2018-09-06  6:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-01  9:54 [PATCH RFC] usb: dwc2: power off during shutdown Stefan Wahren
2018-09-01  9:54 ` [RFC] " Stefan Wahren
2018-09-05  8:37 ` [PATCH RFC] " Minas Harutyunyan
2018-09-05  8:37   ` [RFC] " Minas Harutyunyan
2018-09-05 18:42   ` [PATCH RFC] " Stefan Wahren
2018-09-05 18:42     ` [RFC] " Stefan Wahren
2018-09-06  6:33     ` Minas Harutyunyan [this message]
2018-09-06  6:33       ` Minas Harutyunyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=410670D7E743164D87FA6160E7907A56013A7646E0@am04wembxa.internal.synopsys.com \
    --to=minas.harutyunyan@synopsys.com \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.