From patchwork Mon Feb 20 17:13:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 730120 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 3vRqxf3btLz9sDB for ; Tue, 21 Feb 2017 04:14:46 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754129AbdBTROl (ORCPT ); Mon, 20 Feb 2017 12:14:41 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:47156 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753272AbdBTROV (ORCPT ); Mon, 20 Feb 2017 12:14:21 -0500 Received: from w540.lan (unknown [IPv6:2001:b07:6442:1ac4:d898:a49b:9222:223e]) (Authenticated sender: jacopo@jmondi.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 856451720E5; Mon, 20 Feb 2017 18:13:23 +0100 (CET) From: Jacopo Mondi To: geert+renesas@glider.be, laurent.pinchart@ideasonboard.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 Subject: [PATCH 3/7] arm: dts: dt-bindings: Add Renesas RZ pinctrl header Date: Mon, 20 Feb 2017 18:13:04 +0100 Message-Id: <1487610788-6939-4-git-send-email-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487610788-6939-1-git-send-email-jacopo+renesas@jmondi.org> References: <1487610788-6939-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 | 30 ++++++++++++++++++++++++++ 1 file changed, 30 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..24759bf --- /dev/null +++ b/include/dt-bindings/pinctrl/r7s72100-pinctrl.h @@ -0,0 +1,30 @@ +/* + * 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 */ +/* + * Pin needs input buffer enabled. + * This applies to pin which alternate function requires input capabilities. + * Eg: RX pin on a serial interface needs this flag to be set. + */ +#define INPUT_EN (1 << 3) + +/* + * Let 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 (1 << 4) + +#endif