Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp418355rdb; Thu, 15 Feb 2024 04:29:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU4v8mE4kIuPI9HdvbAs1w053sMH2/pDrW/84gqDn8U7cajkZQB96cY6+NCDD/c7PXbSRD2MHT/i6f7dVTVW557lDgcLOUwwKaCxNxKog== X-Google-Smtp-Source: AGHT+IG/6sVpwvM4r/2SfEKUYcO2FHLMc3G9ipQpoKNDDd2Mp++gnqGTvG/xu91uNEdm+TfUUhLd X-Received: by 2002:ac2:4e09:0:b0:511:a80f:bac6 with SMTP id e9-20020ac24e09000000b00511a80fbac6mr1661164lfr.52.1708000187697; Thu, 15 Feb 2024 04:29:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708000187; cv=pass; d=google.com; s=arc-20160816; b=B7KLskVFAqBjYVDAHKxK4Q3aoSUR2Z7aZdOreRjsxYRzwL2N8RrMIzVwwqDux1h1hR E0XtxTH8JN3M9QlhsHIzRrA+vEXTwIXIT+A84bpBHq1jSjG8+w01ij9AZBVsU3S66unt 5NiYj1EzrkWOJ0swEwD8DlwEN8xreBvH0dIWoH4Gb8blg5W0ttc/QqLDODIIAh6fx2TM L6xhkAKVqjTyh62UySl97Abn6sdcnpNDFKvne9KP2lvQhmNRefh3HgPtCiKVjsxDZm9/ g3sAJB4Q6BYgBM6NfMWZvBn5u7KVlkQvj6uz2Isv7YXJgMElTWCSVofiBnC9MFC5qiW1 6Ilg== 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:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=srmpZi2uOdq8TLrq51itEDqW3WFFrCeLXnGkywx2Dp0=; fh=xjD1ZNeWaD0l9nhkGyteqiIpcX/YUyOYWGy5WDW0xvk=; b=spFZgHyT2bmUjeR+X8yqMgRzww1kKGufSYbERIj0MwdIWMdq3PRLCozWSIZwYH2JqZ hEcLXdoe3KBG30VqO8LdWRZ3EJPcgeobPSrspNlVHJIq7B/S70QVrxjalzcNa2adqZGK ku2HwF1JGc5+fJTxuN1de98ZJ1tz6f9LAf+3iZdylyrdoNu9KJrgZoaUc7t0eCV5ridB duItAc/ffZkTLJt1MUkiPAVk5syJWNy8sVezLPlMeUlsPo+HRKTCHnzZn1c+hv8+I6P7 gbSpuo/D7wUWNNPMO7RZbXKL+Tt76jRFxlfXhPAzjHi0UBVyiuT1D1nSbaXST5teeQQB uGGQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=C4nHm6os; 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-66889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66889-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fi3-20020a170906da0300b00a3d04469dd0si576804ejb.903.2024.02.15.04.29.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 04:29:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=C4nHm6os; 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-66889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66889-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3ADE21F23D19 for ; Thu, 15 Feb 2024 12:29:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8453112DDB6; Thu, 15 Feb 2024 12:29:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="C4nHm6os" Received: from mail-40140.protonmail.ch (mail-40140.protonmail.ch [185.70.40.140]) (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 CE23312C7E9 for ; Thu, 15 Feb 2024 12:29:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.140 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708000147; cv=none; b=i0hVNDab09HtggyzxQUl2EQ7txnOwHNRthlCTskjg8g3VDuLAxJeYpfRueZcu+hJs45GMJkneAx7YFMjMdx8+rqMW3+XISva152ET32O3mEfDXs0jHfPMwZ3F7oFSMCWqJ9NHnDbGRN2wdqOYy4LnFdwqFDEdsNlgws473Pc5eg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708000147; c=relaxed/simple; bh=gK6wUKZ7BRK2yS46gb+SKBvXjc9KtbVUd1KCbiSSQ04=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dIga9PDjbXjY/us6rRnTvKJMqPeq+b9nu6mrn809RwapQm0KANU2PWq1IMcVFj/yfZHPYcJvkHljLw8rX8I/9WH307xwF/7TctvqI2taQ2xRXnT3t/uZebLCWauzWnYJFcDBCd4H6EjjwtuOo6Nc2bupY9ESGJnE0rdEhLhJfz4= 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=C4nHm6os; arc=none smtp.client-ip=185.70.40.140 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=1708000142; x=1708259342; bh=srmpZi2uOdq8TLrq51itEDqW3WFFrCeLXnGkywx2Dp0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=C4nHm6oskzC/uZkH3+TWaCj16kAD/GtFhaSVyb4dbDGLoJu4OId/CpeaoM+KUFe3L +3Xs2EnUflVhYY0h2mzJlskZ1djsGJ7BjoOl3nv+bdYWLQ0oXqVoYQNyIqevFlJYwm 4bjaLwgKZVaiZh4Riuet+rrk/4QxeLa8nHfeuAIDAlkERPTL3vQpeqppfSUXIlVpuy mACqaoJur9pQ5KKZJFshBQnXpKw2RhLUbq/wGWEOk4g7nH4c1ssMN3CNXon9vkLNUZ tAJuwh9PIAcOHBWpOWvHJgOrTQF9lYXMdJMPa0EB3zcrZ8veQbObHLnfGIQLphqWuF 4dawUywCnREFg== Date: Thu, 15 Feb 2024 12:26:36 +0000 To: linux-kernel@vger.kernel.org From: Raymond Hackley Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jakob Hauser , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH v2 2/2] arm64: dts: qcom: msm8916/39-samsung-a2015: Add PMIC and charger Message-ID: <20240215122612.3833-3-raymondhackley@protonmail.com> In-Reply-To: <20240215122612.3833-1-raymondhackley@protonmail.com> References: <20240215122612.3833-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 The phones listed below have Richtek RT5033 PMIC and charger. Add them to the device trees. - Samsung Galaxy A3/A5/A7 2015 - Samsung Galaxy E5/E7 - Samsung Galaxy Grand Max Signed-off-by: Raymond Hackley --- .../qcom/msm8916-samsung-a2015-common.dtsi | 53 +++++++++++++++++- .../boot/dts/qcom/msm8916-samsung-a3u-eur.dts | 6 ++ .../boot/dts/qcom/msm8916-samsung-a5u-eur.dts | 6 ++ .../boot/dts/qcom/msm8916-samsung-e5.dts | 6 ++ .../boot/dts/qcom/msm8916-samsung-e7.dts | 7 +++ .../dts/qcom/msm8916-samsung-grandmax.dts | 6 ++ .../boot/dts/qcom/msm8939-samsung-a7.dts | 56 ++++++++++++++++++- 7 files changed, 138 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/a= rch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 4bbbee80b5e4..e6355e5e2177 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -28,6 +28,12 @@ tz-apps@85500000 { =09=09}; =09}; =20 +=09battery: battery { +=09=09compatible =3D "simple-battery"; +=09=09precharge-current-microamp =3D <450000>; +=09=09precharge-upper-limit-microvolt =3D <3500000>; +=09}; + =09clk_pwm: pwm { =09=09compatible =3D "clk-pwm"; =09=09#pwm-cells =3D <2>; @@ -245,7 +251,7 @@ magnetometer@12 { &blsp_i2c4 { =09status =3D "okay"; =20 -=09battery@35 { +=09fuel-gauge@35 { =09=09compatible =3D "richtek,rt5033-battery"; =09=09reg =3D <0x35>; =09=09interrupt-parent =3D <&tlmm>; @@ -253,6 +259,44 @@ battery@35 { =20 =09=09pinctrl-names =3D "default"; =09=09pinctrl-0 =3D <&fg_alert_default>; + +=09=09power-supplies =3D <&charger>; +=09}; +}; + +&blsp_i2c6 { +=09status =3D "okay"; + +=09pmic@34 { +=09=09compatible =3D "richtek,rt5033"; +=09=09reg =3D <0x34>; + +=09=09interrupts-extended =3D <&tlmm 62 IRQ_TYPE_EDGE_FALLING>; + +=09=09pinctrl-0 =3D <&pmic_int_default>; +=09=09pinctrl-names =3D "default"; + +=09=09regulators { +=09=09=09rt5033_reg_safe_ldo: SAFE_LDO { +=09=09=09=09regulator-min-microvolt =3D <4900000>; +=09=09=09=09regulator-max-microvolt =3D <4900000>; +=09=09=09=09regulator-always-on; +=09=09=09}; + +=09=09=09/* +=09=09=09 * Needed for camera, but not used yet. +=09=09=09 * Define empty nodes to allow disabling the unused +=09=09=09 * regulators. +=09=09=09 */ +=09=09=09LDO {}; +=09=09=09BUCK {}; +=09=09}; + +=09=09charger: charger { +=09=09=09compatible =3D "richtek,rt5033-charger"; +=09=09=09monitored-battery =3D <&battery>; +=09=09=09richtek,usb-connector =3D <&usb_con>; +=09=09}; =09}; }; =20 @@ -476,6 +520,13 @@ nfc_i2c_default: nfc-i2c-default-state { =09=09bias-disable; =09}; =20 +=09pmic_int_default: pmic-int-default-state { +=09=09pins =3D "gpio62"; +=09=09function =3D "gpio"; +=09=09drive-strength =3D <2>; +=09=09bias-disable; +=09}; + =09sdc2_cd_default: sdc2-cd-default-state { =09=09pins =3D "gpio38"; =09=09function =3D "gpio"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts b/arch/ar= m64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts index 3b934f5eba47..906d31f1ea21 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts @@ -55,6 +55,12 @@ &accelerometer { =09=09 "0", "0", "1"; }; =20 +&battery { +=09charge-term-current-microamp =3D <150000>; +=09constant-charge-current-max-microamp =3D <1000000>; +=09constant-charge-voltage-max-microvolt =3D <4350000>; +}; + &blsp_i2c5 { =09status =3D "okay"; =20 diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts b/arch/ar= m64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts index 391befa22bb4..fe39be7a742b 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts @@ -29,6 +29,12 @@ &accelerometer { =09=09=09"0", "0", "1"; }; =20 +&battery { +=09charge-term-current-microamp =3D <200000>; +=09constant-charge-current-max-microamp =3D <1500000>; +=09constant-charge-voltage-max-microvolt =3D <4350000>; +}; + &blsp_i2c5 { =09status =3D "okay"; =20 diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts b/arch/arm64/b= oot/dts/qcom/msm8916-samsung-e5.dts index fad2535255f7..800cb1038da0 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts @@ -23,6 +23,12 @@ / { =09chassis-type =3D "handset"; }; =20 +&battery { +=09charge-term-current-microamp =3D <200000>; +=09constant-charge-current-max-microamp =3D <1500000>; +=09constant-charge-voltage-max-microvolt =3D <4350000>; +}; + &blsp_i2c5 { =09status =3D "okay"; =20 diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts b/arch/arm64/b= oot/dts/qcom/msm8916-samsung-e7.dts index b412b61ca258..ec1debd2e245 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts @@ -23,6 +23,13 @@ / { =09chassis-type =3D "handset"; }; =20 +&battery { +=09charge-term-current-microamp =3D <200000>; +=09constant-charge-current-max-microamp =3D <1500000>; +=09constant-charge-voltage-max-microvolt =3D <4350000>; +}; + + &pm8916_l17 { =09regulator-min-microvolt =3D <3000000>; =09regulator-max-microvolt =3D <3000000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/a= rm64/boot/dts/qcom/msm8916-samsung-grandmax.dts index 5882b3a593b8..135df1739dbd 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts @@ -41,6 +41,12 @@ led-keyled { =09}; }; =20 +&battery { +=09charge-term-current-microamp =3D <150000>; +=09constant-charge-current-max-microamp =3D <1000000>; +=09constant-charge-voltage-max-microvolt =3D <4400000>; +}; + ®_motor_vdd { =09gpio =3D <&tlmm 72 GPIO_ACTIVE_HIGH>; }; diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/b= oot/dts/qcom/msm8939-samsung-a7.dts index 0c599e71a464..91acdb160227 100644 --- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts +++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts @@ -33,6 +33,15 @@ tz-apps@85500000 { =09=09}; =09}; =20 +=09battery: battery { +=09=09compatible =3D "simple-battery"; +=09=09charge-term-current-microamp =3D <150000>; +=09=09constant-charge-current-max-microamp =3D <1500000>; +=09=09constant-charge-voltage-max-microvolt =3D <4300000>; +=09=09precharge-current-microamp =3D <450000>; +=09=09precharge-upper-limit-microvolt =3D <3500000>; +=09}; + =09gpio-hall-sensor { =09=09compatible =3D "gpio-keys"; =20 @@ -82,7 +91,7 @@ i2c-fg { =09=09#address-cells =3D <1>; =09=09#size-cells =3D <0>; =20 -=09=09battery@35 { +=09=09fuel-gauge@35 { =09=09=09compatible =3D "richtek,rt5033-battery"; =09=09=09reg =3D <0x35>; =20 @@ -91,6 +100,8 @@ battery@35 { =20 =09=09=09pinctrl-0 =3D <&fg_alert_default>; =09=09=09pinctrl-names =3D "default"; + +=09=09=09power-supplies =3D <&charger>; =09=09}; =09}; =20 @@ -325,6 +336,42 @@ touchscreen@24 { =09}; }; =20 +&blsp_i2c6 { +=09status =3D "okay"; + +=09pmic@34 { +=09=09compatible =3D "richtek,rt5033"; +=09=09reg =3D <0x34>; + +=09=09interrupts-extended =3D <&tlmm 62 IRQ_TYPE_EDGE_FALLING>; + +=09=09pinctrl-0 =3D <&pmic_int_default>; +=09=09pinctrl-names =3D "default"; + +=09=09regulators { +=09=09=09rt5033_reg_safe_ldo: SAFE_LDO { +=09=09=09=09regulator-min-microvolt =3D <4900000>; +=09=09=09=09regulator-max-microvolt =3D <4900000>; +=09=09=09=09regulator-always-on; +=09=09=09}; + +=09=09=09/* +=09=09=09 * Needed for camera, but not used yet. +=09=09=09 * Define empty nodes to allow disabling the unused +=09=09=09 * regulators. +=09=09=09 */ +=09=09=09LDO {}; +=09=09=09BUCK {}; +=09=09}; + +=09=09charger: charger { +=09=09=09compatible =3D "richtek,rt5033-charger"; +=09=09=09monitored-battery =3D <&battery>; +=09=09=09richtek,usb-connector =3D <&usb_con>; +=09=09}; +=09}; +}; + &blsp_uart2 { =09status =3D "okay"; }; @@ -510,6 +557,13 @@ nfc_i2c_default: nfc-i2c-default-state { =09=09bias-disable; =09}; =20 +=09pmic_int_default: pmic-int-default-state { +=09=09pins =3D "gpio62"; +=09=09function =3D "gpio"; +=09=09drive-strength =3D <2>; +=09=09bias-disable; +=09}; + =09reg_tsp_en_default: reg-tsp-en-default-state { =09=09pins =3D "gpio73"; =09=09function =3D "gpio"; --=20 2.39.2