devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: linux-kernel@vger.kernel.org
Cc: Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	devicetree-discuss@lists.ozlabs.org,
	James Hogan <james.hogan@imgtec.com>
Subject: [PATCH 4/8] metag: tz1090: add <asm/soc-tz1090/gpio.h>
Date: Tue, 23 Apr 2013 15:33:23 +0100	[thread overview]
Message-ID: <1366727607-27444-5-git-send-email-james.hogan@imgtec.com> (raw)
In-Reply-To: <1366727607-27444-1-git-send-email-james.hogan@imgtec.com>

Add <asm/soc-tz1090/gpio.h> with definitions to number all the GPIOs
available on-chip. This is for use by the pinctrl and GPIO drivers.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
---
 arch/metag/include/asm/soc-tz1090/gpio.h | 121 +++++++++++++++++++++++++++++++
 1 file changed, 121 insertions(+)
 create mode 100644 arch/metag/include/asm/soc-tz1090/gpio.h

diff --git a/arch/metag/include/asm/soc-tz1090/gpio.h b/arch/metag/include/asm/soc-tz1090/gpio.h
new file mode 100644
index 0000000..d19fe02
--- /dev/null
+++ b/arch/metag/include/asm/soc-tz1090/gpio.h
@@ -0,0 +1,121 @@
+#ifndef _TZ1090_GPIO_H_
+#define _TZ1090_GPIO_H_
+
+/* TZ1090 has 90 main GPIOs, in 3 banks of 30. */
+#define NR_BUILTIN_GPIO		90
+/* Plus 7 PDC GPIOs */
+#define NR_PDC_GPIO		7
+
+#define GPIO_0_BASE	0
+#define GPIO_0_PIN(x)	(GPIO_0_BASE + (x))
+
+#define GPIO_1_BASE	30
+#define GPIO_1_PIN(x)	(GPIO_1_BASE + (x))
+
+#define GPIO_2_BASE	60
+#define GPIO_2_PIN(x)	(GPIO_2_BASE + (x))
+
+#define GPIO_PDC_BASE	NR_BUILTIN_GPIO
+#define GPIO_PDC_PIN(x)	(GPIO_PDC_BASE + (x))
+
+#define GPIO_SDIO_CLK		GPIO_0_PIN(0)
+#define GPIO_SDIO_CMD		GPIO_0_PIN(1)
+#define GPIO_SDIO_D0		GPIO_0_PIN(2)
+#define GPIO_SDIO_D1		GPIO_0_PIN(3)
+#define GPIO_SDIO_D2		GPIO_0_PIN(4)
+#define GPIO_SDIO_D3		GPIO_0_PIN(5)
+#define GPIO_SDH_CD		GPIO_0_PIN(6)
+#define GPIO_SDH_WP		GPIO_0_PIN(7)
+#define GPIO_SPI0_MCLK		GPIO_0_PIN(8)
+#define GPIO_SPI0_CS0		GPIO_0_PIN(9)
+#define GPIO_SPI0_CS1		GPIO_0_PIN(10)
+#define GPIO_SPI0_CS2		GPIO_0_PIN(11)
+#define GPIO_SPI0_DOUT		GPIO_0_PIN(12)
+#define GPIO_SPI0_DIN		GPIO_0_PIN(13)
+#define GPIO_SPI1_MCLK		GPIO_0_PIN(14)
+#define GPIO_SPI1_CS0		GPIO_0_PIN(15)
+#define GPIO_SPI1_CS1		GPIO_0_PIN(16)
+#define GPIO_SPI1_CS2		GPIO_0_PIN(17)
+#define GPIO_SPI1_DOUT		GPIO_0_PIN(18)
+#define GPIO_SPI1_DIN		GPIO_0_PIN(19)
+#define GPIO_UART0_RXD		GPIO_0_PIN(20)
+#define GPIO_UART0_TXD		GPIO_0_PIN(21)
+#define GPIO_UART0_CTS		GPIO_0_PIN(22)
+#define GPIO_UART0_RTS		GPIO_0_PIN(23)
+#define GPIO_UART1_RXD		GPIO_0_PIN(24)
+#define GPIO_UART1_TXD		GPIO_0_PIN(25)
+#define GPIO_SCB0_SDAT		GPIO_0_PIN(26)
+#define GPIO_SCB0_SCLK		GPIO_0_PIN(27)
+#define GPIO_SCB1_SDAT		GPIO_0_PIN(28)
+#define GPIO_SCB1_SCLK		GPIO_0_PIN(29)
+#define GPIO_SCB2_SDAT		GPIO_1_PIN(0)
+#define GPIO_SCB2_SCLK		GPIO_1_PIN(1)
+#define GPIO_I2S_MCLK		GPIO_1_PIN(2)
+#define GPIO_I2S_BCLK_OUT	GPIO_1_PIN(3)
+#define GPIO_I2S_LRCLK_OUT	GPIO_1_PIN(4)
+#define GPIO_I2S_DOUT0		GPIO_1_PIN(5)
+#define GPIO_I2S_DOUT1		GPIO_1_PIN(6)
+#define GPIO_I2S_DOUT2		GPIO_1_PIN(7)
+#define GPIO_I2S_DIN		GPIO_1_PIN(8)
+#define GPIO_PDM_A		GPIO_1_PIN(9)
+#define GPIO_PDM_B		GPIO_1_PIN(10)
+#define GPIO_PDM_C		GPIO_1_PIN(11)
+#define GPIO_PDM_D		GPIO_1_PIN(12)
+#define GPIO_TFT_RED0		GPIO_1_PIN(13)
+#define GPIO_TFT_RED1		GPIO_1_PIN(14)
+#define GPIO_TFT_RED2		GPIO_1_PIN(15)
+#define GPIO_TFT_RED3		GPIO_1_PIN(16)
+#define GPIO_TFT_RED4		GPIO_1_PIN(17)
+#define GPIO_TFT_RED5		GPIO_1_PIN(18)
+#define GPIO_TFT_RED6		GPIO_1_PIN(19)
+#define GPIO_TFT_RED7		GPIO_1_PIN(20)
+#define GPIO_TFT_GREEN0		GPIO_1_PIN(21)
+#define GPIO_TFT_GREEN1		GPIO_1_PIN(22)
+#define GPIO_TFT_GREEN2		GPIO_1_PIN(23)
+#define GPIO_TFT_GREEN3		GPIO_1_PIN(24)
+#define GPIO_TFT_GREEN4		GPIO_1_PIN(25)
+#define GPIO_TFT_GREEN5		GPIO_1_PIN(26)
+#define GPIO_TFT_GREEN6		GPIO_1_PIN(27)
+#define GPIO_TFT_GREEN7		GPIO_1_PIN(28)
+#define GPIO_TFT_BLUE0		GPIO_1_PIN(29)
+#define GPIO_TFT_BLUE1		GPIO_2_PIN(0)
+#define GPIO_TFT_BLUE2		GPIO_2_PIN(1)
+#define GPIO_TFT_BLUE3		GPIO_2_PIN(2)
+#define GPIO_TFT_BLUE4		GPIO_2_PIN(3)
+#define GPIO_TFT_BLUE5		GPIO_2_PIN(4)
+#define GPIO_TFT_BLUE6		GPIO_2_PIN(5)
+#define GPIO_TFT_BLUE7		GPIO_2_PIN(6)
+#define GPIO_TFT_VDDEN_GD	GPIO_2_PIN(7)
+#define GPIO_TFT_PANELCLK	GPIO_2_PIN(8)
+#define GPIO_TFT_BLANK_LS	GPIO_2_PIN(9)
+#define GPIO_TFT_VSYNC_NS	GPIO_2_PIN(10)
+#define GPIO_TFT_HSYNC_NR	GPIO_2_PIN(11)
+#define GPIO_TFT_VD12ACB	GPIO_2_PIN(12)
+#define GPIO_TFT_PWRSAVE	GPIO_2_PIN(13)
+#define GPIO_TX_ON		GPIO_2_PIN(14)
+#define GPIO_RX_ON		GPIO_2_PIN(15)
+#define GPIO_PLL_ON		GPIO_2_PIN(16)
+#define GPIO_PA_ON		GPIO_2_PIN(17)
+#define GPIO_RX_HP		GPIO_2_PIN(18)
+#define GPIO_GAIN0		GPIO_2_PIN(19)
+#define GPIO_GAIN1		GPIO_2_PIN(20)
+#define GPIO_GAIN2		GPIO_2_PIN(21)
+#define GPIO_GAIN3		GPIO_2_PIN(22)
+#define GPIO_GAIN4		GPIO_2_PIN(23)
+#define GPIO_GAIN5		GPIO_2_PIN(24)
+#define GPIO_GAIN6		GPIO_2_PIN(25)
+#define GPIO_GAIN7		GPIO_2_PIN(26)
+#define GPIO_ANT_SEL0		GPIO_2_PIN(27)
+#define GPIO_ANT_SEL1		GPIO_2_PIN(28)
+#define GPIO_SDH_CLK_IN		GPIO_2_PIN(29)
+
+/* PDC GPIOs */
+#define GPIO_PDC_GPIO0		GPIO_PDC_PIN(0)
+#define GPIO_PDC_GPIO1		GPIO_PDC_PIN(1)
+#define GPIO_SYS_WAKE0		GPIO_PDC_PIN(2)
+#define GPIO_SYS_WAKE1		GPIO_PDC_PIN(3)
+#define GPIO_SYS_WAKE2		GPIO_PDC_PIN(4)
+#define GPIO_IR_DATA		GPIO_PDC_PIN(5)
+#define GPIO_EXT_POWER		GPIO_PDC_PIN(6)
+
+#endif
-- 
1.8.1.2

  parent reply	other threads:[~2013-04-23 14:33 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23 14:33 [PATCH 0/8] Add some TZ1090 SoC infrastructure James Hogan
2013-04-23 14:33 ` [PATCH 2/8] metag: minimal TZ1090 (Comet) " James Hogan
2013-04-23 15:25   ` Arnd Bergmann
2013-04-23 16:06     ` James Hogan
2013-04-24 13:26       ` Catalin Marinas
2013-04-24 14:51         ` James Hogan
2013-04-25 15:21           ` James Hogan
2013-04-23 14:33 ` [PATCH 3/8] irq-imgpdc: add ImgTec PDC irqchip driver James Hogan
2013-04-23 15:09   ` Thomas Gleixner
2013-04-24  9:14     ` James Hogan
2013-04-24  9:32       ` Thomas Gleixner
2013-04-25 11:25     ` James Hogan
2013-04-23 14:33 ` James Hogan [this message]
2013-04-25 21:52   ` [PATCH 4/8] metag: tz1090: add <asm/soc-tz1090/gpio.h> Linus Walleij
2013-04-23 14:33 ` [PATCH 5/8] pinctrl-tz1090: add TZ1090 pinctrl driver James Hogan
2013-04-25 22:39   ` Linus Walleij
2013-04-26 11:54     ` James Hogan
2013-05-03  9:13       ` Linus Walleij
2013-05-03 12:23         ` James Hogan
2013-05-03 13:03           ` Linus Walleij
2013-05-03 15:06             ` James Hogan
     [not found]               ` <5183D262.7000107-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2013-05-14 11:52                 ` Linus Walleij
2013-05-14 12:22                   ` James Hogan
2013-05-15 19:07                     ` Linus Walleij
2013-05-16  9:12                       ` James Hogan
2013-05-17  6:47                         ` Linus Walleij
2013-04-23 14:33 ` [PATCH 6/8] gpio-tz1090: add TZ1090 gpio driver James Hogan
2013-04-25 23:01   ` Linus Walleij
2013-04-26  9:22     ` James Hogan
2013-05-03  8:49       ` Linus Walleij
2013-05-03  9:09         ` James Hogan
2013-05-15 19:09           ` Linus Walleij
2013-04-23 14:33 ` [PATCH 7/8] pinctrl-tz1090-pdc: add TZ1090 PDC pinctrl driver James Hogan
     [not found] ` <1366727607-27444-1-git-send-email-james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2013-04-23 14:33   ` [PATCH 1/8] metag: of_platform_populate from arch generic code James Hogan
2013-04-23 14:33   ` [PATCH 8/8] gpio-tz1090pdc: add TZ1090 PDC gpio driver James Hogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366727607-27444-5-git-send-email-james.hogan@imgtec.com \
    --to=james.hogan@imgtec.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).