Received: by 10.223.176.46 with SMTP id f43csp49224wra; Thu, 25 Jan 2018 17:15:05 -0800 (PST) X-Google-Smtp-Source: AH8x226Li3gltvgIgI2BvEBb787an7IbGxsbKKCu0lfBxa6I1DO52LlE9Kgpx1EWPf13zwd2Nx0F X-Received: by 10.99.99.199 with SMTP id x190mr14368013pgb.193.1516929305112; Thu, 25 Jan 2018 17:15:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516929305; cv=none; d=google.com; s=arc-20160816; b=pDAAMoSiM0zn2sG6sSeLoBhhh7wISZE1hu0Ay/vFkHZ1EXO3W8SfNX+DDFaUV+oSWu CejETU/31Yx0luJ74Ytnd2pm7TFceNqshTwWebfKblnxw1nHU11tEEX6o6Zjqb9sylT+ CTcUfrEnE81WE7kJrnJEAQF0NCEsoBZDL2uTYl/ckN/WRxZqUiu0G6L7kMJb+tCL2OUQ ovc+A3+Ms6YwRB5xbl8S74jMDFm8BYuFCRd0jduGVEizGb9/NQxY+i96DQ5exeXK4EfP BhpqPYwi4qTNuyzEKb9VYELtrmP4d5iR/5IDYEWCDPMG3rBignFg3JocgZAQj45pptrA VQ1w== 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:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=nCox1xW2VZbujUBau89isTePcx/VVVeBbHBcHnoqM3U=; b=fcap2qj6+JaW9f0tFhHqbOOX5R0jYnflVfCTJQcqkPNz+IGZbQMy8GpUcgh1I7SG8Q P1qTbvBayLtFJiLRr2Lryxlz3wq5THzU/bi5mIKvnMZaM9CaTO50qeOloJSkW8hGVXjR OtoNnP2i7K1DSOVZrupG5yIf0HfeWSvnW5XjROe9rghWXA3Kd0GgKsWz0EupipfD41Lt eVXAKYilhyJPMOKWDcTuim/EQpBQsRxp5gcCFBZWDOCbFRedPhkTcI8MskyNimWxcTNP eo1z1ziJENeoZksqugdKq/wp0vlmUhgxZX4zQl7tOMwzqb11+VBOJFIRzA+h3mYE1iCn u6QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=oUoaMs8n; dkim=pass header.i=@codeaurora.org header.s=default header.b=oUoaMs8n; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p184si5443163pfg.371.2018.01.25.17.14.51; Thu, 25 Jan 2018 17:15:05 -0800 (PST) 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=@codeaurora.org header.s=default header.b=oUoaMs8n; dkim=pass header.i=@codeaurora.org header.s=default header.b=oUoaMs8n; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751762AbeAZBOG (ORCPT + 99 others); Thu, 25 Jan 2018 20:14:06 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:39268 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbeAZBOD (ORCPT ); Thu, 25 Jan 2018 20:14:03 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id DA5CC60A97; Fri, 26 Jan 2018 01:14:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516929242; bh=GropLL5BN2mleEsvnlKAIhD4kFp8sYenGlLsJaeGEiA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oUoaMs8nxMJEiBlETeXEYLwWAFW7X8db5vOX8IMm7P32cHgZ2AFhlQS1oLDjmEhCZ jbTjwXXXfBRUEJzrr7oXbD3vWTZCA03q0Kw92PVTtKLCzn52MoqI4Q8rPYU6XCf/eJ UawIq8q2ZAwNar6JNtaZMC8va1JFI61eUsZ5zzbk= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C4FA86050D; Fri, 26 Jan 2018 01:14:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516929242; bh=GropLL5BN2mleEsvnlKAIhD4kFp8sYenGlLsJaeGEiA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oUoaMs8nxMJEiBlETeXEYLwWAFW7X8db5vOX8IMm7P32cHgZ2AFhlQS1oLDjmEhCZ jbTjwXXXfBRUEJzrr7oXbD3vWTZCA03q0Kw92PVTtKLCzn52MoqI4Q8rPYU6XCf/eJ UawIq8q2ZAwNar6JNtaZMC8va1JFI61eUsZ5zzbk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C4FA86050D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org From: Stephen Boyd To: Linus Walleij Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Timur Tabi , Andy Shevchenko , Bjorn Andersson , linux-gpio@vger.kernel.org, Grant Likely , devicetree@vger.kernel.org Subject: [PATCH v2 1/3] dt-bindings: pinctrl: Add a reserved-gpio-ranges property Date: Thu, 25 Jan 2018 17:13:58 -0800 Message-Id: <20180126011400.2191-2-sboyd@codeaurora.org> X-Mailer: git-send-email 2.15.0.374.g5f9953d2c365 In-Reply-To: <20180126011400.2191-1-sboyd@codeaurora.org> References: <20180126011400.2191-1-sboyd@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some qcom platforms make some GPIOs or pins unavailable for use by non-secure operating systems, and thus reading or writing the registers for those pins will cause access control issues. Introduce a DT property to describe the set of GPIOs that are available for use so that higher level OSes are able to know what pins to avoid reading/writing. Cc: Grant Likely Cc: Signed-off-by: Stephen Boyd --- Documentation/devicetree/bindings/gpio/gpio.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt index b5de08e3b1a2..c22b56680fc8 100644 --- a/Documentation/devicetree/bindings/gpio/gpio.txt +++ b/Documentation/devicetree/bindings/gpio/gpio.txt @@ -151,9 +151,9 @@ in a lot of designs, some using all 32 bits, some using 18 and some using first 18 GPIOs, at local offset 0 .. 17, are in use. If these GPIOs do not happen to be the first N GPIOs at offset 0...N-1, an -additional bitmask is needed to specify which GPIOs are actually in use, -and which are dummies. The bindings for this case has not yet been -specified, but should be specified if/when such hardware appears. +additional set of tuples is needed to specify which GPIOs are unusable, with +the reserved-gpio-ranges binding. This property indicates the start and size +of the GPIOs that can't be used. Optionally, a GPIO controller may have a "gpio-line-names" property. This is an array of strings defining the names of the GPIO lines going out of the @@ -178,6 +178,7 @@ gpio-controller@00000000 { gpio-controller; #gpio-cells = <2>; ngpios = <18>; + reserved-gpio-ranges = <0 4>, <12 2>; gpio-line-names = "MMC-CD", "MMC-WP", "VDD eth", "RST eth", "LED R", "LED G", "LED B", "Col A", "Col B", "Col C", "Col D", "Row A", "Row B", "Row C", "Row D", "NMI button", -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project