From patchwork Wed Oct 6 22:40:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 515420 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp800212ime; Wed, 6 Oct 2021 15:42:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypnfK4ul3X39dVtrcsbJ0p90/51Mq8z8eG96RQMDEjRJtgbMB2HrFti43OQGcEUjXiFZ2Z X-Received: by 2002:a63:2bc3:: with SMTP id r186mr498066pgr.385.1633560135450; Wed, 06 Oct 2021 15:42:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633560135; cv=none; d=google.com; s=arc-20160816; b=KLYWSCRyakClYSlTUzBtN2fWY2Hy8plR2u6BULFG5URXPCGTYjA8lEWidxYwRUEIq6 u5zV3nayrAqS+tNe3U/DOyT+ECKrPgh1i2YLNESSGkCXUK+uUO7yeR8GzBZhBedAKoOP MqSvmpdYoL/4m8TXze3pBMDVa54BdAjUnRsoELJkRKOewCQ/Uae8iBCV/4k/vR0jaKgs Ud3ylwfcYwQJiauRWKk2UsizCxhb1d0eHVV+dSq14xVG2yQ5YWXffoye4zzJ6m/q959t rYV5JVqle2Oy3F4JGqpy2ei143OjsTLE0RiO0IKdfYdOfGBuieNoZbw0lqbzgLni4nRk rxBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=62PC80q5pJoCzR+LNs8TxRHYFiyjGthoCs9x+r0DkUA=; b=ictUyIY/UCg2qvUMIL7lf6xSvR1ypEE0eLPjs2ULaKDb1W73JzgaMW87cQaTqo53T3 oSX1BPhceGvo5vcQiKEQTRw72Gfrk8JqD4MbZ5GCxWCnSEBCsuWFA6UZpBLx3NKLPN9o Yw/UPKGmaoKKi8SvY+6CA9BKLarOV6zwa2QFW30QROgh9LxaeUmdS9axYR7reFRWLLO9 ME7LoqGYRVHi1ow7kpI7QCpr7aZp6QssbwC9OdqbZU5bpZfgdHUhx/Sm5uZSUsSX02X2 xCZAkrmv5CfmYZ5ZsIaqmySPx1GANUKwkMnOk4cfUdOfqkVIEeQlUy8hNWRPbUD/shuL q3sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GgrkRnbW; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q14si7147497pjd.167.2021.10.06.15.42.13; Wed, 06 Oct 2021 15:42:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GgrkRnbW; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229926AbhJFWoF (ORCPT + 7 others); Wed, 6 Oct 2021 18:44:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbhJFWoF (ORCPT ); Wed, 6 Oct 2021 18:44:05 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57324C061753 for ; Wed, 6 Oct 2021 15:42:12 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id x27so16570331lfa.9 for ; Wed, 06 Oct 2021 15:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=62PC80q5pJoCzR+LNs8TxRHYFiyjGthoCs9x+r0DkUA=; b=GgrkRnbW8Q5ZotcasaI9VCTfqYGnoXiHII/t76naehUQnvTVEzS4BFBB0fOb04ra3O c7aC71vJ/REHenYaUdYb5nJMFrxd/fjo29AUmhnbJ6kxqN+TApldt4lsfI3aChTldnSm a26tllNkoy2h29reQDur06M9eCBer9VBoLvPVsWkUlXqdYKExpPwU2PMqzCkrqzqQeRI Hrvnctbx0fugjTla3BTPuFoWdqJwYYZhg0cwmAro4sDtlbCbb/7Tkb6til1MdOam6POK nryLonkWn5tTr15QFDxSJo6RcSdP/mfxHsRrp//L8moGmzhsLyP0rQFT8Ah5f6eZWhlW ZGig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=62PC80q5pJoCzR+LNs8TxRHYFiyjGthoCs9x+r0DkUA=; b=ZMDR1LPw4bpdZBbqPAtP2jVuVDEB03OL89KzPSHPsxjmEBoUORCLK77RTQsBaRcc3T WIzCoPc85kxNI7l8tt8JAe3pQXd6DfvY1cccd9N++k4Iv8redSlH5Uw1JpwpMgFuMq0y q7nZQzDLnEn1bLDIKoy1FSc3qlZDyInRtoFNchTd9zYtO4s8EJv+evnNUzMeCoaIgP0c 1mngD0kmuPWOSScdlRlpkDhCR+EDN5gAXJ2VQS3qKpQ2df2Agg2ub1ejKz9JgOPgbGOQ B7DpP1i9994T5ocMrGVot1ByptEYHPvrP15/d6K0ZL2peYy6nPxUSVGGq06xZYWvCa4S f4NQ== X-Gm-Message-State: AOAM532C+DoVzXl5cM9GCGat7RZJjc4g/wdli2ZARX2I1bN2L8dSqaje 8ZQ28CEq0fVkq295kQ0NUFv1KQ== X-Received: by 2002:a2e:b888:: with SMTP id r8mr709717ljp.147.1633560130582; Wed, 06 Oct 2021 15:42:10 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id g7sm2368103lfc.123.2021.10.06.15.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 15:42:10 -0700 (PDT) From: Linus Walleij To: Sebastian Reichel , Marcus Cooper Cc: linux-pm@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery Date: Thu, 7 Oct 2021 00:40:06 +0200 Message-Id: <20211006224008.394191-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Make monitored-battery the standard phandle to the battery we monitor for the AB8500 charger components. We make the old "battery" phandle deprecated, and the new one required so we detect and fix all users to use the standard phandle name. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- .../bindings/power/supply/stericsson,ab8500-btemp.yaml | 10 +++++++--- .../power/supply/stericsson,ab8500-chargalg.yaml | 10 +++++++--- .../power/supply/stericsson,ab8500-charger.yaml | 10 +++++++--- .../bindings/power/supply/stericsson,ab8500-fg.yaml | 10 +++++++--- 4 files changed, 28 insertions(+), 12 deletions(-) -- 2.31.1 diff --git a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-btemp.yaml b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-btemp.yaml index 2f57aa5a5f4e..4b8a00cec39c 100644 --- a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-btemp.yaml +++ b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-btemp.yaml @@ -17,10 +17,14 @@ properties: compatible: const: stericsson,ab8500-btemp - battery: + monitored-battery: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to battery node + battery: + $ref: /schemas/types.yaml#/definitions/phandle + deprecated: true + interrupts: maxItems: 5 @@ -42,7 +46,7 @@ properties: required: - compatible - - battery + - monitored-battery - interrupts - interrupt-names - io-channels @@ -56,7 +60,7 @@ examples: pmic { battery-temperature { compatible = "stericsson,ab8500-btemp"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; interrupts = <20 IRQ_TYPE_LEVEL_HIGH>, <80 IRQ_TYPE_LEVEL_HIGH>, <83 IRQ_TYPE_LEVEL_HIGH>, diff --git a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-chargalg.yaml b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-chargalg.yaml index 0897231c2f6e..6799224f7fb4 100644 --- a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-chargalg.yaml +++ b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-chargalg.yaml @@ -17,13 +17,17 @@ properties: compatible: const: stericsson,ab8500-chargalg - battery: + monitored-battery: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to battery node + battery: + $ref: /schemas/types.yaml#/definitions/phandle + deprecated: true + required: - compatible - - battery + - monitored-battery additionalProperties: false @@ -32,6 +36,6 @@ examples: pmic { charging-algorithm { compatible = "stericsson,ab8500-chargalg"; - battery = <&ab8500_battery>; + monitored-battery = <&ab8500_battery>; }; }; diff --git a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml index e13305afea69..9518eb7289d0 100644 --- a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml +++ b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml @@ -17,10 +17,14 @@ properties: compatible: const: stericsson,ab8500-charger - battery: + monitored-battery: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to battery node + battery: + $ref: /schemas/types.yaml#/definitions/phandle + deprecated: true + vddadc-supply: description: Supply for USB and Main charger @@ -66,7 +70,7 @@ properties: required: - compatible - - battery + - monitored-battery - vddadc-supply - interrupts - interrupt-names @@ -81,7 +85,7 @@ examples: pmic { charger { compatible = "stericsson,ab8500-charger"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; vddadc-supply = <&ab8500_ldo_tvout_reg>; interrupts = <10 IRQ_TYPE_LEVEL_HIGH>, <11 IRQ_TYPE_LEVEL_HIGH>, diff --git a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-fg.yaml b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-fg.yaml index db342e5ac0d1..54ac42a9d354 100644 --- a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-fg.yaml +++ b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-fg.yaml @@ -17,10 +17,14 @@ properties: compatible: const: stericsson,ab8500-fg - battery: + monitored-battery: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to battery node + battery: + $ref: /schemas/types.yaml#/definitions/phandle + deprecated: true + interrupts: maxItems: 5 @@ -41,7 +45,7 @@ properties: required: - compatible - - battery + - monitored-battery - interrupts - interrupt-names - io-channels @@ -55,7 +59,7 @@ examples: pmic { fuel-gauge { compatible = "stericsson,ab8500-fg"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, <8 IRQ_TYPE_LEVEL_HIGH>, <28 IRQ_TYPE_LEVEL_HIGH>, From patchwork Wed Oct 6 22:40:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 515421 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp800417ime; Wed, 6 Oct 2021 15:42:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvssIWAnIesHOlNbcgofi+m80TdOiI9EZ9KRIsM8CMcAS4T7PCEIPeoNZQGfws5eSVB3eY X-Received: by 2002:a63:e945:: with SMTP id q5mr518883pgj.342.1633560163694; Wed, 06 Oct 2021 15:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633560163; cv=none; d=google.com; s=arc-20160816; b=vhpAarAoVn57cTD3q7Soimqj4vGUZvXso737VY/QTsL/mxC+sQIqUrmWvu9TNIrZTn 2mtCJIbHOYPE3z8M4HRySFrNWK4Tcxx3OMUvTVUNZwGdvLeSgii+1fvspT8evxftZ9KP fk3MHnJ+eUCIVg/gBiooWbsa7woujO/o99KQs0fhWA/zmSSxBcpNervnpD82dmHlzz27 TB9U7WZ13w0l+vR2KxJloT2Jt/bxstA6t42KZs5KlJjls0Q7QfspG+KsAe8c/yapNatX STDl3maISIMm7JhkgUV86T2CQPO00PZ6+Nie1XXEEtq5airhkk7PsookS6DRO49DS1g6 5atw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=w74AS8bsnQBpuPJtXKLsNk6KYmEVqK2eVVFusa1JBP4=; b=NeWHDOpgtzcEdAss0iYhcalsn31KDWlzBYpW+QV2ZiHmKVUfXRl1bUkZa8YvEuEJ0b Vg3ThoAyyOMOq5Oxun4X5JTkOZfOPib1E5Hd+1XpBFNlbsO6fqFe46g2LGE9wo5ZhQSp VDyQTjSWX7MWUDSAAPRbrLl4xDZdjRUEOER1rDvG0cRTUkYNyJAyFa01OaTsbiH9wzy7 OqgUr7jRrzLTZbdF8UHYKyKlzhY9NAUyGFePeNX/2+F+4XK/kZluLnuPwpkM7ifVuwyn ZjdR5W5cgyQLHzE/kuLsvGP1VrHJM3lEV1SL4VcsMYH27yrdZ9aBa/0rVKU3ZxYeI8Vh KNyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UB0sVHc9; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e8si29166826pgg.625.2021.10.06.15.42.43; Wed, 06 Oct 2021 15:42:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UB0sVHc9; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230236AbhJFWof (ORCPT + 7 others); Wed, 6 Oct 2021 18:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233378AbhJFWoe (ORCPT ); Wed, 6 Oct 2021 18:44:34 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C6CBC061746 for ; Wed, 6 Oct 2021 15:42:41 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id y26so16794948lfa.11 for ; Wed, 06 Oct 2021 15:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w74AS8bsnQBpuPJtXKLsNk6KYmEVqK2eVVFusa1JBP4=; b=UB0sVHc98SgQxmoowCS/iRCeO8WO6MRXYF1U0P68CbWbbz7CUnWacOqRdRwoq29V8A y9ZsPGGwzPBsIuvd+/JKiKyzpcKOchR8U3dvs02vI05oPYc7Fud9rBmwv3hJpRejUNfH BaPhOGo51VdmJxrrLJXQSGOkfwdSZKX5cXh5FSwdjlUOtThTAKUIpU3bWQkORxmcqCvv Y5DNCaTsj/tb44R1UUSfFr+mQKgWu/FzttgFGie295lv5vfa8NyCEX65njIkEt/kLh2w BumcIKzLqLdtl2sGE2HeopE4Lx495rHKoHYnJw0sDD8NkEU+kuzjThcYNpTxO1LKAbBJ At0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w74AS8bsnQBpuPJtXKLsNk6KYmEVqK2eVVFusa1JBP4=; b=45fekhDLTFJ8o83h3NR8G2t8l1SVgAhMlIxY2AnppiDMKKoSqZ5NDy5AobSS7zoVtL 0BU0yXWxJZg3fT9eXzyIEMYqt7e4f1jIakwnFxcVuH12TKIy1gk9d5twWraIGy1Aubkd TrmWDJa3Smv2YqlASSVhqTSaAlDmpfd5Z1jZr4cEgR4r+dbF+C5L7TgrF4uq78os2Ez9 DSBcDK9d4gSeNSZh4X8gG1Vow3Eoh08sjVYWNsAQ/xKmeyFXA0JFiUkHNkTCyWhqhzCd agCzKjkupgkq5nclUcmBNIztB4GCd2YxydE4fTWzRVqQzQenuZ780PVzwLAyPjt5v9Hs 1A6Q== X-Gm-Message-State: AOAM532nvXNJC6TtvfQf2UwNMypqcCGaxpe4ULLkA4X+laCEccuvA0Nv BdVwhxP2P4vqFwX7uZBS8tzXqmBPbFWQ4g== X-Received: by 2002:a05:6512:3ed:: with SMTP id n13mr670775lfq.282.1633560159592; Wed, 06 Oct 2021 15:42:39 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id g7sm2368103lfc.123.2021.10.06.15.42.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 15:42:39 -0700 (PDT) From: Linus Walleij To: Sebastian Reichel , Marcus Cooper Cc: linux-pm@vger.kernel.org, Linus Walleij Subject: [PATCH 2/3] power: supply: ab8500_bmdata: Use standard phandle Date: Thu, 7 Oct 2021 00:40:07 +0200 Message-Id: <20211006224008.394191-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211006224008.394191-1-linus.walleij@linaro.org> References: <20211006224008.394191-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Look up the battery using the "monitored-battery" phandle as is nowadays a standard DT binding. The actual bindings for these charger elements are not upstream so let's sort out this mess by conforming to the standard. Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebase on v5.13-rc1 --- drivers/power/supply/ab8500_bmdata.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.31.1 diff --git a/drivers/power/supply/ab8500_bmdata.c b/drivers/power/supply/ab8500_bmdata.c index 6f5fb794042c..bfc1245d7912 100644 --- a/drivers/power/supply/ab8500_bmdata.c +++ b/drivers/power/supply/ab8500_bmdata.c @@ -497,8 +497,7 @@ int ab8500_bm_of_probe(struct device *dev, const char *btech; int i; - /* get phandle to 'battery-info' node */ - battery_node = of_parse_phandle(np, "battery", 0); + battery_node = of_parse_phandle(np, "monitored-battery", 0); if (!battery_node) { dev_err(dev, "battery node or reference missing\n"); return -EINVAL; From patchwork Wed Oct 6 22:40:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 515422 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp800430ime; Wed, 6 Oct 2021 15:42:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLgT0gRxz1J5gamQD0uHNJqHHuOgEEY/0uS7t7h2BjBCz//vUqKCfR8lB1f9GcFtnqNGM6 X-Received: by 2002:a17:90a:8c82:: with SMTP id b2mr1450524pjo.173.1633560165202; Wed, 06 Oct 2021 15:42:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633560165; cv=none; d=google.com; s=arc-20160816; b=CHHFww+HXGUmBfvcZXCK/V6rouRIRsa0tf8FdmAFeB9rCQMG8BJO3ROM3kXSDTdHFH DPSieE0sLvk99Yo8PCx0CoV2zCatTj/29LU5sAwSmEJdMoQCs2dgpMrvb5riHUxYSuY8 IajNI6dNRkmPb52u3vCvSVxGtewZ0Ido+x9asWmqTEhNSb3mGKJ4X4TnHo/2DmSZjBYT CntGK+mgYwRnc2cogLQJ/ZCVtVeOuXQW9DcdBWxXOtvrj6cm5rQpBeHCP5jEc1gUJOMt gvE5XhFlkpDbVJVMQ/M9OSe0Pyb4yoH39o4YHWnnA9XLGw+f7wENC2NvEZcOngtqZqCZ awXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/1xXQ7biViM7VYMIiajvvcNfznDeF3gC+OJ0VfX5MSM=; b=aWP8ePpIslA26Bfw+trVi3j3JJ/tbDr18HtcKtMC5OoaUXgJJ/HPrTLrg7kY1vbfXa +QmBtdGsLMXevj22BUnpHCe1YAeuEKZqiSS2W7Dw58oYbZaDUJnNBVKxuTjCTSSr+toK QIEWfbUynY1FEL59kD+owEQ8e3ODZvwVx5bPKZeDUXnqvhMn8po7rXrYyqxOUOOm3FfR O9pJevgpQ729NKnKWhi4d5v6uzGuMqPyS4Hhp4gL8U6h/L9F8z9/MQPvIabegwyiJV1a yjxwQ5mCJwOkNKhNFa8t9turHw+S3SsqBYuIxmsJNUigdpV8doqzQ/f0x08+T/gKD1rs lCfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L0KNNkiU; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e8si29166826pgg.625.2021.10.06.15.42.44; Wed, 06 Oct 2021 15:42:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L0KNNkiU; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233378AbhJFWog (ORCPT + 7 others); Wed, 6 Oct 2021 18:44:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233236AbhJFWof (ORCPT ); Wed, 6 Oct 2021 18:44:35 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05447C061746 for ; Wed, 6 Oct 2021 15:42:43 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id x27so16654090lfu.5 for ; Wed, 06 Oct 2021 15:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/1xXQ7biViM7VYMIiajvvcNfznDeF3gC+OJ0VfX5MSM=; b=L0KNNkiUBUvyAp5aAgreYsp+YwxPIBMkfw8RztG0AJP+dzLBdZZHZCydm+TyNyXjOF 6AFzQD05l6bd8ygWclpwkjg401Y2XbS1Hiea1QLoRR5beIMBVaurnAPllJlowvpLuNSW c2S2+JzGRVSlGgYDBdd0NsE2oLzbNROKgcJwWjAWV5klMLr9AqkIOox33/Mj81fMiNlZ 30jJcKwMtNNJQ6zn3wYbLnnS1AtmPZFB7jCFiKEb7azT+qL9BfpxjpktGqha0kCRRPHQ i2eZFmr4CVIa7Je01D8rZTYlPL5U+36p68L5MBpKP3bSzZkgMCLrCSQGZApByUcPX+0p 8/IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/1xXQ7biViM7VYMIiajvvcNfznDeF3gC+OJ0VfX5MSM=; b=RLpTYEMsX5O9FiBmwDZ1RNLto5ObjWNM0q/kqLdQzYQ29Re68ZJJ8/BZtvsDOLv+81 7yrGFksEWCcIV2cnCw0m5Cxnyej8fnrvHQRixuCYS09E6Wp6c5q419/Wzsx7/5DKxPxf ptP41J9yT4C4t31iVPyfGHNPj8M8ZM7rqtfcCN78hTYvvzxZvDOXI68bL2VjhkO8ZeDj drO/veCuWHNJh8lB232/HeAHnczOv9NEIUHsvoJ6oarFJ7lCuRgvZ9TvcBC/jisU9cEz k8vinW5NbpoPnjY4WZEyHV1IRJzGKhxJjm/9cTaruzUrC4yT/BW77CmXYQOEuFG6axI3 XpPg== X-Gm-Message-State: AOAM530lQVWCTUbpNiC1oPan72T+1av+iqJPkszJanaFFQ/gAdz/Of0w 9N0DUEF1dyA/eTgOYjsXUdMIcA== X-Received: by 2002:a2e:80d9:: with SMTP id r25mr839218ljg.104.1633560160876; Wed, 06 Oct 2021 15:42:40 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id g7sm2368103lfc.123.2021.10.06.15.42.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 15:42:40 -0700 (PDT) From: Linus Walleij To: Sebastian Reichel , Marcus Cooper Cc: linux-pm@vger.kernel.org, Linus Walleij Subject: [PATCH 3/3] ARM: dts: ux500: Switch battery nodes to standard Date: Thu, 7 Oct 2021 00:40:08 +0200 Message-Id: <20211006224008.394191-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211006224008.394191-1-linus.walleij@linaro.org> References: <20211006224008.394191-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This force-converts the per-device battery node into the standard properties using "simple-battery" for the HREF machines and the corresponding Samsung battery for the mobile phones. This is fine to do since the battery data in the DTS files has never been deployed or used. In commit a1149ae97554 "ARM: ux500: Disable Power Supply and Battery Management by default" it was turned off and has not been switched back on since. In the meantime standardized bindings for batteries have appeared making the old AB8500 battery bindings obsolete. The battery node which is now in the middle of an included file is obviously a per-device piece of information so push this down to each board. The HREF machines all have the same battery and can share a single node in the HREF dtsi file. Signed-off-by: Linus Walleij --- Sebastian: I will merge this patch to the Ux500 tree when/if you merge the two other patches, so all is fixed up in linux-next and in the merge window. --- arch/arm/boot/dts/ste-ab8500.dtsi | 13 ++++--------- arch/arm/boot/dts/ste-ab8505.dtsi | 13 ++++--------- arch/arm/boot/dts/ste-href.dtsi | 6 ++++++ arch/arm/boot/dts/ste-snowball.dts | 6 ++++++ arch/arm/boot/dts/ste-ux500-samsung-codina.dts | 4 ++++ arch/arm/boot/dts/ste-ux500-samsung-gavini.dts | 4 ++++ arch/arm/boot/dts/ste-ux500-samsung-golden.dts | 4 ++++ arch/arm/boot/dts/ste-ux500-samsung-janice.dts | 4 ++++ arch/arm/boot/dts/ste-ux500-samsung-kyle.dts | 4 ++++ arch/arm/boot/dts/ste-ux500-samsung-skomer.dts | 4 ++++ 10 files changed, 44 insertions(+), 18 deletions(-) -- 2.31.1 diff --git a/arch/arm/boot/dts/ste-ab8500.dtsi b/arch/arm/boot/dts/ste-ab8500.dtsi index 9baf927f9b95..2cf19386a525 100644 --- a/arch/arm/boot/dts/ste-ab8500.dtsi +++ b/arch/arm/boot/dts/ste-ab8500.dtsi @@ -129,11 +129,6 @@ ab8500_temp { io-channel-names = "aux1", "aux2"; }; - ab8500_battery: ab8500_battery { - stericsson,battery-type = "LIPO"; - thermistor-on-batctrl; - }; - ab8500_fg { compatible = "stericsson,ab8500-fg"; interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, @@ -146,7 +141,7 @@ ab8500_fg { "LOW_BAT_F", "CC_INT_CALIB", "CCEOC"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; io-channels = <&gpadc 0x08>; io-channel-names = "main_bat_v"; }; @@ -163,7 +158,7 @@ ab8500_btemp { "BTEMP_HIGH", "BTEMP_LOW_MEDIUM", "BTEMP_MEDIUM_HIGH"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; io-channels = <&gpadc 0x02>, <&gpadc 0x01>; io-channel-names = "btemp_ball", @@ -200,7 +195,7 @@ ab8500_charger { "VBUS_OVV", "CH_WD_EXP", "VBUS_CH_DROP_END"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; vddadc-supply = <&ab8500_ldo_tvout_reg>; io-channels = <&gpadc 0x03>, <&gpadc 0x0a>, @@ -214,7 +209,7 @@ ab8500_charger { ab8500_chargalg { compatible = "stericsson,ab8500-chargalg"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; }; ab8500_usb: ab8500_usb { diff --git a/arch/arm/boot/dts/ste-ab8505.dtsi b/arch/arm/boot/dts/ste-ab8505.dtsi index 8d018701a680..e98335e9d1cb 100644 --- a/arch/arm/boot/dts/ste-ab8505.dtsi +++ b/arch/arm/boot/dts/ste-ab8505.dtsi @@ -92,11 +92,6 @@ usb_id: channel@e { }; }; - ab8500_battery: ab8500_battery { - stericsson,battery-type = "LIPO"; - thermistor-on-batctrl; - }; - ab8500_fg { status = "disabled"; compatible = "stericsson,ab8500-fg"; @@ -110,7 +105,7 @@ ab8500_fg { "LOW_BAT_F", "CC_INT_CALIB", "CCEOC"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; io-channels = <&gpadc 0x08>; io-channel-names = "main_bat_v"; }; @@ -128,7 +123,7 @@ ab8500_btemp { "BTEMP_HIGH", "BTEMP_LOW_MEDIUM", "BTEMP_MEDIUM_HIGH"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; io-channels = <&gpadc 0x02>, <&gpadc 0x01>; io-channel-names = "btemp_ball", @@ -166,7 +161,7 @@ ab8500_charger { "VBUS_OVV", "CH_WD_EXP", "VBUS_CH_DROP_END"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; vddadc-supply = <&ab8500_ldo_adc_reg>; io-channels = <&gpadc 0x09>, <&gpadc 0x0b>; @@ -177,7 +172,7 @@ ab8500_charger { ab8500_chargalg { status = "disabled"; compatible = "stericsson,ab8500-chargalg"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; }; ab8500_usb: ab8500_usb { diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi index 961f2c7274ce..718752a0248e 100644 --- a/arch/arm/boot/dts/ste-href.dtsi +++ b/arch/arm/boot/dts/ste-href.dtsi @@ -13,6 +13,12 @@ memory { reg = <0x00000000 0x20000000>; }; + battery: battery { + compatible = "simple-battery"; + battery-type = "lithium-ion-polymer"; + thermistor-on-batctrl; + }; + soc { uart@80120000 { pinctrl-names = "default", "sleep"; diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts index 934fc788fe1d..fb719c8a8eb2 100644 --- a/arch/arm/boot/dts/ste-snowball.dts +++ b/arch/arm/boot/dts/ste-snowball.dts @@ -17,6 +17,12 @@ memory { reg = <0x00000000 0x20000000>; }; + battery: battery { + compatible = "simple-battery"; + battery-type = "lithium-ion-polymer"; + thermistor-on-batctrl; + }; + en_3v3_reg: en_3v3 { compatible = "regulator-fixed"; regulator-name = "en-3v3-fixed-supply"; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-codina.dts b/arch/arm/boot/dts/ste-ux500-samsung-codina.dts index 952606e607ed..fbd60065542d 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-codina.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-codina.dts @@ -43,6 +43,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb425161lu"; + }; + /* TI TXS0206 level translator for 2.9 V */ sd_level_translator: regulator-gpio { compatible = "regulator-fixed"; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts b/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts index fabc390ccb0c..47bbf5ab267f 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts @@ -20,6 +20,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb585157lu"; + }; + /* TI TXS0206 level translator for 2.9 V */ sd_level_translator: regulator-gpio { compatible = "regulator-fixed"; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-golden.dts b/arch/arm/boot/dts/ste-ux500-samsung-golden.dts index ee6379ab688c..fc4c5166d85b 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-golden.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-golden.dts @@ -25,6 +25,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb-l1m7flu"; + }; + i2c-gpio-0 { compatible = "i2c-gpio"; sda-gpios = <&gpio2 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-janice.dts b/arch/arm/boot/dts/ste-ux500-samsung-janice.dts index f14cf316a70a..2c914c58f8ba 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-janice.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-janice.dts @@ -20,6 +20,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb535151vu"; + }; + /* External LDO for eMMC LDO VMEM_3V3 controlled by GPIO6 */ ldo_3v3_reg: regulator-gpio-ldo-3v3 { compatible = "regulator-fixed"; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts b/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts index 3b825666d302..9ec3f85b1a18 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts @@ -24,6 +24,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb425161la"; + }; + /* TI TXS0206 level translator for 2.9 V */ sd_level_translator: regulator-gpio { compatible = "regulator-fixed"; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts b/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts index 264f3e9b5fce..37020127f6e7 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts @@ -20,6 +20,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb485159lu"; + }; + /* TI TXS0206 level translator for 2.9 V */ sd_level_translator: regulator-gpio { compatible = "regulator-fixed";