Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1216121lqj; Mon, 3 Jun 2024 14:01:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUdxcQ+js5/X5+ub5L6YTnPBrOqPJfFW2eRBuEc9gn6Q01q7YvL6yizBiiiXGDT9zMwjK6vyPc6d5FjUwljpo6ediD6fNs/FD6WwBcClw== X-Google-Smtp-Source: AGHT+IHAnswGSaPE7K9xO49fFSQAU+Iqs+ewBq19PsXwuOLGHdmMmuGC9x1GG1zDPWc10Zj2QloH X-Received: by 2002:a05:622a:1ba2:b0:43a:f218:a63f with SMTP id d75a77b69052e-43ff54a5b00mr117406511cf.66.1717448466400; Mon, 03 Jun 2024 14:01:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717448466; cv=pass; d=google.com; s=arc-20160816; b=kNqXJMuVBcGZ7RZbgv2TfqTm4MJU+j12Dt2iYUiYWyMdg9+xoxWlRQ5MBte7DS9Lck 2iBbJCb408NlskcLPEjX6xhGfkCblehqhfOwuXwMqgWuVY/GZpUZyXhAU2G9UU34fcRH Hb9/QFYtv+3E1q7Zc6ijRXk5doaiHPsXugHihOj6lOFHAnTc7SnKWYH/sTS2Pl+q7/Z5 byuqkYECB4j4INsCz2uOkflL2DqZctdECrEOUf+mYG77XRGY83Q9i522jVguPvvgCaaG ZkO3o5IOEdROLFfPC5v9yT4znE0vIplv31K+wkm7xw1BFunGR4rIrtzlNgLx38hkxapi mzlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eYNOelfTheiFCDWyH3IJHV/XK7gA6acTvF5EQT6uM9A=; fh=YhVFWa61906/YbE9NeMW4MNekQAT9+FiibKXBh6sHzA=; b=pQA3I1InrWNBJmgVolv7GLpwVuVRK1ZKnVwykiprDAOmMCiTUnw3lfCQwn6UuWXBBS FeFxmKSjEHou4d5dHN9FOTyXXt0NYSw39mIwiE5iTzf6ERC1AcAd81JBV2fxvdpwEyfh l6c+8AWPYqxlOfi/lBS3UrWe7ph2/qqkkz5KvIdgm/oLCIkg7Tx7EWjoKrc1gJIrL5ys 7L2VeAnx7636CzdD7DmMbQsL45hqvEpim7rlNavwZOcwU0Pn1NZcaj/hH+1efEEILQjl PCR6+weekSg4IM0wWpwRKrvLyoqZw+h1qjiJ/XE4pbpAt7KuaY4HaWu9ojGABxMkZDNp VL8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=gUcgaZjp; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-199710-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43ff2467f6bsi96236951cf.256.2024.06.03.14.01.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 14:01:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199710-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=gUcgaZjp; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-199710-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 246B41C221AE for ; Mon, 3 Jun 2024 21:01:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6285F13C9C8; Mon, 3 Jun 2024 20:59:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="gUcgaZjp" Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0746F13C90B; Mon, 3 Jun 2024 20:59:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717448396; cv=none; b=fA99S83JfJsssXX2iHgpCyb8XHm+1jEDOIqjRu95N9sEMeEe98684g+i707o8ry+WG7MzPNVzNKYLkO76j5+fOI8LKlzS642Lv6PTxpnrIJq/OPVHxoaEiXtFceauq9JPn9kfu+vo8cMhV/P3QbDUZfcEasr9TV34jAoHcAU3hc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717448396; c=relaxed/simple; bh=n83K36thiF+lJBy27bSJupNp7twUTuCmlxqyf9CdgCA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Lab/jPM9+Tv6NU19J0uXAfK8/cxfHEL4RC2LDA4A3uTxvjcDk7H6t49G6eiQx04y30kfF/jWLHEIbXVhkssx1BWpiRFnoTDAHWpSgbQN049iArE7RmGZq+gn59aa6s2v188lEUd97CqXK83vHtVnyyCUFRvfFJJlAz8WL1JnGto= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=gUcgaZjp; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1717448393; bh=n83K36thiF+lJBy27bSJupNp7twUTuCmlxqyf9CdgCA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gUcgaZjpWGlbqmbB65yifUBjyhvcJt0LTk69PJK6iiq7JDLZlp3XKwjsvvWohWWrT zBnRS1nc8f8fgYp58ru9UzuJxE3uSh3mFj2XhhPLjCYW4aeEY4aHtmjCyVpzAfzCxa Yowh9W5kkjcJFD0CR26ADM9DGO4KusR8y0rNhllQ= Date: Mon, 3 Jun 2024 22:59:52 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Dustin Howett Cc: Benson Leung , Guenter Roeck , Sebastian Reichel , Lee Jones , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Mario Limonciello , Stephen Horvath , Rajas Paranjpe Subject: Re: [PATCH v2 0/3] ChromeOS Embedded Controller charge control driver Message-ID: <5baf3caf-dc09-4829-96db-2666fc902710@t-8ch.de> References: <20240528-cros_ec-charge-control-v2-0-81fb27e1cff4@weissschuh.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On 2024-06-02 18:40:18+0000, Dustin Howett wrote: > On Tue, May 28, 2024 at 3:05 PM Thomas Weißschuh wrote: > > > > Add a power supply driver that supports charge thresholds and behaviour > > configuration. > > > > This is a complete rework of > > "platform/chrome: cros_ec_framework_laptop: new driver" [0], which used > > Framework specific EC commands. > > > > The driver propsed in this series only uses upstream CrOS functionality. > > > > Tested on a Framework 13 AMD, Firmware 3.05. > > > > I've tested this out on the Framework Laptop 13, 11th gen intel core > and AMD Ryzen 7040 editions. Thanks! > The problem is that the AMD framework laptop *reports* support for the > CrOS charge controller, but it does not truly support it. > As with the 11th Gen Intel Core (and by proxy the 12th, 13th) it still > does require the OEM-specific command. This is surpising, it works on my machine, which is also a AMD 7040. > This is evinced by a mismatch between the firmware-configured value > and the value reported by the charge control subsystem through this > driver. > > $ cat /sys/class/power_supply/BAT1/charge_control_end_threshold > 100 > > $ ectool raw 0x3E03 b8 # OEM command 0x3E03 with BIT(3) in the payload > is Framework's charge limit query host command > Read 2 bytes > 50 00 |P. | > (in my case, 80 in decimal) > > The charge limit is managed at [1], and it does not appear to > integrate with the standard charge control machinery. > > I'll pursue getting this board not to report support for CrOS charge > control. This driver is still entirely fit for purpose, just not for > this board. Can you try disabling all of the Framework-specific charge control settings and test again? Probably the different, disparate logics in the Framework ECs are conflicting with each other. Thomas