From patchwork Fri Dec 15 06:24:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 10113959 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 24DBD60327 for ; Fri, 15 Dec 2017 06:26:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14913291BB for ; Fri, 15 Dec 2017 06:26:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 093C82953B; Fri, 15 Dec 2017 06:26:54 +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 85451291BB for ; Fri, 15 Dec 2017 06:26:53 +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=MsbfeDhftnm/Y7nv8oy055q+HY 6KgBsD2Lr7UiYX31Q8n4CqSbBmR0d7qlZ/58H/o4SVISJFwMNbc6v+nE44mSTlery4Z1RDzBNxPnl 8cPPfdQJ+Mmr+u86QZUoWQH6VnD21rMEGCx5hOx8u97nXtHRoXOcNgSxYfKkJFdiCP0uj3BSWRg2o ZhHrFg9EO6u8WTKonZWM+pWWhyzDlbfPEznJ9xKwFRf/A4Mc/uEtCrCr9VnmQSlgWBsQwHzcMpodL 8eaJVGM3sXlyTb3g0RgYcimeWLiohb5dPMV0XeBYwGlUqKpn0oKur6Fc0RYfCdfddVWKfU1D9eCE+ Q+8KaXgw==; 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 1ePjSP-0007gP-7m; Fri, 15 Dec 2017 06:26:53 +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 1ePjRK-0006Pr-3V for linux-arm-kernel@lists.infradead.org; Fri, 15 Dec 2017 06:25:53 +0000 Received: by mail-pg0-x242.google.com with SMTP id k15so5165653pgr.7 for ; Thu, 14 Dec 2017 22:25:25 -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=RQ7CaA8eakMdWG9bYeVd7t8mGE5KKPPVif7P5GI5SJnMRnVJw4zHqa5eraRuYyH24C NMFYciqk6kHQfYy4Od8jZ3nFkF04ht0gCphHSqHn3bjOuRYtq9VElD1S+BY3db8cWtFo C6r/P1zkFhEw1EsQQuMYopKFTZ498DDfLj+tp7hDM3zGZdz6DCeeOuOxYBAlgp4mO85D cpCWULIJn7IDBFnkFt2NELs3SV82GOUNGZ5v9cBJFF2PFTz1ZGT87l8soCPztyzS9UF6 JPGjNl+vu9wjapCcnufLVScVdCbfI6IqDE6offWIGPrJl4o80hHZpxaDPOCeIaYir+Vy cnHQ== 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=g6fCmpYR7WCkMrQCgY4JlH6oCFdjtab1i6fNw0Ba7QArL/1PHlbQKHL+kXS+Tm4cpf A27l4Mow+1uRLIVLg3u0zPKPiEWTZt7wBM3AkV6UqXPEwtq/0jCcYzXky+6W2IsFmBXC z9sSZ1noF7LZ+asBUho08jbJbX8ow4NH08IRE+mC5fmd4x0PqhexMHVAbGLYqSuMbud/ Bn31TfgLl5CVf7IImoCgL9KMckeiqiAyaTGdD9c+VTIsofbvACg1qd2C09Dw14tfZn0i JaBh3/PBQQD8NrR+vD2Q1pqITAzh12FM2SnNsnnbnD0jxRpAhiIz8PwOdJCDQRy62f1r tcMA== X-Gm-Message-State: AKGB3mKUBCvFFnP7rAaGIQA5sLrbV+cRZkGwm6Z1QgoikInMPwkk0Zse kXtFQt95cLGhVosbApzjl8Y= X-Google-Smtp-Source: ACJfBotQrmB1uopsxnpMHPFB+Vr+c/bJ7SAWSsxKaFNPHrrpVbjeY9t1Wo+oou3sSTYw4eCHA31RNA== X-Received: by 10.159.206.131 with SMTP id bg3mr4629610plb.303.1513319125151; Thu, 14 Dec 2017 22:25:25 -0800 (PST) Received: from aurora.jms.id.au ([203.0.153.9]) by smtp.gmail.com with ESMTPSA id p77sm11862998pfd.132.2017.12.14.22.25.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Dec 2017 22:25:24 -0800 (PST) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Fri, 15 Dec 2017 16:55:15 +1030 From: Joel Stanley To: Rob Herring , Mark Rutland , Arnd Bergmann , Andrew Jeffery , Patrick Venture , Xo Wang , Lei YU Subject: [PATCH v2 02/19] dt-bindings: gpio: Add ASPEED constants Date: Fri, 15 Dec 2017 16:54:26 +1030 Message-Id: <20171215062443.23059-3-joel@jms.id.au> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171215062443.23059-1-joel@jms.id.au> References: <20171215062443.23059-1-joel@jms.id.au> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171214_222546_291350_70B29C16 X-CRM114-Status: GOOD ( 15.90 ) 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