Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1038773rda; Sun, 22 Oct 2023 23:37:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvIHIuAWY+TvbtNoqlgEKVN14ALMjD9vXhg4EuON6TVnwGycvB5smveomrYdTE3Dh3GKRW X-Received: by 2002:a17:903:1110:b0:1c8:9832:827f with SMTP id n16-20020a170903111000b001c89832827fmr6858949plh.20.1698043025622; Sun, 22 Oct 2023 23:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698043025; cv=none; d=google.com; s=arc-20160816; b=YoHuAm0gnyoingZfKxdT2lFaHnLQWuEYA8oT9lsPMK4kXnAlncFoHy5lnq0Hia1Qnb QLHUmmHuUqzZ4b1GTo3CM00UfD4O3w3YRWh6LRX5tcIif8rLLN36PZUvGdWlKJgwCvOr +JaHfyKyz9lXmr+52lTOBuPWh2pSzh4x6h2MY6/kJm8hlc5mJfYXCSgssExrq2kg116Y OrN2U1hL5ZmnanAD3Snb0gmhk2nQr4uYnrb80pMNnQX2tZFfUNQiSeT2bTJLL85DaeQp vUlFl1TCZRXrooErKJgelSvlb/zDogzmat84R1386NkWFICZ7RN4pN71nMJAE5ftrGCb zCuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=K4fyo6K7OzrkvLsx7JVTpQeOK1B6fLbPRjuPeJMN1uM=; fh=I//lQCp6qqa6ZoQAaJx3L222sm8aR465zyXqzZq5+Nc=; b=VNVO9NRS1dg5qT0iNqa9pix86ZUZAU7z/we8E8oxuvt/Xx2dtcW4kay2p2iBrS9rH4 frcTQIbqBiX/BcWKX6n7PRZ72by00Oe8q7qFCCZXOKwCtMDb7BUUEGJIfR+j3oyAvu+C Si5SY/uiuTJsL8IV0rNvYk4J/b+HQSHdUmJ454uYOqZggIuqsmxCMVUSR2nccaXvaDkQ hxSaG2+p1xLGsuEffCXkBGJcHh8Fg1bCx4bWA7qldrt3W1Z2Rv7wRNUqSNIoOJt8Tq58 j0jdmLtQ/cgOpcNaR8lN0EdtcV8GvE9rGH/AWCvHwf59OsSVRoVoZNG/8qt0vUsvzpgP P3dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tZT9zZ0C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y16-20020a17090322d000b001c6189eaadesi6286550plg.132.2023.10.22.23.37.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 23:37:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tZT9zZ0C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C2C11809E71C; Sun, 22 Oct 2023 23:37:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233496AbjJWGg6 (ORCPT + 99 others); Mon, 23 Oct 2023 02:36:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229698AbjJWGg4 (ORCPT ); Mon, 23 Oct 2023 02:36:56 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 525A1D67 for ; Sun, 22 Oct 2023 23:36:53 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9b1ebc80d0aso424211766b.0 for ; Sun, 22 Oct 2023 23:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698043012; x=1698647812; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=K4fyo6K7OzrkvLsx7JVTpQeOK1B6fLbPRjuPeJMN1uM=; b=tZT9zZ0CuvV38PndY+r8D/ZYuqwuLyiKvuZY/iTGd1sJCrltxNEth3b9ONxROZmold PXuSeKLt/bDubhb9aEpRA2Fir+GZl3dnWgnnCtvv4fyE/TZpbudUk+VFw/yUmY3VVljR 67vtGEUaSuu57e0J+LK+7GNPTn7KoQooXE729+64HFHdeIOmsCtfz9q65z7ijzJ/vsxk xv6LMSOgDVufK37R/9fLBP3LL6WP96tpZyetoPAOYG+GCeutSEEMd6c7Xd75L0+HVa1w Vs5XRnARZ0aVkU/c70uQLQ4K5ItOtsuGD4wcOF8m/smeBcLUonyRYXyGRoQmEQZSaBUq SdwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698043012; x=1698647812; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=K4fyo6K7OzrkvLsx7JVTpQeOK1B6fLbPRjuPeJMN1uM=; b=mbjASbRaKEDAFbW+HKp5GwweBKf1gfgnRvlqGtf4tRkCOeLxNKmrxzP1VZD+RzkPIO uJswZwYZgWXM7JTZxEa9tIhBvSo7dtrpRCvHj+7UvXwFoXXY6klfwytROQilff3cWZqy wXz8EXGCH5V3JMQxmVpOZcP4nqQnAXqQR/iuWe16m2vRQxJfr51s7PvfOv5wvCxt+Ztg ZFDIVgB61cG5W3SGHrMEqgZl/y0whQe4sMb1E/6fxzIXCDDf4K+aEK9FSCdZ5U0ay1d4 KKcQGlGhMgXk7wszJg8aAXFwO9Y8isUW2jTlyEEbqvikmmreqXcKEum3DcGT0YDNLPiH h7ng== X-Gm-Message-State: AOJu0YwDvbXgIK0V7dYNqVR+aeuE7H00v/sNfBGAb1p69Su0Bul+N5qV NxB9eA4bCjfO+noia1dsUnCE0w== X-Received: by 2002:a17:907:7b90:b0:9c7:56ee:b6e5 with SMTP id ne16-20020a1709077b9000b009c756eeb6e5mr7368082ejc.40.1698043011756; Sun, 22 Oct 2023 23:36:51 -0700 (PDT) Received: from [192.168.1.20] ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id f25-20020a170906561900b009920e9a3a73sm6154197ejq.115.2023.10.22.23.36.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Oct 2023 23:36:51 -0700 (PDT) Message-ID: Date: Mon, 23 Oct 2023 08:36:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 06/11] iio: adc: Add QCOM PMIC5 Gen3 ADC bindings Content-Language: en-US To: Jishnu Prakash , agross@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linus.walleij@linaro.org, Jonathan.Cameron@huawei.com, sboyd@kernel.org, dmitry.baryshkov@linaro.org, quic_subbaram@quicinc.com, quic_collinsd@quicinc.com, quic_kamalw@quicinc.com, marijn.suijten@somainline.org, andriy.shevchenko@linux.intel.com, Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Luca Weiss , linux-iio@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: linux-arm-msm-owner@vger.kernel.org References: <20230708072835.3035398-1-quic_jprakash@quicinc.com> <20230708072835.3035398-7-quic_jprakash@quicinc.com> <99070bce-6188-82eb-c92c-cf7a323394e2@quicinc.com> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m9B+DgxR+NWWd7dUG5NDfTtBYpsFAmI+BxMCGwMFCRRfre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Lkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <99070bce-6188-82eb-c92c-cf7a323394e2@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 22 Oct 2023 23:37:04 -0700 (PDT) On 23/10/2023 08:14, Jishnu Prakash wrote: > Hi Krzysztof, > > On 7/9/2023 10:53 PM, Krzysztof Kozlowski wrote: >> On 08/07/2023 09:28, Jishnu Prakash wrote: >>> For the PMIC5-Gen3 type PMICs, ADC peripheral is present in HW for the >>> following PMICs: PMK8550, PM8550, PM8550B and PM8550VX PMICs. >>> It is similar to PMIC5-Gen2, with SW communication to ADCs on all PMICs >>> going through PBS firmware through a single register interface. This >>> interface is implemented on an SDAM peripheral on the master PMIC PMK8550 >>> rather than a dedicated ADC peripheral. >>> >>> Signed-off-by: Jishnu Prakash >>> --- >>> properties: >>> compatible: >>> @@ -27,10 +27,11 @@ properties: >>> - qcom,spmi-adc5 >>> - qcom,spmi-adc-rev2 >>> - qcom,spmi-adc5-gen2 >>> + - qcom,spmi-adc5-gen3 >> >> This could be ordered... > > > Yes, will do that in the next patchset. > > >>> >>> reg: >>> description: VADC base address in the SPMI PMIC register map >>> - maxItems: 1 >>> + minItems: 1 >> Why? This does not make any sense. With previous patches it looks like >> random set of changes. > > > The idea here is to convey that reg can have multiple values for ADC5 > Gen3 as there can be more than one peripheral used for ADC, so there can > be multiple base addresses. I'll try to make this more clear in the next > patchset. You cannot remove constraints from an entry. > > >> >> >>> >>> '#address-cells': >>> const: 1 >>> @@ -38,6 +39,12 @@ properties: >>> '#size-cells': >>> const: 0 >>> >>> >>> + qcom,adc-tm-type: >>> + description: | >>> + Indicates if ADC_TM monitoring is done on this channel. >> Description does not match property name. > > > You mean it sounds more like an enum which can take several values > rather than just a boolean? I can update it to "qcom,adc-tm" if that > looks better. The property name suggests this is type of monitoring. Property description says this will enable ADC_TM monitoring. These two do not match. Except that I wonder now whether this is a property of hardware at all... What is this monitoring? By the driver? ... >>> then: >>> patternProperties: >>> @@ -299,7 +315,7 @@ examples: >>> label = "xo_therm"; >>> }; >>> >>> - channel@47 { >>> + channel@147 { >> Why? > > > It would be needed if this channel number was supposed to be the virtual > channel number made by combining PMIC SID and actual channel > number....but I could drop it for now and do it in a separate fix as > Jonathan suggested. > > >> >>> reg = ; >>> qcom,ratiometric; >>> qcom,hw-settle-time = <200>; >>> @@ -307,3 +323,80 @@ examples: >>> }; >>> }; >>> }; >>> + >>> + - | >>> + #include >>> + #include >>> + #include >>> + #include >>> + >>> + pmic { >>> + #address-cells = <1>; >>> + #size-cells = <0>; >>> + >>> + /* VADC node */ >>> + pmk8550_vadc: vadc@9000 { >>> + compatible = "qcom,spmi-adc5-gen3"; >> Don't add new examples which differ only in compatible. > > > This example does have differences unique to ADC5 Gen3 such as use of > "#thermal-sensor-cells" and "qcom,adc-tm-type" properties....to make it > clearer, I'll delete some of the excess nodes which don't highlight > these differences. > > >> >> >>> diff --git a/include/dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550.h b/include/dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550.h >>> new file mode 100644 >>> index 000000000000..74e6e2f6f9ed >>> --- /dev/null >>> +++ b/include/dt-bindings/iio/qcom,spmi-adc5-gen3-pm8550.h >>> @@ -0,0 +1,48 @@ >>> +/* SPDX-License-Identifier: GPL-2.0-only */ >> Dual license. > > > I think we do have an internal rule by which we do have to add these two > licenses....I'll check again and update them if required. Just to be clear: your internal rules are your internal affair. We expect here dual license. Best regards, Krzysztof