* [PATCH 0/4] [MXC] Armadillo500 patches to support various devices. @ 2009-10-15 17:13 Alberto Panizzo 2009-10-15 17:24 ` [PATCH 1/4] [MXC] Armadillo500 Add support for onboard GPIO Buttons Alberto Panizzo 0 siblings, 1 reply; 7+ messages in thread From: Alberto Panizzo @ 2009-10-15 17:13 UTC (permalink / raw) To: linux-arm-kernel In this series of patches I introduce support for: 1 GPIO Buttons with GPIO Keyboard. 2 Correct SMSC9118 Bus width flag to 16 bit instead of 32. 3 Add support for the second i2c device where is connected the onboard RTC module. 4 Add support for Seiko Instruments S-35390A RTC module. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] [MXC] Armadillo500 Add support for onboard GPIO Buttons. 2009-10-15 17:13 [PATCH 0/4] [MXC] Armadillo500 patches to support various devices Alberto Panizzo @ 2009-10-15 17:24 ` Alberto Panizzo 2009-10-15 17:29 ` [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip Alberto Panizzo 0 siblings, 1 reply; 7+ messages in thread From: Alberto Panizzo @ 2009-10-15 17:24 UTC (permalink / raw) To: linux-arm-kernel There are two low active Buttons on boards. This patch connect those to the Input Subsystem over gpio-keys driver. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> --- arch/arm/mach-mx3/armadillo5x0.c | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c index 776c0ee..309fa7a 100644 --- a/arch/arm/mach-mx3/armadillo5x0.c +++ b/arch/arm/mach-mx3/armadillo5x0.c @@ -33,6 +33,8 @@ #include <linux/irq.h> #include <linux/mtd/physmap.h> #include <linux/io.h> +#include <linux/input.h> +#include <linux/gpio_keys.h> #include <mach/hardware.h> #include <asm/mach-types.h> @@ -98,6 +100,36 @@ static int armadillo5x0_pins[] = { MX31_PIN_DRDY0__DRDY0, IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/ }; +/* GPIO BUTTONS */ +static struct gpio_keys_button armadillo5x0_buttons[] = { + { + .code = KEY_ENTER, /*28*/ + .gpio = IOMUX_TO_GPIO(MX31_PIN_SCLK0), + .active_low = 1, + .desc = "menu", + .wakeup = 1, + }, { + .code = KEY_BACK, /*158*/ + .gpio = IOMUX_TO_GPIO(MX31_PIN_SRST0), + .active_low = 1, + .desc = "back", + .wakeup = 1, + } +}; + +static struct gpio_keys_platform_data armadillo5x0_button_data = { + .buttons = armadillo5x0_buttons, + .nbuttons = ARRAY_SIZE(armadillo5x0_buttons), +}; + +static struct platform_device armadillo5x0_button_device = { + .name = "gpio-keys", + .id = -1, + .num_resources = 0, + .dev = { + .platform_data = &armadillo5x0_button_data, + } +}; /* * NAND Flash @@ -300,6 +332,7 @@ static struct imxuart_platform_data uart_pdata = { static struct platform_device *devices[] __initdata = { &armadillo5x0_smc911x_device, + &armadillo5x0_button_device, }; /* -- 1.5.4.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip. 2009-10-15 17:24 ` [PATCH 1/4] [MXC] Armadillo500 Add support for onboard GPIO Buttons Alberto Panizzo @ 2009-10-15 17:29 ` Alberto Panizzo 2009-10-15 17:31 ` [PATCH 3/4] [MXC] Armadillo500 Add i2c second bus support Alberto Panizzo 2009-10-19 14:27 ` [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip Sascha Hauer 0 siblings, 2 replies; 7+ messages in thread From: Alberto Panizzo @ 2009-10-15 17:29 UTC (permalink / raw) To: linux-arm-kernel Armadillo500 Correct bus length for SMSC9118 on board chip. The SMSC9118 network chip is connected to the data bus with a 16 bit interface, not 32 as early suggested. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> --- arch/arm/mach-mx3/armadillo5x0.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c index 309fa7a..bd4a0f9 100644 --- a/arch/arm/mach-mx3/armadillo5x0.c +++ b/arch/arm/mach-mx3/armadillo5x0.c @@ -310,7 +310,7 @@ static struct resource armadillo5x0_smc911x_resources[] = { }; static struct smsc911x_platform_config smsc911x_info = { - .flags = SMSC911X_USE_32BIT, + .flags = SMSC911X_USE_16BIT, .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, }; -- 1.5.4.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] [MXC] Armadillo500 Add i2c second bus support. 2009-10-15 17:29 ` [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip Alberto Panizzo @ 2009-10-15 17:31 ` Alberto Panizzo 2009-10-15 17:33 ` [PATCH 4/4] [MXC] Armadillo500 Add support for Seiko Instruments S-35390A rtc over i2c Alberto Panizzo 2009-10-19 14:27 ` [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip Sascha Hauer 1 sibling, 1 reply; 7+ messages in thread From: Alberto Panizzo @ 2009-10-15 17:31 UTC (permalink / raw) To: linux-arm-kernel [PATCH] Armadillo500 Add i2c second bus support. This add pin allocation an device registration for the second bus i2c. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> --- arch/arm/mach-mx3/armadillo5x0.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c index bd4a0f9..fa973e4 100644 --- a/arch/arm/mach-mx3/armadillo5x0.c +++ b/arch/arm/mach-mx3/armadillo5x0.c @@ -99,7 +99,11 @@ static int armadillo5x0_pins[] = { MX31_PIN_FPSHIFT__FPSHIFT, MX31_PIN_DRDY0__DRDY0, IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/ + /* I2C2 */ + MX31_PIN_CSPI2_MOSI__SCL, + MX31_PIN_CSPI2_MISO__SDA, }; + /* GPIO BUTTONS */ static struct gpio_keys_button armadillo5x0_buttons[] = { { @@ -332,6 +336,7 @@ static struct imxuart_platform_data uart_pdata = { static struct platform_device *devices[] __initdata = { &armadillo5x0_smc911x_device, + &mxc_i2c_device1, &armadillo5x0_button_device, }; -- 1.5.4.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] [MXC] Armadillo500 Add support for Seiko Instruments S-35390A rtc over i2c. 2009-10-15 17:31 ` [PATCH 3/4] [MXC] Armadillo500 Add i2c second bus support Alberto Panizzo @ 2009-10-15 17:33 ` Alberto Panizzo 0 siblings, 0 replies; 7+ messages in thread From: Alberto Panizzo @ 2009-10-15 17:33 UTC (permalink / raw) To: linux-arm-kernel [PATCH] Armadillo500 Add support for Seiko Instruments S-35390A rtc over i2c. The RTC chip Seiko Instruments S-35390A is connected to the Application Processor over the second bus i2c with the hard coded address 0x30. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> --- arch/arm/mach-mx3/armadillo5x0.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c index fa973e4..d10ee27 100644 --- a/arch/arm/mach-mx3/armadillo5x0.c +++ b/arch/arm/mach-mx3/armadillo5x0.c @@ -35,6 +35,7 @@ #include <linux/io.h> #include <linux/input.h> #include <linux/gpio_keys.h> +#include <linux/i2c.h> #include <mach/hardware.h> #include <asm/mach-types.h> @@ -104,6 +105,13 @@ static int armadillo5x0_pins[] = { MX31_PIN_CSPI2_MISO__SDA, }; +/* RTC over I2C*/ +#define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4) + +static struct i2c_board_info armadillo5x0_i2c_rtc = { + I2C_BOARD_INFO("s35390a", 0x30), +}; + /* GPIO BUTTONS */ static struct gpio_keys_button armadillo5x0_buttons[] = { { @@ -373,6 +381,18 @@ static void __init armadillo5x0_init(void) /* set NAND page size to 2k if not configured via boot mode pins */ __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR); + + /* RTC */ + /* Get RTC IRQ and register the chip */ + if (gpio_request(ARMADILLO5X0_RTC_GPIO, "rtc") == 0) { + if (gpio_direction_input(ARMADILLO5X0_RTC_GPIO) == 0) + armadillo5x0_i2c_rtc.irq = gpio_to_irq(ARMADILLO5X0_RTC_GPIO); + else + gpio_free(ARMADILLO5X0_RTC_GPIO); + } + if (armadillo5x0_i2c_rtc.irq == 0) + pr_warning("armadillo5x0_init: failed to get RTC IRQ\n"); + i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); } static void __init armadillo5x0_timer_init(void) -- 1.5.4.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip. 2009-10-15 17:29 ` [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip Alberto Panizzo 2009-10-15 17:31 ` [PATCH 3/4] [MXC] Armadillo500 Add i2c second bus support Alberto Panizzo @ 2009-10-19 14:27 ` Sascha Hauer 2009-10-21 21:40 ` Alberto Panizzo 1 sibling, 1 reply; 7+ messages in thread From: Sascha Hauer @ 2009-10-19 14:27 UTC (permalink / raw) To: linux-arm-kernel Hi Alberto, On Thu, Oct 15, 2009 at 07:29:05PM +0200, Alberto Panizzo wrote: > Armadillo500 Correct bus length for SMSC9118 on board chip. > > The SMSC9118 network chip is connected to the data bus with a 16 bit > interface, not 32 as early suggested. This one looks like it should go into 2.6.32, right? The other patches are ok. Please let me know what I should do with this one. Sascha > > Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> > --- > arch/arm/mach-mx3/armadillo5x0.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c > index 309fa7a..bd4a0f9 100644 > --- a/arch/arm/mach-mx3/armadillo5x0.c > +++ b/arch/arm/mach-mx3/armadillo5x0.c > @@ -310,7 +310,7 @@ static struct resource armadillo5x0_smc911x_resources[] = { > }; > > static struct smsc911x_platform_config smsc911x_info = { > - .flags = SMSC911X_USE_32BIT, > + .flags = SMSC911X_USE_16BIT, > .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, > .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, > }; > -- > 1.5.4.3 > > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip. 2009-10-19 14:27 ` [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip Sascha Hauer @ 2009-10-21 21:40 ` Alberto Panizzo 0 siblings, 0 replies; 7+ messages in thread From: Alberto Panizzo @ 2009-10-21 21:40 UTC (permalink / raw) To: linux-arm-kernel Il giorno Mon, 19 Oct 2009 16:27:57 +0200 Sascha Hauer <s.hauer@pengutronix.de> ha scritto: > Hi Alberto, > > On Thu, Oct 15, 2009 at 07:29:05PM +0200, Alberto Panizzo wrote: > > Armadillo500 Correct bus length for SMSC9118 on board chip. > > > > The SMSC9118 network chip is connected to the data bus with a 16 bit > > interface, not 32 as early suggested. > > This one looks like it should go into 2.6.32, right? > > The other patches are ok. Please let me know what I should do with this > one. > > Sascha If it is possible, yes thanks. Alberto. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-10-21 21:40 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-10-15 17:13 [PATCH 0/4] [MXC] Armadillo500 patches to support various devices Alberto Panizzo 2009-10-15 17:24 ` [PATCH 1/4] [MXC] Armadillo500 Add support for onboard GPIO Buttons Alberto Panizzo 2009-10-15 17:29 ` [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip Alberto Panizzo 2009-10-15 17:31 ` [PATCH 3/4] [MXC] Armadillo500 Add i2c second bus support Alberto Panizzo 2009-10-15 17:33 ` [PATCH 4/4] [MXC] Armadillo500 Add support for Seiko Instruments S-35390A rtc over i2c Alberto Panizzo 2009-10-19 14:27 ` [PATCH 2/4] [MXC] Armadillo500 Correct bus length for SMSC9118 on board chip Sascha Hauer 2009-10-21 21:40 ` Alberto Panizzo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox