From patchwork Thu Aug 15 10:13:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Jakubek X-Patchwork-Id: 13764638 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34BECC3DA7F for ; Thu, 15 Aug 2024 10:15:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=o06GvniUcfmhMUL6PwyXbMvRJebr6Xj9XehasRnJgSU=; b=0otWu91NyL66z1NhVTWL+LpXz3 7Oz7H8Eh606fMWv/YLH1sVQ4YG5PlUG2ybtEBNrfNCMIxrbIFGqU5Sa4FmT62kHt+JVgusYuHaEOz IxcNuXIY8QqKJem37JJ+ptXexdL282smnPMP9SOaTRYQxaqNoffdoIFFeDDS+9sgdS/vE/bhCvZJ+ dw9gzT74DCZ0QJCPwPBiZTmq50ljlamtClQsSs+t/KNLtb9LNMxk3+UrjQyCLbV4tlAgTYQwTYQ0Q v/Fv7xPyCVW3nRsAOBxLu67qePmxeO/fkCZA5vKJQxy/bvR9D3RDsl+APdKtFNZROe7+jUFZJ6YHl r7Fg/07Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seXVP-00000009Ygs-2fvU; Thu, 15 Aug 2024 10:14:55 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seXUI-00000009YTo-2WYT for linux-arm-kernel@lists.infradead.org; Thu, 15 Aug 2024 10:13:47 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5a1337cfbb5so1194902a12.3 for ; Thu, 15 Aug 2024 03:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723716825; x=1724321625; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=o06GvniUcfmhMUL6PwyXbMvRJebr6Xj9XehasRnJgSU=; b=BEycmxpGmCCvYig1OXcBDJw9QBJl8bMdH8uvKbbTG5TVar5PRw27Y56YAsYvH1lYfA sYV0nUyU09nAhUhsOlM92YXhQMA2z3spux/ta+/xtebHScfmLlbtoMAYaDcTiKTCmEJZ R/ICgDQMqPHVwc64UZJ+vA0X7uU4ROpvWaMIGl0VbkCtEt6k6a3IEvI24pF3wbBJRzSN lcqpgz6sGSvnwNDrMpo1eDHtTb1FJs0xrkf+hEugh9MOKCm3dW+S9yFwIyOv7PBe+tX/ /YX8s706vvQPqbWJvIuwNCtfrV0lNy9cTrM2z2gx4EkX6uo35LcYGvb6tZCCOt2aBHbZ ZoQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723716825; x=1724321625; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=o06GvniUcfmhMUL6PwyXbMvRJebr6Xj9XehasRnJgSU=; b=BxkXubcZGrxkQdn8MqrDTQCjWICaqrksEm9+9mf6H5/QM9/aUBEI9Hp7/+UvjPHdlE Sv/3ZfVHKpsVRNu8gdmi8Kjbx4s7dpfKe43W7chXYlhs7sp7Ij6uNqmORH8599fs/JUK DD5m7Csm2IIUY93jJro5SqOcT9GnJQ2CWwjXpu63wbeV6virU5nu9nMiE+GOxUtY3VZO hdE5duKcQKQYKImLNrVKl6/oaYW9bd4uMFoRFwI1qrSXdwWHOHw5IHRSUCc/sNiYnSp8 7JW7KE7a/X3hDzDL28dJ/vzarIFceSD5nh3TC0k6rJdYxKV0orncMpq0lxkzGCsvjn/W on9Q== X-Forwarded-Encrypted: i=1; AJvYcCUKN1NxVW8LyKxvKCRbfRTrQwItpUVycY5JEzlZnIPtPdZwkegxeDBzF2+r2F569id/WUr+7VwP8GRx4MRlMipscYUuziG/+oTmUano7KWdAzuE2SQ= X-Gm-Message-State: AOJu0Yz0r4pOZK2XVHaCW4rNmz7+4rgseKd5Fe1N2TrSD+RZm/Ioc1Hg sAFYqzF7jsSEoTgQx9VzDHZcY9C+wTDw3Vq9Vo09DBYB4zYEein2 X-Google-Smtp-Source: AGHT+IExnRsk3ybYD81mC/sRU/KcANLw9XOwqYwQOZ49cA7sbJcoOHx8/qUzIYtLwlrxf45lZiUF6w== X-Received: by 2002:a05:6402:4416:b0:58e:4e62:429b with SMTP id 4fb4d7f45d1cf-5bea1cb315cmr4763525a12.33.1723716824492; Thu, 15 Aug 2024 03:13:44 -0700 (PDT) Received: from standask-GA-A55M-S2HP (lu-nat-113-247.ehs.sk. [188.123.113.247]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5bebbde48a9sm690760a12.25.2024.08.15.03.13.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 03:13:44 -0700 (PDT) Date: Thu, 15 Aug 2024 12:13:42 +0200 From: Stanislav Jakubek To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] arm64: dts: sprd: sc2731: move fuel-gauge monitored-battery to device DTS Message-ID: <5fc955715c956eac0edf922623c87ab382e4295c.1723716331.git.stano.jakubek@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240815_031346_670374_CA39E757 X-CRM114-Status: GOOD ( 15.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The monitored-battery property is a property of the board, not the PMIC. Move this property to the DTS of its only user, sp9860g-1h10. While at it, disable the fuel-gauge node by default and enable it only for its users, as it requires board-specific properties to work correctly. Signed-off-by: Stanislav Jakubek --- Note that the 'sprd,calib-resistance-micro-ohms' property isn't specified as I do not have the board or any other source of information about it. If the SPRD folks could chime in here, that'd be great. arch/arm64/boot/dts/sprd/sc2731.dtsi | 4 ++-- arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index c8b30c0479fd..0eb4aca0a139 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -94,17 +94,17 @@ pmic_adc: adc@480 { nvmem-cells = <&adc_big_scale>, <&adc_small_scale>; }; - fuel-gauge@a00 { + pmic_fgu: fuel-gauge@a00 { compatible = "sprd,sc2731-fgu"; reg = <0xa00>; bat-detect-gpios = <&pmic_eic 9 GPIO_ACTIVE_HIGH>; io-channels = <&pmic_adc 3>, <&pmic_adc 6>; io-channel-names = "bat-temp", "charge-vol"; - monitored-battery = <&bat>; nvmem-cell-names = "fgu_calib"; nvmem-cells = <&fgu_calib>; interrupt-parent = <&sc2731_pmic>; interrupts = <4>; + status = "disabled"; }; vibrator@ec8 { diff --git a/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts b/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts index cd8b1069e387..a5f6acafee3a 100644 --- a/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts +++ b/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts @@ -84,6 +84,11 @@ bat: battery { }; }; +&pmic_fgu { + monitored-battery = <&bat>; + status = "okay"; +}; + &uart0 { status = "okay"; };