Message ID | 20230530124538.621760-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:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2158327vqr; Tue, 30 May 2023 05:57:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ61woMUE1NpAOzE640AE0jvzNgxLQj/HkjMDJKgYYR2V4eEJvqoA7dJbXBNN5c357/OuAcu X-Received: by 2002:a05:6a20:918d:b0:111:52a4:7fab with SMTP id v13-20020a056a20918d00b0011152a47fabmr5558087pzd.26.1685451440978; Tue, 30 May 2023 05:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685451440; cv=none; d=google.com; s=arc-20160816; b=NcDqpXrn/U/orPHKRZpSdgloON4K/tte96cGEtWrStf8yvYKuMTDz1Jow3jPYrsQ2r FmOGuHNCoL/8mCzro4EaoRXj+F6qA00EM9X7w4XbiKqGo2ufGkdD3WAtvNqOi1UZlAMk J57Gy54mR9p5N/C5EkHaQVgjZMLVUQhxmHxyiXko14QinvErqLCDFKgPcP47PHoMlDYl z9IsN0OfbNKQZ0Q5llan+7QhgPoHQWDx4MQCFHFimhqQjShOFcDoZKonFm8lg+PTyjL5 DtQUViRF916KqeoCfvopBn7RMHADhfdkz8obTq2VP6P11z7jsxsftyyiTOp1Rg6ELwpn 6UZQ== 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=Tvfrm/SClKPXJ+Bcvot4iUqoxk3JAMST0yYmkqmtgDs=; b=mibvj/za4/tI/t6Y76FaxpHxz96cCE5eX6kd6grHGySBTFO0W8jjVePuAlMW7A1lFC tzi12YtXXoezEjGFfU9B1e5o5Mb+MOIB1RIVqpGQjzE0Rlq/zsr2nAdwIUlETH+VwMw0 guTlkIixpT9qNJZwCLVFf0W7jRge18Labum0G/tfLZK2XHQo30ASrY4297A6xjtQ2QR/ 5sowl4PbkS7n4wLxmCTKJXF/TNMhG3xlUl5yuvNGaPREm3+hWkKLdIG/04Mnkjdm2oo8 r8lhZcW83loTAsYT9Si1hMGmmvdQ6TeiS2O+5Bjp5Kukmo43q7R9zvXS0P+ock2Dk5oe E/Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=guAo0Ke2; 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 r22-20020a638f56000000b0052857fbb31dsi10844464pgn.200.2023.05.30.05.57.07; Tue, 30 May 2023 05:57:20 -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=guAo0Ke2; 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 S232278AbjE3MsU (ORCPT <rfc822;andrewvogler123@gmail.com> + 99 others); Tue, 30 May 2023 08:48:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230305AbjE3MsT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 30 May 2023 08:48:19 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35D91A3; Tue, 30 May 2023 05:47:46 -0700 (PDT) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34UC5UDX018243; Tue, 30 May 2023 14:47:16 +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=Tvfrm/SClKPXJ+Bcvot4iUqoxk3JAMST0yYmkqmtgDs=; b=guAo0Ke2/Oq/rND0RKy/3TQx2FlloTnvBGidgmd8uAaa1l5qrb5K9VllqEII91m3Zx4B MN7Y+uUi5y64wuj/cittyNy0LkqIughbvJiohfBDDAfjETQHUPl/9di/INkmMDjsKZm/ mXY9Zh1R7cw2tOUwLZwPRAN83LIieNLxDQaRKkqCoew7GRQZ/OhmNSTOyPigM9WBjTai TUsd5IFw3w59mhkO0lunEUFTczyR/czlmLAziiYmKwO1Ty1lG/Qg9UxzN0jPlYFBTSPh 6edPhiWCBvaTFjA/6eNiKq3zuvhizVZnVDom90tl3KedUczEvQk9p0OWPtIQ7ePe0kp+ rA== 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 3qwdm5hs5f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 14:47:16 +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 255F410002A; Tue, 30 May 2023 14:47:16 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 1E2A52248D6; Tue, 30 May 2023 14:47:16 +0200 (CEST) Received: from localhost (10.201.20.178) 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; Tue, 30 May 2023 14:47:15 +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 v2 3/9] ARM: dts: stm32: add vrefint support to adc2 on stm32mp15 Date: Tue, 30 May 2023 14:45:31 +0200 Message-ID: <20230530124538.621760-4-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230530124538.621760-1-olivier.moysan@foss.st.com> References: <20230530124538.621760-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.201.20.178] X-ClientProxiedBy: EQNCAS1NODE3.st.com (10.75.129.80) 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-30_09,2023-05-30_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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1767323930260009827?= X-GMAIL-MSGID: =?utf-8?q?1767323930260009827?= |
Series |
ARM: dts: stm32: add adc internal channels on stm32mp15
|
|
Commit Message
Olivier MOYSAN
May 30, 2023, 12:45 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 3d0c39d847b5..61508917521c 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>;