* [PATCH] ARM: OMAP3: Make I2C bus 2 configurable for BeagleBoard
@ 2008-07-04 6:26 Dirk Behme
2008-07-04 6:55 ` Jarkko Nikula
0 siblings, 1 reply; 3+ messages in thread
From: Dirk Behme @ 2008-07-04 6:26 UTC (permalink / raw)
To: linux-omap
[-- Attachment #1: Type: text/plain, Size: 688 bytes --]
I2C2 at BeagleBoard is connected to expansion connector, i.e. unused
if nothing is connected to this connector. As internal OMAP3 pull up
resistors are not strong enough, enabled but unused I2C2 bus results
in error messages (e.g. I2C timeouts). I2C2 should be enabled only if
something is connected to I2C2 at board's expansion connector and this
extension has additional pull up resistors for I2C2 bus.
- Add configuration option for this
- Use configuration option in board-omap3beagle
- Ensure correct pin mux if I2C2 is enabled, independent of settings
done by bootloader
- While being there, add OMAP3 to OMAP I2C help text
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
[-- Attachment #2: beagle_i2c2_configuration_patch.txt --]
[-- Type: text/plain, Size: 3523 bytes --]
Subject: ARM: OMAP3: Make I2C bus 2 configurable for BeagleBoard
From: Dirk Behme <dirk.behme@gmail.com>
I2C2 at BeagleBoard is connected to expansion connector, i.e. unused if
nothing is connected to this connector. As internal OMAP3 pull up resistors
are not strong enough, enabled but unused I2C2 bus results in error messages
(e.g. I2C timeouts). I2C2 should be enabled only if something is connected to
I2C2 at board's expansion connector and this extension has additional pull up
resistors for I2C2 bus.
- Add configuration option for this
- Use configuration option in board-omap3beagle
- Ensure correct pin mux if I2C2 is enabled, independent of settings done
by bootloader.
- While being there, add OMAP3 to OMAP I2C help text
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
---
Index: linux-beagle/arch/arm/mach-omap2/board-omap3beagle.c
===================================================================
--- linux-beagle.orig/arch/arm/mach-omap2/board-omap3beagle.c
+++ linux-beagle/arch/arm/mach-omap2/board-omap3beagle.c
@@ -40,7 +40,9 @@ static struct omap_uart_config omap3_bea
static int __init omap3_beagle_i2c_init(void)
{
omap_register_i2c_bus(1, 2600, NULL, 0);
+#ifdef CONFIG_I2C2_OMAP_BEAGLE
omap_register_i2c_bus(2, 400, NULL, 0);
+#endif
omap_register_i2c_bus(3, 400, NULL, 0);
return 0;
}
Index: linux-beagle/arch/arm/mach-omap2/mux.c
===================================================================
--- linux-beagle.orig/arch/arm/mach-omap2/mux.c
+++ linux-beagle/arch/arm/mach-omap2/mux.c
@@ -231,10 +231,12 @@ MUX_CFG_34XX("K21_34XX_I2C1_SCL", 0x1ba,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("J21_34XX_I2C1_SDA", 0x1bc,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+#ifdef CONFIG_I2C2_OMAP_BEAGLE
MUX_CFG_34XX("AF15_34XX_I2C2_SCL", 0x1be,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AE15_34XX_I2C2_SDA", 0x1c0,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+#endif
MUX_CFG_34XX("AF14_34XX_I2C3_SCL", 0x1c2,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AG14_34XX_I2C3_SDA", 0x1c4,
Index: linux-beagle/drivers/i2c/busses/Kconfig
===================================================================
--- linux-beagle.orig/drivers/i2c/busses/Kconfig
+++ linux-beagle/drivers/i2c/busses/Kconfig
@@ -332,10 +332,27 @@ config I2C_OMAP
default y if MACH_OMAP_H3 || MACH_OMAP_OSK
help
If you say yes to this option, support will be included for the
- I2C interface on the Texas Instruments OMAP1/2 family of processors.
- Like OMAP1510/1610/1710/5912 and OMAP242x.
+ I2C interface on the Texas Instruments OMAP1/2/3 family of
+ processors.
+ Like OMAP1510/1610/1710/5912, OMAP242x, OMAP34x and OMAP35x.
For details see http://www.ti.com/omap.
+config I2C2_OMAP_BEAGLE
+ bool "Enable I2C2 for OMAP3 BeagleBoard"
+ depends on ARCH_OMAP && MACH_OMAP3_BEAGLE
+ select OMAP_MUX
+ default n
+ help
+ Say Y here if you want to enable I2C bus 2 at OMAP3 based
+ BeagleBoard.
+ I2C2 at BeagleBoard is connected to expansion connector, i.e. unused
+ if nothing is connected to this connector. As internal OMAP3 pull up
+ resistors are not strong enough, enabled but unused I2C2 bus results
+ in error messages (e.g. I2C timeouts). Enable this only if you have
+ something connected to I2C2 at board's expansion connector and this
+ extension has additional pull up resistors for I2C2 bus.
+
+
config I2C_PARPORT
tristate "Parallel port adapter"
depends on PARPORT
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: OMAP3: Make I2C bus 2 configurable for BeagleBoard
2008-07-04 6:26 [PATCH] ARM: OMAP3: Make I2C bus 2 configurable for BeagleBoard Dirk Behme
@ 2008-07-04 6:55 ` Jarkko Nikula
2008-07-04 7:10 ` Dirk Behme
0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Nikula @ 2008-07-04 6:55 UTC (permalink / raw)
To: ext Dirk Behme; +Cc: linux-omap
On Fri, 04 Jul 2008 08:26:55 +0200
"ext Dirk Behme" <dirk.behme@googlemail.com> wrote:
> - Add configuration option for this
> - Use configuration option in board-omap3beagle
> - Ensure correct pin mux if I2C2 is enabled, independent of settings
> done by bootloader
>
Why this CONFIG_I2C2_OMAP_BEAGLE in mux.c?
Jarkko
--- linux-beagle.orig/arch/arm/mach-omap2/mux.c
+++ linux-beagle/arch/arm/mach-omap2/mux.c
@@ -231,10 +231,12 @@ MUX_CFG_34XX("K21_34XX_I2C1_SCL", 0x1ba,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("J21_34XX_I2C1_SDA", 0x1bc,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+#ifdef CONFIG_I2C2_OMAP_BEAGLE
MUX_CFG_34XX("AF15_34XX_I2C2_SCL", 0x1be,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AE15_34XX_I2C2_SDA", 0x1c0,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+#endif
MUX_CFG_34XX("AF14_34XX_I2C3_SCL", 0x1c2,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AG14_34XX_I2C3_SDA", 0x1c4,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: OMAP3: Make I2C bus 2 configurable for BeagleBoard
2008-07-04 6:55 ` Jarkko Nikula
@ 2008-07-04 7:10 ` Dirk Behme
0 siblings, 0 replies; 3+ messages in thread
From: Dirk Behme @ 2008-07-04 7:10 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-omap
Jarkko Nikula wrote:
> On Fri, 04 Jul 2008 08:26:55 +0200
> "ext Dirk Behme" <dirk.behme@googlemail.com> wrote:
>
>
>>- Add configuration option for this
>>- Use configuration option in board-omap3beagle
>>- Ensure correct pin mux if I2C2 is enabled, independent of settings
>>done by bootloader
>>
>
> Why this CONFIG_I2C2_OMAP_BEAGLE in mux.c?
Because bootloader, e.g. uboot, might have set other mux for these
pins, e.g. GPIO168 and GPIO183.
Then, if CONFIG_MUX is enabled but I2C2 isn't, don't touch the pin mux
done by bootloader. But if I2C2 is enabled, make sure that the correct
mux settings are done independent of bootloader.
Do you think this is wrong?
Thanks
Dirk
> --- linux-beagle.orig/arch/arm/mach-omap2/mux.c
> +++ linux-beagle/arch/arm/mach-omap2/mux.c
> @@ -231,10 +231,12 @@ MUX_CFG_34XX("K21_34XX_I2C1_SCL", 0x1ba,
> OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
> MUX_CFG_34XX("J21_34XX_I2C1_SDA", 0x1bc,
> OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
> +#ifdef CONFIG_I2C2_OMAP_BEAGLE
> MUX_CFG_34XX("AF15_34XX_I2C2_SCL", 0x1be,
> OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
> MUX_CFG_34XX("AE15_34XX_I2C2_SDA", 0x1c0,
> OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
> +#endif
> MUX_CFG_34XX("AF14_34XX_I2C3_SCL", 0x1c2,
> OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
> MUX_CFG_34XX("AG14_34XX_I2C3_SDA", 0x1c4,
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-04 7:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-04 6:26 [PATCH] ARM: OMAP3: Make I2C bus 2 configurable for BeagleBoard Dirk Behme
2008-07-04 6:55 ` Jarkko Nikula
2008-07-04 7:10 ` Dirk Behme
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox