* [PATCH 0/3] omap: n8x0: Audio update to N810
@ 2010-08-09 7:58 Jarkko Nikula
2010-08-09 7:58 ` [PATCH 1/3] omap: n8x0: Cleanup i2c1 and menelaus registration Jarkko Nikula
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Jarkko Nikula @ 2010-08-09 7:58 UTC (permalink / raw)
To: linux-omap; +Cc: Tony Lindgren
Hi
With this set and a fix [1] it is possible to get ALSA SoC on N810 working.
This set is generated against mainline commit e320cea but applies also to
linux-omap (board-n8x0.c has cbus patches in linux-omap).
--
Jarkko
1. http://marc.info/?l=linux-omap&m=128109830113485&w=2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] omap: n8x0: Cleanup i2c1 and menelaus registration
2010-08-09 7:58 [PATCH 0/3] omap: n8x0: Audio update to N810 Jarkko Nikula
@ 2010-08-09 7:58 ` Jarkko Nikula
2010-08-09 7:58 ` [PATCH 2/3] omap: n8x0: Register i2c2 and add board info with tlv320aic3x for N810 Jarkko Nikula
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Jarkko Nikula @ 2010-08-09 7:58 UTC (permalink / raw)
To: linux-omap; +Cc: Tony Lindgren, Jarkko Nikula
- Move n8x0_i2c_board_info_1 out from #ifdef CONFIG_MENELAUS block,
register i2c1 in n8x0_init_machine and do a few clean-ups around these.
Code looks better if board infos are grouped together
- Mark n8x0_i2c_board_info_1 and n8x0_menelaus_platform_data with __initdata
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
---
arch/arm/mach-omap2/board-n8x0.c | 34 +++++++++++++++-------------------
1 files changed, 15 insertions(+), 19 deletions(-)
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index a3e2b49..313ce5e 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -614,30 +614,25 @@ static int n8x0_menelaus_late_init(struct device *dev)
return 0;
}
-static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] = {
+#else
+static int n8x0_menelaus_late_init(struct device *dev)
+{
+ return 0;
+}
+#endif
+
+static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = {
+ .late_init = n8x0_menelaus_late_init,
+};
+
+static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = {
{
I2C_BOARD_INFO("menelaus", 0x72),
.irq = INT_24XX_SYS_NIRQ,
+ .platform_data = &n8x0_menelaus_platform_data,
},
};
-static struct menelaus_platform_data n8x0_menelaus_platform_data = {
- .late_init = n8x0_menelaus_late_init,
-};
-
-static void __init n8x0_menelaus_init(void)
-{
- n8x0_i2c_board_info_1[0].platform_data = &n8x0_menelaus_platform_data;
- omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1,
- ARRAY_SIZE(n8x0_i2c_board_info_1));
-}
-
-#else
-static inline void __init n8x0_menelaus_init(void)
-{
-}
-#endif
-
static void __init n8x0_map_io(void)
{
omap2_set_globals_242x();
@@ -665,9 +660,10 @@ static void __init n8x0_init_machine(void)
/* FIXME: add n810 spi devices */
spi_register_board_info(n800_spi_board_info,
ARRAY_SIZE(n800_spi_board_info));
+ omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1,
+ ARRAY_SIZE(n8x0_i2c_board_info_1));
omap_serial_init();
- n8x0_menelaus_init();
n8x0_onenand_init();
n8x0_mmc_init();
n8x0_usb_init();
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] omap: n8x0: Register i2c2 and add board info with tlv320aic3x for N810
2010-08-09 7:58 [PATCH 0/3] omap: n8x0: Audio update to N810 Jarkko Nikula
2010-08-09 7:58 ` [PATCH 1/3] omap: n8x0: Cleanup i2c1 and menelaus registration Jarkko Nikula
@ 2010-08-09 7:58 ` Jarkko Nikula
2010-08-09 7:59 ` [PATCH 3/3] omap: n8x0: Mux i2s codec port pins for McBSP block Jarkko Nikula
2010-08-10 12:07 ` [PATCH 0/3] omap: n8x0: Audio update to N810 Tony Lindgren
3 siblings, 0 replies; 6+ messages in thread
From: Jarkko Nikula @ 2010-08-09 7:58 UTC (permalink / raw)
To: linux-omap; +Cc: Tony Lindgren, Jarkko Nikula
Second i2c bus on Nokia N800 and N810 shares both common and hw specific
peripherals. Register now this bus and add board info with tlv320aic3x for
N810. Common peripherals may be added as an additional board info to
omap_register_i2c_bus(2, ...);
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
---
With this patch it is possible to probe tlv320aic3x audio codec and get the
ASoC subsystem registered on Nokia N810.
---
arch/arm/mach-omap2/board-n8x0.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 313ce5e..7863633 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -20,6 +20,7 @@
#include <linux/i2c.h>
#include <linux/spi/spi.h>
#include <linux/usb/musb.h>
+#include <sound/tlv320aic3x.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -633,6 +634,17 @@ static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = {
},
};
+static struct aic3x_pdata n810_aic33_data __initdata = {
+ .gpio_reset = 118,
+};
+
+static struct i2c_board_info n810_i2c_board_info_2[] __initdata = {
+ {
+ I2C_BOARD_INFO("tlv320aic3x", 0x18),
+ .platform_data = &n810_aic33_data,
+ },
+};
+
static void __init n8x0_map_io(void)
{
omap2_set_globals_242x();
@@ -662,6 +674,10 @@ static void __init n8x0_init_machine(void)
ARRAY_SIZE(n800_spi_board_info));
omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1,
ARRAY_SIZE(n8x0_i2c_board_info_1));
+ omap_register_i2c_bus(2, 400, NULL, 0);
+ if (machine_is_nokia_n810())
+ i2c_register_board_info(2, n810_i2c_board_info_2,
+ ARRAY_SIZE(n810_i2c_board_info_2));
omap_serial_init();
n8x0_onenand_init();
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] omap: n8x0: Mux i2s codec port pins for McBSP block
2010-08-09 7:58 [PATCH 0/3] omap: n8x0: Audio update to N810 Jarkko Nikula
2010-08-09 7:58 ` [PATCH 1/3] omap: n8x0: Cleanup i2c1 and menelaus registration Jarkko Nikula
2010-08-09 7:58 ` [PATCH 2/3] omap: n8x0: Register i2c2 and add board info with tlv320aic3x for N810 Jarkko Nikula
@ 2010-08-09 7:59 ` Jarkko Nikula
2010-08-10 12:07 ` [PATCH 0/3] omap: n8x0: Audio update to N810 Tony Lindgren
3 siblings, 0 replies; 6+ messages in thread
From: Jarkko Nikula @ 2010-08-09 7:59 UTC (permalink / raw)
To: linux-omap; +Cc: Tony Lindgren, Jarkko Nikula
Bootloader on Nokia N800 and N810 muxes I2C codec port pins for EAC block.
As there is no driver and use for EAC, mux those pins for McBSP instead
since N810 ASoC drivers can use it.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
---
With this patch it is possible to use audio on Nokia N810 by enabling the
CONFIG_SND_OMAP_SOC_N810=y
---
arch/arm/mach-omap2/board-n8x0.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 7863633..8fd2269 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -660,6 +660,11 @@ static void __init n8x0_init_irq(void)
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
+ /* I2S codec port pins for McBSP block */
+ OMAP2420_MUX(EAC_AC_SCLK, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
+ OMAP2420_MUX(EAC_AC_FS, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
+ OMAP2420_MUX(EAC_AC_DIN, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
+ OMAP2420_MUX(EAC_AC_DOUT, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] omap: n8x0: Audio update to N810
2010-08-09 7:58 [PATCH 0/3] omap: n8x0: Audio update to N810 Jarkko Nikula
` (2 preceding siblings ...)
2010-08-09 7:59 ` [PATCH 3/3] omap: n8x0: Mux i2s codec port pins for McBSP block Jarkko Nikula
@ 2010-08-10 12:07 ` Tony Lindgren
2010-08-10 12:43 ` Jarkko Nikula
3 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2010-08-10 12:07 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-omap
* Jarkko Nikula <jhnikula@gmail.com> [100809 10:50]:
> Hi
>
> With this set and a fix [1] it is possible to get ALSA SoC on N810 working.
>
> This set is generated against mainline commit e320cea but applies also to
> linux-omap (board-n8x0.c has cbus patches in linux-omap).
I've added these into omap for-next for 2.6.37. Let me know if these should
go in along with other ASoC patches.
Regards,
Tony
> 1. http://marc.info/?l=linux-omap&m=128109830113485&w=2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] omap: n8x0: Audio update to N810
2010-08-10 12:07 ` [PATCH 0/3] omap: n8x0: Audio update to N810 Tony Lindgren
@ 2010-08-10 12:43 ` Jarkko Nikula
0 siblings, 0 replies; 6+ messages in thread
From: Jarkko Nikula @ 2010-08-10 12:43 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap
On Tue, 10 Aug 2010 15:07:34 +0300
Tony Lindgren <tony@atomide.com> wrote:
> > With this set and a fix [1] it is possible to get ALSA SoC on N810 working.
> >
> > This set is generated against mainline commit e320cea but applies also to
> > linux-omap (board-n8x0.c has cbus patches in linux-omap).
>
> I've added these into omap for-next for 2.6.37. Let me know if these should
> go in along with other ASoC patches.
>
Ok, good. This is independent set so no need for any special
procedure :-)
--
Jarkko
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-08-10 12:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09 7:58 [PATCH 0/3] omap: n8x0: Audio update to N810 Jarkko Nikula
2010-08-09 7:58 ` [PATCH 1/3] omap: n8x0: Cleanup i2c1 and menelaus registration Jarkko Nikula
2010-08-09 7:58 ` [PATCH 2/3] omap: n8x0: Register i2c2 and add board info with tlv320aic3x for N810 Jarkko Nikula
2010-08-09 7:59 ` [PATCH 3/3] omap: n8x0: Mux i2s codec port pins for McBSP block Jarkko Nikula
2010-08-10 12:07 ` [PATCH 0/3] omap: n8x0: Audio update to N810 Tony Lindgren
2010-08-10 12:43 ` Jarkko Nikula
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).