Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1073296rdb; Fri, 16 Feb 2024 04:47:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU1Pb1PF+k/kMc8fEz4LV9Xlt+KyJr3cwRwLS8mZh0XzopNqI5M76hXmqaiwnmj9bGmXCATB+iZtotkPt8x9PIY/pYWJrHD3XpSCTP7wA== X-Google-Smtp-Source: AGHT+IHMjUYAVpIg2Ds7idpEN56igEIzGJyvXRXsv61iqI9FkWWwST350uyLOnnTCzmA5BBPDQi4 X-Received: by 2002:a05:622a:1493:b0:42d:dd39:361b with SMTP id t19-20020a05622a149300b0042ddd39361bmr2065666qtx.6.1708087660813; Fri, 16 Feb 2024 04:47:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708087660; cv=pass; d=google.com; s=arc-20160816; b=Ozn4IyIRujy7aYZaTfwPlJ+/AA/ZaBZN5X5nZx9OTb2fWie8exvksAcoCNLNpi8ZzN kXJ5CIbaIhixkkXtYD/4DyOtND5PSMcCkkBXqaUHZLDTm8YqOO/eh+1QG63XhZlUi/2k /ne2KKu5e0WJ1IuhdPDT6W+NDYMLh1icI5WpoOIeLluRnPgNJyCRPDtYNnv4Vz1XjKFG Nmk5+8jPRsgEKhwqmhMurDh6bo46omnJztwvUAN+/8m9K6W88DYhC2dARTr/RU9o1XV3 zpAwSUmnSaytGvrAy2kABdxVUpLSVqVCaVK8YNWN6PZagAxbnReQ7muj2+bUviaRbBEm s4ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:message-id:subject:cc :from:to:date:dkim-signature; bh=VfZEdqnF7VP+FLhYp67kYP6gCOw5onHI/KrjQrTFpjQ=; fh=xB6aEdDIXzq5WcXZVaRxcj2XbnoG81P/O/ApI/aBaaA=; b=LWyhWn6emYC4FuRwsjcaB6rGqwfwGKVWJcO4Xr46ewOkwMXFoSGw/n9SzzH0a4QiAH lWs0nTRDX88zzsbWiv4stJSYAaHYrjnPFqgUTDAzeR/8wVq+9SUmkGaViLsRf5xnYpyL cxdNeKV2pXabVGnNS907CTQpx4L2+EM4rOWh5jgTDtGuZroKzxlSOMU7ga0glDU1OF4c R69FxbNtS9Fkwc6a4BWVsEhum3+d9SFeCe1l49IYsw8Zl4Zb85MCROod8aWtr/ABDiiF 4r838V38a0ZgUP/sFbedl9pEu8eOdkkwPswWpJpeCH6qsvTVqdzILByzbTRhDKEsUxFW /sfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b="mx/s39uU"; arc=pass (i=1 spf=pass spfdomain=protonmail.com dkim=pass dkdomain=protonmail.com dmarc=pass fromdomain=protonmail.com); spf=pass (google.com: domain of linux-kernel+bounces-68593-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68593-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r17-20020ac85211000000b0042a5bd82617si3634736qtn.321.2024.02.16.04.47.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 04:47:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68593-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=@protonmail.com header.s=protonmail3 header.b="mx/s39uU"; arc=pass (i=1 spf=pass spfdomain=protonmail.com dkim=pass dkdomain=protonmail.com dmarc=pass fromdomain=protonmail.com); spf=pass (google.com: domain of linux-kernel+bounces-68593-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68593-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com 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 8CCB71C227DD for ; Fri, 16 Feb 2024 12:47:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFE9312883E; Fri, 16 Feb 2024 12:47:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="mx/s39uU" Received: from mail-0201.mail-europe.com (mail-0201.mail-europe.com [51.77.79.158]) (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 04E1658203; Fri, 16 Feb 2024 12:47:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.77.79.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708087650; cv=none; b=WEYhv5ZS1xfA8oV9JUGza+RZZu8C/rGJoMwHBqIII8W1Of84r1ZOLOCxCG8bKZpg1mSmNQxCkteUv/Q5VYA5/LkE3zTzCeCRdzOYgbjFNN62Xh5qQ//vBkxbI0tefrWPZxtQLzOK7vA5wVu16mp09W2+6JhOHbosnbZoNvQdaAA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708087650; c=relaxed/simple; bh=iusSZqsywZoAGHlkNH4CuV+VDegpKTa3oydf2OYat8Q=; h=Date:To:From:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=u8fEJC0J9lOKz4N5wSVCs6smFEXatLDha4kVkjHdtxuSBQdcKdX6fXD4r61qeqceTehRT6rs+nxTUV7n/HoJctxqDEQAFCg2pmXlxGgfiH8cCCDrFBwIJQ8Js13O2O0XZzjHXhFiUM3QDcTvB9uWlNQBWAfn0gw/6T4S/wVs120= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com; spf=pass smtp.mailfrom=protonmail.com; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b=mx/s39uU; arc=none smtp.client-ip=51.77.79.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1708087630; x=1708346830; bh=VfZEdqnF7VP+FLhYp67kYP6gCOw5onHI/KrjQrTFpjQ=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=mx/s39uUE4x3KNJKHQYVx93vDx7BuzrnqYlkGSeIqAhU/mABfzA+kaRoaciiCtOEc 1xFU1vGbnP7zAT20U1f6dyWK9FEkWHMt60l2+T7KhioCz3dJdgOZdYMT6VLIr1ONe2 lqD+bM8FO5xE/fQ9P5h8FkzT1EQWsEJjHputN4lMobGc/ZM/HdhtfhsiocegseITWp rOM9xV5IFeQLLjgcQNmpR+hy8M26Ak/1Q78llNCPFi7San5ub411p+lY8YdXYuuLEO 2RkjBk/GuU0Zml1kMo8vd39qIafxqA7cD+h+dPSEJtzOGJkO2LJUFK0WovXi7HpoLf 9O5puOSpiZvcw== Date: Fri, 16 Feb 2024 12:46:50 +0000 To: linux-kernel@vger.kernel.org From: Raymond Hackley Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Joe Mason Subject: [PATCH] arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add fuel gauge Message-ID: <20240216124639.24689-1-raymondhackley@protonmail.com> Feedback-ID: 49437091:user:proton 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-Transfer-Encoding: quoted-printable From: Joe Mason Like the Samsung Galaxy A3/A5, the Grand Prime/Core Prime uses a Richtek RT5033 PMIC as battery fuel gauge, charger, flash LED and for some regulators. For now, only add the fuel gauge/battery device to the device tree, so we can check the remaining battery percentage. The other RT5033 drivers need some more work first before they can be used properly. Signed-off-by: Joe Mason [Raymond: Move to fortuna-common. Use interrupts-extended] Signed-off-by: Raymond Hackley --- .../qcom/msm8916-samsung-fortuna-common.dtsi | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi b= /arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi index 052024073f54..c2800ad2dd5b 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi @@ -80,6 +80,20 @@ muic: extcon@25 { =09}; }; =20 +&blsp_i2c4 { +=09status =3D "okay"; + +=09fuel-gauge@35 { +=09=09compatible =3D "richtek,rt5033-battery"; +=09=09reg =3D <0x35>; + +=09=09interrupts-extended =3D <&tlmm 121 IRQ_TYPE_EDGE_FALLING>; + +=09=09pinctrl-0 =3D <&fg_alert_default>; +=09=09pinctrl-names =3D "default"; +=09}; +}; + &blsp_uart2 { =09status =3D "okay"; }; @@ -152,6 +166,13 @@ &wcnss_mem { }; =20 &tlmm { +=09fg_alert_default: fg-alert-default-state { +=09=09pins =3D "gpio121"; +=09=09function =3D "gpio"; +=09=09drive-strength =3D <2>; +=09=09bias-disable; +=09}; + =09gpio_keys_default: gpio-keys-default-state { =09=09pins =3D "gpio107", "gpio109"; =09=09function =3D "gpio"; --=20 2.39.2