Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp355883pxu; Thu, 3 Dec 2020 01:55:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7HzctMxtM8N85TD69FPPsBJGli3oEMrG5NNMdl2sPmfQJRBTwbOSeTSc4wSnDJx6bgmV/ X-Received: by 2002:a17:906:3294:: with SMTP id 20mr1789104ejw.239.1606989347585; Thu, 03 Dec 2020 01:55:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606989347; cv=none; d=google.com; s=arc-20160816; b=c1IL0J20osqirGqw+d6/A0qSlGSKzWwrT/c463O45z5rg9MSoFPlkqOhHdlKdSKAnU CVHbr5o0ynIhw8gthmLolpxPYJbWdWOpN2BBtGNr/k4SrykNvT4oF8NkswImQzaseaXc st5YSNPybmNG+OgAbUbm+iNhf8f9SIVxM0GPiR/OBb09VcC72EevTMNNPijs5HYxQTKY Cxc/8ztGxNz4hUb311A4gXXMD/k9yU8MokJMukJKOzQfvafg5es/9psnencBfBMNM6Ou zGdlgR85GINOJ1xm8SpTwvC033o4V2KtH4vjYE1znreOzlT/bzzBK3mIE49uLIfpu5A3 /L9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VeEjwhJEEvGLfh7je+ZrF/nqq3on7Uhd6x9LUVEOGJQ=; b=oVzIToafjZsxN7jZv0660esWBztgQjXKYoPHwIzXRlN9OXE/97wmS+wbvDxWDUz+l5 BYeV8ixt640vLiZcKZv3TeSQI1t5Ig5SqPo9GOSvIeF81Fk6izzOrywFXQmgCWQQ3/wv zrIflkqw3IGMTW2FiXbCQoFHzbMyPCO1zeUWXq/6BS8eD3F7GmT1fZT5zUpe3Sq6wT0G zqpExCzpJE8Ah0Z+7+ZHI20pCBu4Cj5yPPqLypVXPwAzhy7kYCMxuiuV+CRR8BKQ1pat 6KVInKKssvMAr8zcBj4gVKVITfKPu16F/gY20SXTnkDRuBrXCZpYvcsrDR5kGHFJI+91 Ankg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si590420edt.484.2020.12.03.01.55.24; Thu, 03 Dec 2020 01:55:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730232AbgLCJv1 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 Dec 2020 04:51:27 -0500 Received: from mail-ej1-f65.google.com ([209.85.218.65]:39602 "EHLO mail-ej1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730201AbgLCJv0 (ORCPT ); Thu, 3 Dec 2020 04:51:26 -0500 Received: by mail-ej1-f65.google.com with SMTP id n26so2514465eju.6; Thu, 03 Dec 2020 01:51:09 -0800 (PST) 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:content-transfer-encoding :in-reply-to; bh=zIi/0Gk+POPxQXzfzK/flFDHb00Mu6VDDpn3MrPay+U=; b=aWNzq4+85ljJnLKH565CqtDhKRnEpSNx1tA+6Mg1X/tps9i4Eorp6bMy6YTpqRKXwV DvR5YgBqaRSUes24Hq3NxzF/0baDvFxtmFEPbLk13ZXxQvzTlgurzFDNgPKTQCJdA8Om 6U0PKM8LGbRkBC4z3cGwEzbgw9xuOvWETQpD6cFOXJiYGITdmTbEWkKRS9lzyANK6HUS NkY9Wlhg9f9YlwV4y3++CoU6p8ZdrV1+YGqseLlvL7Xii4W7HSU/mASOhX4ceTUE9JiY GB2nmMlyzrkGbiGwsWIBnpwkkANvo7RQdjzPd3GgyUNiQBB8GSY2naOsH51Bftyim1iI A7SA== X-Gm-Message-State: AOAM532KRSNw3780xZQcYJhX220xBeBQbzU8fWsmeeofjupxl4pqmAKb 2dposUiwQMg/nHE8CAxDCqU= X-Received: by 2002:a17:907:2131:: with SMTP id qo17mr1742622ejb.546.1606989043852; Thu, 03 Dec 2020 01:50:43 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id b14sm782174edx.0.2020.12.03.01.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 01:50:42 -0800 (PST) Date: Thu, 3 Dec 2020 11:50:41 +0200 From: Krzysztof Kozlowski To: Timon =?utf-8?B?QsOkdHo=?= Cc: Sebastian Reichel , Chanwoo Choi , MyungJoo Ham , Kukjin Kim , Rob Herring , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-samsung-soc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "~postmarketos/upstreaming@lists.sr.ht" <~postmarketos/upstreaming@lists.sr.ht> Subject: Re: [PATCH 3/3] ARM: dts: exynos: Fix charging regulator voltage and current for i9100 Message-ID: <20201203095041.GA14508@kozik-lap> References: <20201202203516.43053-1-timon.baetz@protonmail.com> <20201202203516.43053-3-timon.baetz@protonmail.com> <20201202220430.GB135888@kozik-lap> <20201203082301.GA3999@kozik-lap> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20201203082301.GA3999@kozik-lap> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 03, 2020 at 10:23:01AM +0200, Krzysztof Kozlowski wrote: > On Thu, Dec 03, 2020 at 05:46:03AM +0000, Timon Bätz wrote: > > On Wednesday, December 2, 2020 11:04 PM, Krzysztof Kozlowski wrote: > > > > > On Wed, Dec 02, 2020 at 09:07:28PM +0000, Timon Baetz wrote: > > > > > > > Set CHARGER current and CHARGER_CV voltage according to Galaxy S2 kernel > > > > fork. > > > > > > > > Signed-off-by: Timon Baetz timon.baetz@protonmail.com > > > > > > > > ------------------------------------------------------ > > > > > > > > arch/arm/boot/dts/exynos4210-i9100.dts | 8 ++++---- > > > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/arch/arm/boot/dts/exynos4210-i9100.dts b/arch/arm/boot/dts/exynos4210-i9100.dts > > > > index 9f8d927e0d21..2700d53ea01b 100644 > > > > --- a/arch/arm/boot/dts/exynos4210-i9100.dts > > > > +++ b/arch/arm/boot/dts/exynos4210-i9100.dts > > > > @@ -558,14 +558,14 @@ safe2_sreg: ESAFEOUT2 { > > > > > > > > charger_reg: CHARGER { > > > > regulator-name = "CHARGER"; > > > > > > > > > > > > - regulator-min-microamp = <60000>; > > > > > > > > > > > > - regulator-max-microamp = <2580000>; > > > > > > > > > > > > > > > > - regulator-min-microamp = <200000>; > > > > > > > > > > > > - regulator-max-microamp = <950000>; > > > > }; > > > > > > > > chargercv_reg: CHARGER_CV { > > > > regulator-name = "CHARGER_CV"; > > > > > > > > > > > > > > > > - regulator-min-microvolt = <3800000>; > > > > > > > > > > > > - regulator-max-microvolt = <4100000>; > > > > > > > > > > > > > > > > - regulator-min-microvolt = <4200000>; > > > > > > > > > > > > - regulator-max-microvolt = <4200000>; > > > > > > > > > > > > > > I am looking at my sources of Android 3.0 for GT-I9100 but I cannot find > > > charger voltages for it. Where did you find it? > > > > > > Best regards, > > > Krzysztof > > > > Thanks all the feedback Krzysztof, > > > > Voltage is set in the charger probe function of the downstream kernel fork: https://github.com/LineageOS/android_kernel_samsung_smdk4412/blob/lineage-17.0/drivers/power/max8997_charger_u1.c#L390-L391 > > You need to fix your email client to wrap lines. > > The fork cannot be used as a reference because of poor quality of > explanations for origins of the code. > > The commit which added 4.2 V is described as "samsung update 1" which > basically means nothing. If at least it was "drop sources of > GT-I9105"... but in this form it is useless. > > For the things we are not sure how they should be implemented, we > sometimes accept the reason "vendor sources do like this". However Lineage > or any other fork are not vendor sources. > > Therefore you need to provide a valid explanation for this voltage > change. I checked vendor sources for Samsung Galaxy S2 Epic 4G Touch (SPH-D710) and indeed it uses the max8997 charger U1 which sets v4.2 volts. You can use it to fix up the commit msg. Unfortunately it seems Samsung started to remove most of older kernel source code from their OS compliance page. S1, S2 and S3 are mostly gone. I was able to find just few remaining sources and I am now updating my vendor-dump with them. I'll upload them later to https://github.com/krzk/linux-vendor-backup . Best regards, Krzysztof