From patchwork Wed Feb 9 16:38:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rayyan Ansari X-Patchwork-Id: 12740472 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B84D3C433EF for ; Wed, 9 Feb 2022 16:39:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237326AbiBIQjy (ORCPT ); Wed, 9 Feb 2022 11:39:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234543AbiBIQjx (ORCPT ); Wed, 9 Feb 2022 11:39:53 -0500 Received: from fwd1.porkbun.com (fwd1.porkbun.com [52.10.174.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8457C0612BE; Wed, 9 Feb 2022 08:39:56 -0800 (PST) Received: by fwd1.porkbun.com (Postfix, from userid 497) id 78B7C429CD; Wed, 9 Feb 2022 16:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ansari.sh; s=default; t=1644424796; bh=ooNj/8suxQGCS+iG0qUYChLq9ehXfq6KW/VZ9iEQVtM=; h=From:To:Cc:Subject:Date; b=m2Mzvb3yBRtES/mr4zsa1QF5lj5mhZS1V0C6oe92XDpcv5MPqBz/vU8gOtlrbORKR Tt0RqZoBdYPdmZsDUpBxIPYrE5UnfhCnMpsu6k89T+MgqUrwY6FVkrIoJVnMoPveiy 8vYKvLi8nSFutE0FplWcPfZ3ZRuUbp7VUV9dmiNM= Received: from rayyan-pc.. (unknown [90.242.138.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rayyan@ansari.sh) by fwd1.porkbun.com (Postfix) with ESMTPSA id B8E4D41C54; Wed, 9 Feb 2022 16:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ansari.sh; s=default; t=1644424781; bh=ooNj/8suxQGCS+iG0qUYChLq9ehXfq6KW/VZ9iEQVtM=; h=From:To:Cc:Subject:Date; b=ZM0LJZsYefdS00PyYlDAREOJZ+oo2lgbvjHxMsfx6vGyauOZP0s8MW22WeUp9KIBg WPohoiTLEsz9SvHvTuB24ydfECHae4XNrRHeJsHRTEYFIdZRWdQ1M+5X0num9UF2ap 7u+fgkXSA0MqW4/hGjzKg4plnyZ1S8+ZMuGshFsg= From: Rayyan Ansari To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Rayyan Ansari , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ARM: dts: qcom: pm8226: Add VADC node Date: Wed, 9 Feb 2022 16:38:40 +0000 Message-Id: <20220209163841.7360-1-rayyan@ansari.sh> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a node for the voltage ADC (VADC) found in PM8226. Signed-off-by: Rayyan Ansari --- arch/arm/boot/dts/qcom-pm8226.dtsi | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/arm/boot/dts/qcom-pm8226.dtsi b/arch/arm/boot/dts/qcom-pm8226.dtsi index b3d0f7b5874d..5e07f34e4ec4 100644 --- a/arch/arm/boot/dts/qcom-pm8226.dtsi +++ b/arch/arm/boot/dts/qcom-pm8226.dtsi @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause #include #include +#include &spmi_bus { pm8226_0: pm8226@0 { @@ -40,6 +41,39 @@ smbb: charger@1000 { chg_otg: otg-vbus { }; }; + pm8226_vadc: adc@3100 { + compatible = "qcom,spmi-vadc"; + reg = <0x3100>; + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + adc-chan@7 { + reg = ; + qcom,pre-scaling = <1 3>; + label = "vph_pwr"; + }; + adc-chan@8 { + reg = ; + label = "die_temp"; + }; + adc-chan@9 { + reg = ; + label = "ref_625mv"; + }; + adc-chan@a { + reg = ; + label = "ref_1250mv"; + }; + adc-chan@e { + reg = ; + }; + adc-chan@f { + reg = ; + }; + }; + pm8226_mpps: mpps@a000 { compatible = "qcom,pm8226-mpp", "qcom,spmi-mpp"; reg = <0xa000>;