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 X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06970C433DF for ; Sun, 18 Oct 2020 10:57:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9ADBD20897 for ; Sun, 18 Oct 2020 10:57:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iOseQhRt"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="TjMO+Ppl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9ADBD20897 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uF6GVO17z46UM0TbFygE/ZPrnUbhQk/ei94MqzgO/28=; b=iOseQhRt/6Ap44YMSq1+LKOBB NYet4sdIvvrYrZyeHlYAt8qebuBCVNw2eqZasgpAm2CmJARB/Twd9ea8N6VVb4UzqTSxNocXoqbYf t7NPZJs/Kj00q9p2lj82elxFWYyGfuQAejDy761FcNIG9lJzcYiqhDmuWx5/64MwYIk16Ua+//rpE mymGRrUUe5qcSn70mNsZi30Uf2goGGcgf3xSCjvopDV5YOVknFDnl5Ca3Xyo8QJcu4Du1TNfIn1Hj I3n5NV/wYRsMQ1JWDfmdQ9ekk3qRw1bsI0a0n5wPuTWzK/t0JJrGR+YWZyq9rIoKqwWwAlZ7lYMqk 4P428hvww==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kU6M4-0004ri-0j; Sun, 18 Oct 2020 10:56:00 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kU6M1-0004r9-5o for linux-arm-kernel@lists.infradead.org; Sun, 18 Oct 2020 10:55:58 +0000 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6D26520897; Sun, 18 Oct 2020 10:55:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603018555; bh=L+dg32jrevsTb3fSsRs6/iEC7MJ0sIPnxbRA5OGaXE0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TjMO+PplxQuZkosT10rnNMmsEujF4/Sb2QRh09G28MZC3H1ZZog7xP2V/vzwZsTqj 2Z24FPUsnXEMYhMtWh8gZphJCwP0xRvDxURlLRgCHEIN1DyLSlhE9Y7kB5g/MfJIxO /KdvwO9qugnmJjmStreXqgbKOcCy9uhRfz2iUWFE= Date: Sun, 18 Oct 2020 11:55:49 +0100 From: Jonathan Cameron To: Billy Tsai Subject: Re: [PATCH 3/3] iio: adc: aspeed: Setting ref_voltage in probe Message-ID: <20201018115549.6b1f871a@archlinux> In-Reply-To: <20201013103245.16723-4-billy_tsai@aspeedtech.com> References: <20201013103245.16723-1-billy_tsai@aspeedtech.com> <20201013103245.16723-4-billy_tsai@aspeedtech.com> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201018_065557_351495_F0784381 X-CRM114-Status: GOOD ( 23.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, lars@metafoo.de, p.zabel@pengutronix.de, linux-aspeed@lists.ozlabs.org, BMC-SW@aspeedtech.com, andrew@aj.id.au, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, robh+dt@kernel.org, joel@jms.id.au, pmeerw@pmeerw.net, knaack.h@gmx.de, alexandru.ardelean@analog.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 13 Oct 2020 18:32:45 +0800 Billy Tsai wrote: > At ast2600 ref_voltage becomes configurable and this property is board > dependency. > > Signed-off-by: Billy Tsai dt-bindings: etc for the patch title. Look at naming of similar patches for a reference. > --- > .../devicetree/bindings/iio/adc/aspeed_adc.txt | 16 +++++++++++++++- This has been converted to yaml. It is now in Linus' tree (though only very recently!) You will need to add the relevant logic to make the yaml binding express that this only exists and is required for ast600 The binding is making me wonder a bit on what this voltage actually is... I 'think' we have a setup where the reference voltage is either picked from 2 available internal references or uses an external regulator (presumably provided to a pin on the chip?) As such, the binding should be an optional regulator. If the regulator is present we use that, even if it matches the internal regulator votlage. Someone put it down on the board, so presumably they want to use it. If it's not present, then have to provide either of the two internal regulator voltages via a devicetree binding such as you have here. > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt > index 034fc2ba100e..0ba1980c4e06 100644 > --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt > +++ b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt > @@ -3,8 +3,11 @@ Aspeed ADC > This device is a 10-bit converter for 16 voltage channels. All inputs are > single ended. > > +At ast2600, this device split into two individual IPs and each contains 8 voltage channels. > + > +Chip level dtsi: > Required properties: > -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc" > +- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc" or "aspeed,ast2600-adc" > - reg: memory window mapping address and length > - clocks: Input clock used to derive the sample clock. Expected to be the > SoC's APB clock. > @@ -20,3 +23,14 @@ Example: > resets = <&syscon ASPEED_RESET_ADC>; > #io-channel-cells = <1>; > }; > + > +Board level dts: > +Required properties: > +- ref_voltage: (ast2600 only) > + - Reference voltage in millivolts for the conversions. > + - The range of value is 900 to 2700 mv. See above for suggestion on on this. For the internal case, will need a name that expresses both what it is and what the units are. int_ref_voltage_mv perhaps? Yaml binding should check that either we have a regulator, or we have this element. That way we'll ensure we don't have any confusion over which one to use. Thanks, Jonathan > + > +Example: > +&adc0 { > + ref_voltage = <2500>; > +}; > \ No newline at end of file _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel