From patchwork Fri Mar 24 15:22:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9643047 X-Patchwork-Delegate: horms@verge.net.au 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 8048360327 for ; Fri, 24 Mar 2017 15:23:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72BCA267EC for ; Fri, 24 Mar 2017 15:23:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6792226E8A; Fri, 24 Mar 2017 15:23:07 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD1E0267EC for ; Fri, 24 Mar 2017 15:23:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936115AbdCXPW4 (ORCPT ); Fri, 24 Mar 2017 11:22:56 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:37860 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757379AbdCXPWn (ORCPT ); Fri, 24 Mar 2017 11:22:43 -0400 Received: from w540.lan (unknown [IPv6:2001:b07:6442:1ac4:8933:ba3e:2dfc:4f2]) (Authenticated sender: jacopo@jmondi.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 6AC671720BD; Fri, 24 Mar 2017 16:22:31 +0100 (CET) From: Jacopo Mondi To: geert+renesas@glider.be, laurent.pinchart@ideasonboard.com, chris.brandt@renesas.com, linus.walleij@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk Cc: linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/7] arm: dts: dt-bindings: Add Renesas RZ pinctrl header Date: Fri, 24 Mar 2017 16:22:10 +0100 Message-Id: <1490368934-12494-4-git-send-email-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490368934-12494-1-git-send-email-jacopo+renesas@jmondi.org> References: <1490368934-12494-1-git-send-email-jacopo+renesas@jmondi.org> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add dt-bindings for Renesas r7s72100 pin controller header file. Signed-off-by: Jacopo Mondi --- include/dt-bindings/pinctrl/r7s72100-pinctrl.h | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/dt-bindings/pinctrl/r7s72100-pinctrl.h diff --git a/include/dt-bindings/pinctrl/r7s72100-pinctrl.h b/include/dt-bindings/pinctrl/r7s72100-pinctrl.h new file mode 100644 index 0000000..170338b --- /dev/null +++ b/include/dt-bindings/pinctrl/r7s72100-pinctrl.h @@ -0,0 +1,36 @@ +/* + * Defines macros and constants for Renesas RZ/A1 pin controller pin + * muxing functions. + */ +#ifndef __DT_BINDINGS_PINCTRL_RENESAS_RZA1_H +#define __DT_BINDINGS_PINCTRL_RENESAS_RZA1_H + +#define RZA1_PINS_PER_PORT 16 + +/* Create the pin index from its bank and position numbers */ +#define PIN(b, p) ((b) * RZA1_PINS_PER_PORT + (p)) + +/* + * Flags to apply to alternate function configuration + * All of the following are mutually exclusive. + */ + +/* + * Pin is bi-directional. + * An alternate function that needs both input/output functionalities shall + * be configured as bidirectional. + * Eg. SDA/SCL pins of an I2c interface. + */ +#define BI_DIR (1 << 3) + +/* + * Flags used to ask software to drive the pin I/O direction overriding the + * alternate function configuration. + * Some alternate functions require software to force I/O direction of a pin, + * overriding the designated one. + * Refer to the HW manual to know when this flag shall be used. + */ +#define SWIO_IN (1 << 4) +#define SWIO_OUT (1 << 5) + +#endif