Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp857456rwb; Wed, 28 Sep 2022 09:56:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67vVEZ6xuDAZMAaJKwCSqUsC5L2qwUrHza7k7R5RFTwvJbW87VQ6yhZwJ1Y/EghGG8LuNa X-Received: by 2002:aa7:db5a:0:b0:458:3e4:7df3 with SMTP id n26-20020aa7db5a000000b0045803e47df3mr1529302edt.112.1664384162502; Wed, 28 Sep 2022 09:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664384162; cv=none; d=google.com; s=arc-20160816; b=M478cd4kEwopUGiW/sONhXaYvjjxzTC3ffIKrJeBhKIRskwrpgodvgKYhbSVBbsg7H MXEtQeBLLTtuJB58wPxCeesMnW7Ec+wMx40GaubjvV3SQ9mKE202cHusdYlYjQ2KTYgu vWnkbKzcPQSXFGovQ3ecjuZaNpIIWq5U+nYYlQs4jmUFVSgY2liYY0OUr40LzVkggdPY Lv9+oyzHsiL/K4Txq5AciR9CRnim1zPhQc7L13A2pjN+ITMXpTMGuDt5BsHnGTHgv1xs NDddq4x6hwIjj4S4YQC+rZpHCRGi/vVQSa39Pa2tYmfZvogrhdWBhmP8tm/EgTUbPR7H 57Dw== 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=Tvv4XSpFVhRAUHCiQIXFXmpFW58v1bKVTxE9iPBGlaM=; b=de5ijw7JJ8MbWDfvLz02bBWkX9qwT7rWbiGqrqeZi4Klsn0jdJZXDp5igu3XRo5X6R idLg2ILpaUUkb1z3HfX5de6CcivWa+VX6gi0rpxZ7dgFqPVOe51A1mcczSa6q745xWYT j9TInyEAcjyx7Boo3B7SachcJnjKmrqroiRhYE8tGY7KFCb5KvX6+zXl0u1qafKWRR6l MK0t3A9S9yhsI35wtZ9ZDmPMax96CS2JKeWqs1eRI5H2dn63ZKtV2ESJuTmsAHSjw9Ci rbb847RbhBFIaYMQX+EMNCWXniEdoqni4cBK2Df+Tk3dxWZvfLtiCpnNTmagbofNUMDH Sglw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=G7cqFUCe; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o14-20020a170906974e00b0077f009c0f04si6337094ejy.94.2022.09.28.09.55.35; Wed, 28 Sep 2022 09:56:02 -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=G7cqFUCe; 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 S234588AbiI1QoN (ORCPT + 99 others); Wed, 28 Sep 2022 12:44:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234474AbiI1Qnd (ORCPT ); Wed, 28 Sep 2022 12:43:33 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D69DEE99BC; Wed, 28 Sep 2022 09:43:23 -0700 (PDT) Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28SGYIku027335; Wed, 28 Sep 2022 18:42:58 +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=Tvv4XSpFVhRAUHCiQIXFXmpFW58v1bKVTxE9iPBGlaM=; b=G7cqFUCeLV/D91pWfAawIbRcFtpiQOCGsL7LbRh1spG2BefD9Hmm/XuLs5cwATHBsDLc Tb/simSXC+GV5d2TFB3RgVMYuEsyvFmHEMrooIycRaYau1dAlKeqNSgs8VkcksN6Z+Ws /ZWfx+n/A4qO+NXsBMyrsmA+FCKYEMSD9hLcK1ia0OAvudSy0J6l/MjjUEjj8P98FaEe GYMouMQXpnhMt65PXwfs6GvNLdS3ObBCIEMiDdNGYtoy+xofwMgVlxakBEWdatc7qhXy Rvc/YEeKnYheBhSksl/D0GuAiILPJSVr+EC9/D0pZwSccxLp3QeYtMEm3EZqXxioCn76 9A== 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 3jss82hwd8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Sep 2022 18:42:58 +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 A0D5F100034; Wed, 28 Sep 2022 18:42:56 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 9C6EB23C6B5; Wed, 28 Sep 2022 18:42:56 +0200 (CEST) Received: from localhost (10.75.127.45) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2375.31; Wed, 28 Sep 2022 18:42:56 +0200 From: Olivier Moysan To: Alexandre Torgue , Andy Shevchenko , Fabrice Gasnier , Jonathan Cameron , Lars-Peter Clausen , Maxime Coquelin , , Olivier Moysan , Paul Cercueil , Sebastian Andrzej Siewior , Wan Jiabing , Yannick Brosseau CC: , , , Subject: [PATCH 8/8] ARM: dts: stm32: add adc support on stm32mp135f-dk Date: Wed, 28 Sep 2022 18:41:14 +0200 Message-ID: <20220928164114.48339-9-olivier.moysan@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220928164114.48339-1-olivier.moysan@foss.st.com> References: <20220928164114.48339-1-olivier.moysan@foss.st.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-28_07,2022-09-28_01,2022-06-22_01 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 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 Configure ADC support on stm32mp135f-dk. ADC can be used for USB Type-C CC1 & CC2 pins wired to in6 & in12. Signed-off-by: Olivier Moysan --- arch/arm/boot/dts/stm32mp135f-dk.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp135f-dk.dts b/arch/arm/boot/dts/stm32mp135f-dk.dts index 95068231ed57..5b7630a2452e 100644 --- a/arch/arm/boot/dts/stm32mp135f-dk.dts +++ b/arch/arm/boot/dts/stm32mp135f-dk.dts @@ -76,6 +76,32 @@ vdd_adc: vdd-adc { }; }; +&adc_1 { + pinctrl-names = "default"; + pinctrl-0 = <&adc1_usb_cc_pins_a>; + vdda-supply = <&vdd_adc>; + vref-supply = <&vdd_adc>; + status = "okay"; + + adc1: adc@0 { + status = "okay"; + /* + * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in6 & in12. + * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C: + * 5 * (5.1 + 47kOhms) * 5pF => 1.3us. + * Use arbitrary margin here (e.g. 5us). + */ + channel@6 { + reg = <6>; + st,min-sample-time-ns = <5000>; + }; + channel@12 { + reg = <12>; + st,min-sample-time-ns = <5000>; + }; + }; +}; + &iwdg2 { timeout-sec = <32>; status = "okay"; -- 2.25.1