Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2741761pxb; Mon, 18 Oct 2021 00:20:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbhzlVKMIHJ0XLsvIOFRYaHpf4nXxgRaEvuA1UVYsJo/j0tDlvjJo8/79KcK6vkZd3fc98 X-Received: by 2002:a17:907:1b16:: with SMTP id mp22mr17882436ejc.487.1634541653294; Mon, 18 Oct 2021 00:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634541653; cv=none; d=google.com; s=arc-20160816; b=NOy4ZbehGOcEOM0nIhdwQa0Mh3cM6mKoY6h3fCvDvzEH56c18MGKve0O+VqKCAlBsq 0tWibSAyyQn9IIDteMcmpirRL60ADCARZydLFMoMvz3kHrazmBJfWz1zqKIfcCl4Gp4K e7RBmx0HuJzIJNhr/4A9RXWnMeZfmc+vKV7jYvZR4N934tdyJ1XJnbNwd8nH5o7jJ4b7 i7YsGqNFUP9ukkW8eJV9cJsOBHy38nEcXPkW9UOR+DETg1qo9/4Czq+4nXU3AZVr99qY MIf7aAmRg+IhcNPk/T2WWXmvC9zeY8SnjMecbvtdIiPIsYmG8lkgJR/v7XlGEzJ5IpYv 5DKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ccKtCxZdu4gFjQYBt6CXv3rmuli2NT7/4Lb9YNS2ayc=; b=KIkwGT4zVvyWHKGvNl6VDL62R3LFc5FEj1fyNf2SWcbD84Kk/iK8OwZasxpSSr8BbH SDE3xAUwuMhhtARZSV+Y+BtKmvrcf1jaangKbqkAm7VhtvuSZGOp8BElNJQiEJmTYCLd qFYaItfzxVPu3AfCp5huDpDBKWEWMDAvuAzdUEZDli6Wf43UCy/GqDhOWCcWfQBqb5iz EkQm3hsom+qr7sBi/Ut7gIn7QCHCTCk9ududH10GSyxbQZ1nPFISbebf4tLzJG9ZEi/K U6M0AmRZ8Rz6UgjtzcrvFOLKK/h/G6yKQrGkbxSH3b5/IGzK3eHSMeU6RLNdsWWqWCLX jXTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=UPla4Oja; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si21776391edp.593.2021.10.18.00.20.28; Mon, 18 Oct 2021 00:20:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=UPla4Oja; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbhJRHUD (ORCPT + 99 others); Mon, 18 Oct 2021 03:20:03 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:15804 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbhJRHUC (ORCPT ); Mon, 18 Oct 2021 03:20:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1634541471; x=1666077471; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=ccKtCxZdu4gFjQYBt6CXv3rmuli2NT7/4Lb9YNS2ayc=; b=UPla4Oja23ebDSArdeu4wdXG1x6ablAeSjfyUq/mEPHS6E4aiwwZBUaQ t/nOMkvvE9tbgaAi7KaOgbvSgI6Er603y1ZrGiGicy9/vxjkxvIayfpnj 6W4tJnoB0rf8S5QkINCfMQwfvF/4nkogw+p9ePJwKfMs5lQjpv69MTgbD Y=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 18 Oct 2021 00:17:51 -0700 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2021 00:17:49 -0700 Received: from jprakash-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Mon, 18 Oct 2021 00:17:43 -0700 From: Jishnu Prakash To: , , , , , , , , , , "Rafael J. Wysocki" , "Daniel Lezcano" , Amit Kucheria , "Zhang Rui" , Rob Herring , , , CC: , Jishnu Prakash Subject: [PATCH 1/2] dt-bindings: thermal: qcom: add PMIC5 Gen2 ADC_TM bindings Date: Mon, 18 Oct 2021 12:47:08 +0530 Message-ID: <1634541429-3215-2-git-send-email-quic_jprakash@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1634541429-3215-1-git-send-email-quic_jprakash@quicinc.com> References: <1634541429-3215-1-git-send-email-quic_jprakash@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add documentation for PMIC5 Gen2 ADC_TM peripheral. It is used for monitoring ADC channel thresholds for PMIC7-type PMICs. It is present on PMK8350, like PMIC7 ADC and can be used to monitor up to 8 ADC channels, from any of the PMIC7 PMICs on a target, through PBS(Programmable Boot Sequence). Signed-off-by: Jishnu Prakash --- .../bindings/thermal/qcom-spmi-adc-tm5.yaml | 83 +++++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml b/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml index 3ea8c0c..71a05a3 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml +++ b/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml @@ -10,7 +10,9 @@ maintainers: properties: compatible: - const: qcom,spmi-adc-tm5 + enum: + - qcom,spmi-adc-tm5 + - qcom,spmi-adc-tm5-gen2 reg: maxItems: 1 @@ -33,6 +35,7 @@ properties: qcom,avg-samples: $ref: /schemas/types.yaml#/definitions/uint32 description: Number of samples to be used for measurement. + Not applicable for Gen2 ADC_TM peripheral. enum: - 1 - 2 @@ -45,6 +48,7 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 description: This parameter is used to decrease ADC sampling rate. Quicker measurements can be made by reducing decimation ratio. + Not applicable for Gen2 ADC_TM peripheral. enum: - 250 - 420 @@ -93,6 +97,29 @@ patternProperties: - const: 1 - enum: [ 1, 3, 4, 6, 20, 8, 10 ] + qcom,avg-samples: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Number of samples to be used for measurement. + This property in child node is applicable only for Gen2 ADC_TM peripheral. + enum: + - 1 + - 2 + - 4 + - 8 + - 16 + default: 1 + + qcom,decimation: + $ref: /schemas/types.yaml#/definitions/uint32 + description: This parameter is used to decrease ADC sampling rate. + Quicker measurements can be made by reducing decimation ratio. + This property in child node is applicable only for Gen2 ADC_TM peripheral. + enum: + - 85 + - 340 + - 1360 + default: 1360 + required: - reg - io-channels @@ -124,7 +151,7 @@ examples: #size-cells = <0>; #io-channel-cells = <1>; - /* Other propreties are omitted */ + /* Other properties are omitted */ conn-therm@4f { reg = ; qcom,ratiometric; @@ -148,4 +175,56 @@ examples: }; }; }; + + - | + #include + #include + #include + spmi_bus { + #address-cells = <1>; + #size-cells = <0>; + pmk8350_vadc: adc@3100 { + reg = <0x3100>; + compatible = "qcom,spmi-adc7"; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + /* Other properties are omitted */ + xo-therm@44 { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + conn-therm@47 { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + }; + + pmk8350_adc_tm: adc-tm@3400 { + compatible = "qcom,spmi-adc-tm5-gen2"; + reg = <0x3400>; + interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>; + #thermal-sensor-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + + pmk8350-xo-therm@0 { + reg = <0>; + io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; + + conn-therm@1 { + reg = <1>; + io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU>; + qcom,ratiometric; + qcom,hw-settle-time-us = <200>; + }; + }; + }; ... -- 2.7.4