From patchwork Wed May 24 13:39:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier MOYSAN X-Patchwork-Id: 98509 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2874914vqo; Wed, 24 May 2023 07:07:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ65mtT0TdvsfVgKkEOThKMQs9b2ekB705QRlzrBn4s6ZDh6enAJjbpUFCmFJgAfrm5TwteB X-Received: by 2002:a17:902:ca13:b0:1a9:433e:41e7 with SMTP id w19-20020a170902ca1300b001a9433e41e7mr14691970pld.43.1684937247658; Wed, 24 May 2023 07:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684937247; cv=none; d=google.com; s=arc-20160816; b=nWpe7j+g7Avvx4uoZLBjKh7y1rCZv8KGfljRUm9/BG6bpLAt/pz95nrLCEHtLpqmci Y4g6eqWX9t9tFF0i9Btpl4ntrlgGVl7YKF5WeKPBM9th+p8w8aWtmXOEpjgJBB/Qv5gt 3XHmGbPHrx4/mg6t7uVR2rSpJA3SPHP8jP1Fl8BUKO69idk+uddr0Vq5sfzgBa/1Zt/E /t9UCmtckQaZ3OWJj2kfahXJep+3pKgW1VufqdnbnqHNK4BilxgA5UxR+QS/njZXrVDI jPsLh9ThNCeJ1iY3bbLTjYn9UaN7PVbznxzcbIWHLYnRxOTk7Oud02WbZMLdEbslUQA+ NRxA== 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=G9vvnWSLJsuNooiWQS7kP00jY9mJ1HLWlugGthqt8l8=; b=UkJFlUJWJ1GagF8ifSCa/F4V5SH+N3g3/Dxbis3H8F7d++LUaV6bf6NjnfNuZgcVeH +f8Xol7nQf/pdGk1w+5Z4pmaOQYtQJjVMQdggnX16TfHA6nWDPKQLw7isTuwzG+RLcKy FDRh3CTgQ2PAuOQYJnHYVA98PJbbIf3g0EYWEY/mfkDQimRnzzK+VZAbIZXBJohnSthC 6tsosBhuW3RtdQTYcXY+PHTyMq9fAxVzUXWy3bgmhUfbOe0/E0nqbAgNhHbwlN0ee2P5 /DcklmcIvvLoMYktCqoY62U6/2dgZawk37rP5jb7NwYJfo5hfOlOeXY4rkjSEL0rA40r FK4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=kw38mBeX; 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 b19-20020a170902b61300b001ac9ab8539csi8161288pls.77.2023.05.24.07.07.14; Wed, 24 May 2023 07:07:27 -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=kw38mBeX; 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 S235250AbjEXNkR (ORCPT + 99 others); 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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766784759000699319?= X-GMAIL-MSGID: =?utf-8?q?1766784759000699319?= 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/stm32mp151.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 = "st,stm32mp1-adc"; #io-channel-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; reg = <0x0>; interrupt-parent = <&adc>; interrupts = <0>; @@ -1104,12 +1106,22 @@ adc1: adc@0 { adc2: adc@100 { compatible = "st,stm32mp1-adc"; #io-channel-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; reg = <0x100>; interrupt-parent = <&adc>; interrupts = <1>; dmas = <&dmamux1 10 0x400 0x01>; dma-names = "rx"; status = "disabled"; + channel@13 { + reg = <13>; + label = "vrefint"; + }; + channel@14 { + reg = <14>; + label = "vddcore"; + }; }; }; From patchwork Wed May 24 13:39:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier MOYSAN X-Patchwork-Id: 98506 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2862346vqo; Wed, 24 May 2023 06:50:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7AwJW5nbzugxeaXtsosi5JyFskLvoLwckVH6ddEhNVwQY7A+IuDvcsIPqKnCVmW9Y1ybXA X-Received: by 2002:a17:902:7249:b0:1ae:1a33:6c with SMTP id c9-20020a170902724900b001ae1a33006cmr16394230pll.31.1684936230542; Wed, 24 May 2023 06:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684936230; cv=none; d=google.com; s=arc-20160816; b=e6qsiu1c4yl1cq7Ty/j4dcoCTahBs3Uv8g/aaKo5eZ2FlP3/GDV6ZllihpN2ENTNMJ 1qTeZTFVJajdJEozNL4OalyyxT422eUdvsFHLjjkOsg+gGsg547BMRzCilPhrhetZmnB 7uQETnpLfYaErAMev97pkexu8y6+mDZ6jsQY//QJEiLaDke3WwTq77fK62+IjysnqEqF VHcV4GeyXIOnecjI+hSPIK1eBEsCYpO7cW/mk6OJErYw8KAK8j10ABug0NU2N1mrcf9K oH23F2CCzVkK5v6CUrp1UUM9Rgm2fI9LgceqNwxmFpwolaOTU6SRgPZ3k2E0or2dpgxZ 7nSw== 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=ODAJpjjCT+TsOCgb7AAjwV5Sj2DIOhFUhg814BVV3ow=; b=gW2xn4L6s/1uknYXgBTbQkbol7tKTDRosyQrybhQkmEpSvPyWjYcqhx24hzv+Q9C96 wCzRjXBoV2JRdwnZNcUeMrKHARitivy7Vvx5Bx8Prs9HYUfKu9OXNmCl3puJqUOOeSd9 5mDtSuUrLUQ+3dxaqkT+4Mkj7qIDu4SwywG1HQKzhhClKWjIODETZraheZhJHPArygbV 1pHNrcwIjt2WaQOYgVx1s95U+JaH1aUx3r9djm7n6keJ/ZVnH+gcu3UxsYvVEA0DSQUK 0sdTvdNaKsQSo3+GzP/1wTOK1jneXBHXvDCjWDxgxQUAS8JdHOJCAiT9QwkJNZDpVZQg wZRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=yOfyE+E7; 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 iw13-20020a170903044d00b001a63b8e071esi3952256plb.28.2023.05.24.06.50.15; Wed, 24 May 2023 06:50:30 -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=yOfyE+E7; 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 S235354AbjEXNkV (ORCPT + 99 others); Wed, 24 May 2023 09:40:21 -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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766783693131336054?= X-GMAIL-MSGID: =?utf-8?q?1766783693131336054?= 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/stm32mp151.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 = <0x4 0x1>; }; + vrefint: vrefin_cal@52 { + reg = <0x52 0x2>; + }; ts_cal1: calib@5c { reg = <0x5c 0x2>; }; From patchwork Wed May 24 13:39:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier MOYSAN X-Patchwork-Id: 98508 Return-Path: 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 + 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 ); 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 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: 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?= 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 --- 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>; From patchwork Wed May 24 13:39:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier MOYSAN X-Patchwork-Id: 98507 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2862348vqo; Wed, 24 May 2023 06:50:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tcSd7F6k0S2i5QJj1H1c68UpYVxlaA+dA6jxTBx5MSG9gKUYBD0ARKI9AvVanWYprj1YJ X-Received: by 2002:a17:902:d4d0:b0:1ac:3d1c:83c9 with SMTP id o16-20020a170902d4d000b001ac3d1c83c9mr25137969plg.13.1684936230768; Wed, 24 May 2023 06:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684936230; cv=none; d=google.com; s=arc-20160816; b=q9kZDnEjuOZOoyVSejHJQeUYjxeGO96E/VTTqHC9ZLU/Gb1MCfNB8GwXtBIhg4ZU0n yHXtelEzjiRaRc9z7mQEdVS9uTHVccPY7Xjeggpcj7aA+MVvIB8uTJEi+D5hPQwgN/kz 7H+7snRHImwPZ9liuRjEY6aJpM82gtUEFTTq5N3FH6PSPHaawQqm5z67Nj+pBuCvUnP4 5VINNhigAAj4IGeNzEyc/upIGz4lg7tN7RdSXf+Qh4eCBoBban9TFGmv3XaGyDzX+XBm TiBYZi1cJwBGYGHuHlNVO03+g7qztWDH8QDhVdmng18kPRvMAXGQrvQS8w7RdiFmjc3a 9XcA== 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=5tr8+koJbahJlh8pGZf1G18j68F+/fl56MXnG8oEP+c=; b=z5qj/WzuBM/KURWGAaaSLfFC64pAqZZhtV1YbvcpJIH+nZS/XBaR5qTugojWd6XlSA ZYpFChbNfSfGKKS3VvmVWjHJ7TVbAxfnLGVwJRGyf2xfYE5kkOs41aJ0X6JF4K+Bvh8C /HvmBI+qV5B/1P4kO7+DnMih5JvthSkvkR6qvn3cONpof7RQt+Ls3gxLSMeVFk/p2BJR mKLcP63qWiIaZFYf2FkQ3pIyUSaiVIChy9jsPK+xZfbKLXUuBUpB3krxQvGbl5UnJYmC 6BzELtt2bVPz1WbHSstKyjcvrf4cNpqQwImkidA8sUhTNZx6cVDP00RQfR/t2delLwVi Lvaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=LFU+C6RA; 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 w10-20020a170902e88a00b001a656596b9esi2793679plg.608.2023.05.24.06.50.15; Wed, 24 May 2023 06:50:30 -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=LFU+C6RA; 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 S235391AbjEXNkZ (ORCPT + 99 others); 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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766783693181818712?= X-GMAIL-MSGID: =?utf-8?q?1766783693181818712?= 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/stm32mp15xx-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 { &adc { pinctrl-names = "default"; - pinctrl-0 = <&adc12_ain_pins_a>, <&adc12_usb_cc_pins_a>; + pinctrl-0 = <&adc12_usb_cc_pins_a>; vdd-supply = <&vdd>; vdda-supply = <&vdd>; vref-supply = <&vrefbuf>; - status = "disabled"; + status = "okay"; adc1: adc@0 { + status = "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 => 2.5us. * Use arbitrary margin here (e.g. 5us). */ - st,min-sample-time-nsecs = <5000>; - /* AIN connector, USB Type-C CC1 & CC2 */ - st,adc-channels = <0 1 6 13 18 19>; - status = "okay"; + channel@18 { + reg = <18>; + st,min-sample-time-ns = <5000>; + }; + channel@19 { + reg = <19>; + st,min-sample-time-ns = <5000>; + }; }; adc2: adc@100 { - /* AIN connector, USB Type-C CC1 & CC2 */ - st,adc-channels = <0 1 2 6 18 19>; - st,min-sample-time-nsecs = <5000>; status = "okay"; + /* USB Type-C CC1 & CC2 */ + channel@18 { + reg = <18>; + st,min-sample-time-ns = <5000>; + }; + channel@19 { + reg = <19>; + st,min-sample-time-ns = <5000>; + }; }; }; From patchwork Wed May 24 13:39:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier MOYSAN X-Patchwork-Id: 98513 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2878987vqo; Wed, 24 May 2023 07:12:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6JGEd4rDv660mMntOhJT08Evv0xT4BuoIyzmtAp96pzgiTSNI8wlT8fODZxHzybCWlARfn X-Received: by 2002:a17:90a:982:b0:255:8802:937a with SMTP id 2-20020a17090a098200b002558802937amr6986634pjo.11.1684937542988; Wed, 24 May 2023 07:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684937542; cv=none; d=google.com; s=arc-20160816; b=U5rVQHYW8LIi/lqdgtlXjNL2kOJFZmv/x4eygGpTwGZciGTazxb0X3NQZCb4Ikm0eh BzZ8IaO+qHqtV2I6vCNbOusOvRB9PGdvGbS0A0xUScp5gwtPncB1ukdbWzsQfBS1abM2 85BF9UfyFa7gTolLXneISPos5uPQI5FNRMspkX4qnaIbdcLTEe9nuBTarxz0jFlMWs5B dV0xqC0JeEyZVCJTsbxbozCSTb+eHSznEtCY1bwNF4tayg33Wsgtm7S4bZbnWV+50+Ow i3zhVqGoAzGhNwTJsTkFLRxtRzE1k7MY7khmMv97GDulv6r5FAPLwXGrGPGGbM3oydmi UK6g== 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=iQXTMxUt9SX5FwNNn9VT0H47jLLTrjkB+qHe01i2GLc=; b=BnmrcZ/ry00Qsb9yDy8tOpUrzTsucYvOh5E2Id7KNfyejDYy51+Vav53+XSHFnmrf2 SUo4BSgmfri9lYHsBbA1nx1rxn2dVDQm/y6CKc6TO7vR5Ys1qqh4LvnX6PKAhmVOEfjl mZePiCcYHvfumrSCncBoXY4JFukQnBs5EKFe6Zx4QmPpjlZUvX1gJALIvY09RVPBg62s px5N4l8oAKhaxO3A4174ffN+QMpx1wQN7vWsaX45eiilicBmvPFvg5PdyOBnd1zN4QHX amrVok7LXtLq7GsafjudcoURAxqbilyIWxo7Vd39OjMca6arlI++zfVdmlgtGNfhaqoh Qqmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=2X3ynNzg; 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 gw13-20020a17090b0a4d00b00250a2e130ecsi256358pjb.87.2023.05.24.07.12.09; Wed, 24 May 2023 07:12:22 -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=2X3ynNzg; 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 S235126AbjEXNla (ORCPT + 99 others); Wed, 24 May 2023 09:41:30 -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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766785069150109510?= X-GMAIL-MSGID: =?utf-8?q?1766785069150109510?= 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/stm32mp157c-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 = <&vdda>; status = "disabled"; adc1: adc@0 { - st,adc-channels = <0 1 6>; - /* 16.5 ck_cycles sampling time */ - st,min-sample-time-nsecs = <400>; status = "okay"; + channel@0 { + reg = <0>; + /* 16.5 ck_cycles sampling time */ + st,min-sample-time-ns = <400>; + }; + channel@1 { + reg = <1>; + st,min-sample-time-ns = <400>; + }; + channel@6 { + reg = <6>; + st,min-sample-time-ns = <400>; + }; }; }; From patchwork Wed May 24 13:39:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier MOYSAN X-Patchwork-Id: 98512 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2878122vqo; Wed, 24 May 2023 07:11:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6DVo+XSOgSMb5OyxqzsblblLKOEbL850ZOd+g0S2+zjgoOTm81yzpecDReBYRmGxzb/u7v X-Received: by 2002:a05:6a00:23c8:b0:64c:c65f:7322 with SMTP id g8-20020a056a0023c800b0064cc65f7322mr3166101pfc.30.1684937478540; Wed, 24 May 2023 07:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684937478; cv=none; d=google.com; s=arc-20160816; b=SK2px+zpSq+qmjYtwpodZPfiXEweCYgYFpz9yJwq3SEfTAZGgh7JKFiRzeRRwNTEXS t5vRWRiBa5pYwn9y7qkIkvz8rcCNOnakz2P0XQ624sRyo0IgDYEAg8Ra/mcOX5od/NsV 8Ejf4g/33Ud3cMMZxNWiSDk/zwxVaoJFGNVPuMgv6kDw8jvrG8G0gw6DtkjACM1oz7v7 RvOPdH6zFYHAqm/0nauyJM2SalMV53oznV7IqkWS/qXt98Z0ubCCckOLZRhlTWsmF8mf UXu5HX5dZcSuBFP76+tTwBkP8ZByITSZUe0vVmM0i3DBeS6UZquhlj/spXkzpXC6stoA uuRA== 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=ngCEpUO0MoixhBhQjak+ESBBQIkGgYUVlUkd9S2iL5A=; b=SMBVlSzxWVRNtjBPkqUgqS3F2U9xdmBu3v2Dnye+oibNwP53TGctodYfDZm2X2cAiP jY7yrQrlKwb0OxVjBJd33zWJANMtA9sLvy/6FMDlqsezcwW0VFMoWaD947he6HndWCEs Wg9Dh4moqTMOxTDUtQok2Imh4TD/626Mdhtd9wQR6ERpxChC0UDwZcsfMOiYkAnniZcO 4dSzhc3UzetDbmv6fddSlC/TXRVHmm2vQYFmCZWIYY2Ajjf6x2M4fIal+tZS3pjVFQ1z 6j6VYSV/Xj1Zo18GboB69BlH/WDdPjLeZhVl/9RVv3HICZ+4eypcWs9iS21rAQBs+uXa DBiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=NxAa84bZ; 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 p186-20020a6229c3000000b0063b82909b1esi6742986pfp.0.2023.05.24.07.11.04; Wed, 24 May 2023 07:11:18 -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=NxAa84bZ; 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 S232882AbjEXNlf (ORCPT + 99 others); Wed, 24 May 2023 09:41:35 -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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766785001107945664?= X-GMAIL-MSGID: =?utf-8?q?1766785001107945664?= 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/boot/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 = "default"; pinctrl-0 = <&adc1_in6_pins_a>; - st,min-sample-time-nsecs = <5000>; - st,adc-channels = <6>; status = "disabled"; + channel@6 { + reg = <6>; + st,min-sample-time-ns = <5000>; + }; }; adc2: adc@100 { From patchwork Wed May 24 13:39:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier MOYSAN X-Patchwork-Id: 98514 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2879360vqo; Wed, 24 May 2023 07:12:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6lR1Vgk2hKbj7Bgz8snjo26vPYBAMkhmoUydY6oGHhgNT3h2Gz4k41aUMssLAMUeLu5Mw3 X-Received: by 2002:a05:6a20:3d8b:b0:103:7b36:f21 with SMTP id s11-20020a056a203d8b00b001037b360f21mr20119359pzi.21.1684937568672; Wed, 24 May 2023 07:12:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684937568; cv=none; d=google.com; s=arc-20160816; b=w3sr/qdDNWp4eLr3urbE3LiMHC/lXuMAF+65QruVej5zduDCFvlUTjLfP239ceqOEM E3YMr8LQWLkCC8OIFJUQJIrmvSLkcNvJZkTFL8BsDvWcpLHysU29SPzHsUTQG4clufnv 79TGi7zPDF4hzSh/CrAs2tQQLNSfUsMQFdfPLLoCwVZDScO+r6WBfnu+fYz1ZDAgTBB4 GTqIztgmxgBcNUrKT8L5T0pYU2GGHGwkdrXGxz0+KpXRJ5nw0GdplyN2n9aULMoQhx6G q+Ptus5rq+fIVkHAucyK71zGRI8hkTjfOuH4t6LvzRKqJ5xfDs3TRKl7CKz0FMiZCPul dS2w== 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=R65kAiFBwFlbJ1i90X8uxO7VwNFCvDFlboVO+PjmHGY=; b=dx5s+mOo+nW7wR1zh+Khfjs5HsvBQ+5Y0x4BaUS5pqUtjNJ5DQ1cu11qtJAigEfbc8 GK9rijid/kLhb8+uLleTL3kxXf0AK9iV0e2eDo2HvZ36L0yQTHLAEvGXJ9o5QQE/0TBg thsdZCrZ+ZcgITnL2J2DO76S2rGUP85ONlBADiTvvkynL7m0yBzBPUbazIELk31z6xx+ MlPMHS5nXHvyJxGAMDWhFvMjqi25HxmvpSIYbGV5bKfBWXPkgduESRQJnK2DD64zpCh5 B3MaSQU24Ct6KVOPTMXDgmq3/9xnuFF0IO6ptNwRjGgWfXCnzCs+rXge2O1wdmFupRRA NYyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=wn5A4SN5; 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 j124-20020a636e82000000b0053b928deb7asi2675948pgc.344.2023.05.24.07.12.35; Wed, 24 May 2023 07:12:48 -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=wn5A4SN5; 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 S235207AbjEXNmB (ORCPT + 99 others); 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 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,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766784785642592884?= X-GMAIL-MSGID: =?utf-8?q?1766785096068416419?= 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/arm/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 = "okay"; adc1: adc@0 { - st,adc-channels = <0 1 6>; - st,min-sample-time-nsecs = <5000>; status = "okay"; + channel@0 { + reg = <0>; + st,min-sample-time-ns = <5000>; + }; + channel@1 { + reg = <1>; + st,min-sample-time-ns = <5000>; + }; + channel@6 { + reg = <6>; + st,min-sample-time-ns = <5000>; + }; }; adc2: adc@100 { - st,adc-channels = <0 1 2>; - st,min-sample-time-nsecs = <5000>; status = "okay"; + channel@0 { + reg = <0>; + st,min-sample-time-ns = <5000>; + }; + channel@1 { + reg = <1>; + st,min-sample-time-ns = <5000>; + }; + channel@2 { + reg = <2>; + st,min-sample-time-ns = <5000>; + }; }; }; From patchwork Wed May 24 13:39:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier MOYSAN X-Patchwork-Id: 98515 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2879422vqo; Wed, 24 May 2023 07:12:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ypUvoP7MUjY+9bCSDzUJXHGClGd0R19lVtaRZ5X849waU/W1TsOY/66pQIzRLSwiJPXaZ X-Received: by 2002:a05:6a20:c701:b0:105:53:998 with SMTP id hi1-20020a056a20c70100b0010500530998mr15725975pzb.12.1684937572030; Wed, 24 May 2023 07:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684937572; cv=none; d=google.com; s=arc-20160816; b=x2JxfALr2psZTnm1akmjDA8YckDxZzVjZIR999O9a9P+3NxG2tw2No+ORNDnatVtCX 1bURJ9ca0RC+yB5YzTS+ibEQxp9+oU1UYIj3s3bkjtBmAnKAeynPjAI2hPmsX4yUYswJ we32jxg6pG4neLHpmlxagoXFIbwA+F4mQbRKB43t7nXDa5mya50NIX9HfCqnu8iFvNbu p7OIfsEI9bJBijjYUJ7Gj2ABvERWWZqBn/gOJ4nSSt4xDoDCYuQn68F+1ac98fUc0B5l ww3J0l4tGif6nn6YsFhFs3mJ2uXV3Qqg6liIVIJSmHJCLc2nodgsFFR9Dh2tp7B6Tqvu kWCQ== 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=Do0DjikyeIDFZP9oGmyZJjVUwz6VAIDmWXDZg0ApHTI=; b=Rp1lHRP+DOYe9cDCkygxR50ydfmFcwFMX1Dnzf608vFcpIuCICXe11AGRZochjz0hG QK2bzqHQKhe4XXGQCx2fbWZsHKI9aetrEG9Ar3z3KfHAySntOTrctcBicoeRGrdBcemn roJe0oS4tYqwAom7Y5o/bgHvj942t9OsoQJ9Ce4xF5JF3/vhsce9iScsd1coeX9UUjAJ j38LojKNmmNoY4BuKbHBVrYpxQbZgAlkPH5wDdl0fmolODgtuJl1a+sSl7KEIOOi5SEA tguVDXg0Rc5f9JVx1z9Vg/Iip4FP59g67xJv8GfxyWs7EGuj9GoEMaIcW7adOPvAB4Il R3sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=IkYvi42c; 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 a13-20020a63704d000000b0052c6e736acbsi4420063pgn.333.2023.05.24.07.12.38; Wed, 24 May 2023 07:12:52 -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=IkYvi42c; 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 S235485AbjEXNmE (ORCPT + 99 others); Wed, 24 May 2023 09:42:04 -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 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,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766785099353627853?= X-GMAIL-MSGID: =?utf-8?q?1766785099353627853?= 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 = "okay"; adc1: adc@0 { - st,adc-channels = <0 1 6>; - st,min-sample-time-nsecs = <5000>; status = "okay"; + channel@0 { + reg = <0>; + st,min-sample-time-ns = <5000>; + }; + channel@1 { + reg = <1>; + st,min-sample-time-ns = <5000>; + }; + channel@6 { + reg = <6>; + st,min-sample-time-ns = <5000>; + }; }; adc2: adc@100 { - st,adc-channels = <0 1 2>; - st,min-sample-time-nsecs = <5000>; status = "okay"; + channel@0 { + reg = <0>; + st,min-sample-time-ns = <5000>; + }; + channel@1 { + reg = <1>; + st,min-sample-time-ns = <5000>; + }; + channel@2 { + reg = <2>; + st,min-sample-time-ns = <5000>; + }; }; };