From patchwork Thu Mar 5 09:46:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 45447 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 709AB204BC for ; Thu, 5 Mar 2015 09:46:37 +0000 (UTC) Received: by labge10 with SMTP id ge10sf38565569lab.3 for ; Thu, 05 Mar 2015 01:46:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Vi09YvitiGAsWySSdJsr28oN81qqb90WoLPXFi6ir9c=; b=B1nRci2KpnnNsyu3LUwebaLcGd+4xixOFoQOIbsUNo0RvhkiKcO9ZvwxcaO/E3ZDh+ nq6sL5iLiVGoYL9nLC8TwHTNK8YOHdfdNVPNedlVG8J0bxWwPNA5F/YfjGM2T3f0Qoa/ lMSbM6h16DK5rYn6+bIqjGQA/dUFggxkjeTAzIhKh6dEPiF5j1okqul9cQyDGWYPL/S7 cWF68KR90siRnzADdqNzIQDMw7xqMRIg55Ins9PE70WJGEJc7Y2O85Yz7eF+1KbDDGFQ pnibBn9vbuQuX39bYWpOvUeK0MIhNeJG3U2anXgwXwe4cKtpgmJJjPNPVYixrrPhPL3z wJJQ== X-Gm-Message-State: ALoCoQlc6xMr0nVTa3qDLHJtZDNXpV0wDGD4Drc2nQEZjRnZjcQsl5XbZDfHjflsalFTKtA6JQYz X-Received: by 10.194.161.194 with SMTP id xu2mr1355083wjb.1.1425548796392; Thu, 05 Mar 2015 01:46:36 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.103 with SMTP id s7ls246077lag.105.gmail; Thu, 05 Mar 2015 01:46:36 -0800 (PST) X-Received: by 10.112.150.200 with SMTP id uk8mr7288369lbb.14.1425548796134; Thu, 05 Mar 2015 01:46:36 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id s19si4159322lbp.47.2015.03.05.01.46.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 01:46:36 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbiz11 with SMTP id z11so24147868lbi.13 for ; Thu, 05 Mar 2015 01:46:36 -0800 (PST) X-Received: by 10.152.197.34 with SMTP id ir2mr7144731lac.36.1425548796029; Thu, 05 Mar 2015 01:46:36 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp372586lbj; Thu, 5 Mar 2015 01:46:34 -0800 (PST) X-Received: by 10.68.69.8 with SMTP id a8mr14700405pbu.82.1425548793442; Thu, 05 Mar 2015 01:46:33 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qp8si8640926pac.143.2015.03.05.01.46.29; Thu, 05 Mar 2015 01:46:33 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932536AbbCEJqR (ORCPT + 28 others); Thu, 5 Mar 2015 04:46:17 -0500 Received: from mail-we0-f182.google.com ([74.125.82.182]:45933 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932511AbbCEJqK (ORCPT ); Thu, 5 Mar 2015 04:46:10 -0500 Received: by wesp10 with SMTP id p10so49557323wes.12 for ; Thu, 05 Mar 2015 01:46:09 -0800 (PST) X-Received: by 10.194.239.134 with SMTP id vs6mr4123721wjc.158.1425548769537; Thu, 05 Mar 2015 01:46:09 -0800 (PST) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-89-242-228-249.as13285.net. [89.242.228.249]) by mx.google.com with ESMTPSA id u18sm9683935wjq.42.2015.03.05.01.46.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Mar 2015 01:46:08 -0800 (PST) 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 , andrew@lunn.ch, Arnd Bergmann , broonie@kernel.org, Greg Kroah-Hartman , Srinivas Kandagatla Subject: [PATCH v1 3/6] eeprom: Add bindings for simple eeprom framework Date: Thu, 5 Mar 2015 09:46:05 +0000 Message-Id: <1425548765-13019-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425548685-12887-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1425548685-12887-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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..dbfb95c --- /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 drivers 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 resets 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"; + };