Message ID | 20230524133918.1439516-4-olivier.moysan@foss.st.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2874657vqo; Wed, 24 May 2023 07:07:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6bCGsDfgefHBre79JXUxsznzCe34Ktfmfk5HWXinkeqqKa2PX7U0o0RIiP3DlDtEaAxkPk X-Received: by 2002:a05:6a00:178d:b0:64d:4188:ae86 with SMTP id s13-20020a056a00178d00b0064d4188ae86mr3810176pfg.6.1684937233156; Wed, 24 May 2023 07:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684937233; cv=none; d=google.com; s=arc-20160816; b=rZArk4FEhWA5Uprc66gOyDgTH9NZyT+AkktrtrRckL5gSjSxpu7udbQqNpSpx/d26K I8aOar1Y1lrOumn3Li06xv0sjgJzSDcDVZMJ0cbGHCz5p2+rQeDEO2UdDzn1y8F5DuYc hhVB8g+NTgCKkc6mIF93aI7iW0PFC95njgNJOFmkd8mL8dujZVxdYF8J7O1FO1vu8ZWi 17kvBGDbKHU52f2YqRXtYKC0gTt1PV6Y8pfxJ68IKOW7GUYklbvjJHLqwvl5WUj+Wiec DT6otUqVygnwM4+GuGtm5j40darIjmMPaEHG/09wI7hE7MN52JECiCufr25SKw3Qo7Vm d31g== 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=+PfABAqjFKoktucajSEVGKR9Q6DkjuUsIsIWvzTTESo=; b=ouHP1syNyw2l+7X/lAhuWZPW2FPGAI4PycgX4BRMSxQWonKNse9vkEY6DuPeEexj8Z 4tDL0P9+yV2+PVDjCG8Lo4B0OWoYlmUx1CcJWoPxsMRrPZH6lQ4NXlWhuy99SyayMK+b /rq+T2cabPYOPZGA9AeS+HoqGJj4BwXRAn9JEcCC5PC0/H15RyQ78kM7V5IeWg9KtFkr HARTL8Nc8oZLsnY1eEcfswVWqnP4KZ8TxdIkVDsUu9JKfa/Pyr69FkEQ7/hKoBTEzH3n dqHtjQxaZg/p4BFV3hk8j8Xk0BQLQu0KWEOecjbJ3SAbHP197ncZz16pTFsEG2edVNQd N6hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=LXAqIRKh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p188-20020a6229c5000000b00643aa8d8cb7si590443pfp.185.2023.05.24.07.06.57; Wed, 24 May 2023 07:07:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=LXAqIRKh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235308AbjEXNkT (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Wed, 24 May 2023 09:40:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232530AbjEXNkO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 24 May 2023 09:40:14 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47962A9; Wed, 24 May 2023 06:40:13 -0700 (PDT) Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34O9ioXp010792; Wed, 24 May 2023 15:39:53 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=+PfABAqjFKoktucajSEVGKR9Q6DkjuUsIsIWvzTTESo=; b=LXAqIRKhba6Iygd9ElsBF7bz+NV/25TNK5y+K2cY4cpZwepo5o69Hus6GwuUYeT6cLuL SVao+jv/wWm41rsGnJfxlWiChB3KLMcDj/puTFSJ17ZPQBu9rLx8YqJmJngAw4WQVyW8 nS3gGBAr1yjlOGE5+TyzyDHkf8YIGOvAHiGDDp21eHEKI3MZh9byDFToBe3ig0ZBIK71 BZzRN0GzqW8BzbwecQAaE30FmLVCD2FVNnQEh/g521HYZfssr2t8LSIg963H+icBdFSY AMJ8kB2M5TCt3J/ac1JBlpbSZkDn77qrO4/ilR8xq2vG1vLyI7X2BJ4XDGaNRpQsrhiN 7g== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3qru86gkfp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 May 2023 15:39:53 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7ACD7100039; Wed, 24 May 2023 15:39:51 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 73840229A88; Wed, 24 May 2023 15:39:51 +0200 (CEST) Received: from localhost (10.252.20.36) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 24 May 2023 15:39:51 +0200 From: Olivier Moysan <olivier.moysan@foss.st.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com> CC: Olivier Moysan <olivier.moysan@foss.st.com>, <devicetree@vger.kernel.org>, <linux-stm32@st-md-mailman.stormreply.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH 3/8] ARM: dts: stm32: add vrefint support to adc2 on stm32mp15 Date: Wed, 24 May 2023 15:39:12 +0200 Message-ID: <20230524133918.1439516-4-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230524133918.1439516-1-olivier.moysan@foss.st.com> References: <20230524133918.1439516-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.252.20.36] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-24_09,2023-05-24_01,2023-05-22_02 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766784744044067350?= X-GMAIL-MSGID: =?utf-8?q?1766784744044067350?= |
Series |
ARM: dts: stm32: add adc internal channels on stm32mp15
|
|
Commit Message
Olivier MOYSAN
May 24, 2023, 1:39 p.m. UTC
Set STM32 ADC2 as a consumer of BSEC on STM32MP15, to retrieve
vrefint calibration data saved in OTP.
During the calibration process vrefp is set to 3.3V and the data
acquired is saved to the OTP. This data is used by the ADC driver
to calculated the actual value of vrefp according to the formula:
vrefp = 3.3 x vrefint_cal / vrefint_data
The vrefint channel provides the actual value of vrefp,
which can be used to correct ADC acquisition data.
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
---
arch/arm/boot/dts/stm32mp151.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi index 40d3959964cf..5bb5dfabb747 100644 --- a/arch/arm/boot/dts/stm32mp151.dtsi +++ b/arch/arm/boot/dts/stm32mp151.dtsi @@ -1113,6 +1113,8 @@ adc2: adc@100 { interrupts = <1>; dmas = <&dmamux1 10 0x400 0x01>; dma-names = "rx"; + nvmem-cells = <&vrefint>; + nvmem-cell-names = "vrefint"; status = "disabled"; channel@13 { reg = <13>;