From patchwork Wed Feb 7 18:35:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 10205847 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 87E2F6020F for ; Wed, 7 Feb 2018 18:36:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77F6329091 for ; Wed, 7 Feb 2018 18:36:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C9F52909C; Wed, 7 Feb 2018 18:36:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EB5AC29091 for ; Wed, 7 Feb 2018 18:36:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=L3RRO2f09AnUmiITx/1JD6GxhbgwdSsRpa+FYhoNM9Q=; b=t86Ky/iVhpFHdITTkjRhWBK6XR lrbRwTLjaFdYZ/tm/egXKJLWvp+Hwt5aL6sZrjXSaqoLejHcrkyi8gGozBQO2DkHPb+HB/pnu5N63 1h6bGRWu4IvfL3qJ8ntpVXx89/vXY4z8wVn2g1137CpqRtsEDSkOc42/ef/oW+/7aPZaBE5sf0RP4 Vm/avP75pWt1AU8Zb8C0HXU3YVtedDSyhBNGiTcaK45yU09a2284oy0n/btS4AArl2GDbZB411RfJ RjeLIF5VdAp9WmCems7yEMJZiYStc7KbSqPH1sWm8qH4WrY4vAGAfqIiKz4ZuBm/JHs1eftu/Nhoc aUbO1Myg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ejUaF-0006JA-CA; Wed, 07 Feb 2018 18:36:39 +0000 Received: from guitar.tcltek.co.il ([192.115.133.116] helo=mx.tkos.co.il) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ejUa0-00063v-9k; Wed, 07 Feb 2018 18:36:26 +0000 Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 9FF6C440A0A; Wed, 7 Feb 2018 20:35:49 +0200 (IST) From: Baruch Siach To: Linus Walleij , Dave Stevenson , Eric Anholt , Stefan Wahren Subject: [PATCH v4 2/5] dt-bindings: gpio: add raspberry pi GPIO expander binding Date: Wed, 7 Feb 2018 20:35:23 +0200 Message-Id: <214ff3856c430b8045b63b25d83733b77054dfab.1517923836.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.15.1 In-Reply-To: References: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Baruch Siach , linux-gpio@vger.kernel.org, Michael Zoran , Rob Herring , linux-rpi-kernel@lists.infradead.org, Frank Rowand , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware over I2C. The firmware mailbox interface allows the ARM core to control the GPIO lines. Signed-off-by: Baruch Siach --- v4: * Move the example gpio node under the firmware node * Rename gpio node name to plain 'gpio' v3: * Rename node name. v2: * Rename compatible string to raspberrypi,firmware-gpio --- .../bindings/gpio/raspberrypi,firmware-gpio.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt diff --git a/Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt b/Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt new file mode 100644 index 000000000000..30326528faa9 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt @@ -0,0 +1,29 @@ +Raspberry Pi GPIO expander + +The Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware. The +firmware exposes a mailbox interface that allows the ARM core to control the +GPIO lines on the expander. + +Required properties: + +- compatible : Should be "raspberrypi,firmware-gpio" +- gpio-controller : Marks the device node as a gpio controller +- #gpio-cells : Should be two. The first cell is the pin number, and + the second cell is used to specify the gpio polarity: + 0 = active high + 1 = active low +- firmware : Reference to the RPi firmware device node + +Example: + +firmware: firmware { + compatible = "raspberrypi,bcm2835-firmware"; + mboxes = <&mailbox>; + + expgpio: gpio { + compatible = "raspberrypi,firmware-gpio"; + gpio-controller; + #gpio-cells = <2>; + firmware = <&firmware>; + }; +};