From patchwork Wed Apr 27 14:11:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Franklin Cooper X-Patchwork-Id: 8958101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6588F9F1C1 for ; Wed, 27 Apr 2016 14:14:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B8E420121 for ; Wed, 27 Apr 2016 14:14:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F7772024D for ; Wed, 27 Apr 2016 14:14:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1avQD0-0007JC-O6; Wed, 27 Apr 2016 14:12:54 +0000 Received: from mail-oi0-f68.google.com ([209.85.218.68]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1avQCO-0006dW-H5 for linux-arm-kernel@lists.infradead.org; Wed, 27 Apr 2016 14:12:17 +0000 Received: by mail-oi0-f68.google.com with SMTP id b10so7494918oig.1 for ; Wed, 27 Apr 2016 07:12:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rHL931fHcpJUDUUvD98U21n2peInZ8yFnB4sFK3CySk=; b=jV9XXQS53O6hYp6v3aU1A8zExfThEU6qgRTiW/DNK2P0Z4VtplrPradMlZMpVze556 cF41h7im2xxd7+pcdEC5uqEXkGK76xtFYZvcflK5dklwPyGlm82oPp1QRhOYh3B8Qp1D qGGd5Tkh6ohFMV0R4WFGqoHiJpcmCB5RY6uA19LT/VY3UpJWbmgGrXLoTX0kdhau2WdZ Haf+mM3+f7g30y+IHfBR+hlHVo4k61uzYVkVVS5ko5ZeLqVG9fg04xQgX/6RxCKgrT34 DUCAghyH4ukoiZ8Pq08mA1A4JkxRJWkk8OE6ZPTcKxgYD02g7qV2MesccejObed8dbVu GQGQ== X-Gm-Message-State: AOPr4FXhgz3Ab2401IL0IwSWa+m1wwwPmNMHjHeMFQv/UvzT1HAJbdCy4PmviTwX2h6B6A== X-Received: by 10.202.4.17 with SMTP id 17mr3771179oie.140.1461766319276; Wed, 27 Apr 2016 07:11:59 -0700 (PDT) Received: from beast-server.fios-router.home ([173.64.219.161]) by smtp.gmail.com with ESMTPSA id u41sm422483otd.37.2016.04.27.07.11.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Apr 2016 07:11:58 -0700 (PDT) From: Franklin S Cooper Jr To: robh+dt@kernel.org, linux@arm.linux.org.uk, ssantosh@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] ARM: dts: keystone: Header file for pinctrl constants Date: Wed, 27 Apr 2016 09:11:47 -0500 Message-Id: <1461766308-27669-5-git-send-email-fcooper@ti.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461766308-27669-1-git-send-email-fcooper@ti.com> References: <1461766308-27669-1-git-send-email-fcooper@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160427_071216_718091_9731A771 X-CRM114-Status: GOOD ( 15.21 ) X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lokesh Vutla , Tero Kristo , Franklin S Cooper Jr , Dave Gerlach MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Lokesh Vutla The pinctrl IP used in some of the Keystone 2 devices differ vs other TI SoCs. Therefore, create a Keystone specific pinctrl header. Signed-off-by: Lokesh Vutla Signed-off-by: Franklin S Cooper Jr Signed-off-by: Tero Kristo Signed-off-by: Dave Gerlach --- arch/arm/boot/dts/keystone-k2g.dtsi | 1 + include/dt-bindings/pinctrl/keystone.h | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 include/dt-bindings/pinctrl/keystone.h diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi b/arch/arm/boot/dts/keystone-k2g.dtsi index b99e879..3372615 100644 --- a/arch/arm/boot/dts/keystone-k2g.dtsi +++ b/arch/arm/boot/dts/keystone-k2g.dtsi @@ -14,6 +14,7 @@ */ #include +#include #include "skeleton.dtsi" / { diff --git a/include/dt-bindings/pinctrl/keystone.h b/include/dt-bindings/pinctrl/keystone.h new file mode 100644 index 0000000..7f97d77 --- /dev/null +++ b/include/dt-bindings/pinctrl/keystone.h @@ -0,0 +1,39 @@ +/* + * This header provides constants for Keystone pinctrl bindings. + * + * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _DT_BINDINGS_PINCTRL_KEYSTONE_H +#define _DT_BINDINGS_PINCTRL_KEYSTONE_H + +#define MUX_MODE0 0 +#define MUX_MODE1 1 +#define MUX_MODE2 2 +#define MUX_MODE3 3 +#define MUX_MODE4 4 +#define MUX_MODE5 5 + +#define BUFFER_CLASS_B (0 << 19) +#define BUFFER_CLASS_C (1 << 19) +#define BUFFER_CLASS_D (2 << 19) +#define BUFFER_CLASS_E (3 << 19) + +#define PULL_DISABLE (1 << 16) +#define PIN_PULLUP (1 << 17) +#define PIN_PULLDOWN (0 << 17) + +#define KEYSTONE_IOPAD_OFFSET(pa, offset) (((pa) & 0xffff) - (offset)) + +#define K2G_CORE_IOPAD(pa) KEYSTONE_IOPAD_OFFSET((pa), 0x1000) + +#endif