From patchwork Mon Dec 11 05:06:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 10104181 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 B6664602B3 for ; Mon, 11 Dec 2017 05:09:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BBBB29363 for ; Mon, 11 Dec 2017 05:09:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6062029367; Mon, 11 Dec 2017 05:09:06 +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=unavailable 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 E902E29363 for ; Mon, 11 Dec 2017 05:09:05 +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=LMP9GeDlAJK6cTrFJ0Q8UMmVnLv3qwXWPKJwLneembI=; b=MxDJ9qRYsMyUSAATH73cs8LHvk T2JGE86kgIeo4Jl0jP9C9drlQba+62NvbTgMJcpq/FKw55KPLzB5R+dghADg85wrHNzIIcIdN7dvC AYGZvm5rp5uuOJ6g8vt3HhR5y8V+TZ8pCCLmZoHa90meYXGLqcit5jDMMUamswew/QPM86c1Uku7R 0SnsUhTfmXy/D3M3p1+i4MWeO87Ti/CK1IIweIhpSTqwl1cszAnxcfjdIVbFpjlAaTl/989o/kRu/ loqqQh+cshrvGdEqxK2JpLDGQph3BOFtm4qm3/i5+45LTuvycmY5gB5VzngdevR0WJtptIzU4iTUr gbfHAZLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eOGKv-00011b-3j; Mon, 11 Dec 2017 05:09:05 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eOGKZ-0000QG-JA for linux-arm-kernel@lists.infradead.org; Mon, 11 Dec 2017 05:08:47 +0000 Received: by mail-pg0-x242.google.com with SMTP id j4so10157165pgp.1 for ; Sun, 10 Dec 2017 21:08:23 -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=h3V+zjUuLXfGaZ13W3JQN+SZRDMI9YAZ1Gmgc72wsNs=; b=ett96tSYBkNBYK2MSIFf4M4++BwmpwOf/5MbXYk4ILVmb57Q9Xy6MhBlGNbJisbgGo G1wXTSa+MB0dLXudwwTvBojvj1uhMxvG7Rj/HMvibcaE63tcz6cDCQFcVBKVUMKVlbXZ NmZRzaguEwzu9vlwVRak5nvGRL34CsCfrMREbLOmDB9icFtT6AFVJtBd5u/wIzOCOxE3 HuElGtk1Xis2TlbsDdDd7IrjVJpHDLQ30PfV5sX+jZMcfR+Pt18SCWb50jWiaNjSFoWy 3VepLC/iPhJwO3GmhfmHxP7cehHELneaOGTggo51QrovBnDTqE7yz7DBAh2x6aShhVMz tz4g== 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=h3V+zjUuLXfGaZ13W3JQN+SZRDMI9YAZ1Gmgc72wsNs=; b=hDh3lJIxdRBA2kGP7zz/0JjeSrIFCGR5GduPZmvn96brKE1Ajo/VzxHtCs9CBIsCdc bIMWA8a4DChn4XEwhsoi8fFJaaEbXT00zzEGdxwh7w/ovLcWKVvwhuk6aQRgmVUczo4Q fNDLBZpwUr+kYVUPiDDpC78es99FcmbfR9b4ZAx0OPat6ukpewHSOinI86EZNbSHuVNj 97f+VqtJXTZtdZTpRUBJYdrPVJJ1Fw/YtNzwicXTL8+R2MH7zM3OXqILM0SomZGVXpUs XLOwRxM1vHXW19Fl2to0sWGl8pPn0W9cGqMzuNreZIe3Anju6Lw1UwgIsQ1gZ95QH9Nu BQiQ== X-Gm-Message-State: AJaThX5xaR7eHfwhLoC6YNifhvUVZ1EvirGO4F9anBT3s/FxqpqKVvru hLenTvG2JledNNPPPM+Ywp0= X-Google-Smtp-Source: AGs4zMbDux2HbmFfrcw/3gGk/hsm2wvvkXN9uOzm52iIHtbGqG/zXeuYZkORpcJI+BEwhN+itZ45NA== X-Received: by 10.99.103.70 with SMTP id b67mr37238633pgc.211.1512968903063; Sun, 10 Dec 2017 21:08:23 -0800 (PST) Received: from aurora.jms.id.au ([203.0.153.9]) by smtp.gmail.com with ESMTPSA id c24sm24685612pfl.2.2017.12.10.21.08.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 10 Dec 2017 21:08:21 -0800 (PST) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Mon, 11 Dec 2017 15:38:13 +1030 From: Joel Stanley To: Rob Herring , Mark Rutland , Arnd Bergmann , Andrew Jeffery , Patrick Venture , Xo Wang , Lei YU Subject: [PATCH 02/20] dt-bindings: gpio: Add ASPEED constants Date: Mon, 11 Dec 2017 15:36:46 +1030 Message-Id: <20171211050704.20621-3-joel@jms.id.au> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171211050704.20621-1-joel@jms.id.au> References: <20171211050704.20621-1-joel@jms.id.au> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171210_210843_881204_6363BB1E X-CRM114-Status: GOOD ( 15.59 ) 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 --- arch/arm/boot/dts/aspeed-g4.dtsi | 1 + arch/arm/boot/dts/aspeed-g5.dtsi | 1 + include/dt-bindings/gpio/aspeed-gpio.h | 49 ++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 include/dt-bindings/gpio/aspeed-gpio.h diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi index 45d815a86d42..100d092e6c07 100644 --- a/arch/arm/boot/dts/aspeed-g4.dtsi +++ b/arch/arm/boot/dts/aspeed-g4.dtsi @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "skeleton.dtsi" +#include / { model = "Aspeed BMC"; diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi index 5c4ecdba3a6b..1f9d28313f82 100644 --- a/arch/arm/boot/dts/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed-g5.dtsi @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "skeleton.dtsi" +#include / { model = "Aspeed BMC"; 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