From patchwork Wed Jul 12 06:34:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 107445 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp432805qge; Tue, 11 Jul 2017 23:35:29 -0700 (PDT) X-Received: by 10.101.70.15 with SMTP id v15mr2268710pgq.229.1499841329443; Tue, 11 Jul 2017 23:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499841329; cv=none; d=google.com; s=arc-20160816; b=kHxGSZNxBNxuACu82ZlauBPDchz7Vllp/sl7F83UQzmRXcOdkc5/2z60EaRG0wcPtr 6DupCOc9LgSLC+8Nb9KCoEVOzbJdNjDbTco4lALI0B+UfnnJaCz8XC2oXMURWqGgzG6H 9zClTpk7tNMfjsznmWRdDBAoaWLk5O0P5cEWvDMj47NkWCCMWSsZmvX44047s6DVN4Oa L9LCn0/XwWeWhD1umfKfKkI4txSWCr22qPBXxI0ZuN2oBH/soDEn4n4/LfnBQuOxd5er Cb0E6D3LSJFwP4Li5QkGZLmLDjMFdPLZHd/GwnaZ1JNY1qk/iQaSKu002/ti0U5cYejD X6XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=6QubhvYZiBgYMMjWZt5eTfe/h08H/7pi5xeESTfWzRI=; b=iAJQAMyVOIqxm+hfc0/TjYnIsj0vJbmRBTxoZYyddIRlnshJhXggYFhHyqqllFCFZk XN2LPfCgVAlkKTeZr2EaqXGm+HQ/U9ufDTRIFyBqjZtLtqJDo9lqVRrFHCjtfj9FhPYG 2+4X3sUUQod022uBm1C8QhLMgyP2ngtNdUXVm3jI60e3XAYJecVDITZuJrDKhsqPqe1Q sMleH9V4Br/2VIwr9hd8zqAbTrc6vmN/7wqGodLvRN99Ily1w2fFCPsxPRMPK5pkfGDI V2PRlStwBYY9eSc9VtlzTnk4zM9NQMBTkQqemKkZVdhIyz1+NnoJW31aEczdLSu795YK 7OKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=TFuR5/GB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si1272640pld.16.2017.07.11.23.35.29; Tue, 11 Jul 2017 23:35:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=TFuR5/GB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756713AbdGLGfI (ORCPT + 25 others); Wed, 12 Jul 2017 02:35:08 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:35747 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756694AbdGLGfF (ORCPT ); Wed, 12 Jul 2017 02:35:05 -0400 Received: by mail-pg0-f41.google.com with SMTP id j186so8004666pge.2 for ; Tue, 11 Jul 2017 23:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=6QubhvYZiBgYMMjWZt5eTfe/h08H/7pi5xeESTfWzRI=; b=TFuR5/GBbjyj/0On8L9Bz9QIFEB5GI8s0r1x+JjvxdA8PMqeUEVQUGnQ85Cv9IVbOa lsJJvr3bnne7b5hIAIDPZFLRhnu/lLiV8swVAiFKiepVNCE4f1sB92vNprdFmavCPYgg nFaiRZVhuUC1LxB8VTIkyXTnniB/KwPNLGTI0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=6QubhvYZiBgYMMjWZt5eTfe/h08H/7pi5xeESTfWzRI=; b=cDO1oIzoy4vC0ZgXaWl2oY4ZuC94rgAxI7J7a9CzX9xUzWlIshQsTk8JuyAHP1TKg1 6j5VlVPWzVwp1Z2FOOtZddQKKFoVcdyEsWshl2xxjkWoAc59inxJs+yTtanVyVRmJdzc r4WzlMEZlXqqpqxPOTu7uhIlnV2630xpENYc6NJr/NBKSmT5M5He2SSAPY8TFpJKtYaq OyOGe/qKvbcyUftHmnc3Oh3FguOan73juYJnZz/QOlK3iUyvlNGXcFdXCgFK/aalWGw3 fTuv0Ne1OrFWPSyuv7259KT6MOGd5JYGJiKqolcFssTl0nYSq0Y89+AejpGNqOWZ4LMj P/Bw== X-Gm-Message-State: AIVw111TbmmrcT0vzaPK9Z+qjHoadPkCD74Wdm9V+55SjFdt+mf6O127 GeAA9BvVi2BHIb26 X-Received: by 10.101.77.69 with SMTP id j5mr2247397pgt.133.1499841299289; Tue, 11 Jul 2017 23:34:59 -0700 (PDT) Received: from localhost ([122.167.138.108]) by smtp.gmail.com with ESMTPSA id y192sm2018488pgd.38.2017.07.11.23.34.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jul 2017 23:34:58 -0700 (PDT) From: Viresh Kumar To: Greg Kroah-Hartman , Rob Herring , Mark Rutland Cc: Viresh Kumar , Vincent Guittot , Mark Brown , Stephen Boyd , Rajendra Nayak , Shiraz Hashim , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [RFC v2 5/6] drivers: boot_constraint: Add initial DT bindings Date: Wed, 12 Jul 2017 12:04:35 +0530 Message-Id: <0610277aef9830cff53b7b53cf41cc54886fdc7f.1499770771.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.13.0.71.gd7076ec9c9cb In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds device tree bindings for boot constraints. Only power supply constraint types are supported currently. Signed-off-by: Viresh Kumar --- .../devicetree/bindings/boot-constraints.txt | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/boot-constraints.txt -- 2.13.0.71.gd7076ec9c9cb diff --git a/Documentation/devicetree/bindings/boot-constraints.txt b/Documentation/devicetree/bindings/boot-constraints.txt new file mode 100644 index 000000000000..9a01ea1e6e72 --- /dev/null +++ b/Documentation/devicetree/bindings/boot-constraints.txt @@ -0,0 +1,68 @@ +BOOT CONSTRAINTS +================ + +Some devices are powered ON by the bootloader before the bootloader handovers +control to the Operating System (OS). It maybe important for those devices to +keep working until the time the OS takes over and starts configuring the devices +again. + +A typical example of that can be the LCD controller, which is used by the +bootloaders to show image(s) while the platform is booting into the Operating +System. The LCD controller can be using some resources, like clk, supplies, etc, +that are shared between several devices. These shared resources should be +configured to satisfy need of all the users. If another device's (X) driver gets +probed before the LCD controller driver in this case, then it may end up +reconfiguring these resources to ranges satisfying the current users (only +device X) and that can make the LCD screen unstable. + +This document describes the binding used to specify such boot constraints to the +OS. + +Power Supply Constraints: +------------------------- + +This describes the binding of constraints for the power supply resources. These +must be present directly in the consumer device's node. + +Required properties: +- boot-constraint-supplies: + + This contains an array of (one or more) strings, each of which must match with + the of a corresponding -supply property in the same device node. + This is required for the OS to know about the power supplies that are + configured (and enabled) by the bootloader for the consumer device. + + It is assumed that the power supply is already enabled by the bootloader. + +- boot-constraint-uV: + + This contains an array of {min max} microvolt tuples for the power supplies in + the same order in which they are present in "boot-constraint-supplies" + property. Here, min is the smallest and max is the largest voltage that the + consumer (corresponding to the device node where this property is present) may + set. + +Example of a consumer device node (mmc) referencing two regulators and setting +their boot constraints (twl_reg1 and twl_reg2): + + twl_reg1: regulator@0 { + ... + ... + ... + }; + + twl_reg2: regulator@1 { + ... + ... + ... + }; + + mmc: mmc@0x0 { + ... + ... + vmmc-supply = <&twl_reg1>; + vmmcaux-supply = <&twl_reg2>; + boot-constraint-supplies = "vmmc", "vmmcaux"; + boot-constraint-uV = <1800000 2000000>, /* vmmc */ + <2000000 2000000>; /* vmmcaux */ + };