From patchwork Tue Jan 20 16:02:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 5670131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 41CCFC058D for ; Tue, 20 Jan 2015 16:04:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76F9E20495 for ; Tue, 20 Jan 2015 16:04:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 456CB20494 for ; Tue, 20 Jan 2015 16:04:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YDbGX-0001HH-F1; Tue, 20 Jan 2015 16:02:53 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YDbGB-00016M-BW for linux-arm-kernel@lists.infradead.org; Tue, 20 Jan 2015 16:02:33 +0000 Received: from trochilidae.toradex.int (unknown [46.140.72.82]) by mail.kmu-office.ch (Postfix) with ESMTPSA id F13AC5C0E76; Tue, 20 Jan 2015 17:00:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=agner.ch; s=dkim; t=1421769620; bh=in23/18y18GXXCUkYdpso1yxGNkFF1zzFJ6nDG1X7PM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U5/tenMcxEwaueeT9dq00DbRReg5xyXeIYm0eaODjiIFJXviZIG2HRnDrnaq1gKmv +HKHRJoS/of5e3vH3SvukDixfyPUkYX4D8as/B738rPjV2PncLReTOLMuKmxpxd6s/ K/z+5qEu+Xx0rQnCRoecc2Bbn1I3D3fsSbPVQt5g= From: Stefan Agner To: jic23@kernel.org Subject: [PATCH 3/3] ARM: dts: add property for maximum ADC clock frequencies Date: Tue, 20 Jan 2015 17:02:03 +0100 Message-Id: <1421769723-28677-4-git-send-email-stefan@agner.ch> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1421769723-28677-1-git-send-email-stefan@agner.ch> References: <1421769723-28677-1-git-send-email-stefan@agner.ch> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150120_080231_639112_E52208F3 X-CRM114-Status: UNSURE ( 7.90 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.1 (/) Cc: B38611@freescale.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, stefan@agner.ch, maitysanchayan@gmail.com, shawn.guo@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ADC clock frequency is limited depending on modes used. Add device tree property which allow to set the mode used and the maximum frequency ratings for the instance. These allows to set the ADC clock to a frequency which is within specification according to the actual mode used. Signed-off-by: Stefan Agner --- Documentation/devicetree/bindings/iio/adc/vf610-adc.txt | 9 +++++++++ arch/arm/boot/dts/vfxxx.dtsi | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt b/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt index 1a4a43d..3eb40e2 100644 --- a/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt +++ b/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt @@ -11,6 +11,13 @@ Required properties: - clock-names: Must contain "adc", matching entry in the clocks property. - vref-supply: The regulator supply ADC reference voltage. +Recommended properties: +- fsl,adck-max-frequency: Maximum frequencies according to datasheets operating + requirements. Three values are required, depending on conversion mode: + - Frequency in normal mode (ADLPC=0, ADHSC=0) + - Frequency in high-speed mode (ADLPC=0, ADHSC=1) + - Frequency in low-power mode (ADLPC=1, ADHSC=0) + Example: adc0: adc@4003b000 { compatible = "fsl,vf610-adc"; @@ -18,5 +25,7 @@ adc0: adc@4003b000 { interrupts = <0 53 0x04>; clocks = <&clks VF610_CLK_ADC0>; clock-names = "adc"; + fsl,adck-max-frequency = <30000000>, <40000000>, + <20000000>; vref-supply = <®_vcc_3v3_mcu>; }; diff --git a/arch/arm/boot/dts/vfxxx.dtsi b/arch/arm/boot/dts/vfxxx.dtsi index 505969a..7584e0a 100644 --- a/arch/arm/boot/dts/vfxxx.dtsi +++ b/arch/arm/boot/dts/vfxxx.dtsi @@ -182,6 +182,8 @@ clocks = <&clks VF610_CLK_ADC0>; clock-names = "adc"; status = "disabled"; + fsl,adck-max-frequency = <30000000>, <40000000>, + <20000000>; }; wdog@4003e000 { @@ -361,6 +363,8 @@ clocks = <&clks VF610_CLK_ADC1>; clock-names = "adc"; status = "disabled"; + fsl,adck-max-frequency = <30000000>, <40000000>, + <20000000>; }; esdhc1: esdhc@400b2000 {