linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benson Leung <bleung@google.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	linux-pm@vger.kernel.org, sre@kernel.org,
	Sameer Nanda <snanda@chromium.org>,
	gwendal@chromium.org, linux-kernel@vger.kernel.org,
	groeck@chromium.org, Adam.Thomson.Opensource@diasemi.com,
	kernel@collabora.com, bleung@chromium.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>,
	bleung@google.com
Subject: Re: [PATCH v2 1/2] power: supply: add input voltage limit property.
Date: Mon, 3 Dec 2018 11:58:45 -0800	[thread overview]
Message-ID: <20181203195845.GA120704@google.com> (raw)
In-Reply-To: <20181201150934.GA7052@amd>

[-- Attachment #1: Type: text/plain, Size: 2187 bytes --]

Hi Pavel,

On Sat, Dec 01, 2018 at 04:09:34PM +0100, Pavel Machek wrote:
> > I think that handle this via dt / ACPI is not possible for our use case. It can
> > be a hardware bug or a hardware/user constrain, let me try to explain better
> > with an example.
> > 
> > On Pixel C's devices, userspace uses this to set a USB input limit of 5V when
> > the screen is on for thermal reasons, but those go away when the screen is
> > off/system is sleeping, so we allow 9V and 12V levels when sleeping.
> 
> So, on pixel C, what happens if userland ignores the constraint, keeps
> display on and sets charger to 12V?

I was the software tech lead for the Google Pixel C and was involved in this
particular code change in 2015 before the release of the product.

So there's nothing fundamentally broken about the hardware that would cause
the Pixel C to malfunction if we were charging at 9V or 12V instead of 5V
when the screen is on, ie if userspace doesn't change this.

This is part of the Pixel C's thermal management strategy to effectively
limit the input power to 5V 3A when the screen is on. When the screen is on,
the display, the CPU, and the GPU all contribute more heat to the system
than while the screen is off, and we made a tradeoff to throttle the charger
in order to give more of the thermal budget to those other components.

What would happen is that you wouldn't meet Google's skin temperature targets
on the system if the charger was allowed to run at 9V or 12V with the screen
on.

For folks hacking on Pixel Cs (which is now outside of Google's official support
window for Android) and customizing their own kernel and userspace
this would be acceptable, but we wanted to expose this feature in the power
supply properties because the feature does exist in the Emedded Controller
firmware of the Pixel C and all of Google's Chromebooks with USB-C made since
2015 in case someone running an up to date kernel wanted to limit the charging
power for thermal or other reasons.

Thanks,
Benson

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-12-03 19:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 10:11 [PATCH v2 1/2] power: supply: add input voltage limit property Enric Balletbo i Serra
2018-11-22 10:11 ` [PATCH v2 2/2] power: supply: cros: allow to set input voltage and current limit Enric Balletbo i Serra
2018-11-22 15:24   ` Guenter Roeck
2018-11-22 16:54 ` [PATCH v2 1/2] power: supply: add input voltage limit property Adam Thomson
2018-11-23 23:22 ` Pavel Machek
2018-11-30 12:19   ` Enric Balletbo i Serra
2018-12-01 15:09     ` Pavel Machek
2018-12-03 19:58       ` Benson Leung [this message]
2018-12-05 15:47         ` Sebastian Reichel
2018-12-09  8:44         ` Pavel Machek

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=20181203195845.GA120704@google.com \
    --to=bleung@google.com \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=bleung@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=kernel@collabora.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=snanda@chromium.org \
    --cc=sre@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).