From patchwork Thu Jan 7 10:27:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quan Nguyen X-Patchwork-Id: 7975631 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7C0439F716 for ; Thu, 7 Jan 2016 10:29:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B63F2017E for ; Thu, 7 Jan 2016 10:29:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4DA62011B for ; Thu, 7 Jan 2016 10:29:31 +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 1aH7nh-0006gj-FA; Thu, 07 Jan 2016 10:28:13 +0000 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aH7nT-0006YJ-Oh for linux-arm-kernel@lists.infradead.org; Thu, 07 Jan 2016 10:28:02 +0000 Received: by mail-pa0-x231.google.com with SMTP id cy9so255623453pac.0 for ; Thu, 07 Jan 2016 02:27:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Qa/6OrED5diBiUw+p/q0WxXHQhkGrBI6xbHIPjECF/0=; b=WHtxLWRyNPv4kQYl2RhVMveJevznsYRMHnkVtfmQw0Zp9g62cNtiG6rNZ6Aei0zi1y Ftz/585laiDmHxzhq//SCHb22eIbddSvSi5NhYB/vDXrD1uzz64IaC0ZPmrVnHaxigpA IfqVudOdIddYhdRhdw2aNAaQPFMlNMjxEvufg= 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=Qa/6OrED5diBiUw+p/q0WxXHQhkGrBI6xbHIPjECF/0=; b=CDQwvIKZF2Bp/ZAccMqI5QR2q2mW/74Xitwx187k8O0/dPKb/uo44bKJZ/yQ+1Stmq eF5baWGxYlbqHA+M48vS5LpU8uKWEzFxSJkuicB5mQYtQLP/TZDVvb/FOZh35yj1W7SV Cv8B7Ee1gvVh4HBUk+tGP6NkBZZPY7LH2sjxvSIm+dZfFYfD3/+CmxniRBHDcWkBqRtV jVS7sPJHxLbW+FIYUGwAmMZpT13y+6x3XUriStwTBMj/ZOVzZC53Iff0jK4ylvvy5PZ8 mzn9r4eHQjgKU2flcG/53/i/lTYH6DqVCtYXAtaAHPMt7uHHNHuqhhjQuDUnwvP6Yaeu gqTg== X-Gm-Message-State: ALoCoQlDrmCmjPG6Yh73qUOJsNfnNa9aCyjevcbcJGhCKZKz81cYdRYmSY81x2zKxzkrCKHSM/soi6MWz3Kl8BYooRJQXOl3Sg== X-Received: by 10.66.140.39 with SMTP id rd7mr149557696pab.86.1452162458598; Thu, 07 Jan 2016 02:27:38 -0800 (PST) Received: from localhost.localdomain ([118.69.219.197]) by smtp.gmail.com with ESMTPSA id fc8sm153268991pab.21.2016.01.07.02.27.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jan 2016 02:27:37 -0800 (PST) From: Quan Nguyen To: linus.walleij@linaro.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: [PATCH v3 2/3] Documentation: gpio: Update description for X-Gene standby GPIO controller DTS binding Date: Thu, 7 Jan 2016 17:27:07 +0700 Message-Id: <1452162428-26839-3-git-send-email-qnguyen@apm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1452162428-26839-1-git-send-email-qnguyen@apm.com> References: <1452162428-26839-1-git-send-email-qnguyen@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160107_022759_989158_70A658FF X-CRM114-Status: GOOD ( 12.44 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Feng Kan , Phong Vo , Duc Dang , patches@apm.com, Loc Ho , Quan Nguyen , Y Vo 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Update description for X-Gene standby GPIO controller DTS binding to support GPIO line configuration as input, output or external IRQ pin. Signed-off-by: Y Vo Signed-off-by: Quan Nguyen Acked-by: Rob Herring --- .../devicetree/bindings/gpio/gpio-xgene-sb.txt | 49 +++++++++++++++++----- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt b/Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt index dae1300..a960d1b 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt @@ -1,10 +1,20 @@ APM X-Gene Standby GPIO controller bindings -This is a gpio controller in the standby domain. - -There are 20 GPIO pins from 0..21. There is no GPIO_DS14 or GPIO_DS15, -only GPIO_DS8..GPIO_DS13 support interrupts. The IRQ mapping -is currently 1-to-1 on interrupts 0x28 thru 0x2d. +This is a gpio controller in the standby domain. It also supports interrupt in +some particular pins which are sourced to its parent interrupt controller +as diagram below: + +-----------------+ + | X-Gene standby | + | GPIO controller +--------- GPIO_0 ++------------+ | | ... +| Parent IRQ | | +--------- GPIO_8/EXT_INT_0 +| controller | EXT_INT_0 | | ... +| (GICv2) +-------------+ +--------- GPIO_[N+8]/EXT_INT_N +| | ... | | +| | EXT_INT_N | +--------- GPIO_[N+9] +| +-------------+ | ... +| | | +--------- GPIO_MAX ++------------+ +-----------------+ Required properties: - compatible: "apm,xgene-gpio-sb" for the X-Gene Standby GPIO controller @@ -16,6 +26,11 @@ Required properties: 1 = active low - gpio-controller: Marks the device node as a GPIO controller. - interrupts: Shall contain exactly 6 interrupts. +- interrupt-parent: Phandle of the parent interrupt controller. +- interrupt-cells: Shoule be two. + - first cell is 0-N coresponding for EXT_INT_0 to EXT_INT_N. + - second cell is used to specify flags. +- interrupt-controller: Marks the device node as an interrupt controller. Example: sbgpio: sbgpio@17001000 { @@ -23,10 +38,22 @@ Example: reg = <0x0 0x17001000 0x0 0x400>; #gpio-cells = <2>; gpio-controller; - interrupts = <0x0 0x28 0x1>, - <0x0 0x29 0x1>, - <0x0 0x2a 0x1>, - <0x0 0x2b 0x1>, - <0x0 0x2c 0x1>, - <0x0 0x2d 0x1>; + interrupt-parent = <&gic>; + interrupts = <0x0 0x28 0x4>, + <0x0 0x29 0x4>, + <0x0 0x2a 0x4>, + <0x0 0x2b 0x4>, + <0x0 0x2c 0x4>, + <0x0 0x2d 0x4>; + #interrupt-cells = <2>; + interrupt-controller; + }; + + testuser { + compatible = "example,testuser"; + /* Use the GPIO_13/EXT_INT_5 line as an active high triggered + * level interrupt + */ + interrupts = <5 4>; + interrupt-parent = <&sbgpio>; };