From patchwork Wed Dec 20 03:23:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 10124861 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 D28DD603B5 for ; Wed, 20 Dec 2017 03:25:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEFE3296AB for ; Wed, 20 Dec 2017 03:25:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B35AD296AE; Wed, 20 Dec 2017 03:25:10 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 21E5F296AB for ; Wed, 20 Dec 2017 03:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=n73cPHPuHHUhOHVRH2HKKg+XB/JLpMpgfcL4h+gxOK0=; b=Q0QODs3TGFULOFZzTiqnbRTTn1 FWVj/4E3GZ0ED8sHEuQeV+s4QqwwIvzwF5ZRVPbtPJNMfK+eJSD+6Vtfpuqwz2TldgqZSTmpu8cdP 6VQv+5tayFKM59GxyauHmBADW7yLsPyz1PgrW+e6eso+DuBCJdNdyUSXT8n5iwRlRjldPDUskslrE ZGPXtyVxghWpHzT8+0fIp27dse0fjtstluyGWRCihj/pfm4LE3x3TSRbdkq9zkQ4N735Dhj3sdP3c M2TzS3bVorPQWJoNpe0yyQWm07amJ8rDc5SsPy1wS+SpvcQqRETt/y+PzBc4XMT/1eas3FnPXRRSX eACZGZOQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eRV0D-0003DE-QV; Wed, 20 Dec 2017 03:25:05 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eRUzZ-0002wb-HS for linux-arm-kernel@bombadil.infradead.org; Wed, 20 Dec 2017 03:24:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PNasiNy6rFMiHmPQt47xEjbUmasBpA9TaOZ4PUtiLuQ=; b=Ud/Q1qUz3RZCR1rSAzSWCjspv WLNO5yQihF7QcgCwCnzRY3pdDbKCVxzlj+OKQDbmOlxW6mN9KIlkuOK2vO9jGZlvuTOgBuNUDZwAn NVOczESByIBye8maaKkM84As7Hrpw0BVac1iGJ0oCcQdaMrT/EGxpDK7etW8mMiBtpU3mkA5ktONt JD8tCr9G45fdStWtDHMqkFSuD0WuY3BoBeuX+/kS4O0l9eawXxdn5aRhL6oP4YuVOC9vAwdpFRVvp 3Alu5Ai/7FAWqxKfrR+zCDW27wj+gK5TCRO3xV26eeeBAJH5xZWmpzLAR4G1m8LiRgmcUfhBq3LLp GfBtl8bgw==; Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by merlin.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eRUzV-0004RU-Pd for linux-arm-kernel@lists.infradead.org; Wed, 20 Dec 2017 03:24:23 +0000 Received: by mail-pl0-x241.google.com with SMTP id bi12so8248173plb.6 for ; Tue, 19 Dec 2017 19:24:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=PNasiNy6rFMiHmPQt47xEjbUmasBpA9TaOZ4PUtiLuQ=; b=ZEpp+kwv1W42/yuNEDJgCmxioWGBhH1QvcsZ6hn0I0srr5VXMXZgld36Ar6dlW8Xgz 28D+JaxSCgoNY6lZ46beNhWpLI+lc0/CM93YYBt1ZDK5ZRnQo78po9zamXLcLvH4YWbY +EKaFx9othbV9aA4N5DeqVIlLkt2o6UvwaDTR/3Qd1RA1w3H3giDYmj/FCThXeXMtXvn xfiyOhUL5xhvLhUX7stG2fJXDxnjG6HxewGIRykr5R8tti8HoPZv1tvFhQ1MTchLca9Y g7GykqWhh1ATEvq/phVmoI9m/o0YCkcScNFhaFisAjdqwZVMJjVeP0Eo7g9kNsTKVUbx 5VRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=PNasiNy6rFMiHmPQt47xEjbUmasBpA9TaOZ4PUtiLuQ=; b=Ck/tvBFDMeKXn30eUHmbZ5Tx+YjBO2EB77mUatdr7G0cq5Q2kErGcTQ9jK1wM5D73N YdiDs0Isf9m9rv8scBu6b5/8L7hx27jUVn1Lre7n4ls0Esyw8lompjdDH4yFN+4MQue5 Bz4eO7SBAl4nirfLoW85i3Y7d9KQAU0Od1do3ABjH/G9759v6A9KLnkICRi6lf+W53wv K8IztzqTfHfmdB+z3J4+bJifMzeNgQJuBKZjNYxtly0ndKL9/evI4ntb+kOzzkV5XzmO +/YygaNIPZ1o2PPrGFouwKD0UHyblhlWaNnoLz5Nwk6K1m8pLkhRgOTGow0Y5lUCjJES BJ9Q== X-Gm-Message-State: AKGB3mLUTla/HROnQJ3AQUVMZcHAUW9haYt9OCEo5lxwQdm+EkjQS8EV 7VMbjsb2jG67ydAr3xJTm/g= X-Google-Smtp-Source: ACJfBovzjz27zTgSaTrB6KxDXtjx1i5gitYZD1jagjl6NeuLbrA+VGIdqgi+X3pvw28AJTsYPuOesQ== X-Received: by 10.84.129.193 with SMTP id b59mr5381286plb.361.1513740247105; Tue, 19 Dec 2017 19:24:07 -0800 (PST) Received: from aurora.jms.id.au ([45.124.203.15]) by smtp.gmail.com with ESMTPSA id t75sm3872443pgc.12.2017.12.19.19.23.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Dec 2017 19:24:05 -0800 (PST) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Wed, 20 Dec 2017 13:53:55 +1030 From: Joel Stanley To: Rob Herring , Mark Rutland , Arnd Bergmann , Andrew Jeffery , Patrick Venture , Xo Wang , Lei YU Subject: [PATCH v3 02/20] dt-bindings: gpio: Add ASPEED constants Date: Wed, 20 Dec 2017 13:53:10 +1030 Message-Id: <20171220032328.30584-3-joel@jms.id.au> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171220032328.30584-1-joel@jms.id.au> References: <20171220032328.30584-1-joel@jms.id.au> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-aspeed@lists.ozlabs.org, Benjamin Herrenschmidt , linux-kernel@vger.kernel.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , linux-arm-kernel@lists.infradead.org, Jeremy Kerr MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP These are used to by the device tree to map pin numbers to constants required by the GPIO bindings. Signed-off-by: Joel Stanley Reviewed-by: Rob Herring --- v3: - Remove dtsi includes from this patch, they will come later --- include/dt-bindings/gpio/aspeed-gpio.h | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 include/dt-bindings/gpio/aspeed-gpio.h diff --git a/include/dt-bindings/gpio/aspeed-gpio.h b/include/dt-bindings/gpio/aspeed-gpio.h new file mode 100644 index 000000000000..56fc4889b2c4 --- /dev/null +++ b/include/dt-bindings/gpio/aspeed-gpio.h @@ -0,0 +1,49 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * This header provides constants for binding aspeed,*-gpio. + * + * The first cell in Aspeed's GPIO specifier is the GPIO ID. The macros below + * provide names for this. + * + * The second cell contains standard flag values specified in gpio.h. + */ + +#ifndef _DT_BINDINGS_GPIO_ASPEED_GPIO_H +#define _DT_BINDINGS_GPIO_ASPEED_GPIO_H + +#include + +#define ASPEED_GPIO_PORT_A 0 +#define ASPEED_GPIO_PORT_B 1 +#define ASPEED_GPIO_PORT_C 2 +#define ASPEED_GPIO_PORT_D 3 +#define ASPEED_GPIO_PORT_E 4 +#define ASPEED_GPIO_PORT_F 5 +#define ASPEED_GPIO_PORT_G 6 +#define ASPEED_GPIO_PORT_H 7 +#define ASPEED_GPIO_PORT_I 8 +#define ASPEED_GPIO_PORT_J 9 +#define ASPEED_GPIO_PORT_K 10 +#define ASPEED_GPIO_PORT_L 11 +#define ASPEED_GPIO_PORT_M 12 +#define ASPEED_GPIO_PORT_N 13 +#define ASPEED_GPIO_PORT_O 14 +#define ASPEED_GPIO_PORT_P 15 +#define ASPEED_GPIO_PORT_Q 16 +#define ASPEED_GPIO_PORT_R 17 +#define ASPEED_GPIO_PORT_S 18 +#define ASPEED_GPIO_PORT_T 19 +#define ASPEED_GPIO_PORT_U 20 +#define ASPEED_GPIO_PORT_V 21 +#define ASPEED_GPIO_PORT_W 22 +#define ASPEED_GPIO_PORT_X 23 +#define ASPEED_GPIO_PORT_Y 24 +#define ASPEED_GPIO_PORT_Z 25 +#define ASPEED_GPIO_PORT_AA 26 +#define ASPEED_GPIO_PORT_AB 27 +#define ASPEED_GPIO_PORT_AC 28 + +#define ASPEED_GPIO(port, offset) \ + ((ASPEED_GPIO_PORT_##port * 8) + offset) + +#endif