From patchwork Fri Jun 29 12:43:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 936851 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nQE8jZwH"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41HGXt4BBRz9s0n for ; Fri, 29 Jun 2018 22:43:42 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934233AbeF2Mnk (ORCPT ); Fri, 29 Jun 2018 08:43:40 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:51808 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934172AbeF2Mni (ORCPT ); Fri, 29 Jun 2018 08:43:38 -0400 Received: by mail-wm0-f67.google.com with SMTP id w137-v6so2072630wmw.1; Fri, 29 Jun 2018 05:43:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4DWUoHj6vTfwHuJUrbTm1e5UxTOhVgFKQbUhMPifmTc=; b=nQE8jZwHcqUQyUcodEScO/L/LFgAmls62FbvRF6I8/wzfT7c95UHF5QBYtNN+duFqN 5RsQcBEHX6V3qGiRCpfJ8GW1sZUlbcnYTgiBl901LA8s+uKFlBsrvSmrLPaIcq2AnDKR kpIBOWP5EB8TOOAj6FJ+kZkQnEZBqpcowZ3ynXuwmFUeBG+0H2cN84eiOu/W4ymDK6mi /OAkh5QgBTJxYs9kpfpB+QvM2ZTAvIMYGLEwAsasOsb+J9khi4ncYJuCwTMz+q5DkL+Q nRGM+Ur1oPFGPP3sEFwMAtv8xzoC6rw+m9BI6kni81LNl9BBJKYM82v0hvgXr2IhdBco S2vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4DWUoHj6vTfwHuJUrbTm1e5UxTOhVgFKQbUhMPifmTc=; b=I8Oy2YFqCMk5pHWiMD97TiHLHFcddeoUy3aUjOstgusvYSlZtAK+1BnPlcqEx/MYSW Whg9pRWUFY/D4SQ6xDbUuwy0v6vH/gpeJ/5zkP0k/dT37jLt7kJY9ZsqKo1PfjUVBeZn MjVmZfvLeSdTR5wl7HO857FjjyYa30vPopaCykk79OVCl0AOIS08y0rS0U6fXOJakjoj EKoqG26JF/yxPsUyk9WmI9AztuksTzoD3W6k0UK5ncza673iICnZH2+76Hs7LObvRu8f t+hyYp1ykm2JO0AUJGmYiclVltVxmuZ44Yc5P4220eOWMnWRjKETGXifqdx8+5N7UZ0D uuTA== X-Gm-Message-State: APt69E3GJI7KZ/RCO9D5GZnXHKHcg3yRykqzY47eK1aJMI0RbjPMzxxt N2q/iQnWrp05COGFxBklH7Q= X-Google-Smtp-Source: AAOMgpeKMy7ybQa4xBoEkXBD7VoeGyGPXdaqCqQC9go/eZ+b+wrlJU8IKAaZkiLbd+TrJY5VtAgPwA== X-Received: by 2002:a1c:a103:: with SMTP id k3-v6mr1722479wme.161.1530276217009; Fri, 29 Jun 2018 05:43:37 -0700 (PDT) Received: from localhost.localdomain (173.red-83-42-150.dynamicip.rima-tde.net. [83.42.150.173]) by smtp.gmail.com with ESMTPSA id s184-v6sm1567951wmf.5.2018.06.29.05.43.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jun 2018 05:43:36 -0700 (PDT) From: Sergio Paracuellos To: linus.walleij@linaro.org Cc: robh+dt@kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, gregkh@linuxfoundation.org, neil@brown.name, driverdev-devel@linuxdriverproject.org Subject: [PATCH v2 2/2] dt-bindings: document gpio-mt7621 bindings Date: Fri, 29 Jun 2018 14:43:32 +0200 Message-Id: <1530276212-18376-3-git-send-email-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530276212-18376-1-git-send-email-sergio.paracuellos@gmail.com> References: <1530276212-18376-1-git-send-email-sergio.paracuellos@gmail.com> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Add a devicetree binding documentation for the mt7621 gpio. Signed-off-by: Sergio Paracuellos --- .../bindings/gpio/mediatek,mt7621-gpio.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/mediatek,mt7621-gpio.txt diff --git a/Documentation/devicetree/bindings/gpio/mediatek,mt7621-gpio.txt b/Documentation/devicetree/bindings/gpio/mediatek,mt7621-gpio.txt new file mode 100644 index 0000000..ba45558 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/mediatek,mt7621-gpio.txt @@ -0,0 +1,35 @@ +Mediatek MT7621 SoC GPIO controller bindings + +The IP core used inside these SoCs has 3 banks of 32 GPIOs each. +The registers of all the banks are interwoven inside one single IO range. +We load one GPIO controller instance per bank. Also the GPIO controller can receive +interrupts on any of the GPIOs, either edge or level. It then interrupts the CPU +using GIC INT12. + +Required properties for the top level node: +- #gpio-cells : Should be two. The first cell is the GPIO pin number and the + second cell specifies GPIO flags, as defined in . + Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt. Should be 2. The first cell defines the interrupt number, + the second encodes the triger flags encoded as described in + Documentation/devicetree/bindings/interrupt-controller/interrupts.txt +- compatible: + - "mediatek,mt7621-gpio" for Mediatek controllers +- reg : Physical base address and length of the controller's registers +- interrupt-parent : phandle of the parent interrupt controller. +- interrupts : Interrupt specifier for the controllers interrupt. +- interrupt-controller : Mark the device node as an interrupt controller. +- gpio-controller : Marks the device node as a GPIO controller. + +Example: + gpio@600 { + #gpio-cells = <2>; + #interrupt-cells = <2>; + compatible = "mediatek,mt7621-gpio"; + gpio-controller; + interrupt-controller; + reg = <0x600 0x100>; + interrupt-parent = <&gic>; + interrupts = ; + };