From patchwork Thu Feb 8 08:01:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 870771 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; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Xp+ltz8t"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zcVz95DkGz9sNw for ; Thu, 8 Feb 2018 19:02:13 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750876AbeBHICM (ORCPT ); Thu, 8 Feb 2018 03:02:12 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:45769 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750815AbeBHICL (ORCPT ); Thu, 8 Feb 2018 03:02:11 -0500 Received: by mail-pg0-f66.google.com with SMTP id m136so1346446pga.12 for ; Thu, 08 Feb 2018 00:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=kbjuYO3tEDBWwTIaqQoLiptgd0PYHUDE6C3cCgyqhEU=; b=Xp+ltz8t3TwTXkHNx09p3mrVpMwLSDFSLojlj4Jehk0d4AIe1RrM3GibgisPrY7Tu9 9ONrG7W7ab4zHm6TH/n8dc497Hdkg4z7RLjmlRRREEr6e07YuDiGPXAv8tpBkbwK3Ojm PxQRLnn9hPKvGjl5ehec5qVyLQ54YJmDxQFS0= 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; bh=kbjuYO3tEDBWwTIaqQoLiptgd0PYHUDE6C3cCgyqhEU=; b=SlnGtWskP+13T24HvFQ/+me2YCUaoSv3QfQCUodAhU1qmLSur6oW2/+60Ysshwre6Z tvIvcb2VFUFygeEXAm/gyqmsAokKvom5heC4MhAtwAZPa8l5XzaEgcCWoK6kTZwIkpbe w7G7ACu5ihz5bZ+GtPFyJHa0apCeNipYd2XvvT/hiNjVRyPorqcOtCdCYJ/QkNbfNX+N 4hQ2lrzUoHHYa59YO9HGnfHUC5eeo+jL/+Kp4mkymuiBZ+jJjnXj48s86SScQvKUvP65 2t6Sg9+3yoewm//okDXb7KSSarLKnD9UL42mne7PtD2wDaiDE5cdadACK66SB4Vg5/vh yaDQ== X-Gm-Message-State: APf1xPCmEsJ7IP08JNbpb2fiwePM3U6pkbL5YuinG3JSfRGH3cn+tXzU V8PWdM5bqVF6jIc5LYHU0s5HJtYso4w= X-Google-Smtp-Source: AH8x227q+Q3T6cWP0lXQhhvf+YR7jbFmA2CA0o/f0Z2Sd5/4OKCVKKTcUAQ8MGQCgce40olzCYgvLw== X-Received: by 10.99.113.11 with SMTP id m11mr7231601pgc.57.1518076931171; Thu, 08 Feb 2018 00:02:11 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id e189sm8136726pfa.4.2018.02.08.00.02.08 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Feb 2018 00:02:10 -0800 (PST) From: Baolin Wang To: linus.walleij@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org, andy.shevchenko@gmail.com Subject: [PATCH 1/2] dt-bindings: gpio: Add Spreadtrum EIC controller documentation Date: Thu, 8 Feb 2018 16:01:42 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This patch adds the device tree bindings for the Spreadtrum EIC controller. The EIC can be recognized as one special type of GPIO, which can only be used as input. Signed-off-by: Baolin Wang --- .../devicetree/bindings/gpio/gpio-eic-sprd.txt | 51 ++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-eic-sprd.txt diff --git a/Documentation/devicetree/bindings/gpio/gpio-eic-sprd.txt b/Documentation/devicetree/bindings/gpio/gpio-eic-sprd.txt new file mode 100644 index 0000000..34f194f --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-eic-sprd.txt @@ -0,0 +1,51 @@ +Spreadtrum EIC controller bindings + +The EIC is the abbreviation of external interrupt controller, which +is only can be used as input mode. The EIC controller includes 4 +sub-modules: EIC-Debounce, EIC-Latch, EIC-Async, EIC-Sync. + +The EIC-debounce sub-module provides up to 8 source input signal +connection. A debounce machanism is used to capture input signal's +stable status (ms grade) and a single-trigger mechanism is introduced +into this sub-module to enhance the input event detection reliability. +In addition, this sub-module's clock can be shut-off automatically to +reduce power dissipation. The debounce range is from 1ms to 4s with +the step of 1ms. If the input signal is shorter than 1ms, it will be +omitted as this sub-module. + +The EIC-latch sub-module is used to latch some special input signal +and send interrupts to MCU core, and it can provide up to 8 latch +source input signal connection. + +The EIC-async sub-module uses 32k clock to capture short signal (us +grade) to generate interrupt to MCU by level or edge trigger. + +The EIC-sync is similar with GPIO's input function. + +Required properties: +- compatible: Should be one of the following: + "sprd,sc9860-eic-debounce", + "sprd,sc9860-eic-latch", + "sprd,sc9860-eic-async", + "sprd,sc9860-eic-sync", + "sprd,sc27xx-eic-debounce". +- reg: Define the base and range of the I/O address space containing + the GPIO controller registers. +- gpio-controller: Marks the device node as a GPIO controller. +- #gpio-cells: Should be <2>. The first cell is the gpio number and + the second cell is used to specify optional parameters. +- interrupt-controller: Marks the device node as an interrupt controller. +- #interrupt-cells: Should be <2>. Specifies the number of cells needed + to encode interrupt source. +- interrupts: Should be the port interrupt shared by all the gpios. + +Example: + eic_debounce: eic@40210000 { + compatible = "sprd,sc9860-eic-debounce"; + reg = <0 0x40210000 0 0x80>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = ; + };