From patchwork Tue Jan 26 07:22:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quan Nguyen X-Patchwork-Id: 8118161 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 A113D9F859 for ; Tue, 26 Jan 2016 07:24:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C0A1220274 for ; Tue, 26 Jan 2016 07:24:34 +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 EACE12034C for ; Tue, 26 Jan 2016 07:24:33 +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 1aNxy8-0004NU-Rg; Tue, 26 Jan 2016 07:23:16 +0000 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNxxq-0004FH-4Y for linux-arm-kernel@lists.infradead.org; Tue, 26 Jan 2016 07:22:59 +0000 Received: by mail-pa0-x234.google.com with SMTP id cy9so93965628pac.0 for ; Mon, 25 Jan 2016 23:22:37 -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=cLTTCIy5a0ZYumFJUlwTJjjomuAXg9JgeswFIQDcW6U=; b=awV2u2Y1E/dd0vpBDTYpzVQLpjl68NDCGPQntZE9GX1VQSggHFRnvd4n+8pNGiqiI6 4naSTGDgaxHZGfETIk9KCS3ptmDhL1MFZsXK1kDGTZNjDRK8ANLv/AhBR4qPhU43UH+M B9AOw9ji8FC6AknsK4opi2ZBxfKTo2HAbyi6Q= 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=cLTTCIy5a0ZYumFJUlwTJjjomuAXg9JgeswFIQDcW6U=; b=B0YXNlP4uebKGTM2On1pw0EFDv28sZNJLzwiZhI5320ninLa22enqtZ9cYY6TQ3o2T jofQy9O5Q10zuJTWmtAuZhemavNMfQhsSiSTnpE1XhhaYlK1lVX6oFhj+owULfqr/x0r Hw5bHXcBz3X3/z+XRO8n/+Un+QoQVH/578x2E/wZOl/8fZ/DizcvBlV98o5iGAU2oxzK HcmYclCBw8b5XOQAwVSUssRanesfPYtweWBluKGA+rt1jeddb07ofVhhC6+vx19Uae+l U0jW+kQCqIIn63GrnHGTclSKxXwRZz6GaEhi+9n+cuuooD8aH/6zowhVQ78jL0vBAUUX WbGw== X-Gm-Message-State: AG10YOQyHpsQG23BhQ2EuM0t5hSgRrPZsxaAzpIq5wMwMjNyPbCBx/i98hmQt4ZWmzFlj2Kt X-Received: by 10.67.15.73 with SMTP id fm9mr32183371pad.130.1453792957431; Mon, 25 Jan 2016 23:22:37 -0800 (PST) Received: from localhost.localdomain ([118.69.219.197]) by smtp.gmail.com with ESMTPSA id f12sm34863pat.20.2016.01.25.23.22.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2016 23:22:36 -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 v4 2/3] Documentation: gpio: Update description for X-Gene standby GPIO controller DTS binding Date: Tue, 26 Jan 2016 14:22:14 +0700 Message-Id: <1453792935-19916-3-git-send-email-qnguyen@apm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1453792935-19916-1-git-send-email-qnguyen@apm.com> References: <1453792935-19916-1-git-send-email-qnguyen@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160125_232258_421737_9CEAB49F X-CRM114-Status: GOOD ( 12.52 ) 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 --- .../devicetree/bindings/gpio/gpio-xgene-sb.txt | 39 ++++++++++++++++++---- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt b/Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt index dae1300..2fb76d8 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,9 +26,14 @@ 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: Should 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 { + sbgpio: gpio@17001000{ compatible = "apm,xgene-gpio-sb"; reg = <0x0 0x17001000 0x0 0x400>; #gpio-cells = <2>; @@ -29,4 +44,16 @@ Example: <0x0 0x2b 0x1>, <0x0 0x2c 0x1>, <0x0 0x2d 0x1>; + interrupt-parent = <&gic>; + #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>; };