From patchwork Thu Aug 20 07:46:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chee Nouk Phoo X-Patchwork-Id: 508970 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E7CB5140293 for ; Thu, 20 Aug 2015 19:21:58 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751711AbbHTJVn (ORCPT ); Thu, 20 Aug 2015 05:21:43 -0400 Received: from mail-bn1bon0094.outbound.protection.outlook.com ([157.56.111.94]:25236 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752127AbbHTJUF (ORCPT ); Thu, 20 Aug 2015 05:20:05 -0400 X-Greylist: delayed 3617 seconds by postgrey-1.27 at vger.kernel.org; Thu, 20 Aug 2015 05:20:04 EDT Received: from BN3PR0301CA0081.namprd03.prod.outlook.com (10.160.152.177) by BY1PR03MB1498.namprd03.prod.outlook.com (10.162.210.144) with Microsoft SMTP Server (TLS) id 15.1.231.21; Thu, 20 Aug 2015 07:46:44 +0000 Received: from BY2FFO11FD010.protection.gbl (2a01:111:f400:7c0c::109) by BN3PR0301CA0081.outlook.office365.com (2a01:111:e400:401e::49) with Microsoft SMTP Server (TLS) id 15.1.231.21 via Frontend Transport; Thu, 20 Aug 2015 07:46:44 +0000 Authentication-Results: spf=softfail (sender IP is 66.35.236.227) smtp.mailfrom=altera.com; vger.kernel.org; dkim=none (message not signed) header.d=none; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning altera.com discourages use of 66.35.236.227 as permitted sender) Received: from sj-itexedge03.altera.priv.altera.com (66.35.236.227) by BY2FFO11FD010.mail.protection.outlook.com (10.1.14.74) with Microsoft SMTP Server (TLS) id 15.1.249.14 via Frontend Transport; Thu, 20 Aug 2015 07:46:43 +0000 Received: from sj-mail01.altera.com (137.57.1.6) by webmail.altera.com (66.35.236.227) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 20 Aug 2015 00:46:08 -0700 Received: from ubuntu.localdomain (pg-cnphoon-620.altera.priv.altera.com [137.57.162.85]) by sj-mail01.altera.com (8.13.7+Sun/8.13.7) with ESMTP id t7K7kcjp003614; Thu, 20 Aug 2015 00:46:39 -0700 (PDT) From: Chee Nouk Phoo To: , , CC: , , , Chee Nouk Phoon Subject: [PATCH] Altera Modular ADC driver device tree binding Date: Thu, 20 Aug 2015 00:46:35 -0700 Message-ID: <1440056795-6190-1-git-send-email-cnphoon@altera.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD010; 1:TEOvA/FhGPy3n5oDaYmkqep5rBXN7oWlsceLayOIciOYPPFVHm1v2kVuZg6wnARCS7uzMbjTAfp0GrpnmKhgtLne7sZ5P3N2EU5e0mfjKTsjnSmmbJEGACgAwnPxkCqqXTICy7xTBKnqppaa1pYqc2F70JhAJ4jIsbMwHX0Uxr2Wrt1jx/I6KVe3U8WWx7764n6vfO5sr4xihR7FolgHl1NcZa+zpmPJf1gTdtTu0JBAtyD8UhZwAr0t9+dB+vet6Gu7IOja4n/RX4LbjYokb9Xf5GAaGEeVBt7tnAiX+V4H1w5OGRyKp6OkW2v/YU8rwfrLdgEKEEIgFaqZyBZx6RLQkJhPd7Vs8xE+UODg7Gw= X-Forefront-Antispam-Report: CIP:66.35.236.227; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(3050300001)(189002)(199003)(5003600100002)(19580405001)(77156002)(97736004)(16796002)(64706001)(47776003)(48376002)(19580395003)(106466001)(5007970100001)(92566002)(6806004)(5001860100001)(5003940100001)(62966003)(50466002)(105596002)(107886002)(50226001)(87936001)(86362001)(68736005)(5001960100002)(189998001)(5001770100001)(229853001)(36756003)(5001830100001)(50986999)(46102003)(33646002)(2201001)(81156007)(4001540100001)(7099028)(7059030)(4001430100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR03MB1498; H:sj-itexedge03.altera.priv.altera.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1498; 2:sKA0TqOkwJimHixALiWuEQIF/2S84I/dAinI7IcXXZ0KjLi0+dEvOrz3y6cEbj8cfw/zSaFJgfbz90h9dLVyX70j2+EeP3QOzal9ANe5F1taxn+NDedMfpfNNIZQ2g/RC9wqUdLsJkWa/OwfAOoSkFfbnYnoici+YRXGSJl9tWQ=; 3:A+NxE2jkrtp0eISzjlgB+mInnAv5HDZMyA1WBXydI0uFaNasxI8nyU0SkNWf0S+vhOZeSAhjidXk7tuxW17+ZqJbKrPxppP2m5VfNeKC+yX7WnlI5byNbM2g5DLnG425SwCvB6bWpos1sa5CyEmw7eK2ctg1cmwIcUEtDZQ8kojY38V1lNjJS72t0fQn8NbIwNIeeRBsFWEuXgxv7+1BnuQXZHZjWOkWhBApPd9gMBE=; 25:EbRNawkVgp4RTF6W3M+mf4kc/bWQA+bwMzUftQSGRLJNSoumVbUiHJ4fOTtGm2LVQp4PgTqv1z8NnHu6s0hkADXl3boFFCnbfELD9JjTYqq9GtsLPEsu9v4OiT9pq/XbadCrlq6QhqdWrOUYq3Qv5LHcThhSnQpG4U+mFq9Xxaisg1YLjquDlc+eI1PlFxCNfiFN1NjEEIt4eUdCs7KDVuS5HAoW/ceKJnlNYu5T/GlJfQf2GuvjEwOb1dqR2p9h; 20:gU8oRADb544su/oCvnORxadFJ2vl3Iam0MU/WHmtAP3gImSYCxd5FGGrXnYSdfr9vMCj1L/Nx0kbGbPGNog1YByY0flxUEiyZ8DZjjWzil+aRtIJQfz7EzyB3x/9gwFMVax+rEVd+cbjuzFsouomkK3n1PNppxb3WH1SYqEyneQ= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1498; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(8121501046)(5005006)(3002001); SRVR:BY1PR03MB1498; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1498; X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1498; 4:JdMCFZXVaHw6oCejWF9yvj4T6xy2J8fzqmX5On+t1xV7kTEqe8VoKeK8rar/xdqvOotfLEpqYRFnQw2TAHnV3lsQUugUAAFWCt9FQ+YJwzPzs9dlmnhQLBjktXBvmj5gN6wxrwGZx8nMFRGeZ7SdYzSyEr0D5Kug3mIk+l+UD3dAY8Vm877YvSvlscxF+qPAMcUzDRT7dmxjRBY9J8knTPyDyq2/LRPvA7Eqr6fzDTu3wr2gm0nBvGEcyX7GudOARxXiqoar9iEa2j4c+3V9rBOYzF+mr8DkPTIrlvm8NYABSwyeN7GtW2YoROWmNjcg X-Forefront-PRVS: 0674DC6DD3 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR03MB1498; 23:CR/G8Kai3TU8mMxv8Dwvaz7yM6Qvj1cBpPF6Hvqr5?= =?us-ascii?Q?WlHAa1mZ3ErdJRt+C1N0PEh9ujWKXaWyFYf5nVgPxclL/5jzoor+T3xi2tXX?= =?us-ascii?Q?z6dmWVh7gGwpUDWuYoUOpiZoRUpKdmJ43ZEaXM5yv8O3oYBnCobr54D671db?= =?us-ascii?Q?WTfjXt3BUqRfCART7lwRfnBA/slE6sD5t6OjZLzcJ6D8dm9PMO1Nnj9GZzoP?= =?us-ascii?Q?nysawaAuxsdDrjK6fqSB1d0Xm8XA6e5y42UcfJK/UyStw6QIr+eRvShjeeoy?= =?us-ascii?Q?iaJotJlL90KHa0WPA8Xisbb4kk5gWgf9pUhZ08h0tpgjxAs/WMCCWB8+Rejf?= =?us-ascii?Q?vx1q1lDqRKGvGPs34Z46pXaVdYHBciKgXnqPv52Mbp1M+0Wx0GZBy9e4EL8d?= =?us-ascii?Q?JZFmy92HucTHG3fid0YExRJUtcRykTXGgk4Y5VPE3rIxvLboPvtlMLzZdii8?= =?us-ascii?Q?b1MDbf0P0WzxNfJs4pF93CPqfmug8ctvVE9hmEhsLPUK4f2yGc5K2vNGUOIC?= =?us-ascii?Q?4mZk9c1gZKVmXeujA49B45+sz42g+qI2Ju6dtgmLSqTH0KaxT+WqfrSKlWJJ?= =?us-ascii?Q?e9It9tCZqTXrOifN5LyuBHCinPo/t1PHZBMs1zeruZHTIRFu7nvDE4C8cP/z?= =?us-ascii?Q?NDJpqQlzWz/eQ0+2XSxMAl2dQy6K5EiAXIIAQGs0GR40qtcSekpebUSQMbEf?= =?us-ascii?Q?QpsVijMv/o4wBdDT4WqccAet//u08RSAToMN6v95cAnz39nL2RI3KCLskt/3?= =?us-ascii?Q?AnoWVd670fN06Hmv8NBfNw9FrooG7tpz8O9no5xHKldZ30TC506Tj+xxMQ3Z?= =?us-ascii?Q?18233q1J9nHGkAxmaFpHWcytiLBuvbQnUySZMmcPVqzMXXM6h3YfFarOu5S1?= =?us-ascii?Q?mpaSFQFFyM83OPeXb3tg7S6sdKseHO7LV23M4xoLwvL7dStizJ9Qu1CItatY?= =?us-ascii?Q?Y4E6nSPeazoOttFkV+nfjzDQuvFojEIsl3twgQwDNvtj1uXg9JwPzMkxv63r?= =?us-ascii?Q?svOTdAFRbV3a8Srf3OKSsw7dUIB3ZRAPkc8khSlReARUPiazwNl+JDqLrJA7?= =?us-ascii?Q?Ejq0dE2mOzh51FzFd6x6qdOr5dMiNa+eSZbKjLjeGE75Uimh4/zkpWdPNn+n?= =?us-ascii?Q?CPzH6rvUoWLvfqf3UQk5gPCR0l6fpko2gmNwBAC5iTSCUj6e03Nluk9rcR5D?= =?us-ascii?Q?Y57nyZr2ynDB/U=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1498; 5:0lpdvYLDTiSD1vK7/+h/j89/MJqmfFQwVsdcAE4VmrFhT8M1LFaq5PG2oSVeUUC8Jn7hqfMIwJBfxh2jnrB5CdonaILjISiEElvIF3IWoY0oeVQyKdWoj9Px2unzmYLPSLkVw/4+02MlFPEtbD41Tw==; 24:ae76NRCS8kkprdroAYjr4p+Wtcq2tn3AcRF0EVG/Po6Uyj86TQazPUWSrk24AImy0GnrmdRVObkDtT5nxsJak1Tmap/OAxgZDtvJS85IN14=; 20:ElkYrIEEXdbKjtLUWiDrCPgQIc9ugVfLHTUzPfOzUL/sdeBNYPMWsD9kDH85Xt1AK68zx9AxdaGVIdUrt2iw5T3DdHeRB2V78Gdkdnv6la+QidSV7nn5RMVSxQUin3WczqD5G4H1yDkm5KmIDAxTNDbDntQ0KLXT/El1eFY24PI= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2015 07:46:43.7276 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a; Ip=[66.35.236.227]; Helo=[sj-itexedge03.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1498 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Chee Nouk Phoon Altera Modular ADC is soft IP that wraps the hardened ADC block in a Max1 device. It can be configured to dual ADC mode that supports two channel synchronous sampling or independent single ADCs. ADC sampled values will be written into memory slots in sequence determined by a user configurable sequencer block. This patch adds device tree binding for Altera Modular ADC driver Signed-off-by: Chee Nouk Phoon --- .../bindings/iio/adc/altr,modular-adc.txt | 63 ++++++++++++++++++++ 1 files changed, 63 insertions(+), 0 deletions(-) create mode 100755 Documentation/devicetree/bindings/iio/adc/altr,modular-adc.txt diff --git a/Documentation/devicetree/bindings/iio/adc/altr,modular-adc.txt b/Documentation/devicetree/bindings/iio/adc/altr,modular-adc.txt new file mode 100755 index 0000000..4106cb4 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/altr,modular-adc.txt @@ -0,0 +1,63 @@ +Altera Modular (Dual) ADC + +This binding document describes both Altera Modular ADC and Altera Modular Dual +ADC. Both options can be configured during generation time in Qsys. This driver +only support standard sequencer with Avalon-MM sample storage with up to 64 +memory slots. + +Required properties: +- compatible: must be one of the following strings + "altr,modular-adc": single ADC configuration + "altr,modular-dual-adc": dual ADC configuration + +- reg: Address and length of the register set for the device. It contains the + information of registers in the same order as described by reg-names + +- reg-names: Should contain the reg names + "sequencer_csr": register region for adc sequencer block + "sample_store_csr": register region for sample store block + +- interrupts: interrupt line for ADC + +- altr,adc-mode : ADC configuration + 1: single ADC mode + 2: dual ADC mode + +- altr,adc-slot-count : specify number of conversion slot in use + +- altr,adc-slot-sequence-: specify ADC channel + conversion sequence + : instantiated ADC number + : slot index for ADC memory slot + +- altr,adc-number : specify ADC number when single ADC mode is selected + 1: 1st ADC + 2: 2nd ACD + +Example: single ADC +modular_adc_0: adc@0x20000200 { + compatible = "altr,modular-adc"; + reg = <0x20000000 0x00000008>, + <0x20000200 0x00000200>; + reg-names = "sequencer_csr", "sample_store_csr"; + interrupt-parent = <&cpu>; + interrupts = <8>; + altr,adc-mode = <1>; + altr,adc-slot-count = <2>; + altr,adc1-slot-sequence-1 = <1>; + altr,adc-number = <1>; +}; + +Example: dual ADC +modular_adc_1: adc@0x18002200 { + compatible = "altr,modular-dual-adc"; + reg = <0x18002000 0x00000008>, + <0x18002200 0x00000200>; + reg-names = "sequencer_csr", "sample_store_csr"; + interrupt-parent = <&cpu>; + interrupts = <8>; + altr,adc-mode = <2>; + altr,adc-slot-count = <1>; + altr,adc1-slot-sequence-1 = <6>; + altr,adc2-slot-sequence-1 = <6>; +}; \ No newline at end of file