From nobody Mon Sep 15 11:14:21 2025 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 390F3C7EE23 for ; Tue, 30 May 2023 12:47:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232227AbjE3MrK (ORCPT ); Tue, 30 May 2023 08:47:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231658AbjE3MrA (ORCPT ); Tue, 30 May 2023 08:47:00 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF4BA18D; Tue, 30 May 2023 05:46:38 -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 34U9eCAR001514; Tue, 30 May 2023 14:46:13 +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=FN/jL3ZpxnraHfsa8vk35518WADwt4pWVusBTGPVWUU=; b=HDHpvLmzqfBxQ8bmGwt/k3Aa4A6uY1kdBtGfzAxzJ64mTdMzKn0W5+m3MVdeXjNB7Opc o32PlkDc8Kymi8UmLOYW5E/l74sB1I0GrBfNH2n1E85bkLo0CzMMO5WS0G46GQUTtxca 0yPEA85lgwgYFt736LvQSwal27F5o+3dPIfu7Nws/Y4odX7s2yaYLf+ovQ2wGqZwGj06 3bH3b/u9vbql12y7mYlxNoibsYinQFE+mD8l9hAND1Tt/ttX4uO2iSS0kuUFmNi+nplZ +wpeWNZ5rymkmtVmZQ4mkDcG9jKnsgRPccQbfQjOPJvIAISyj1jsyY6sLJkixhfAW1Un zw== 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 3qweqe13m5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 14:46:13 +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 32269100034; Tue, 30 May 2023 14:46:13 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 2BB912248D8; Tue, 30 May 2023 14:46:13 +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:46:12 +0200 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH v2 1/9] ARM: dts: stm32: add adc internal channels to stm32mp15 Date: Tue, 30 May 2023 14:45:29 +0200 Message-ID: <20230530124538.621760-2-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: quoted-printable 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 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 bf3830dca742..7b360ee1ba2b 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 Sep 15 11:14:21 2025 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 154C8C77B73 for ; Tue, 30 May 2023 12:47:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231584AbjE3MrD (ORCPT ); Tue, 30 May 2023 08:47:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232210AbjE3Mq4 (ORCPT ); Tue, 30 May 2023 08:46:56 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B67451BC; Tue, 30 May 2023 05:46:37 -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 34UBtjVe011762; Tue, 30 May 2023 14:46:15 +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=QMw9Tnd7+RpGGBDn1zw1zumG/Sad+L8PSAew5gasot0=; b=Ur581kKBiE9BPEeSOTlra949ItEG4FT5mqX4bp0hIe+Q1FogmsaTx7r4lyIsgZew4kZs 5OGLkKuAxuPsiRB17wggoEQ1q0G232QiyzGkSUQaGMTmjrJcVWkYpcuzNsqeZniUVfjP 3nu2mnlcvfZ5rT9YTv6wyTGjVF2FoPRNdvoh7D6DEq/u4GGan6I1nbxKOK74/pLG6+oL PNGmyL8rUVScCWDEIpW0ar2R6x/yNVHgbC28uSoj2O+uBvmF2tyMwsJTfcfnur5Lz1is g2WigDVfgO/aTHALMCgTs0rPia3NosEBk5TJEgvfjPxxoB1jKKfonVICS3bpjYhIn0gG 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 3qvsnnqk6s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 14:46:15 +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 9BB43100038; Tue, 30 May 2023 14:46:14 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 962102248D8; Tue, 30 May 2023 14:46:14 +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:46:14 +0200 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH v2 2/9] ARM: dts: stm32: add vrefint calibration on stm32mp15 Date: Tue, 30 May 2023 14:45:30 +0200 Message-ID: <20230530124538.621760-3-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: quoted-printable 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_08,2023-05-30_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 7b360ee1ba2b..3d0c39d847b5 100644 --- a/arch/arm/boot/dts/stm32mp151.dtsi +++ b/arch/arm/boot/dts/stm32mp151.dtsi @@ -1630,6 +1630,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 Sep 15 11:14:21 2025 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 AA756C7EE2C for ; Tue, 30 May 2023 12:48:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232290AbjE3MsW (ORCPT ); Tue, 30 May 2023 08:48:22 -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 ); 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 To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , 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: quoted-printable 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 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 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 =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 Sep 15 11:14:21 2025 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 C203FC77B73 for ; Tue, 30 May 2023 12:48:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232303AbjE3MsY (ORCPT ); Tue, 30 May 2023 08:48:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230487AbjE3MsU (ORCPT ); Tue, 30 May 2023 08:48:20 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0832BE; Tue, 30 May 2023 05:47:46 -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 34U9eA8k001487; Tue, 30 May 2023 14:47:17 +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=cO/FJ+AZFp2lr5ucdDhnQHBCcBeeC19QRXJP3967DQE=; b=fmJr4z0L8/dwUgCjtegBSjgwX4cJv4dQcMDTNCg/X7YsCuPK704zE7ox3fZ7lzLKIkjW a2xDcdLiGTsSpiyuxJrbmvzupdk/4aNNNAVTLIHeIVb0jv1vYNJb9FlgNtWMxtKxKvmx P2ezOtCsWpyBXG+WheTiwYzADfxouVczkDGzy5FiR2VTMFtRKWH6upwJyqeCjTHHc+zg 517um7tAEcog0mDbChOC80YaJs9V0+j2YeTUPaRUsREb/aPN/bL2Vo9TwSO6I7OjsKQh APHwRJnGSwkU8rdNyqZslxs+CRBlNwsoBMRf0v6fZnnieDCldzDsPmjrPbeyFkcxjjVt 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 3qweqe13t7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 14:47:17 +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 192F110002A; Tue, 30 May 2023 14:47:17 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 118192248D6; Tue, 30 May 2023 14:47:17 +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:16 +0200 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH v2 4/9] ARM: dts: stm32: enable adc on stm32mp15xx-dkx boards Date: Tue, 30 May 2023 14:45:32 +0200 Message-ID: <20230530124538.621760-5-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: quoted-printable 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 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 a6e2e20f12fa..e78ba956b9d0 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 Sep 15 11:14:21 2025 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 6DE1BC7EE23 for ; Tue, 30 May 2023 12:48:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232315AbjE3Ms1 (ORCPT ); Tue, 30 May 2023 08:48:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232280AbjE3MsV (ORCPT ); Tue, 30 May 2023 08:48:21 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E54A7E8; Tue, 30 May 2023 05:47:47 -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 34UBjP66011761; Tue, 30 May 2023 14:47:18 +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=s5JEeavFkt3QmiggyrZWDMOnFkvRKX/NZLiHdhbEGS1U+seF9hgsQ+oeAKCzDEAo+s9S JK0q2UFm0bvm2Nc4jKvIG6DVYR84VIgxCpNtmMHx3Zkw1YTPdHhyTTEHuJ4Z+mWdSnQt ff8vL6gsQyrDIPApiKI+ifF8Fg0EOhpHn/B14cqx3QhWT9HoyF4gkRoyQ2103p8fzrlb 0gncBFfiivR9gohIcxmh1WE8RpUxA8l+8CsxwFSThZKz7XFMp3ea9B4o4Pll9Scb3o1j fmYQ665Lc2T0ru/2g4rYrkiRbhQKMMvW4jw2du+Gm1yflm+p+k0/rgaDeOVV6WJ69CwS XA== 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 3qvsnnqkcd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 14:47:18 +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 E0DE410002A; Tue, 30 May 2023 14:47:17 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id D9B222248D6; Tue, 30 May 2023 14:47:17 +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:17 +0200 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH v2 5/9] ARM: dts: stm32: adopt generic iio bindings for adc channels on stm32mp157c-ed1 Date: Tue, 30 May 2023 14:45:33 +0200 Message-ID: <20230530124538.621760-6-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: quoted-printable 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_08,2023-05-30_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 Sep 15 11:14:21 2025 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 19D8AC77B73 for ; Tue, 30 May 2023 12:49:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbjE3Mtf (ORCPT ); Tue, 30 May 2023 08:49:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232317AbjE3Mt0 (ORCPT ); Tue, 30 May 2023 08:49:26 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D855D121; Tue, 30 May 2023 05:49:02 -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 34UC2ZJ9017368; Tue, 30 May 2023 14:48:19 +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=sPXqCUgbhw9VqFR6yzZhgtow9f2DSqC4gkywR5Z5bmjoneUlhGwaImtN3ueiq0kDIMqN qOSkO26dXZVqlE/seppJ7XHJtZWydL61/7nrLRR/IE9C3Q7jrdzk6vRydY5TScOdE3pS OVkCxcvtcHk1GoTRNbBPhVwHibhj9PBIIHwJbs4Rm7+bsTC7APUg653R611wZQf+EIpL 4ctKc0M/RogmuB3MHI0ChzPwddV5iZe0va8IBvW0bJI5QSl8Ivk3D2RYaQOd5tqvaUYG h28yNHltWosYITXy1G2wWLwRfPreCz2oBW5aDFiJON7HA2fK0diYrcD3XO4tg9zyDYR+ cA== 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 3quahy7yuk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 14:48:19 +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 AE84B100034; Tue, 30 May 2023 14:48:18 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A75632248DA; Tue, 30 May 2023 14:48:18 +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:48:18 +0200 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH v2 6/9] ARM: dts: stm32: adopt generic iio bindings for adc channels on emstamp-argon Date: Tue, 30 May 2023 14:45:34 +0200 Message-ID: <20230530124538.621760-7-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: quoted-printable 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 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 Sep 15 11:14:21 2025 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 CEE24C77B73 for ; Tue, 30 May 2023 12:49:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232240AbjE3Mtr (ORCPT ); Tue, 30 May 2023 08:49:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231858AbjE3Mto (ORCPT ); Tue, 30 May 2023 08:49:44 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1F71133; Tue, 30 May 2023 05:49:22 -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 34UC0CSt011757; Tue, 30 May 2023 14:48:20 +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=CgTSzVkn85BmTT6zfLFXyYup5KXyI90Jku0NhvyMcWAx2mnazb1cmpkPtxgYtNL6jJBS VyecInSlMy8xQezq44kqN+7LsTy0hMzDeFE3nEcBAt8ZZeUu43IcR300LnUbRsoxi3F1 sjdgp9dGIWNNG0XGMcm2oawG4r7PpMoRLiHff3X5rrboiElCjiMpN9mdUYlRhiieCmUT qIss/VYJ8eQux0T8Qk59cCaG8DbKQp9WnARty6jii0h/Tno655+JjBX8n76YUxZGd4y5 S6VhYLc/okiFTpMpy+I0hfa2QIoJG7VuSQ0LBBEaDHQxORvAHH9bxT/SJxoY7gGdKIpV YQ== 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 3qvsnnqkhn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 14:48:20 +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 8A83A10002A; Tue, 30 May 2023 14:48:19 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 8275B2248DB; Tue, 30 May 2023 14:48:19 +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:48:19 +0200 From: Olivier Moysan To: Marek Vasut , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , , Subject: [PATCH v2 7/9] ARM: dts: stm32: adopt generic iio bindings for adc channels on dhcor-drc Date: Tue, 30 May 2023 14:45:35 +0200 Message-ID: <20230530124538.621760-8-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: quoted-printable 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_08,2023-05-30_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 Sep 15 11:14:21 2025 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 CF539C77B73 for ; Tue, 30 May 2023 12:49:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232346AbjE3Mtu (ORCPT ); Tue, 30 May 2023 08:49:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231983AbjE3Mtr (ORCPT ); Tue, 30 May 2023 08:49:47 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C64A5189; Tue, 30 May 2023 05:49:23 -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 34UCAgre017542; Tue, 30 May 2023 14:48:20 +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=X17XIzBHPM4SWuko/RB6ogwCTzLbiqELLn7CU++i+dC2onOJVEAsR6KGzqhEXnJ/m9Wf HPWGoVPIDrNf/zN6ubzLMCvmpMYlTYCx0NDr0hfH8A+01C2WZ9zVk5VrF9pN1oHS0lqg g1GHwmnhRRxa0wEm5TzBcZC2f93g5QQx8Z/jMlaKjcTqGInuCdM0AZCCTEWGXGZLzLv/ yz9/BhH6WOJ/boKliF2ubmBjk1pp4Y7g2zaqPrauqARlEougS5y4w61fh+GRXSAkjJmM pQsxPHGchpTLWrKMsmN1pQRXWAir0PErwEwlgi/+dXaaFnvC8X3KHbHRJZ5etM55DxmW vA== 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 3quahy7yun-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 14:48:20 +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 5BE5A100038; Tue, 30 May 2023 14:48:20 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 54A852248DB; Tue, 30 May 2023 14:48:20 +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:48:20 +0200 From: Olivier Moysan To: Marek Vasut , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , , Subject: [PATCH v2 8/9] ARM: dts: stm32: adopt generic iio bindings for adc channels on dhcor-testbench Date: Tue, 30 May 2023 14:45:36 +0200 Message-ID: <20230530124538.621760-9-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: quoted-printable 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 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 From nobody Mon Sep 15 11:14:21 2025 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 66EDDC77B7A for ; Tue, 30 May 2023 13:50:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232389AbjE3Nu4 (ORCPT ); Tue, 30 May 2023 09:50:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230183AbjE3Nuu (ORCPT ); Tue, 30 May 2023 09:50:50 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37785EA; Tue, 30 May 2023 06:50:44 -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 34UC4pcC018239; Tue, 30 May 2023 14:49:21 +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=8v+0p59Typ3U3+A0Vdhp+6kA+itNhaM4lGhf6lg8Pug=; b=Q7cTmlKkkqwCgBvzhU5C/8I9Svhejus3dbXQlCIYD+iYNkc8EstyY4GdrF71Gg1gT2UG J/2yKSPLzcQ6MfmFQ/jRkSgOOd9LTF86iSonWucCIEbmsTFGhHaTjsahfk1+/BhHjxd/ EM4jKQj0zrO3ZbSclkmPb/HhjYdTl3mS/Xp2v9hGvFN7w8m9iJiuddlaGrx3vKFnSn43 1s9JSyFsl2vzWIB1Y8lVQO7JtoG6EkauEJ7O2zSJf81r6GgWSWSzp5z6ZaJRfSlZ8EH+ wS+k7WZ6Fubw01qWqm6FfVgojSgh3FCPOMv0Kim1aSF/5RHV1nWVnMxtmaQ5iFQjI7iw LA== 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 3qwdm5hsgn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 14:49:21 +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 4172710002A; Tue, 30 May 2023 14:49:21 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 390622248D6; Tue, 30 May 2023 14:49:21 +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:49:20 +0200 From: Olivier Moysan To: Marek Vasut , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: , , , , Subject: [PATCH v2 9/9] ARM: dts: stm32: Update to generic ADC channel binding on DHSOM systems Date: Tue, 30 May 2023 14:45:37 +0200 Message-ID: <20230530124538.621760-10-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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Marek Vasut The generic ADC channel binding is recommended over legacy one, update the DT to the modern binding. No functional change. For further details, see commit which adds the generic binding to STM32 ADC binding document: '664b9879f56e ("dt-bindings: iio: stm32-adc: add generic channel binding")' Signed-off-by: Marek Vasut --- arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 18 +++++---- .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 38 +++++++++++++++---- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/d= ts/stm32mp15xx-dhcom-som.dtsi index c06edd2eacb0..e61df23d361a 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi @@ -80,17 +80,19 @@ &adc { vdda-supply =3D <&vdda>; vref-supply =3D <&vdda>; status =3D "okay"; +}; =20 - adc1: adc@0 { - st,min-sample-time-nsecs =3D <5000>; - st,adc-channels =3D <0>; - status =3D "okay"; +&adc1 { + channel@0 { + reg =3D <0>; + st,min-sample-time-ns =3D <5000>; }; +}; =20 - adc2: adc@100 { - st,adc-channels =3D <1>; - st,min-sample-time-nsecs =3D <5000>; - status =3D "okay"; +&adc2 { + channel@1 { + reg =3D <1>; + st,min-sample-time-ns =3D <5000>; }; }; =20 diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi b/arch/arm/= boot/dts/stm32mp15xx-dhcor-avenger96.dtsi index cdd4902b59a9..0069ad75d55e 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi @@ -111,17 +111,39 @@ &adc { vdda-supply =3D <&vdda>; vref-supply =3D <&vdda>; status =3D "okay"; +}; =20 - adc1: adc@0 { - st,adc-channels =3D <0 1 6>; - st,min-sample-time-nsecs =3D <5000>; - status =3D "okay"; +&adc1 { + channel@0 { + reg =3D <0>; + 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@1 { + reg =3D <1>; + st,min-sample-time-ns =3D <5000>; + }; + + channel@6 { + reg =3D <6>; + st,min-sample-time-ns =3D <5000>; + }; +}; + +&adc2 { + 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