From patchwork Thu Jan 12 10:44:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13097795 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A909C677F1 for ; Thu, 12 Jan 2023 10:46:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IJkU9yHhQi6h89aKtnyljqUYMqBPrQdImyxwOWEuHPw=; b=c+wV2XZUZ1ehYJ /4gtBssxyPzrqAR+o9KQb6vcxMmWVW5iCpyaxzEmwOR6bhj+UOm4jkLAQ9CxRJ3IYGri32CQcia36 7HHZPkMR97ysnuqtCCOsPvUszOcXSBsEDwFTPLCkFtelR38aVxyWu+eDW8lY6AILwoJMgKWOCPeCT cgmJOdcMKSETeuIL2EawQFPVelPPkCOmCB9gWYw/KiFpNOOXuagegGTtuHjPZExOC+p/fzvkr7YWV tlPUwSAITje4ih9DQidJ0tnc/QXTFrZU68fQS/nywhwgwWn1dFcy6BtDkZXGXJSqhgnHDQUbQwe8d m4tPcaEJQrXiwNhHmOjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv5K-00Edc1-TS; Thu, 12 Jan 2023 10:45:27 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv5G-00EdZl-OC for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 10:45:24 +0000 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 30C7tWiD003642; Thu, 12 Jan 2023 11:45:06 +0100 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=qbOSelrgo9ly75B1lL3nGqofuIGQTzSwK46itLRhY8Q=; b=YrU5GeLY1ekJUP8XoXw0SUa06tUY9KT9xrim9N8l3WcDarGrGsUodfsuKjE3j8jZBGjg egMqtvr+4yuNojbzzOpdOs4rjxpB2eMtHHUZx4JcwU34+WepF8UU3KMxxJZCcarnaw6m BIYsCUPRtH7RupMem5woeCSRfy8Z157EP3uhs71DYLwryppqYnj8Rx9R5HYdsn8AZWTW w8gQvnENoKkMvRiacq5d8AAWJt8lEFBlMv5Q+n9rHXI+omU3EyxJEaPcGWwv1cHhgEGS mns+P2coGHbv034OoEYYyTGoTUkXE49eoV8FCrtPN4HmNcADHQtBoHkN1KZT4btzAeaG iA== 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 3n1k64j6xd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 11:45:06 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1043C100034; Thu, 12 Jan 2023 11:45:05 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 08651214B12; Thu, 12 Jan 2023 11:45:05 +0100 (CET) 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.13; Thu, 12 Jan 2023 11:45:04 +0100 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 01/10] ARM: dts: stm32: add adc internal channels to stm32mp15 Date: Thu, 12 Jan 2023 11:44:36 +0100 Message-ID: <20230112104446.1140551-2-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112104446.1140551-1-olivier.moysan@foss.st.com> References: <20230112104446.1140551-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] 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.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_024523_117977_20560175 X-CRM114-Status: GOOD ( 16.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 4e437d3f2ed6..dea1c53f2b1d 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 Thu Jan 12 10:44:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13097794 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7D629C54EBD for ; Thu, 12 Jan 2023 10:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XS2Ds19zUN+F63hcT5MgKjOkXAQuasP+p0xxnKQ4RI0=; b=FiwrES9oCv6g0O wKJYCr0cKqhQsfRwW2zCTrtjMqJJ9ciLFLD0miJkyvTpw1BcZ+uY7Ih8iqPLKCGmeESv4OgvyuOrv BQaHfaMsv9UdpDFD38zivT6O/9Cp3SX/pZZbsAA7SD8FQ2ZcDduRlwH/6OuL4wSt5/FPJFoYDRe81 UpI+VKkeHyJCPaBO2oPUKtRi7a9yv8qykosiW8HmTjdBIHevGBVSY3+drB+Fe8uxiZ11iMJL6id/p C31lnwqxojx+UO/TykpyQOc+htTjWGVxY7xIfrDISMIueWldB/3+m07nHJ2cJBucSCUHVFMNYbuQA NUNZvBI+UbkfpF7h/iBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv5S-00Edcp-PY; Thu, 12 Jan 2023 10:45:34 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv5G-00EdZh-IT for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 10:45:24 +0000 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 30C950Yp006896; Thu, 12 Jan 2023 11:45:07 +0100 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=dPaJwsRGXwCcMzZZwkQyfdVt8cCjBD6sB59ZnpGsKNA=; b=CwtdjhRiFpC2katfFWcHzcqzVuE2S/71jXIgXQxF1keJNH4QD0jOZ6eLQvsYBMLDDA2D u9Nvh2riNE2t5X7Q547J8rHjFag3c81Kq6/4UvtcFPt0VmK+mdMsjsOnjV0MZPzS6T4z VU2DFweO6GiM0V/MPPHuupLOP0bye7o3CBLKgcx8UaIAI17SIEAxTNRwcrK376C5tzXa cuwjX6IDYskQctKeLLyt1ti7qLKdDaYNaNsqR8snIuE5L5A76q8+yj31VyoQ9SvXTGN4 Cxe4rPfHoeCsqtnvfsbYpNvkb9FWeJb+LPF+DF7Oq38Ub8SFn5oGASKOJK7cNt3w/56R 3Q== 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 3n1tnmf867-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 11:45:07 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 78C2D100038; Thu, 12 Jan 2023 11:45:06 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 72DAA214B11; Thu, 12 Jan 2023 11:45:06 +0100 (CET) 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.13; Thu, 12 Jan 2023 11:45:06 +0100 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 02/10] ARM: dts: stm32: add vrefint calibration on stm32mp15 Date: Thu, 12 Jan 2023 11:44:37 +0100 Message-ID: <20230112104446.1140551-3-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112104446.1140551-1-olivier.moysan@foss.st.com> References: <20230112104446.1140551-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] 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.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_024523_071627_4ED2C360 X-CRM114-Status: GOOD ( 14.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 dea1c53f2b1d..eec5e9992bff 100644 --- a/arch/arm/boot/dts/stm32mp151.dtsi +++ b/arch/arm/boot/dts/stm32mp151.dtsi @@ -1632,6 +1632,9 @@ bsec: efuse@5c005000 { reg = <0x5c005000 0x400>; #address-cells = <1>; #size-cells = <1>; + vrefint: vrefin_cal@52 { + reg = <0x52 0x2>; + }; ts_cal1: calib@5c { reg = <0x5c 0x2>; }; From patchwork Thu Jan 12 10:44:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13097798 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BCC1FC54EBC for ; Thu, 12 Jan 2023 10:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IRONtVspoyztVxzwjJQYvUyvnPO2VLlFkcLkVGPV08s=; b=SJq5yAkipU9RLy Bp/TPv1o8n/VIERIQUphV9zpXzHJsw6Hp7J54ZG3ZtDMlIhsBC+QslaBoCSMyO9qGhdeFsDQuaj7c SgwWpIEbPLVhGRgiyrwC6agPTDVwXJvbpj1gvudqCGQhV8lUG7fjNdhRlCVgVmrLmvoHuxA/D4uSR 3Ie2JtO5fp4Hy/uWyT8DvB4ymBi9bHQ6QV6xy4fVPD0gIF8ngyIAr09tenen2XRpP/zA7ZQLaIbve Xruvg1uPAh0To8alsp+aFvzopYxwQSVx8fWGplSN9pqLICUMYmcUNV/tk6d1DgxtQFRR6M1W5R7kF oh+wxgUK1tgeDA7b1VDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv5u-00Edix-FG; Thu, 12 Jan 2023 10:46:02 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv5I-00EdZq-KX for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 10:45:27 +0000 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 30C7gqbY019146; Thu, 12 Jan 2023 11:45:08 +0100 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=J6sCbJAvaWM5HGxKl15fUTUZyL6LThGNw8XtSWWX/qY=; b=UoiF4PmJp75VdY69hHUQdV9Apgnv0BIoSjpHOkzG69+3UqtGdzUK9ep1Mk93NL0JWUbk I/g4c6pWw7wJxpM+8nGRicj5pYZ6df6DUSxqpF4+r4tYk9BKNzgHyXj0FVz8/SQQn7ae rY4kQZEW9KeALHyuLU9joMOMFleWotGpMuRoQYAzBcqeyuHEK6BuF4vGZuxhgsyZ85rs ScOXbG1aX9pUrlsvaWnNCp27Ea0K+qgIGMsulWJ6uT9BtZnjEQhmsWCTCUIbLAVVxF1q 81h/rSKDrf0vEEiYh6wXcr0NMStIo84+BJjR9xH8rhOwV0otSf1MMy8xdBaX3sNFyUQs 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 3n1k5s1y2u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 11:45:08 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 95DD610002A; Thu, 12 Jan 2023 11:45:07 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 8FE2C214B11; Thu, 12 Jan 2023 11:45:07 +0100 (CET) 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.13; Thu, 12 Jan 2023 11:45:07 +0100 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 03/10] ARM: dts: stm32: add vrefint support to adc2 on stm32mp15 Date: Thu, 12 Jan 2023 11:44:38 +0100 Message-ID: <20230112104446.1140551-4-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112104446.1140551-1-olivier.moysan@foss.st.com> References: <20230112104446.1140551-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] 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.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_024524_993573_45A10DCB X-CRM114-Status: GOOD ( 18.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Set STM32 ADC2 as a consumer of BSEC on STM32MP15, to retrieve vrefint calibration data savec 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 eec5e9992bff..472fc3b94f33 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 Thu Jan 12 10:44:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13097796 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C33FC54EBD for ; Thu, 12 Jan 2023 10:46:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HEu0dEC8Wuar1ehlkiuCLk7De1b5euUpWJdcqCAn9WY=; b=rTmlHAgU3xncWI tJvtjUpDhhyj9Zl2chShcHaMAzGsUfRBm6fLQg8w36lYdN36tMF4fO8o0jbGxF4K5TBq6bas17i7U idRMBHgX9yGaTau+i+KSvA9KGvI13qmowR+V2ODU0jyU3cH1cym6a5JgZOL5ungRxVHtL92gjCWJV RwfKcza9Jpba3/SZUXVqPh+LcXPoBJVAtHlT2JTgEjlm2U7v3OYlx/MWFmnnM0Qf83rEQ2d0mv3q0 zKEuY+EcZgxqBKa11+hRjb2yMbmcofhwVFywQM06P+JT1vX340VuP/2RM15fFxhoXi3q1q2eGtEDS odvjGrXz4PmbwVNmQWkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv5b-00Edes-3H; Thu, 12 Jan 2023 10:45:43 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv5I-00EdaB-FJ for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 10:45:26 +0000 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 30C7taCG003671; Thu, 12 Jan 2023 11:45:09 +0100 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=YlwGMexYBoWgLY+IXf0t36MXaoLetV81lCvSQEz0d3w=; b=VLubzurXoDC2BTYcv+WOcuh46/TVBIwERFibRozFGF36CVyScMjHU8pmFAOnM8PRcEAr AbINWXlw6LZD6VGJ/adsQWXYuoDopMNFYEJEv6iIwIKtGekN9heM1w+NDdyKQ/R/GEWa jQOTH8TxGv65oQDo2HdHkkE1rwuFQ4NC0c2S4Yh4UlsQ+b3wv6Gh7UZ1w8duXo4pedDX NYOsYlHyeC4wLwwEaqNhnzPqwceXPsczQDI3n1E2Em6E0q/oWvEo1b95S0Nirrz3/VP8 Lhsow2oSHkLtrqicoEoN3d0pyRfYU0IBKxOYoDflAYN00o68gPGiil4W9YfWRFcn5JP3 9Q== 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 3n1k64j6xm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 11:45:09 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7FD0510002A; Thu, 12 Jan 2023 11:45:08 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 78432214B11; Thu, 12 Jan 2023 11:45:08 +0100 (CET) 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.13; Thu, 12 Jan 2023 11:45:08 +0100 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 04/10] ARM: dts: stm32: enable adc on stm32mp15xx-dkx boards Date: Thu, 12 Jan 2023 11:44:39 +0100 Message-ID: <20230112104446.1140551-5-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112104446.1140551-1-olivier.moysan@foss.st.com> References: <20230112104446.1140551-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] 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.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_024524_837156_5D2717FF X-CRM114-Status: GOOD ( 17.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 11370ae0d868..6f88e9b1af90 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi @@ -92,28 +92,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 Thu Jan 12 10:44:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13097799 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 001ADC61DB3 for ; Thu, 12 Jan 2023 10:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SHPqCh3/qwnsmzzstk+dsJJbyLRLBlsSIuQVSkkgzng=; b=u0PIhNA4R2aA16 kTLp3p2kaLTN6wJyv6eHzDOmG+o1V3CltR0hYzz/8IMacrEI//PBhNgy4sQUvKw1f+O3H6U6/NOdj F8zaCnhv3Snsd5Xn2hRvUXyoqsoj+mzTHlXFNYn0MR3RgaHBPsK61/WoLj3esR4Bak171KGAWR/mI WBY/LxXzVuqTJcH6zfjb6UoGO645axcPmFL9KioyONDw0m7BCDRINsPT5wYePj1Y1w8vMvlDGBOh8 XP9rUC9hBWG4WyoNJJ/xVln8L3usEhjBgo40nOxU9H87202RcfvMuNSdkVgVMlrwn+0aJ5HJqAUxs wlA7ZRjEyFDvb91Oq5FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv6C-00Edrs-Oo; Thu, 12 Jan 2023 10:46:21 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv67-00EdoJ-QK for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 10:46:18 +0000 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 30C8ASTj019024; Thu, 12 Jan 2023 11:46:10 +0100 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=AUtscierGSWqnxJwSEJS/sAoyVo8tK45Cbbdvi3RjfM=; b=xusZCTaH57IrV6fJtx3J82TmeP/xkGLUMzyjm3P4bTugRiI2bCW2Vd4nn3XSRzru4xOi md1ifLfgybvyjdy/F9yGm7mACWoCaAqy+/d2wG2kQy3sTNTXBPI56akqXG+Nh7FGT1jm AovEc1HvbYdfngMghr+bF/0VoYi60caDClP3LW0W+6ogB45n27iyats+N4jx45qy5Hx3 bTkHZRAPZxKCeSec6+HHRcENnpc53ftH8yipq97CTObYpJrMVKkHKPv8Ni7527Py1f1v 8Q8IlNR35gZzz68RjOAXHx4yDAbNs0AuML4+D5HIm457+d9Mq837ShtE54X6OFhZohBr ng== 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 3n1k5s1y9f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 11:46:10 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 924D110002A; Thu, 12 Jan 2023 11:46:09 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 8C482214B1C; Thu, 12 Jan 2023 11:46:09 +0100 (CET) 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.13; Thu, 12 Jan 2023 11:46:09 +0100 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 05/10] ARM: dts: stm32: adopt generic iio bindings for adc channels on stm32mp157c-ed1 Date: Thu, 12 Jan 2023 11:44:40 +0100 Message-ID: <20230112104446.1140551-6-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112104446.1140551-1-olivier.moysan@foss.st.com> References: <20230112104446.1140551-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] 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.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_024616_208883_851D6E4C X-CRM114-Status: GOOD ( 17.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 b1eb688a278a..4e218aaaaf9b 100644 --- a/arch/arm/boot/dts/stm32mp157c-ed1.dts +++ b/arch/arm/boot/dts/stm32mp157c-ed1.dts @@ -108,10 +108,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 Thu Jan 12 10:44:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13097801 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3EBFCC54EBD for ; Thu, 12 Jan 2023 10:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p4J7epzVG1YyswmUCINEUBPnh+z/CkaBMnIuWvqJZ+0=; b=0sIPRYbDPCyK4N X6c6zV9c9qHbZCf3bb1Ijub7Ehmdsx1nUlu33ltzbdxqGASirv0ZuGByZXiQR2Glvntec1w0oRuiX vCGy0Wah8X7IxPTTGE1/Uf5ca4NYR7X/pC7Flb9I3Rfto9ibZaLlNrTnyN+1jSPCY4DgvyXv8pTmY pQFf6JQTox2KZYrUVdzfsL8ID96fe5XQXcF8ft9miox2gvu4zOkgoYuuAgLoPciTqrZlPBoxMwQEf cEHGggYYQ0q8N5qmeuc1gPIMw+mtPqpOJ27O7rM8upqdpj5hUv07MH/WBDexwpMklwShmOx3dK5Ce Q+R91vM1tev7wJdKNi1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv6l-00Ee9W-Ne; Thu, 12 Jan 2023 10:46:55 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv6G-00Edt5-0G for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 10:46:25 +0000 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 30C7vmSO020522; Thu, 12 Jan 2023 11:46:10 +0100 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=HNZn/Sss8OCkI4O73uBiQwt1zxld6WDeyc0yafXjo3Y=; b=SmfDEBeuJDre3988Gt33cSPVETkJIuTfeWLfIuN/luzXMIUDg63u6oiaB1RatES4eA8n LkqpmySP9pq2psPR/eO6jPPo/683uWrhZtpBWvZjfbVT/3/WgcTRCzmbl19L5NbVF4Xe 2CXJva4sHgwnYDSRpWkyS8NukYE9HQfvPcV/efCCzRovdjBtZ0qpx9dHZ8gTtNCxhZOh /7bqiRtUI24OMvpUi9+sbx5IZ8mgLcOyhw7nx8g6NTyNTxxmOzRc8UuWanmxDKa75hf1 6mpG5gnjydrJr3jJ8vL8UatwmbXR8eOmUs+tj24zLpmpMsw0VbuS0/Ro+nFRbtaGKg4C fg== 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 3n1k5s1y9j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 11:46:10 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6ECD5100038; Thu, 12 Jan 2023 11:46:10 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 6916B214B1C; Thu, 12 Jan 2023 11:46:10 +0100 (CET) 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.13; Thu, 12 Jan 2023 11:46:10 +0100 From: Olivier Moysan To: Marek Vasut , Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , , Subject: [PATCH 06/10] ARM: dts: stm32: adopt generic iio bindings for adc channels on avenger96 Date: Thu, 12 Jan 2023 11:44:41 +0100 Message-ID: <20230112104446.1140551-7-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112104446.1140551-1-olivier.moysan@foss.st.com> References: <20230112104446.1140551-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] 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.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_024624_405912_3B71A1D2 X-CRM114-Status: GOOD ( 16.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use STM32 ADC generic bindings instead of legacy bindings on Avenger96 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-avenger96.dtsi | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi index 50af4a27d6be..62efb550ae64 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi @@ -113,15 +113,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>; + }; }; }; From patchwork Thu Jan 12 10:44:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13097800 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E572BC677F1 for ; Thu, 12 Jan 2023 10:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UM+1lQN8lwzkHcT/dqVYgu7k9DH1GJMb54x7Wi5GVlQ=; b=aW8kHu2byjC3W5 1jXCTas87zmJzxiW8qa5MbnOBixjd4AHA5zh0C4usfAgbR+93fCr2H1JrIqIKGCzj6voPXHKZry3P jWu/uxKsjd+84gfxTQb0IqcX/8qisPfbUcjKUful94LT7vddjwSTYdXwldfBYKraXABGGv7e17tfq Do5pdKcGNuD/3GBt8gbNaQ5UbANHHiFHboiIBBO+dJ5vJA5F9I0R2UsmdUow7jCv477uCBPghXgkL zSZT3wKfQCmYdTfwnUwpGoJ5QVWNfyE/JeMd0CcWD715MgtoOrXnuNyF218u6T6UwS0DcYhXj1KdO WEksG/UGxirANBUFmTjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv6a-00Ee42-3o; Thu, 12 Jan 2023 10:46:44 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv69-00EdpG-D9 for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 10:46:19 +0000 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 30C7gqbh019146; Thu, 12 Jan 2023 11:46:12 +0100 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=A6Nw5imwTw0BXBJa1S9e8lZPQPjlAtQ52d/bFgLH0gw=; b=TQoXwI5t7CUz0WOOR7993CRLUqkFdD+Dd2O5jd9/cQAAhe8GPowYMaCmMRnPDhDG6KRP 5dM50oLEVQhW1vW9LGM8oSF4ZeFNPs+QOtWNpsvLnYTOn9ZPb73cbs1eREbToSVsNtar XzoGeKzd4cZ2JUhRnWyILFoxtj/Qzi5xi+XM6RAMjfvAa2EoGxHDr3Bu48pB+9aq6YfM 3TshbHbl37/5PuX/oWuHxMG0MnIrk8G4UJGC/GpJ5VlG7dGBCk9QoqCMFk6FmBEiwnkH PS3ZcEkwZkneG9NqqVXAYDwqMeLHZ/pMldhThqvrunLje19wsbKI8sAGDRrZMS0sLPEV 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 3n1k5s1y9p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 11:46:12 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DD6E110002A; Thu, 12 Jan 2023 11:46:11 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id D7605214B1C; Thu, 12 Jan 2023 11:46:11 +0100 (CET) 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.13; Thu, 12 Jan 2023 11:46:11 +0100 From: Olivier Moysan To: Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , Subject: [PATCH 07/10] ARM: dts: stm32: adopt generic iio bindings for adc channels on emstamp-argon Date: Thu, 12 Jan 2023 11:44:42 +0100 Message-ID: <20230112104446.1140551-8-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112104446.1140551-1-olivier.moysan@foss.st.com> References: <20230112104446.1140551-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] 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.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_024617_823145_76B7B212 X-CRM114-Status: GOOD ( 16.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 7d11c50b9e40..8b1f1ebd13f9 100644 --- a/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi +++ b/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi @@ -102,9 +102,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 Thu Jan 12 10:44:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13097802 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A61C3C54EBC for ; Thu, 12 Jan 2023 10:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F33/hwKaPviCQoWX3V57e4XT28dTXFFB5MgNUrJxz3o=; b=GRHY8rN/qEE2VI 5gBy+unTF4/mefl9QxG+vafwYqOIN01eivT7x/qGFMAZgKOILP/5JIZizFs6KfILaTrHpNelll/mF X5H9RG5nsmhcsXwuu1/IFJ6q2tYYmtoquZNWipuoTDKiOlLM5GEtztBNuRbztUsrhSTTcW9m1Jbfv arQZBlJA28ck6g8dU03K4Rg9GKYZHsT58l2ul4BWufbSEOohaUfMyFonaIIBtJK9tLW2iAPHk8thI ayNPHGB6vJP67dGO1EFmrICRJin0MfYmFpKarQyLNrOR0LOXM2zqftOHZcN2tQ5LzmEm2i3y4a1+O mS5uQGC9Jps09iUBeyIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv7A-00EeM3-TT; Thu, 12 Jan 2023 10:47:21 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv6J-00Eduq-Ae for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 10:46:31 +0000 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 30C7gaKt031502; Thu, 12 Jan 2023 11:46:14 +0100 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=knjudRumlSRyotBrdwQs+Czf8QCBps4pPL3XJKzxDtQ=; b=c/FSxS7UxvIJ63IRac71CHZW9UNik2UdXRkFYkOjcS68/C3P0gAE/jHVhACbCZ/a8qAs yUmdYzF5lk6+w2g1neN4sMuFr8W8hevZ/JVKnRCszsLk23X/45eGEMS/nw4MSXSn1ftu KpwGJIWhZWNPH8WikjIRboYHGEX6AArr6cm7joePZ0jIsE6X5TTqz/BKo53N1OXCr6qo YKgi6P31XYHtxh3u5sh10ARx78OVBIib5xV9I9b7Memc7Kf3xnMXGXngB/51OSw29IbZ LUt8gupSMFm3gBvUnZN+GclIwtUeM0DiiP3reggr8zwG9qEh++yBsy1KbKbCeFyReMMM aQ== 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 3n1k43j0bv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 11:46:13 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7F53510002A; Thu, 12 Jan 2023 11:46:13 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 782EB214B1C; Thu, 12 Jan 2023 11:46:13 +0100 (CET) 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.13; Thu, 12 Jan 2023 11:46:13 +0100 From: Olivier Moysan To: Marek Vasut , Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , , Subject: [PATCH 08/10] ARM: dts: stm32: adopt generic iio bindings for adc channels on dhcom Date: Thu, 12 Jan 2023 11:44:43 +0100 Message-ID: <20230112104446.1140551-9-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112104446.1140551-1-olivier.moysan@foss.st.com> References: <20230112104446.1140551-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] 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.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_024627_713953_F4F0F5CA X-CRM114-Status: GOOD ( 17.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use STM32 ADC generic bindings instead of legacy bindings on DHCOM 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/stm32mp15xx-dhcom-som.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi index c06edd2eacb0..343ceaf8cd96 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi @@ -82,15 +82,19 @@ &adc { status = "okay"; adc1: adc@0 { - st,min-sample-time-nsecs = <5000>; - st,adc-channels = <0>; status = "okay"; + channel@0 { + reg = <0>; + st,min-sample-time-ns = <5000>; + }; }; adc2: adc@100 { - st,adc-channels = <1>; - st,min-sample-time-nsecs = <5000>; status = "okay"; + channel@1 { + reg = <1>; + st,min-sample-time-ns = <5000>; + }; }; }; From patchwork Thu Jan 12 10:44:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13097803 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA5D1C54EBC for ; Thu, 12 Jan 2023 10:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0/wIhLQz1rnlBd93Z/A0MdwZ7ilCTwyKfPNE4Q53SQI=; b=gV5nb4mF8tUpEs OOVT6f5Vrvtzf78Q8EMybYFfV31iriRwUmLRtaDU4+VP+GmhhU7mhXLMha6XBZ/iKZhbdsFnKuFJ1 QCwFsomry3qHfK2ykXY6CHb6bOumS2lesxvI2l8VvwfYzmPo3J9lBAqawaSsMwt+4q6fryGbNMI6M Az2EvSB/MhA7zqwO2TekCYr8HDOnbZR0PRV4s7ddGfKCWqDCDKAkKsGay0Il/4iif9D3pJGdZzfNq 7DS7+HC8mYmYJvEzB1AF8MgBUovL02obAjezqg3akez2I9BhzONX5aQcYMwbsNsMqVU76PgZzi8LI ekq1S8uUO23SYPEIVMbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv7b-00EebW-Su; Thu, 12 Jan 2023 10:47:48 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv6K-00EdvS-NQ for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 10:46:31 +0000 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 30C8ASTl019024; Thu, 12 Jan 2023 11:46:15 +0100 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=hMu2mmWbpYHte8nDlM0fkeKJVA+2nUVkE+FnfDrdrJA=; b=ytDBaijj/vQpsLVY5KOd2y7sBn1qX09LBUAGd/4w61D7oFsjQEEMAQdusb2moyLeBoQ0 ExyQnxJLVGqer6g5EMSUy6TbQ7mQcBf1v0M3HPzUc1GUlUBtQuA9HaGUPqxDInA04SDW oDmsjZs/jNIPcdP/VBzriy1yCuSzo3ceovWORvRO+E+hjMO9+b54vONwjc3bj7kQWKqL eJqK1Tq/8Spx5fjpt43PoHocZpocxQS8jg8Eskv91j/9Y7QvDHLF5MPmgmVMx2ABZCc3 Qc1vVKziRJxUfgY7XAq3gSqx9+eSAOzuQBhE4oAVg8Du312eQVGbmnb0Atj8yKgzIy9g ww== 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 3n1k5s1y9v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 11:46:15 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1A72310002A; Thu, 12 Jan 2023 11:46:15 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 13C53214B16; Thu, 12 Jan 2023 11:46:15 +0100 (CET) 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.13; Thu, 12 Jan 2023 11:46:14 +0100 From: Olivier Moysan To: Marek Vasut , Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , , Subject: [PATCH 09/10] ARM: dts: stm32: adopt generic iio bindings for adc channels on dhcor-drc Date: Thu, 12 Jan 2023 11:44:44 +0100 Message-ID: <20230112104446.1140551-10-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112104446.1140551-1-olivier.moysan@foss.st.com> References: <20230112104446.1140551-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] 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.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_024629_148764_D467E02C X-CRM114-Status: GOOD ( 16.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 c32c160f97f2..12c85926b901 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 Thu Jan 12 10:44:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Moysan X-Patchwork-Id: 13097804 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3715C54EBD for ; Thu, 12 Jan 2023 10:49:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gCUoV5XDBFHV2x1wW133ndo2EwMgy3zhhluW/m8PDZY=; b=foxw8Gq84BQw42 I8jk0FQBRdfg6ypT8dZmULZUIgyadSgK3kaMgLIRqxAMbf8WPWb3y2sush8/iNtnRoaHEDXENCdet PY3XvzXYg05EKvpCved2mxxOayZSdBDottAKAtk0Rv8HUPCeBQ6mJWA9vASMs5BlVM+mrEGfvPeMW daH8/I+3M3bY6DpQPBrBhWrwAjkAtu/HyyPt2TBte0NzzdFrNh65gmtH7PixyHiLHK95MZS8/TTtb 5vEQ3sWPKKGfVuU3nUY3FzyJxv/VpwcNHA1P+Sx3uAB/cuh3y1d+wluhG0aUCwmObDJjxCeG8J/j0 wV2in+pPeLWGPreQreTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv86-00Eeqw-Mn; Thu, 12 Jan 2023 10:48:19 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFv7L-00EeSG-O6 for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 10:47:33 +0000 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 30C94p1W006449; Thu, 12 Jan 2023 11:47:17 +0100 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=xLV3WigZgu4otlQzhTrE3iP2jSMMMnHfzTKJq5FNspo=; b=AmvIX8oVKJq6S5TemBIkFnwj4lbmYOHBfk93i25jwx6+YiRKysA5Xmm/1JVxKR2TJehP ZmzEJKRsJytajthRh2nToeyYZRNQia4omI0glBLZvazclShoNqYTx8glNdcZP2/oyq1W KtGe7+/Fc8tMYXySgUb9CY1VxqyIf9f+jZs8bn3PT+GNI8TrPATPYMDrYxjYsGsz33vt bmLUc95KB6n+k3TMZo3j1SNCodOF9cHY+YafCauzzjZbyNlbjFBwPOOOgabp4Z/TVK89 8FDYlDEUVdpuZusB3EMOngUSZG27FJ/vnDL/jOkFcf0i33bvUlyqvkG/K446nT8C4NhZ dw== 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 3n1tnmf8ky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 11:47:17 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 95ACC10002A; Thu, 12 Jan 2023 11:47:16 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 8FE7D214B24; Thu, 12 Jan 2023 11:47:16 +0100 (CET) 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.13; Thu, 12 Jan 2023 11:47:16 +0100 From: Olivier Moysan To: Marek Vasut , Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue CC: Olivier Moysan , , , , , Subject: [PATCH 10/10] ARM: dts: stm32: adopt generic iio bindings for adc channels on dhcor-testbench Date: Thu, 12 Jan 2023 11:44:45 +0100 Message-ID: <20230112104446.1140551-11-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112104446.1140551-1-olivier.moysan@foss.st.com> References: <20230112104446.1140551-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.178] 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.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_024732_139387_8F20CE94 X-CRM114-Status: GOOD ( 16.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 5fdb74b652ac..487779a44156 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>; + }; }; };