Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7381453imu; Mon, 3 Dec 2018 11:59:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/WqeRIAzog2wHcROic1AF3D0rjfxtcuXeX705iVNWOWjiToaN2I/tQ0q4ga3+2lVM95nuoj X-Received: by 2002:a17:902:ab92:: with SMTP id f18mr16528793plr.221.1543867180793; Mon, 03 Dec 2018 11:59:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543867180; cv=none; d=google.com; s=arc-20160816; b=Ou9OI0ygxM5Znu7baaQUVRwKlJLVJK1XnqIzhx++hH4Sk40/+c+EvFdNurZJj7ajVL PKLiPu71Z2Bg8NEFca0EcK3WnVdZON2en46aPu6r/UAPbisrGCN9o2Sk/1HZYQhKJoey o0OiHgx9deEtQis4YuEb417mXpO4Qc5u16s+f9o2YLhHCGzXuHQx24BK+v0rizI7z08r +npNOhLZjXL1mY4UpXqqWCUy3KPwlF6ro2HBoMHpgT03jPtCoOjLMVtG7r8FWL9kY6zA 5ZTWS2QIepue8bvT1yIamIB4ujk7YUn4a9CEdmA1jWnPQuBhH8CMFi8h1FWUa7++RIRw jniQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YIDFunJvTP/droGzlbqYsetOXj0jnj8R/u1TJotTzKg=; b=I813R+qKM5kl9Ih7nQUGQtcv2qRCAXmeF0aReInbjZy/lYiigzYv6dZpi+pl6VmWU2 fkK6PrwoxELP1Pq7/CsL7NzwAMbXx/2aY4C+/MqGqS0AFNg13xPVU9q39GPm5FtiVUeb 9w9m2zA7o4aD4NvMzqQrG3tCOrSySW44QfqUJTQbpoCl/aXKLTKYX6GteMdR0voOIDr8 O3H4XPqVjl+Gn3iZyN1WC4wVG+pIRvgE2IK5asYaIxzMuIoCMEiNJidUjsWcSN3lrUdI sVf5GPMdEBly8In3ZSYyzysXhbbmSbvFrbm4VXhd5Ci2nYid1GhYyiU+ZUowpGPoPzp+ YEZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=sWiEiDZs; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si14376697plo.363.2018.12.03.11.59.25; Mon, 03 Dec 2018 11:59:40 -0800 (PST) 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=@google.com header.s=20161025 header.b=sWiEiDZs; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725952AbeLCT6w (ORCPT + 99 others); Mon, 3 Dec 2018 14:58:52 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:46853 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725850AbeLCT6v (ORCPT ); Mon, 3 Dec 2018 14:58:51 -0500 Received: by mail-pf1-f195.google.com with SMTP id c73so6898905pfe.13 for ; Mon, 03 Dec 2018 11:58:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YIDFunJvTP/droGzlbqYsetOXj0jnj8R/u1TJotTzKg=; b=sWiEiDZsuURQRFaR8I7XzFI17T/XwzjKuSrEHGsNva4P8J1l81QsXfVin1VHzHTxzm uK185dsX9DJx6ORMIf0x1M0I9IUz8yFxzTvHy1ld6wsMtXuMTDZwK5BgZCmsGRTwkvOq wdoWEKOI1OBRZriMxyiYds7UwNaSpiYIHwSzo7dT1/g002TCBHxqOEym7kvvtkzyxT5u PpLoSafp62Ot4Sq1iGaAFDauP4M1RWKEbiNunlFOeUZcmCF2ceB2yIQZDtHStnM9PyDk 0/0wjO0ArkmyqD3F1Jsa6GQ3c+vaIethTIlXgbfFKVliDQLZF6NOXb7/Pk1YTEct8EUH NOHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YIDFunJvTP/droGzlbqYsetOXj0jnj8R/u1TJotTzKg=; b=t+715S2U0ECJ8tYm6Rn9wAQewYTiqQIUcK16Xti1IEepWDwzIqzYl8K1y/tO/koh6D ee3eBD9j7LQWbUOX+5ejR2YkG8S5l1u6KsI49oBPxNZ5k8f4pYbYvTxTNpsoklDKoEPa Zeh8dYnwKUelB29jvXU2Wt6gKD1y/1jkEK9iWh5kf6CkzJrAks0OYIJIOiIFyhQGiK+a p3OQmBIkPB5XWt0UCaFR/EwIDIA3Vpna2L1sK1/40L0gAJfyTkpVAZfVYsz3Pxdjushi B/R+MlHhmEHWR2keMPaTKtR7yIaVk21k4JzquTP+8zs4lCrcT10GVH+IWw/hIS3G0UnJ AvAw== X-Gm-Message-State: AA+aEWbiC6GgmzYO+PY5inoVPycL8dzHnVBEdw4nZTlADIsgIToOitTj IC9T4fSNrVfA4zMpf0H8h2JvPw== X-Received: by 2002:a63:554b:: with SMTP id f11mr14767561pgm.37.1543867128518; Mon, 03 Dec 2018 11:58:48 -0800 (PST) Received: from google.com ([2620:15c:202:1:c562:226a:6d78:2ae4]) by smtp.gmail.com with ESMTPSA id x27sm21422365pfe.178.2018.12.03.11.58.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Dec 2018 11:58:47 -0800 (PST) Date: Mon, 3 Dec 2018 11:58:45 -0800 From: Benson Leung To: Pavel Machek Cc: Enric Balletbo i Serra , linux-pm@vger.kernel.org, sre@kernel.org, Sameer Nanda , 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" , Len Brown , bleung@google.com Subject: Re: [PATCH v2 1/2] power: supply: add input voltage limit property. Message-ID: <20181203195845.GA120704@google.com> References: <20181122101119.29194-1-enric.balletbo@collabora.com> <20181123232203.GA3852@amd> <20181201150934.GA7052@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline In-Reply-To: <20181201150934.GA7052@amd> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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= =2E It can > > be a hardware bug or a hardware/user constrain, let me try to explain b= etter > > with an example. > >=20 > > On Pixel C's devices, userspace uses this to set a USB input limit of 5= V 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. >=20 > 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 targe= ts 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 su= pport 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 sin= ce 2015 in case someone running an up to date kernel wanted to limit the charg= ing power for thermal or other reasons. Thanks, Benson --=20 Benson Leung Staff Software Engineer Chrome OS Kernel Google Inc. bleung@google.com Chromium OS Project bleung@chromium.org --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE6gYDF28Li+nEiKLaHwn1ewov5lgFAlwFivIACgkQHwn1ewov 5lg8+hAAkU3bSc1yCGH1bSwmoNTjpDQHMs/45GRZKQsgfDOKkraVTOm2BM5WriGQ r5fB85winldp6rdghBT9Epa+zVNYEANaQwcesgoWhgbaqBhpRdyXFLyWLVsGCg/8 2mqfJri7T/uRGLzwFlLVwJwJk/5OrzaNPVPDBTHdfpVirSeYdU34QdiNeDP/TQ8n TtWE//JApbXb9vB+F+QKlrrU6ImIm0jrukAM6eR+chi8rXPAt2TW1cmlb9JcJxDg 1h9U1uRevKat7zXZ64+LPayQ7R9v64oUMIeKSHapgCXrOqCL0PDlcI4wbVhdK1Cn h39OEGmhoaub/csJLkUSrn/wjKoLg39edefcZ+sQ5BPosWDrAmvCHh0fZoqKsjfv Zi3dHFw4qgp/O3vpkvJMcRgpN621FWnNCG7/pRBgr3W+L6HlTXW1s+WADzSkgbzW 4A40LDTWB/4trGv/CKSZgTX93AZhmj7GNdVZyr/XUfKIZWcaNQhMHAPTYttLtFbp X9jN0YGZvIQ+JaZQyGqEYDxm3rOiidRf40LPrMpoza93npG6FIeGDvAa42XfllHk AWnmJDxusgJb+oZmKIQMAe9k2jHxafSqzCFjnH57T/6vD1Tn5YYmqJy+b4gAbI83 9IexSFTWAyAbwYg+/pRzcaUnzKCYirLxJSe+585uWEcoilITZ0c= =Rk1S -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn--