From patchwork Fri Jul 26 20:25:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 18613 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6DA0425DFF for ; Fri, 26 Jul 2013 20:26:39 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id b11sf1721039qcw.8 for ; Fri, 26 Jul 2013 13:26:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to :x-server-uuid:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:mime-version:x-wss-id:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=Ifvp2yWzyi3yQhy8uZj3ekIuwlGmewNfgbeM+VBqMIM=; b=OAbPEm8gikYGjxuDpFBHBZ6fqZeNOdbgdrT9zQNVnK8h0JCxjxd4lauYIoxMVqO7F7 KrZwkBoj6d8nSzu+u4GsVVaEvbgqM8IfQHS2I2rR72PeU6QD78Da8HrhZIFzyCBeJm9h V77suqNPCoVEV8vLbc+SMIR6wxGalpy/9DrU/2Digejom3mkWGWsHc8fvB2+3rvk8+ZJ N2mPUZnykooUGJTHJiMvPJFCIMPJrmyf7Kg5PmbfLU19xnBip8ksJVI47q0a1ZPvoPil VilSa+QKlEiE+AcnMVWdQzyb1mh0VU8pVfRi32aUdZoNwFABOeI7XEdeyjYal8x75ByG AG0w== X-Received: by 10.236.83.82 with SMTP id p58mr24038971yhe.10.1374870399155; Fri, 26 Jul 2013 13:26:39 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.139 with SMTP id jw11ls1268353qeb.21.gmail; Fri, 26 Jul 2013 13:26:39 -0700 (PDT) X-Received: by 10.58.118.200 with SMTP id ko8mr21393481veb.94.1374870399040; Fri, 26 Jul 2013 13:26:39 -0700 (PDT) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id sj10si14632748vdc.66.2013.07.26.13.26.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Jul 2013 13:26:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.42; Received: by mail-vb0-f42.google.com with SMTP id i3so1539888vbh.29 for ; Fri, 26 Jul 2013 13:26:39 -0700 (PDT) X-Received: by 10.221.16.200 with SMTP id pz8mr1766423vcb.53.1374870398927; Fri, 26 Jul 2013 13:26:38 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp41217veb; Fri, 26 Jul 2013 13:26:38 -0700 (PDT) X-Received: by 10.66.234.71 with SMTP id uc7mr56010325pac.10.1374870398021; Fri, 26 Jul 2013 13:26:38 -0700 (PDT) Received: from mms3.broadcom.com (mms3.broadcom.com. [216.31.210.19]) by mx.google.com with ESMTP id rt9si35698931pbc.143.2013.07.26.13.26.36 for ; Fri, 26 Jul 2013 13:26:38 -0700 (PDT) Received-SPF: neutral (google.com: 216.31.210.19 is neither permitted nor denied by best guess record for domain of markus.mayer@linaro.org) client-ip=216.31.210.19; Received: from [10.9.208.57] by mms3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Fri, 26 Jul 2013 13:16:40 -0700 X-Server-Uuid: B86B6450-0931-4310-942E-F00ED04CA7AF Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Fri, 26 Jul 2013 13:26:25 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.1.438.0; Fri, 26 Jul 2013 13:26:25 -0700 Received: from mail.broadcom.com (lbrmn-lnxub70.ric.broadcom.com [10.136.8.215]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 482C4F2D75; Fri, 26 Jul 2013 13:26:24 -0700 (PDT) From: "Markus Mayer" To: "ARM Kernel List" , "Stephen Warren" , "Linus Walleij" , "Device Tree List" cc: "Christian Daudt" , "Linaro Patches" , "Markus Mayer" Subject: [PATCH v3 2/3] ARM: bcm281xx: Device Tree bindings for GPIO driver Date: Fri, 26 Jul 2013 13:25:44 -0700 Message-ID: <1374870345-8276-3-git-send-email-markus.mayer@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1374870345-8276-1-git-send-email-markus.mayer@linaro.org> References: <1374870345-8276-1-git-send-email-markus.mayer@linaro.org> MIME-Version: 1.0 X-WSS-ID: 7DEC06AD2L852567224-03-01 X-Gm-Message-State: ALoCoQmR5kel1gzZ/XjF3SlNdMK/wXcc2gNeFEfHICfGdqO30K9PpIJT09VG6QAonYU/GzTYIvdl X-Original-Sender: markus.mayer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Markus Mayer Reviewed-by: Christian Daudt Reviewed-by: Tim Kryger Reviewed-by: Matt Porter --- .../devicetree/bindings/gpio/gpio-bcm-kona.txt | 41 ++++++++++++++++++++ arch/arm/boot/dts/bcm11351.dtsi | 16 ++++++++ 2 files changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt diff --git a/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt b/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt new file mode 100644 index 0000000..08e9b5a --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt @@ -0,0 +1,41 @@ +Broadcom Kona Family GPIO +------------------------- + +This GPIO driver is used in the following Broadcom SoCs: + BCM11130, BCM11140, BCM11351, BCM28145, BCM28155 + +The GPIO controller only supports edge, not level triggering. + +Required properties: + - compatible: "brcm,kona-gpio" + - reg: Physical base address and length of the controller's registers. + - interrupts: The interrupt outputs from the controller. + - #gpio-cells: Should be <2>. The first cell is the pin number, the second + cell is used to specify optional parameters: + - bit 0 specifies polarity (0 for normal, 1 for inverted) + - #interrupt-cells: Should be <2>. The first cell is the GPIO number. + The second cell is used to specify flags: + - trigger type (bits[1:0]): + 1 = low-to-high edge triggered. + 2 = high-to-low edge triggered. + 3 = low-to-high or high-to-low edge triggered + Valid values are 1, 2, 3 + - gpio-controller: Marks the device node as a GPIO controller. + - interrupt-controller: Marks the device node as an interrupt controller. + +Example: + gpio: gpio@35003000 { + compatible = "brcm,kona-gpio"; + reg = <0x35003000 0x800>; + interrupts = + <0x0 106 0x4 + 0x0 115 0x4 + 0x0 114 0x4 + 0x0 113 0x4 + 0x0 112 0x4 + 0x0 111 0x4>; + #gpio-cells = <2>; + #interrupt-cells = <2>; + gpio-controller; + interrupt-controller; + }; diff --git a/arch/arm/boot/dts/bcm11351.dtsi b/arch/arm/boot/dts/bcm11351.dtsi index c0cdf66..13aaa06 100644 --- a/arch/arm/boot/dts/bcm11351.dtsi +++ b/arch/arm/boot/dts/bcm11351.dtsi @@ -63,6 +63,22 @@ clock-frequency = <32768>; }; + gpio: gpio@35003000 { + compatible = "brcm,kona-gpio"; + reg = <0x35003000 0x800>; + interrupts = + <0x0 106 0x4 + 0x0 115 0x4 + 0x0 114 0x4 + 0x0 113 0x4 + 0x0 112 0x4 + 0x0 111 0x4>; + #gpio-cells = <2>; + #interrupt-cells = <2>; + gpio-controller; + interrupt-controller; + }; + sdio0: sdio@0x3f180000 { compatible = "bcm,kona-sdhci"; reg = <0x3f180000 0x10000>;