From patchwork Thu May 21 16:44:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 6457701 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 769F3C0020 for ; Thu, 21 May 2015 16:48:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9491B203B7 for ; Thu, 21 May 2015 16:48:12 +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 4AB3D20220 for ; Thu, 21 May 2015 16:48:11 +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 1YvTbA-0005Ao-5V; Thu, 21 May 2015 16:45:32 +0000 Received: from mail-wg0-f47.google.com ([74.125.82.47]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YvTaK-0003Qb-Ta for linux-arm-kernel@lists.infradead.org; Thu, 21 May 2015 16:44:42 +0000 Received: by wgez8 with SMTP id z8so1662419wge.0 for ; Thu, 21 May 2015 09:44:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Z95IegQy06e9m0wdB6yxEAspmDYJTc7/J8PYHJbJqE8=; b=jrp/lMKSThHg59GrBkJI+jAY32BTSNF9Z1PHJBqITfo05gLOBpQ0UM/cH7rWEf47IT ZJrJGNV2ak1O+n6KWuvkc8Dpv4VUnxESSApJC0lsM5ePDYi+wWSDPRBj3M6aU21BX7dB hB72skRUyI8GmaFa3q7tgxwN14xS1pasz6c9p7MmMO+5w6uGAg4DVJTBTrCUWA3bzOfV HS6BM8xY0ExQ4Sq1HdeiB7GAJtLF/ikHI/0RKOwdgsE9VVPle69oV5xsdv7+SeILUSZy jzH60ui/ZiIMur4Xu82kpiB8RqjS2LlbrC3908VOE1xuESXO2fExE1uHSqiqdYPoKEaC i/Kw== X-Gm-Message-State: ALoCoQn6z9aTiz1wiypYA2pedph6hXkJPAee3f/dXwIV9TjSW1PIr4KWrZjTra2DGA3Ly/Rzjpr4 X-Received: by 10.180.206.229 with SMTP id lr5mr54261549wic.86.1432226659128; Thu, 21 May 2015 09:44:19 -0700 (PDT) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-2-96-95-164.as13285.net. [2.96.95.164]) by mx.google.com with ESMTPSA id g11sm32933926wjr.25.2015.05.21.09.44.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 May 2015 09:44:18 -0700 (PDT) From: Srinivas Kandagatla To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 06/11] nvmem: Add bindings for simple nvmem framework Date: Thu, 21 May 2015 17:44:12 +0100 Message-Id: <1432226652-8947-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432226535-8640-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1432226535-8640-1-git-send-email-srinivas.kandagatla@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150521_094441_185328_DD847454 X-CRM114-Status: GOOD ( 12.24 ) X-Spam-Score: -0.7 (/) Cc: devicetree@vger.kernel.org, arnd@arndb.de, Greg Kroah-Hartman , s.hauer@pengutronix.de, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, pantelis.antoniou@konsulko.com, Rob Herring , Srinivas Kandagatla , Mark Brown , Kumar Gala , mporter@konsulko.com, Maxime Ripard , linux-api@vger.kernel.org, linux-arm-msm@vger.kernel.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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 This patch adds bindings for simple nvmem framework which allows nvmem consumers to talk to nvmem providers to get access to nvmem cell data. Signed-off-by: Maxime Ripard [Maxime Ripard: intial version of eeprom framework] Signed-off-by: Srinivas Kandagatla --- Documentation/devicetree/bindings/nvmem/nvmem.txt | 84 +++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/nvmem.txt diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.txt b/Documentation/devicetree/bindings/nvmem/nvmem.txt new file mode 100644 index 0000000..ecea654 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/nvmem.txt @@ -0,0 +1,84 @@ += NVMEM Data Device Tree Bindings = + +This binding is intended to represent the location of hardware +configuration data stored in NVMEMs. + +On a significant proportion of boards, the manufacturer has stored +some data on NVMEM, for the OS to be able to retrieve these information +and act upon it. Obviously, the OS has to know about where to retrieve +these data from, and where they are stored on the storage device. + +This document is here to document this. + += Data providers = +Contains bindings specific to provider drivers and data cells as children +to this node. + +Optional properties: + read-only: Mark the provider as read only. + += Data cells = +These are the child nodes of the provider which contain data cell +information like offset and size in nvmem provider. + +Required properties: +reg: specifies the offset in byte within that storage device, start bit + in the byte and the length in bits of the data we care about. + There could be more then one offset-length pairs in this property. + +Optional properties: + +bit-offset: specifies the offset in bit within the address range specified + by reg property. Can take values from 0-7. +nbits: specifies number of bits this cell occupies starting from bit-offset. + +For example: + + /* Provider */ + qfprom: qfprom@00700000 { + ... + + /* Data cells */ + tsens_calibration: calib@404 { + reg = <0x404 0x10>; + }; + + tsens_calibration_bckp: calib_bckp@504 { + reg = <0x504 0x11>; + bit-offset = 6; + nbits = 128; + }; + + pvs_version: pvs-version@6 { + reg = <0x6 0x2> + bit-offset = 7; + nbits = 2; + }; + + speed_bin: speed-bin@c{ + reg = <0xc 0x1>; + bit-offset = 2; + nbits = 3; + + }; + ... + }; + += Data consumers = +Are device nodes which consume nvmem data cells/providers. + +Required-properties: +nvmem-cell: list of phandle to the nvmem data cells. +nvmem-cell-names: names for the each nvmem-cell specified + +Optional-properties: +nvmem : list of phandles to nvmem providers. +nvmem-names: names for the each nvmem provider. + +For example: + + tsens { + ... + nvmem-cell = <&tsens_calibration>; + nvmem-cell-names = "calibration"; + };