From nobody Mon Feb 9 10:54:13 2026 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 2E8BAC7EE32 for ; Wed, 24 May 2023 13:40:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235260AbjEXNkR (ORCPT ); Wed, 24 May 2023 09:40:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234203AbjEXNkO (ORCPT ); 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 45BAEA7; Wed, 24 May 2023 06:40:13 -0700 (PDT) Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34OCgVK1015625; Wed, 24 May 2023 15:39:51 +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=G9vvnWSLJsuNooiWQS7kP00jY9mJ1HLWlugGthqt8l8=; b=kw38mBeXe5RHnnD2GdW+CYW/6+IGkURLioYttckPR+MDBW3baW8s3rkZXsoFR8UxVMKe bVhZVgDacecLIR1WAHvz22378NEpOLJKkSRIz46JHkhpgVCMnYpYW4cpfxVdgOtIdb4l fZy+Qh/MRx7705ZBhsAzXHsg13WAcJNUaNIbPMh7yjxFtHXh0PnuE92PoJ2ljyBXnJRM J8kz2T9/XI6OL5aPlrvRFU1SW+4FQFxdXlSiArbdQhtzXdyiMqZ1DeWPkDMWyeAVmhC/ fmdnjVjuIXFnlkI97++n7159L5+eHXV/II6JjECwjvOqwS77RzWpYJjtDNM141rLXJ8N sw== 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 3qrthk930g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 May 2023 15:39:51 +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 7B539100034; Wed, 24 May 2023 15:39:49 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 759CE229A97; Wed, 24 May 2023 15:39:49 +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:49 +0200 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 1/8] ARM: dts: stm32: add adc internal channels to stm32mp15 Date: Wed, 24 May 2023 15:39:10 +0200 Message-ID: <20230524133918.1439516-2-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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add STM32 ADC2 internal channels VREFINT and VDDCORE to STM32MP15x SoCs. VBAT internal channel is not defined by default in SoC DT, and has be defined in board DT when needed, instead. This avoids unwanted current consumption on battery, when ADC conversions are performed on any other channels. The internal channels are defined in STM32MP15 SoC DT according to the generic IIO channel bindings. The STM32 driver does not support a mixed use of legacy and generic channels. When generic channels are defined, legacy channels are ignored. This involves that the board device trees using legacy bindings for ADC2, have to be reworked. Signed-off-by: Olivier Moysan --- arch/arm/boot/dts/stm32mp151.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp1= 51.dtsi index a98ae58e2c1c..9c40b5e679f8 100644 --- a/arch/arm/boot/dts/stm32mp151.dtsi +++ b/arch/arm/boot/dts/stm32mp151.dtsi @@ -1093,6 +1093,8 @@ adc: adc@48003000 { adc1: adc@0 { compatible =3D "st,stm32mp1-adc"; #io-channel-cells =3D <1>; + #address-cells =3D <1>; + #size-cells =3D <0>; reg =3D <0x0>; interrupt-parent =3D <&adc>; interrupts =3D <0>; @@ -1104,12 +1106,22 @@ adc1: adc@0 { adc2: adc@100 { compatible =3D "st,stm32mp1-adc"; #io-channel-cells =3D <1>; + #address-cells =3D <1>; + #size-cells =3D <0>; reg =3D <0x100>; interrupt-parent =3D <&adc>; interrupts =3D <1>; dmas =3D <&dmamux1 10 0x400 0x01>; dma-names =3D "rx"; status =3D "disabled"; + channel@13 { + reg =3D <13>; + label =3D "vrefint"; + }; + channel@14 { + reg =3D <14>; + label =3D "vddcore"; + }; }; }; =20 --=20 2.25.1 From nobody Mon Feb 9 10:54:13 2026 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 A41D4C77B73 for ; Wed, 24 May 2023 13:40:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235327AbjEXNkW (ORCPT ); Wed, 24 May 2023 09:40:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235190AbjEXNkP (ORCPT ); Wed, 24 May 2023 09:40:15 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F205AA; 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 34O9qTZQ009638; 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=ODAJpjjCT+TsOCgb7AAjwV5Sj2DIOhFUhg814BVV3ow=; b=yOfyE+E7dIXTUCzjDvhYvToT/ySwWBq1DowSRQGdZLWUw6Jh+hBfXIqOLUOsGJJmYGIo TiFQwhNngoXe/gxLn0/EMQvpeMx/6o0kqKU9HbcowuGibvFM4DQBxMWaoEeOPh0QoZU6 nDmysUF2cA9rlXc/TVnIeJRtGMYv0YaZS4BLZALTUTq6vaZI0N2DNwtGOjrB8E6GOJjH 4sV1KFjddHmQY0Rd3uatyR2E2PFziIq4U1YH9Oh7MvlOxrl9ULDPssAmjZslQ8GI6ONz v3dsQlnyGEoWf+kfg0IFtoex8PlUPC7S3rwpadvfxmNiWVH1XC3IaBYhTZ/QMeuZeqc3 +w== 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 3qru86gkfk-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 A2333100038; Wed, 24 May 2023 15:39:50 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 9B727229A98; Wed, 24 May 2023 15:39:50 +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:50 +0200 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 2/8] ARM: dts: stm32: add vrefint calibration on stm32mp15 Date: Wed, 24 May 2023 15:39:11 +0200 Message-ID: <20230524133918.1439516-3-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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Describe vrefint calibration cell to be retrieved through bsec. Signed-off-by: Olivier Moysan --- arch/arm/boot/dts/stm32mp151.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp1= 51.dtsi index 9c40b5e679f8..40d3959964cf 100644 --- a/arch/arm/boot/dts/stm32mp151.dtsi +++ b/arch/arm/boot/dts/stm32mp151.dtsi @@ -1635,6 +1635,9 @@ bsec: efuse@5c005000 { part_number_otp: part-number-otp@4 { reg =3D <0x4 0x1>; }; + vrefint: vrefin_cal@52 { + reg =3D <0x52 0x2>; + }; ts_cal1: calib@5c { reg =3D <0x5c 0x2>; }; --=20 2.25.1 From nobody Mon Feb 9 10:54:13 2026 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 5789DC7EE2C for ; Wed, 24 May 2023 13:40:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235317AbjEXNkT (ORCPT ); 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 ); 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 To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , 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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =3D 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 --- 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/stm32mp1= 51.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 =3D <1>; dmas =3D <&dmamux1 10 0x400 0x01>; dma-names =3D "rx"; + nvmem-cells =3D <&vrefint>; + nvmem-cell-names =3D "vrefint"; status =3D "disabled"; channel@13 { reg =3D <13>; --=20 2.25.1 From nobody Mon Feb 9 10:54:13 2026 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 02220C77B7A for ; Wed, 24 May 2023 13:40:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235396AbjEXNkZ (ORCPT ); Wed, 24 May 2023 09:40:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235200AbjEXNkP (ORCPT ); Wed, 24 May 2023 09:40:15 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D126B0; Wed, 24 May 2023 06:40:14 -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 34ODYnw4009311; 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=5tr8+koJbahJlh8pGZf1G18j68F+/fl56MXnG8oEP+c=; b=LFU+C6RAtznVJ4PXz1frySK7ptJocWbhoHxNAbBbh4oTvtBY15mbVZ+oTB4Al421tmf8 RJ76A3gFJ2P4mGC2J8zc9MALGAHlAKYauNqoL3pjBuLNvDTGFRntytdfEWW/rOiFD5xu lCoM3coYRak4HYjZwouIMd5Bvo0Ix87Cp6EIj5Bg7X0zj3vgcTsE+cgr9AopnVOJaUFV mdxoeiX820OWZvcMeQFPmWb5ma4tnlHMVIvWLCr7o9MoNE1fK0+qcyg28Lle9qHuUYMv OpieH0R/hd7kCR6vBBKsrvoev3DIMdWzH9+BUsOJ0yPdhkVObs4LMicIFOO5SDxgns7B jQ== 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 3qru86gkfr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 May 2023 15:39:52 +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 6227610002A; Wed, 24 May 2023 15:39:52 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 5A85F229A88; Wed, 24 May 2023 15:39:52 +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:52 +0200 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 4/8] ARM: dts: stm32: enable adc on stm32mp15xx-dkx boards Date: Wed, 24 May 2023 15:39:13 +0200 Message-ID: <20230524133918.1439516-5-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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" U-Boot enables ADC1&2 to support USB power measurement and ADC calibration on STM32MP15x Disco boards. When leaving U-boot the ADCs do not return to power down state to keep ADC linear calibration available for kernel. Enable ADC1&2 by default on STM32MP15xx-DKx boards to align kernel DT with Uboot. This avoids to shutdown the ADCs VDDA, while the ADCs are not in power down. Use STM32 ADC generic bindings instead of legacy bindings on STM32MP15xx-DKx boards. The ADC pins on Arduino connector are not set by default. These pins are added in A7 Disco example DTs only. Signed-off-by: Olivier Moysan --- arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 29 ++++++++++++++++++-------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/stm= 32mp15xx-dkx.dtsi index 0f1110e42c93..ad46f1b1e1ed 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi @@ -93,28 +93,39 @@ vin: vin { =20 &adc { pinctrl-names =3D "default"; - pinctrl-0 =3D <&adc12_ain_pins_a>, <&adc12_usb_cc_pins_a>; + pinctrl-0 =3D <&adc12_usb_cc_pins_a>; vdd-supply =3D <&vdd>; vdda-supply =3D <&vdd>; vref-supply =3D <&vrefbuf>; - status =3D "disabled"; + status =3D "okay"; adc1: adc@0 { + status =3D "okay"; /* * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in18 & in19. * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C: * 5 * (56 + 47kOhms) * 5pF =3D> 2.5us. * Use arbitrary margin here (e.g. 5us). */ - st,min-sample-time-nsecs =3D <5000>; - /* AIN connector, USB Type-C CC1 & CC2 */ - st,adc-channels =3D <0 1 6 13 18 19>; - status =3D "okay"; + channel@18 { + reg =3D <18>; + st,min-sample-time-ns =3D <5000>; + }; + channel@19 { + reg =3D <19>; + st,min-sample-time-ns =3D <5000>; + }; }; adc2: adc@100 { - /* AIN connector, USB Type-C CC1 & CC2 */ - st,adc-channels =3D <0 1 2 6 18 19>; - st,min-sample-time-nsecs =3D <5000>; status =3D "okay"; + /* USB Type-C CC1 & CC2 */ + channel@18 { + reg =3D <18>; + st,min-sample-time-ns =3D <5000>; + }; + channel@19 { + reg =3D <19>; + st,min-sample-time-ns =3D <5000>; + }; }; }; =20 --=20 2.25.1 From nobody Mon Feb 9 10:54:13 2026 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 6169AC77B7A for ; Wed, 24 May 2023 13:41:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235371AbjEXNlc (ORCPT ); Wed, 24 May 2023 09:41:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235382AbjEXNl0 (ORCPT ); Wed, 24 May 2023 09:41:26 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DB95194; Wed, 24 May 2023 06:41:03 -0700 (PDT) Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34OCgVKL015625; Wed, 24 May 2023 15:40: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=iQXTMxUt9SX5FwNNn9VT0H47jLLTrjkB+qHe01i2GLc=; b=2X3ynNzgvp0WjjtCjo3LjAFnqc9iuEwXz85SZ3hsSY4YQeWvQHwGpR7GZ6b025gu1D2O MKFIRfALUYVPxHXO2g39Q9QBuDYXxyJTfiSJP7zabIAqERW+i5T6WwesgIS7SR6fAmI3 1GaEMKSt0Dt11sitGurd/rwbmzBBF9u7WLy+O19eSKvEHHmiMKn0FUmimYkXOnKnYz+e ehP/jlHcOcCec3ftoT+WZl6RoflIXNgPRvb0B0aWkgKPFicmD5fhujGbd6rS9vkR5Mtz GLMILgZClQPe2/hgttI33a7xH0TtXOeKbdH4id3l/4efkFUD8GnKPNpJ8SVV9OvnAgrU Jg== 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 3qrthk9384-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 May 2023 15:40: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 3384610002A; Wed, 24 May 2023 15:40:53 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 2A14B229A88; Wed, 24 May 2023 15:40:53 +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:40:52 +0200 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 5/8] ARM: dts: stm32: adopt generic iio bindings for adc channels on stm32mp157c-ed1 Date: Wed, 24 May 2023 15:39:14 +0200 Message-ID: <20230524133918.1439516-6-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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use STM32 ADC generic bindings instead of legacy bindings on STM32MP157c-ed1 board. The STM32 ADC specific binding to declare channels has been deprecated, hence adopt the generic IIO channels bindings, instead. The STM32MP151 device tree now exposes internal channels using the generic binding. This makes the change mandatory here to avoid a mixed use of legacy and generic binding, which is not supported by the driver. Signed-off-by: Olivier Moysan --- arch/arm/boot/dts/stm32mp157c-ed1.dts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm3= 2mp157c-ed1.dts index 8beb901be506..66ed5f9921ba 100644 --- a/arch/arm/boot/dts/stm32mp157c-ed1.dts +++ b/arch/arm/boot/dts/stm32mp157c-ed1.dts @@ -103,10 +103,20 @@ &adc { vref-supply =3D <&vdda>; status =3D "disabled"; adc1: adc@0 { - st,adc-channels =3D <0 1 6>; - /* 16.5 ck_cycles sampling time */ - st,min-sample-time-nsecs =3D <400>; status =3D "okay"; + channel@0 { + reg =3D <0>; + /* 16.5 ck_cycles sampling time */ + st,min-sample-time-ns =3D <400>; + }; + channel@1 { + reg =3D <1>; + st,min-sample-time-ns =3D <400>; + }; + channel@6 { + reg =3D <6>; + st,min-sample-time-ns =3D <400>; + }; }; }; =20 --=20 2.25.1 From nobody Mon Feb 9 10:54:13 2026 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 89048C77B73 for ; Wed, 24 May 2023 13:41:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235382AbjEXNlg (ORCPT ); Wed, 24 May 2023 09:41:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235448AbjEXNl1 (ORCPT ); Wed, 24 May 2023 09:41:27 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFBD7195; Wed, 24 May 2023 06:41:04 -0700 (PDT) Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34OCX55T015657; Wed, 24 May 2023 15:40:54 +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=ngCEpUO0MoixhBhQjak+ESBBQIkGgYUVlUkd9S2iL5A=; b=NxAa84bZ8is52dT9RUfWoor1l/IM6jdU0jGZ+GcHHQVTWT75LJAu9f3ZO9zxYTw2kYMf fX8rr2EwVzdWPVoc4/+K7VjZgyhT8v7O68L5ilHN0pajNZSBOwD6zbjOYeh7P4C7B6yX tvDnTSiITubdtiZxJ6Sh6dS02UFa7p4GNIPysOqv3ULVJKfBoFfxN2jepLK1upb5gvC7 JnP0pGcqnfJaUf7KbqUkk4uhWTvw5+MzwpHIh/Ps++Wb0Ez7K0KQ8KSNEsp7kD+6Lf82 s7PwK51IoPlrOx5ZD+caksgVKnNLVWAg/lE6aUncjIGucsHpcMjhrNKodQRxNivYWqEf Rw== 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 3qrthk9386-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 May 2023 15:40:54 +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 E6FEC100034; Wed, 24 May 2023 15:40:53 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id DF17D229A88; Wed, 24 May 2023 15:40:53 +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:40:53 +0200 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 6/8] ARM: dts: stm32: adopt generic iio bindings for adc channels on emstamp-argon Date: Wed, 24 May 2023 15:39:15 +0200 Message-ID: <20230524133918.1439516-7-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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use STM32 ADC generic bindings instead of legacy bindings on emtrion GmbH Argon boards. The STM32 ADC specific binding to declare channels has been deprecated, hence adopt the generic IIO channels bindings, instead. The STM32MP151 device tree now exposes internal channels using the generic binding. This makes the change mandatory here to avoid a mixed use of legacy and generic binding, which is not supported by the driver. Signed-off-by: Olivier Moysan --- arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi b/arch/arm/bo= ot/dts/stm32mp157c-emstamp-argon.dtsi index b01470a9a3d5..94e38141af67 100644 --- a/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi +++ b/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi @@ -97,9 +97,11 @@ &adc { adc1: adc@0 { pinctrl-names =3D "default"; pinctrl-0 =3D <&adc1_in6_pins_a>; - st,min-sample-time-nsecs =3D <5000>; - st,adc-channels =3D <6>; status =3D "disabled"; + channel@6 { + reg =3D <6>; + st,min-sample-time-ns =3D <5000>; + }; }; =20 adc2: adc@100 { --=20 2.25.1 From nobody Mon Feb 9 10:54:13 2026 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 BBD06C77B73 for ; Wed, 24 May 2023 13:42:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235478AbjEXNmB (ORCPT ); Wed, 24 May 2023 09:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235475AbjEXNlv (ORCPT ); Wed, 24 May 2023 09:41:51 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4156C195; Wed, 24 May 2023 06:41:31 -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 34ODABHs017492; Wed, 24 May 2023 15:40:55 +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=R65kAiFBwFlbJ1i90X8uxO7VwNFCvDFlboVO+PjmHGY=; b=wn5A4SN5ZzUd4ND9wvgmiYyf/4STGsNAPMIZW5DZG5yLcw0MB26vQI8WzEoEIRjFfGj1 jwzoMtl8gcPq2WCCFp/z2tJMvsDt5Q13K7HyP0JBCwScvEdBHWT3U0EMbx6FyieHvyiT rEdRxdLgfcmygalzNqkl1npZrGMICnvJlzfevMUSxWtBtXVhOJiInZxLYY1EmNjJkfPu VwgjfnK8KFUjKb8akPt3npsjS3WAT0wA3dikFXdkr+BO+Rq21XnSSZc26mfzuDjiHcpd MaKemfD6a+onRXqY1Ff4b40HdUC92BwOmzaOJsF1mIRI9n0W+yPj/G6fxVFoPvRgfE+C yA== 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 3qrspnsaqg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 May 2023 15:40:55 +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 AB64810002A; Wed, 24 May 2023 15:40:54 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A3173229A88; Wed, 24 May 2023 15:40:54 +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:40:54 +0200 From: Olivier Moysan To: Marek Vasut , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , , Subject: [PATCH 7/8] ARM: dts: stm32: adopt generic iio bindings for adc channels on dhcor-drc Date: Wed, 24 May 2023 15:39:16 +0200 Message-ID: <20230524133918.1439516-8-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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use STM32 ADC generic bindings instead of legacy bindings on DHCOR DRC Compact board. The STM32 ADC specific binding to declare channels has been deprecated, hence adopt the generic IIO channels bindings, instead. The STM32MP151 device tree now exposes internal channels using the generic binding. This makes the change mandatory here to avoid a mixed use of legacy and generic binding, which is not supported by the driver. Signed-off-by: Olivier Moysan --- .../dts/stm32mp15xx-dhcor-drc-compact.dtsi | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi b/arch/ar= m/boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi index 39af79dc654c..92d906bfd5d7 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi @@ -57,15 +57,35 @@ &adc { /* X11 ADC inputs */ status =3D "okay"; =20 adc1: adc@0 { - st,adc-channels =3D <0 1 6>; - st,min-sample-time-nsecs =3D <5000>; status =3D "okay"; + channel@0 { + reg =3D <0>; + st,min-sample-time-ns =3D <5000>; + }; + channel@1 { + reg =3D <1>; + st,min-sample-time-ns =3D <5000>; + }; + channel@6 { + reg =3D <6>; + st,min-sample-time-ns =3D <5000>; + }; }; =20 adc2: adc@100 { - st,adc-channels =3D <0 1 2>; - st,min-sample-time-nsecs =3D <5000>; status =3D "okay"; + channel@0 { + reg =3D <0>; + st,min-sample-time-ns =3D <5000>; + }; + channel@1 { + reg =3D <1>; + st,min-sample-time-ns =3D <5000>; + }; + channel@2 { + reg =3D <2>; + st,min-sample-time-ns =3D <5000>; + }; }; }; =20 --=20 2.25.1 From nobody Mon Feb 9 10:54:13 2026 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 D3BA0C77B7A for ; Wed, 24 May 2023 13:42:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235463AbjEXNmF (ORCPT ); Wed, 24 May 2023 09:42:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234813AbjEXNlw (ORCPT ); Wed, 24 May 2023 09:41:52 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17D3913E; Wed, 24 May 2023 06:41:30 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34OCYCKp031558; Wed, 24 May 2023 15:40:56 +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=Do0DjikyeIDFZP9oGmyZJjVUwz6VAIDmWXDZg0ApHTI=; b=IkYvi42caGJWSglmsWG2LM+rjKCJtPblzqCJuJb+iZxLN0Nfuhvh4jiR42tW73szWwKc v+LNBzizdEItSevfv2AE8mH3P2pSTm53diEz18E8JRDZOReJ2tQeP5qQGMatvWcpUwUh w61yuhfxu64uu50X/B1iy8QGgeubVti6BNOubPlIOIb64h65F8IAu/PC+oCuRXcDEuaM k80d2wtDhiAOKcEz1v9ACCR8NfrK295b+jQq9+X8Vr3+srcBGz9orCc+EQmkIpno7g6a WpzM/DcjiKRSNeYFKAckCsai30JYGqqz8PM/ZXugibhFirMDYd06PUAn0y25NldN+lhC dQ== 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 3qrtgv162j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 May 2023 15:40:56 +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 80132100034; Wed, 24 May 2023 15:40:55 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 78467229A88; Wed, 24 May 2023 15:40:55 +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:40:55 +0200 From: Olivier Moysan To: Marek Vasut , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , , Subject: [PATCH 8/8] ARM: dts: stm32: adopt generic iio bindings for adc channels on dhcor-testbench Date: Wed, 24 May 2023 15:39:17 +0200 Message-ID: <20230524133918.1439516-9-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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use STM32 ADC generic bindings instead of legacy bindings on DHCOR Testbench board. The STM32 ADC specific binding to declare channels has been deprecated, hence adopt the generic IIO channels bindings, instead. The STM32MP151 device tree now exposes internal channels using the generic binding. This makes the change mandatory here to avoid a mixed use of legacy and generic binding, which is not supported by the driver. Signed-off-by: Olivier Moysan --- .../boot/dts/stm32mp15xx-dhcor-testbench.dtsi | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-testbench.dtsi b/arch/arm/= boot/dts/stm32mp15xx-dhcor-testbench.dtsi index faed31b6d84a..ab7f0ba49639 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dhcor-testbench.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-testbench.dtsi @@ -41,15 +41,35 @@ &adc { status =3D "okay"; =20 adc1: adc@0 { - st,adc-channels =3D <0 1 6>; - st,min-sample-time-nsecs =3D <5000>; status =3D "okay"; + channel@0 { + reg =3D <0>; + st,min-sample-time-ns =3D <5000>; + }; + channel@1 { + reg =3D <1>; + st,min-sample-time-ns =3D <5000>; + }; + channel@6 { + reg =3D <6>; + st,min-sample-time-ns =3D <5000>; + }; }; =20 adc2: adc@100 { - st,adc-channels =3D <0 1 2>; - st,min-sample-time-nsecs =3D <5000>; status =3D "okay"; + channel@0 { + reg =3D <0>; + st,min-sample-time-ns =3D <5000>; + }; + channel@1 { + reg =3D <1>; + st,min-sample-time-ns =3D <5000>; + }; + channel@2 { + reg =3D <2>; + st,min-sample-time-ns =3D <5000>; + }; }; }; =20 --=20 2.25.1