From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cpanel.siel.si (cpanel.siel.si [46.19.9.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3F1D39854; Fri, 22 Mar 2024 09:58:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.19.9.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711101543; cv=none; b=O1prgql9nkdtWpZU8+6gjhcEEM8NVfiyPKSa1LP3EmH7DrNz5o9jT0IDhGcPz7z54YSzDZg6lx3kyWssUY6qM9OG9fVaeQguzZc0Dw4XM5TzRT9cKWaW6WUQfEElMIdi5mcQOVaBv/eqB+5h+lojUuVVkv6szdOmXCqMB1ppKhw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711101543; c=relaxed/simple; bh=snSfJ5AEfJHDPAVmOuKibdE9ybjzZy8eOI7cRfFLAgE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=a8S78l6c18tuFgudDNaS7ielehWLHwm37xIJbFnIu/2w1JGuHvIXauYZeZHF6JyTSu0jlCb7Q4NbDEGtQjXzDcXteFz0xDzifMDRZkdIH1ZQHKMT07BJGs/iXSvUF21VMXB4LUSvnxDGsKmhShl+5mVXSDwzx6CtYVojzVUFnsc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=norik.com; spf=pass smtp.mailfrom=norik.com; dkim=pass (2048-bit key) header.d=norik.com header.i=@norik.com header.b=DBX7q0i8; arc=none smtp.client-ip=46.19.9.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=norik.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=norik.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=norik.com header.i=@norik.com header.b="DBX7q0i8" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=norik.com; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yzXvXf84t5xedKkjpoUQe3At33UjMGBnjxJCS2m3Aho=; b=DBX7q0i8YZtNwO6PSSaLlw49o1 V1an/mgH+UuZNViR2IPATvhExnpVYVBCaTstrG8ousCWpKY8LVQxP4iA0pWCLU7mlCmZkWtW8KsW7 ArSqZtTY7hJwqKo828YNyXtEFQdybQPr56E6vs69If8RCNLIu0/pCv4UAq5/AljNpWZ5d6gt1V0ZT dUBO9tnaV0GX1LevYNBFaqQW5nOLi2tBhxb9L/ky1JhB2ZgUCz2PJ9lDZcdxnOgtKpdttkbcxLe2H JGG5ZdSA8d/9iXyY9IMuu/1o4VKYmubbqXGiiZxRYsx2R8YnpTlyiTN+IYhEOaWMrI7qwJFSf0A6X mgdAEDQA==; Received: from 89-212-21-243.static.t-2.net ([89.212.21.243]:44576 helo=[192.168.69.84]) by cpanel.siel.si with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96.2) (envelope-from ) id 1rnbfu-00Ev5q-2H; Fri, 22 Mar 2024 10:58:57 +0100 Message-ID: <1bbd4fdf-59c5-42b2-8698-95f402645c67@norik.com> Date: Fri, 22 Mar 2024 10:58:54 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] dt-bindings: iio: adc: nxp,imx93-adc.yaml: Add calibration properties Content-Language: en-GB To: Krzysztof Kozlowski , haibo.chen@nxp.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: jic23@kernel.org, lars@metafoo.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, upstream@lists.phytec.de References: <20240320100407.1639082-1-andrej.picej@norik.com> <20240320100407.1639082-3-andrej.picej@norik.com> <38637621-1611-4268-ae79-7ac93a72c5ee@linaro.org> <7e58bf96-3c38-467f-86b6-06ff5feedb31@linaro.org> <40e08a5e-e7e9-47c7-9102-24a2bbba67cf@norik.com> From: Andrej Picej In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel.siel.si X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - norik.com X-Get-Message-Sender-Via: cpanel.siel.si: authenticated_id: andrej.picej@norik.com X-Authenticated-Sender: cpanel.siel.si: andrej.picej@norik.com X-Source: X-Source-Args: X-Source-Dir: On 22. 03. 24 09:14, Krzysztof Kozlowski wrote: > On 22/03/2024 08:39, Andrej Picej wrote: >> On 20. 03. 24 13:15, Krzysztof Kozlowski wrote: >>> On 20/03/2024 13:05, Andrej Picej wrote: >>>> Hi Krzysztof, >>>> >>>> On 20. 03. 24 11:26, Krzysztof Kozlowski wrote: >>>>> On 20/03/2024 11:04, Andrej Picej wrote: >>>>>> Document calibration properties and how to set them. >>>>> >>>>> Bindings are before users. >>>> >>>> will change patch order when I send a v2. >>>> >>>>> >>>>> Please use subject prefixes matching the subsystem. You can get them for >>>>> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory >>>>> your patch is touching. >>>>> There is no file extension in prefixes. >>>> >>>> So: dt-bindings: iio/adc: nxp,imx93-adc: Add calibration properties? >>> >>> Did you run the command I proposed? I don't see much of "/", but except >>> that looks good. >> >> Ok noted. >> >>> >>>> >>>>> >>>>>> >>>>>> Signed-off-by: Andrej Picej >>>>>> --- >>>>>> .../bindings/iio/adc/nxp,imx93-adc.yaml | 15 +++++++++++++++ >>>>>> 1 file changed, 15 insertions(+) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml >>>>>> index dacc526dc695..64958be62a6a 100644 >>>>>> --- a/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml >>>>>> +++ b/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml >>>>>> @@ -46,6 +46,21 @@ properties: >>>>>> "#io-channel-cells": >>>>>> const: 1 >>>>>> >>>>>> + nxp,calib-avg-en: >>>>>> + description: >>>>>> + Enable or disable averaging of calibration time. >>>>>> + enum: [ 0, 1 ] >>>>>> + >>>>>> + nxp,calib-nr-samples: >>>>>> + description: >>>>>> + Selects the number of averaging samples to be used during calibration. >>>>>> + enum: [ 16, 32, 128, 512 ] >>>>>> + >>>>>> + nxp,calib-t-samples: >>>>>> + description: >>>>>> + Specifies the sample time of calibration conversions. >>>>>> + enum: [ 8, 16, 22, 32 ] >>>>> >>>>> No, use existing, generic properties. Open other bindings for this. >>>> >>>> You mean I should use generic properties for the ADC calibration >>>> settings? Is there already something in place? Because as I understand >>>> it, these calib-* values only effect the calibration process of the ADC. >>> >>> Please take a look at other devices and dtschema. We already have some >>> properties for this... but maybe they cannot be used? >>> >> >> I did look into other ADC devices, grep across iio/adc, adc bindings >> folders and couldn't find anything closely related to what we are >> looking for. Could you please point me to the properties that you think >> should be used for this? > > Indeed, there are few device specific like qcom,avg-samples. We have > though oversampling-ratio, settling-time-us and min-sample-time (which > is not that good because does not use unit suffix). Ok, these are examples but I think I should not use them, since these are i.MX93 ADC specific settings, which are used for configuration of calibration process, and are not related to the standard conversion process during runtime. Calibration process is the first step that should be done after every power-on reset. > > Then follow up questions: > - nxp,calib-avg-en: Why is it a board-level decision? I would assume > this depends on user choice and what kind of input you have (which could > be board dependent or could be runtime decision). Not really sure I get your question, so please elaborate if I missed the point. This is a user choice, to enable or disable the averaging function in calibration, but this is a board-level decision, probably relates on external ADC regulators and input connections. The same options are used for every ADC channel and this can not be a runtime decision, since calibration is done before the ADC is even registered. > - nxp,calib-t-samples: what does it mean? Time is expressed in time > units, but there is nothing about units in the property name. > You are right, basically this is "time" in cycles of AD_CLK. I should at least add that to the property description. Best regards, Andrej Picej From mboxrd@z Thu Jan 1 00:00:00 1970 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 6D430C47DD9 for ; Fri, 22 Mar 2024 09:59:20 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t4gljEPof+YANqGTRjbro4BY5pPKqd8i3HAlFrO6zMY=; b=japiQaZTwsKxRf wODAXIb9sQm2/VGUBeqtFkSLlohCPzOVBe3Mrx/EQvkMrQQBX3XFhB+5JlBcyoV0SuVU0WDKl1JYw ogtp/s5VN7G0fa0kxuj0AwqFKeNw2m/dEcd5scDBKq3XaaypjgyRT3q1C8sWZr8egjYyAHb1qsT4l wb+i3UKrZ8jJ8hHcSsPcq/HA/JlTcSXDAmZXHWYtTAKkUVT0N6DOIzO6jh1oF6KX6IRcTSH1GhSTE u6eCbrRALrLmxsmyEKzXFUW+2WVhcLPkvfqQetp+1MEyFLhuFM/8ogeIv69Hq2eVBT0FD+V3sbTVn 9fJ0KRIUGAhthJEkPK+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnbg4-00000006hCh-2ehg; Fri, 22 Mar 2024 09:59:08 +0000 Received: from cpanel.siel.si ([46.19.9.99]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnbfy-00000006hBg-0oJ1 for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 09:59:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=norik.com; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yzXvXf84t5xedKkjpoUQe3At33UjMGBnjxJCS2m3Aho=; b=DBX7q0i8YZtNwO6PSSaLlw49o1 V1an/mgH+UuZNViR2IPATvhExnpVYVBCaTstrG8ousCWpKY8LVQxP4iA0pWCLU7mlCmZkWtW8KsW7 ArSqZtTY7hJwqKo828YNyXtEFQdybQPr56E6vs69If8RCNLIu0/pCv4UAq5/AljNpWZ5d6gt1V0ZT dUBO9tnaV0GX1LevYNBFaqQW5nOLi2tBhxb9L/ky1JhB2ZgUCz2PJ9lDZcdxnOgtKpdttkbcxLe2H JGG5ZdSA8d/9iXyY9IMuu/1o4VKYmubbqXGiiZxRYsx2R8YnpTlyiTN+IYhEOaWMrI7qwJFSf0A6X mgdAEDQA==; Received: from 89-212-21-243.static.t-2.net ([89.212.21.243]:44576 helo=[192.168.69.84]) by cpanel.siel.si with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96.2) (envelope-from ) id 1rnbfu-00Ev5q-2H; Fri, 22 Mar 2024 10:58:57 +0100 Message-ID: <1bbd4fdf-59c5-42b2-8698-95f402645c67@norik.com> Date: Fri, 22 Mar 2024 10:58:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] dt-bindings: iio: adc: nxp,imx93-adc.yaml: Add calibration properties Content-Language: en-GB To: Krzysztof Kozlowski , haibo.chen@nxp.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: jic23@kernel.org, lars@metafoo.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, upstream@lists.phytec.de References: <20240320100407.1639082-1-andrej.picej@norik.com> <20240320100407.1639082-3-andrej.picej@norik.com> <38637621-1611-4268-ae79-7ac93a72c5ee@linaro.org> <7e58bf96-3c38-467f-86b6-06ff5feedb31@linaro.org> <40e08a5e-e7e9-47c7-9102-24a2bbba67cf@norik.com> From: Andrej Picej In-Reply-To: X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel.siel.si X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - norik.com X-Get-Message-Sender-Via: cpanel.siel.si: authenticated_id: andrej.picej@norik.com X-Authenticated-Sender: cpanel.siel.si: andrej.picej@norik.com X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_025904_584166_C5F258BF X-CRM114-Status: GOOD ( 20.35 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22. 03. 24 09:14, Krzysztof Kozlowski wrote: > On 22/03/2024 08:39, Andrej Picej wrote: >> On 20. 03. 24 13:15, Krzysztof Kozlowski wrote: >>> On 20/03/2024 13:05, Andrej Picej wrote: >>>> Hi Krzysztof, >>>> >>>> On 20. 03. 24 11:26, Krzysztof Kozlowski wrote: >>>>> On 20/03/2024 11:04, Andrej Picej wrote: >>>>>> Document calibration properties and how to set them. >>>>> >>>>> Bindings are before users. >>>> >>>> will change patch order when I send a v2. >>>> >>>>> >>>>> Please use subject prefixes matching the subsystem. You can get them for >>>>> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory >>>>> your patch is touching. >>>>> There is no file extension in prefixes. >>>> >>>> So: dt-bindings: iio/adc: nxp,imx93-adc: Add calibration properties? >>> >>> Did you run the command I proposed? I don't see much of "/", but except >>> that looks good. >> >> Ok noted. >> >>> >>>> >>>>> >>>>>> >>>>>> Signed-off-by: Andrej Picej >>>>>> --- >>>>>> .../bindings/iio/adc/nxp,imx93-adc.yaml | 15 +++++++++++++++ >>>>>> 1 file changed, 15 insertions(+) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml >>>>>> index dacc526dc695..64958be62a6a 100644 >>>>>> --- a/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml >>>>>> +++ b/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml >>>>>> @@ -46,6 +46,21 @@ properties: >>>>>> "#io-channel-cells": >>>>>> const: 1 >>>>>> >>>>>> + nxp,calib-avg-en: >>>>>> + description: >>>>>> + Enable or disable averaging of calibration time. >>>>>> + enum: [ 0, 1 ] >>>>>> + >>>>>> + nxp,calib-nr-samples: >>>>>> + description: >>>>>> + Selects the number of averaging samples to be used during calibration. >>>>>> + enum: [ 16, 32, 128, 512 ] >>>>>> + >>>>>> + nxp,calib-t-samples: >>>>>> + description: >>>>>> + Specifies the sample time of calibration conversions. >>>>>> + enum: [ 8, 16, 22, 32 ] >>>>> >>>>> No, use existing, generic properties. Open other bindings for this. >>>> >>>> You mean I should use generic properties for the ADC calibration >>>> settings? Is there already something in place? Because as I understand >>>> it, these calib-* values only effect the calibration process of the ADC. >>> >>> Please take a look at other devices and dtschema. We already have some >>> properties for this... but maybe they cannot be used? >>> >> >> I did look into other ADC devices, grep across iio/adc, adc bindings >> folders and couldn't find anything closely related to what we are >> looking for. Could you please point me to the properties that you think >> should be used for this? > > Indeed, there are few device specific like qcom,avg-samples. We have > though oversampling-ratio, settling-time-us and min-sample-time (which > is not that good because does not use unit suffix). Ok, these are examples but I think I should not use them, since these are i.MX93 ADC specific settings, which are used for configuration of calibration process, and are not related to the standard conversion process during runtime. Calibration process is the first step that should be done after every power-on reset. > > Then follow up questions: > - nxp,calib-avg-en: Why is it a board-level decision? I would assume > this depends on user choice and what kind of input you have (which could > be board dependent or could be runtime decision). Not really sure I get your question, so please elaborate if I missed the point. This is a user choice, to enable or disable the averaging function in calibration, but this is a board-level decision, probably relates on external ADC regulators and input connections. The same options are used for every ADC channel and this can not be a runtime decision, since calibration is done before the ADC is even registered. > - nxp,calib-t-samples: what does it mean? Time is expressed in time > units, but there is nothing about units in the property name. > You are right, basically this is "time" in cycles of AD_CLK. I should at least add that to the property description. Best regards, Andrej Picej _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel