From patchwork Mon Mar 20 16:14:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 741081 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vn26F3KXLz9s78 for ; Tue, 21 Mar 2017 03:51:49 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755840AbdCTQu5 (ORCPT ); Mon, 20 Mar 2017 12:50:57 -0400 Received: from slow1-d.mail.gandi.net ([217.70.178.86]:55323 "EHLO slow1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756057AbdCTQub (ORCPT ); Mon, 20 Mar 2017 12:50:31 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by slow1-d.mail.gandi.net (Postfix) with ESMTP id DB24647F476; Mon, 20 Mar 2017 17:16:20 +0100 (CET) Received: from w540.lan (unknown [IPv6:2001:b07:6442:1ac4:30ee:93b1:e300:81e]) (Authenticated sender: jacopo@jmondi.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 08F401722C4; Mon, 20 Mar 2017 17:15:15 +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 v2 3/7] arm: dts: dt-bindings: Add Renesas RZ pinctrl header Date: Mon, 20 Mar 2017 17:14:47 +0100 Message-Id: <1490026491-21742-4-git-send-email-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490026491-21742-1-git-send-email-jacopo+renesas@jmondi.org> References: <1490026491-21742-1-git-send-email-jacopo+renesas@jmondi.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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..98852d3 --- /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 it's 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. + * Alternate function that need both input/outpu functionalities shall + * be configured as bidirectional. + * Eg. SDA/SCL pins of an I2c interface. + */ +#define BI_DIR (1 << 3) + +/* + * Flags used to ask software drive the pin I/O direction overriding the + * alternate function configuration. + * Some alternate function requires software to force I/O direction of a pin, + * ovverriding the designated one. + * Reference to the HW manual to know when this flag shall be used. + */ +#define SWIO_IN (1 << 4) +#define SWIO_OUT (1 << 5) + +#endif