From patchwork Fri Mar 13 09:50:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 6003941 Return-Path: X-Original-To: patchwork-linux-arm-msm@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 8B1EABF90F for ; Fri, 13 Mar 2015 09:52:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F08C202B8 for ; Fri, 13 Mar 2015 09:52:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE122202AE for ; Fri, 13 Mar 2015 09:52:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754644AbbCMJv4 (ORCPT ); Fri, 13 Mar 2015 05:51:56 -0400 Received: from mail-we0-f182.google.com ([74.125.82.182]:41524 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754338AbbCMJug (ORCPT ); Fri, 13 Mar 2015 05:50:36 -0400 Received: by wesw62 with SMTP id w62so22064693wes.8 for ; Fri, 13 Mar 2015 02:50:34 -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=Nnzq55zdtbxsZs1jCIuegltUZAwHQRkTWWpPXJsPfsM=; b=PzW+7v74ALFYWSokkaLUd1J5xQEO7qmOO7+aX9qZiEeDmcwJQ0EUW0Z9CB96UKE0oZ M4F6V4wUpvzfsny+ismgZnsLUtaRbnYT5+dZHQDof1pT0JUsz4Arqg/7RmAvdjUALXKJ rJE3VseO8C73sEJz+tR9/km+6/8pZpVWTMWYl5DIeY2ZfuMj14OmJu8iFIgRx2xnhmo6 j0UbeMs7/N+ieMx07vz/qgk+KWxvdjZz42JyyDDfLKC+47I17gdv0q4hYcr3Ual+YWs7 p6YczBRxXUjOMP+nslSnvz9iPzXDwJ+OKwizr587ROzqB/Zu85lMQTmLFTKmhtDMG1JO GPSA== X-Gm-Message-State: ALoCoQnDRaOKuq/t2JJxfZuzu6hpPEm0jsGddYw/rAXSUIHlH32X3tB/ozByhDZpTC4oMye8Mufb X-Received: by 10.194.174.164 with SMTP id bt4mr60214441wjc.155.1426240234839; Fri, 13 Mar 2015 02:50:34 -0700 (PDT) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-2-99-228-8.as13285.net. [2.99.228.8]) by mx.google.com with ESMTPSA id r3sm2085872wjw.7.2015.03.13.02.50.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Mar 2015 02:50:34 -0700 (PDT) From: Srinivas Kandagatla To: linux-arm-kernel@lists.infradead.org Cc: Maxime Ripard , Rob Herring , Pawel Moll , Kumar Gala , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stephen Boyd , Arnd Bergmann , broonie@kernel.org, Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v2 3/7] eeprom: Add bindings for simple eeprom framework Date: Fri, 13 Mar 2015 09:50:31 +0000 Message-Id: <1426240231-2520-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426240157-2383-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1426240157-2383-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 eeprom framework which allows eeprom consumers to talk to eeprom providers to get access to eeprom cell data. Signed-off-by: Maxime Ripard [Maxime Ripard: intial version of eeprom framework] Signed-off-by: Srinivas Kandagatla --- .../devicetree/bindings/eeprom/eeprom.txt | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/eeprom/eeprom.txt diff --git a/Documentation/devicetree/bindings/eeprom/eeprom.txt b/Documentation/devicetree/bindings/eeprom/eeprom.txt new file mode 100644 index 0000000..8348d18 --- /dev/null +++ b/Documentation/devicetree/bindings/eeprom/eeprom.txt @@ -0,0 +1,70 @@ += EEPROM Data Device Tree Bindings = + +This binding is intended to represent the location of hardware +configuration data stored in EEPROMs. + +On a significant proportion of boards, the manufacturer has stored +some data on an EEPROM-like device, 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. + += Data cells = +These are the child nodes of the provider which contain data cell +information like offset and size in eeprom provider. + +Required properties: +reg: specifies the offset in byte within that storage device, and the length + in bytes of the data we care about. + There could be more then one offset-length pairs in this property. + +Optional properties: +As required by specific data parsers/interpreters. + +For example: + + /* Provider */ + qfprom: qfprom@00700000 { + compatible = "qcom,qfprom"; + reg = <0x00700000 0x1000>; + ... + + /* Data cells */ + tsens_calibration: calib@404 { + reg = <0x404 0x10>; + }; + + serial_number: sn { + reg = <0x104 0x4>, <0x204 0x4>, <0x30c 0x4>; + + }; + ... + }; + += Data consumers = +Are device nodes which consume eeprom data cells. + +Required properties: + +eeproms: List of phandle and data cell the device might be interested in. + +Optional properties: + +eeprom-names: List of data cell name strings sorted in the same order + as the eeproms property. Consumers drivers will use + eeprom-names to differentiate between multiple cells, + and hence being able to know what these cells are for. + +For example: + + tsens { + ... + eeproms = <&tsens_calibration>; + eeprom-names = "calibration"; + };